Merge branch 'docs-kittens' of https://github.com/page-down/kitty
This commit is contained in:
commit
a4fff7abe3
@ -32,7 +32,7 @@ Glossary
|
||||
top of an existing kitty window, entirely covering it. Overlays are used
|
||||
throught kitty, for example, to display the :ref:`the scrollback buffer <scrollback>`,
|
||||
to display :doc:`hints </kittens/hints>`, for :doc:`unicode input
|
||||
</kittens/unicode-input>` etc.
|
||||
</kittens/unicode_input>` etc.
|
||||
|
||||
hyperlinks
|
||||
Terminals can have hyperlinks, just like the internet. In kitty you can
|
||||
|
||||
@ -7,15 +7,15 @@ Extend with kittens
|
||||
:hidden:
|
||||
:glob:
|
||||
|
||||
kittens/custom
|
||||
kittens/icat
|
||||
kittens/diff
|
||||
kittens/unicode-input
|
||||
kittens/unicode_input
|
||||
kittens/themes
|
||||
kittens/hints
|
||||
kittens/remote_file
|
||||
kittens/hyperlinked_grep
|
||||
kittens/transfer
|
||||
kittens/custom
|
||||
kittens/*
|
||||
|
||||
|kitty| has a framework for easily creating terminal programs that make use of
|
||||
@ -32,7 +32,7 @@ Some prominent kittens:
|
||||
images
|
||||
|
||||
|
||||
:doc:`Unicode Input <kittens/unicode-input>`
|
||||
:doc:`Unicode Input <kittens/unicode_input>`
|
||||
Easily input arbitrary unicode characters in |kitty| by name or hex code.
|
||||
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ Extending kitty
|
||||
kitty has a powerful framework for scripting. You can create small terminal
|
||||
programs called :doc:`kittens <kittens_intro>`. These can used to add features
|
||||
to kitty, for example, :doc:`editing remote files <kittens/remote_file>` or
|
||||
:doc:`inputting unicode characters <kittens/unicode-input>`. They can also be
|
||||
:doc:`inputting unicode characters <kittens/unicode_input>`. They can also be
|
||||
used to create programs that leverage kitty's powerful features, for example,
|
||||
:doc:`viewing images <kittens/icat>` or :doc:`diffing files with images
|
||||
<kittens/diff>`.
|
||||
|
||||
@ -7,7 +7,7 @@ end kitty has many foundational features, such as: :doc:`image support
|
||||
:doc:`various enhancements to the terminal protocol <protocol-extensions>`,
|
||||
etc. These features allow the development of rich terminal applications, such
|
||||
as :doc:`Side-by-side diff <kittens/diff>` and :doc:`Unicode input
|
||||
<kittens/unicode-input>`.
|
||||
<kittens/unicode_input>`.
|
||||
|
||||
If you wish to support this mission and see the terminal ecosystem evolve,
|
||||
consider donating so that I can devote more time to |kitty| development.
|
||||
|
||||
@ -86,7 +86,7 @@ def as_rst() -> str:
|
||||
|
||||
def kitten_link(text: str) -> str:
|
||||
x = text.split()
|
||||
return f':doc:`kittens/{x[2]}`'.replace('_', '-') if len(x) > 2 else ''
|
||||
return f':doc:`kittens/{x[2]}`' if len(x) > 2 else ''
|
||||
|
||||
for group in sorted(allg, key=key):
|
||||
title = group_title(group)
|
||||
|
||||
@ -1407,7 +1407,7 @@ class Boss:
|
||||
if data is not None:
|
||||
end_kitten(data, target_window_id, self)
|
||||
|
||||
@ac('misc', 'Input an arbitrary unicode character. See :doc:`/kittens/unicode-input` for details.')
|
||||
@ac('misc', 'Input an arbitrary unicode character. See :doc:`/kittens/unicode_input` for details.')
|
||||
def input_unicode_character(self) -> None:
|
||||
self._run_kitten('unicode_input')
|
||||
|
||||
|
||||
22
publish.py
22
publish.py
@ -80,14 +80,7 @@ def run_html(args: Any) -> None:
|
||||
add_old_redirects('docs/_build/dirhtml')
|
||||
|
||||
|
||||
def add_old_redirects(loc: str) -> None:
|
||||
for dirpath, dirnames, filenames in os.walk(loc):
|
||||
if dirpath != loc:
|
||||
for fname in filenames:
|
||||
if fname == 'index.html':
|
||||
bname = os.path.basename(dirpath)
|
||||
base = os.path.dirname(dirpath)
|
||||
link_name = os.path.join(base, f'{bname}.html') if base else f'{bname}.html'
|
||||
def generate_redirect_html(link_name: str, bname: str) -> None:
|
||||
with open(link_name, 'w') as f:
|
||||
f.write(f'''
|
||||
<html>
|
||||
@ -108,6 +101,19 @@ window.location.replace('./{bname}/' + window.location.hash);
|
||||
''')
|
||||
|
||||
|
||||
def add_old_redirects(loc: str) -> None:
|
||||
for dirpath, dirnames, filenames in os.walk(loc):
|
||||
if dirpath != loc:
|
||||
for fname in filenames:
|
||||
if fname == 'index.html':
|
||||
bname = os.path.basename(dirpath)
|
||||
base = os.path.dirname(dirpath)
|
||||
link_name = os.path.join(base, f'{bname}.html') if base else f'{bname}.html'
|
||||
generate_redirect_html(link_name, bname)
|
||||
|
||||
generate_redirect_html(os.path.join(loc, 'kittens', 'unicode-input.html'), 'unicode_input')
|
||||
|
||||
|
||||
def run_docs(args: Any) -> None:
|
||||
subprocess.check_call(['make', 'docs'])
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user