Skip to content

Commit

Permalink
Update docstring for with improved examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
hreikin committed Apr 5, 2022
1 parent f68098c commit b609ac8
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions gen_pygments_css/gen_pygments_css.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,32 @@ def gen_pygments_css(css_dir="css/", styles_list=list(get_all_styles()), css_sel
<https://pygments.org/docs/formatters/?highlight=get_style_defs#HtmlFormatter>
Example Usage:
from gen_pygments_css.gen_pygments_css import gen_pygments_css
# Called with no arguments.
gen_pygments_css()
# Called with a string passed into the styles_list.
gen_pygments_css(styles_list="monokai")
# Called with a list of strings passed into the styles_list.
gen_pygments_css(styles_list=["monokai", "stata-dark"])
# Call with a CSS selector defined.
gen_pygments_css(css_selector=".highlight")
# Call with a custom css_dir, can be relative or absolute.
# Call with a multiple arguments defined.
gen_pygments_css(css_selector=".highlight", styles_list=["monokai", "stata-dark"])
# Call with a relative custom css_dir.
gen_pygments_css(css_dir="assets/styles/")
# Call with an absolute custome css_dir.
gen_pygments_css(css_dir="/home/user/project/assets/styles/")
# Create a list of strings containing the paths of all stylesheets.
# Call the function and create a list of strings containing the paths of all
# stylesheets.
my_list = gen_pygments_css()
Args:
Expand Down

0 comments on commit b609ac8

Please sign in to comment.