Package: bt-cheater
Table of Contentsgenerated withDocTocIntroductionConfiguration fileUsageUsage examplesTipsHow do I get started?InstallationUsing PipIntroductionbt-cheateris a general-purpose cheatsheet tool powered by python.The tool provides a way search through snippets of text stored in plain-text files using keywords, and all from the commandline.The search logic relies on a simple structure for the text: a cheatheaderandbody, e.g.# python ternary assignments # ternary # variables
    This is a note on python ternary variable assignments
# bash loops # loops
    This is text on bash loop structures
# civil # war # us
    Dates: Apr 12, 1861 - May 9, 1865As illustrated above, the header is comprised ofCheat Terms, which are keywords delimited by octothorpes (#).The whitespace padding is optional and improves readability.Configuration filecheatercan read yaml config files formatted as:search:
  paths:
    - ~/Documents/notes
    - ${HOME}/Documents/more_notes
    - ~/notes
  filters:
    - md
    - txtThese are the settings recognized by the tool:KeyValuepathsList of cheat file paths to search againstfiltersList of file extensions to search forIf no config file is specified, the tool will attempt to read one from the following locations, in order of precedence:/etc/bt-cheater/config.yaml./config.yaml~/.bt-cheater/config.yamlUsageUsage: cheater find [OPTIONS] TOPICS...

  Find cheat notes according to keywords

Options:
  --version                     Show the version and exit.
  -e, --explode-topics          Write results to their own cheat files
  -c, --cheatfile TEXT          Manually specify cheat file(s) to search
                                against
  -p, --cheatfile-path TEXT     Manually specify cheat file paths to search
                                against
  -a, --any                     Any search term can occur in the topic header
                                (default is "all")
  -b, --search-body             Search against cheat note content instead of
                                topic headers
  --no-pause                    Do not pause between topic output
  --help                        Show this message and exit.

  Examples:
  bt-cheater find -c ~/Documents/cheats.md foo bar baz
  bt-cheater find -c ~/Documents/cheats.md foo bar baz
  bt-cheater -C my_special_config.yaml find -c ~/Documents/cheats.md foo bar baz

  If no config file is specified, the tool will attempt to read one from the
  following locations, in order of precedence:

  - /etc/bt-cheater/config.yaml 
  - ./config.yaml 
  - ~/.bt-cheater/config.yamlUsage examplesGiven: Your config file is configured to search through '~/Documents/notes'
for cheat files, that is, your configuration file is ~/.bt-cheater/config.yaml, with contents:search:paths:-${HOME}/Documents/notesfilters:-md-txtYou want to find topic headers containing the wordsfoobarandbazbt-cheater find foo bar bazYou want to search a specific cheat file,~/Documents/cheats.md, for topic headers containing the wordsfoobarandbazbt-cheater find -c ~/Documents/cheats.md foo bar bazSame as above, but you also want to specify your own configuration filemy_special_config.yamlbt-cheater -C my_special_config.yaml find -c ~/Documents/cheats.md foo bar bazNote:Because you explicitly specified the cheat file, any cheat paths defined in your config will be skippedTipsAs bodies of text may overlap in their keyword designation, specifying multiple terms
can help narrow down search results if you specify a search condition.As such, the default search logic isall, where all search terms must occur in the topic header (logically equivalent to AND).If you want to broaden your search criteria, use the-a/--anyflag, instructingbt-cheaterto consideranysearch term present in the topic header (logically equivalent to OR).How do I get started?InstallationUsing PipForm pypi.orgpip install bt-cheaterDirectly from the repopip install git+https://github.com/berttejeda/bert.cheater.gitOr clone this repo, switch to the project rootcd bert.cheater, andpip install -e .,
then callingpython bertdotcheater/cli.py --help