Document the additions to the clipboard kitten

This commit is contained in:
Kovid Goyal
2022-12-04 11:37:02 +05:30
parent b644a42a48
commit fe53555dba
6 changed files with 122 additions and 31 deletions

View File

@@ -255,6 +255,8 @@ if you specify a program-to-run you can use the special placeholder
p('.. program::', 'kitty @', func.name)
p('\n\n' + as_rst(*cli_params_for(func)))
from kittens.runner import get_kitten_cli_docs
from kitty.fast_data_types import wrapped_kitten_names
for kitten in all_kitten_names:
data = get_kitten_cli_docs(kitten)
if data:
@@ -263,7 +265,11 @@ if you specify a program-to-run you can use the special placeholder
p('.. program::', 'kitty +kitten', kitten)
p('\nSource code for', kitten)
p('-' * 72)
p(f'\nThe source code for this kitten is `available on GitHub <https://github.com/kovidgoyal/kitty/tree/master/kittens/{kitten}>`_.')
if kitten in wrapped_kitten_names():
scurl = f'https://github.com/kovidgoyal/kitty/tree/master/tools/cmd/{kitten}'
else:
scurl = f'https://github.com/kovidgoyal/kitty/tree/master/kittens/{kitten}'
p(f'\nThe source code for this kitten is `available on GitHub <{scurl}>`_.')
p('\nCommand Line Interface')
p('-' * 72)
p('\n\n' + option_spec_as_rst(