Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/chubin/cheat.sh
/ functions
Functions
281 in github.com/chubin/cheat.sh
⨍
Functions
281
◇
Types & classes
83
↳
Endpoints
4
↓ 1 callers
Function
all_adapters
Return list of all known adapters If `as_dict` is True, return dict {'name': adapter} instead of a list.
lib/adapter/adapter.py:327
↓ 1 callers
Method
apply_mask
(self)
lib/panela/panela_colors.py:662
↓ 1 callers
Function
beautify
Process input `text` according to the specified `mode`. Adds comments if needed, according to the `lang` rules. Caches the results. T
lib/fmt/comments.py:295
↓ 1 callers
Function
cheat_wrapper
Function that delivers cheat sheet for `query`. If `html` is True, the answer is formatted as HTML. Additional request options specified
lib/cheat_wrapper.py:36
↓ 1 callers
Method
check_ip
Check if `ip_address` is allowed, and if not raise an RuntimeError exception. Return True otherwise
lib/limits.py:75
↓ 1 callers
Function
colorize_internal
Colorize `text`, use `palette`
lib/fmt/internal.py:45
↓ 1 callers
Method
crop
Crop panela. Remove <left>, <right> columns from left or right, and <top> and <bottom> rows from top and bottom.
lib/panela/panela_colors.py:179
↓ 1 callers
Method
current_state_command
Get current state of repository (current revision). This is used to find what cache entries should be invalidated.
lib/adapter/adapter.py:256
↓ 1 callers
Function
error
Log error `text` and produce a RuntimeError exception
lib/globals.py:23
↓ 1 callers
Method
extend
Adds [cols] columns from the right and [rows] rows from the bottom
lib/panela/panela_colors.py:164
↓ 1 callers
Function
fetch_all
Fetch all known repositories mentioned in the adapters
lib/fetch.py:47
↓ 1 callers
Method
fetch_command
Initial fetch of the repository. Return cmdline that has to be executed to fetch the repository. Skipping if `self._repositor
lib/adapter/adapter.py:219
↓ 1 callers
Function
find_answers_by_keyword
Search in the whole tree of all cheatsheets or in its subtree `directory` by `keyword`
lib/search.py:88
↓ 1 callers
Function
get_answer_language
Return preferred answer language based on domain name, query arguments and headers
bin/app.py:165
↓ 1 callers
Method
get_list
Return available pages for `prefix`
lib/adapter/adapter.py:71
↓ 1 callers
Method
get_list
(prefix=None)
lib/adapter/internal.py:70
↓ 1 callers
Method
get_page
Return specified cheat sheet `name` for the language. If `partial`, cheat sheet name may be shortened
lib/adapter/learnxiny.py:189
↓ 1 callers
Method
get_page_dict
Return page dict for `topic`
lib/adapter/adapter.py:131
↓ 1 callers
Function
get_request_ip
Extract IP address from `request`
bin/app.py:144
↓ 1 callers
Method
get_state
Return the saved `state` of the repository. If state cannot be read, return None
lib/adapter/git_adapter.py:146
↓ 1 callers
Method
get_updates_list
If a .md file was updated, invalidate cache entry with the name of this file
lib/adapter/tldr.py:96
↓ 1 callers
Method
get_updates_list_command
Return the command to get the list of updates since the last update whose id is saved as the repository state (`cached_state`).
lib/adapter/adapter.py:300
↓ 1 callers
Method
handle_if_random_request
Check if the `query` is a :random one, if yes we check its correctness and then randomly select a topic, based on the provide
lib/routing.py:121
↓ 1 callers
Method
in_field
(self, col, row)
lib/panela/panela_colors.py:104
↓ 1 callers
Method
is_cache_needed
Return True if answers should be cached. Return False if answers should not be cached.
lib/adapter/adapter.py:89
↓ 1 callers
Method
is_found
(self, topic)
lib/adapter/latenz.py:34
↓ 1 callers
Function
is_result_a_script
(query)
bin/app.py:103
↓ 1 callers
Method
is_valid
Check whether topic `name` is valid.
lib/adapter/learnxiny.py:171
↓ 1 callers
Function
last_query
Return the last query for the client `client_id`
lib/stateful_queries.py:15
↓ 1 callers
Function
log
Log error `text` (if it does not start with 'Too many queries')
lib/globals.py:33
↓ 1 callers
Function
log_query
Log processed query and some internal data
bin/app.py:135
↓ 1 callers
Function
main
standalone wrapper for cheat_wrapper()
lib/standalone.py:64
↓ 1 callers
Function
main
function for the initial repositories fetch and manual repositories updates
lib/fetch.py:233
↓ 1 callers
Function
main
Only for experiments
lib/panela/panela_colors.py:686
↓ 1 callers
Function
match
Search for each keyword from `keywords` in `page` and if all of them are found, return `True`. Otherwise return `False`. Several keywords
lib/search.py:51
↓ 1 callers
Function
parse_args
Parse arguments and options. Replace short options with their long counterparts.
lib/options.py:6
↓ 1 callers
Function
parse_cmdline
Parses command line arguments and returns query and request_options
lib/standalone.py:41
↓ 1 callers
Function
process_post_request
Process POST request `req`.
lib/post.py:31
↓ 1 callers
Method
read_ansi
Read ANSI sequence and render it to the panela starting from x and y. If transparence is True, replace spaces with ""
lib/panela/panela_colors.py:558
↓ 1 callers
Function
removeInvalidEntries
()
share/scripts/cacheCleanup.go:16
↓ 1 callers
Function
remove_ansi
Remove ANSI sequences from `sometext` and convert it into plaintext.
lib/frontend/ansi.py:57
↓ 1 callers
Function
save_query
Save the last query `query` for the client `client_id`
lib/stateful_queries.py:8
↓ 1 callers
Method
save_state
Save state `state` of the repository. Must be called after the cache clean up.
lib/adapter/adapter.py:276
↓ 1 callers
Method
show
(self)
lib/panela/panela_colors.py:678
↓ 1 callers
Function
show_usage
Show how to use the program in the standalone mode
lib/standalone.py:23
↓ 1 callers
Function
update_all
Update all known repositories, mentioned in the adapters and fetched locally. If repository is not fetched, it is skipped.
lib/fetch.py:190
↓ 1 callers
Function
update_by_name
Find adapter by its `name` and update only it.
lib/fetch.py:207
↓ 1 callers
Method
update_command
Update of the repository. Return cmdline that has to be executed to update the repository inside `local_repository_location()
lib/adapter/adapter.py:235
Method
__get_topic_type
(topic: str)
lib/routing.py:92
Method
__init__
(self, *args, **kwargs)
lib/config.py:168
Method
__init__
(self)
lib/limits.py:42
Method
__init__
(self)
lib/routing.py:34
Method
__init__
(self, char=None, foreground=None, background=None)
lib/panela/panela_colors.py:44
Method
__init__
(self, x=80, y=25, panela=None, field=None)
lib/panela/panela_colors.py:86
Method
__init__
(self)
lib/panela/panela_colors.py:613
Method
__init__
(self)
lib/adapter/adapter.py:57
Method
__init__
(self, get_topic_type=None, get_topics_list=None)
lib/adapter/internal.py:54
Method
__init__
(self)
lib/adapter/learnxiny.py:28
Method
__init__
(self)
lib/adapter/learnxiny.py:80
Method
__init__
(self)
lib/adapter/rosetta.py:31
Method
__repr__
(cls)
lib/adapter/adapter.py:21
Method
__select_random_topic
(prefix, topic_list)
lib/routing.py:129
Method
__setitem__
(self, key, val)
lib/config.py:172
Method
__str__
(self)
lib/panela/panela_colors.py:578
Method
_class_repr
(cls)
lib/adapter/adapter.py:54
Function
_colorize_curlies_block
(text)
lib/fmt/internal.py:65
Function
_colorize_headers
(text)
lib/fmt/internal.py:83
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:289
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:335
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:430
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:468
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:497
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:564
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:593
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:628
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:672
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:725
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:769
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:803
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:844
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:868
Method
_cut_block
(block, start_block=False)
lib/adapter/learnxiny.py:926
Method
_format_page
Preformatting page hook. Converts `text` (as in the initial repository) to text (as to be displayed).
lib/adapter/adapter.py:97
Method
_get_command
(self, topic, request_options=None)
lib/adapter/cmd.py:103
Method
_get_command
(self, topic, request_options=None)
lib/adapter/cmd.py:139
Method
_get_command
(self, topic, request_options=None)
lib/adapter/cmd.py:173
Method
_get_filetype
(topic)
lib/adapter/cmd.py:133
Method
_get_list
(self, prefix=None)
lib/adapter/upstream.py:74
Method
_get_list
(self, prefix=None)
lib/adapter/cmd.py:114
Method
_get_list
Return list of all learnxiny topics
lib/adapter/learnxiny.py:42
Method
_get_list
(self, prefix=None)
lib/adapter/latenz.py:31
Method
_get_list
Return all files on the first and the second level, excluding directories and hidden files
lib/adapter/cheat_sheets.py:52
Method
_get_list
(self, prefix=None)
lib/adapter/cheat_sheets.py:105
Method
_get_list
List of files in the cheat sheets directory with the extension removed
lib/adapter/git_adapter.py:21
Method
_get_list
(self, prefix=None)
lib/adapter/rosetta.py:144
Method
_get_page
(self, topic, request_options=None)
lib/adapter/upstream.py:55
Method
_get_page
(self, topic, request_options=None)
lib/adapter/internal.py:90
Method
_get_page
(self, topic, request_options=None)
lib/adapter/internal.py:125
Method
_get_page
(self, topic, request_options=None)
lib/adapter/cmd.py:33
Method
_get_page
(self, topic, request_options=None)
lib/adapter/cmd.py:78
← previous
next →
101–200 of 281, ranked by callers