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
|
top of an existing kitty window, entirely covering it. Overlays are used
|
||||||
throught kitty, for example, to display the :ref:`the scrollback buffer <scrollback>`,
|
throught kitty, for example, to display the :ref:`the scrollback buffer <scrollback>`,
|
||||||
to display :doc:`hints </kittens/hints>`, for :doc:`unicode input
|
to display :doc:`hints </kittens/hints>`, for :doc:`unicode input
|
||||||
</kittens/unicode-input>` etc.
|
</kittens/unicode_input>` etc.
|
||||||
|
|
||||||
hyperlinks
|
hyperlinks
|
||||||
Terminals can have hyperlinks, just like the internet. In kitty you can
|
Terminals can have hyperlinks, just like the internet. In kitty you can
|
||||||
|
|||||||
@ -7,15 +7,15 @@ Extend with kittens
|
|||||||
:hidden:
|
:hidden:
|
||||||
:glob:
|
:glob:
|
||||||
|
|
||||||
|
kittens/custom
|
||||||
kittens/icat
|
kittens/icat
|
||||||
kittens/diff
|
kittens/diff
|
||||||
kittens/unicode-input
|
kittens/unicode_input
|
||||||
kittens/themes
|
kittens/themes
|
||||||
kittens/hints
|
kittens/hints
|
||||||
kittens/remote_file
|
kittens/remote_file
|
||||||
kittens/hyperlinked_grep
|
kittens/hyperlinked_grep
|
||||||
kittens/transfer
|
kittens/transfer
|
||||||
kittens/custom
|
|
||||||
kittens/*
|
kittens/*
|
||||||
|
|
||||||
|kitty| has a framework for easily creating terminal programs that make use of
|
|kitty| has a framework for easily creating terminal programs that make use of
|
||||||
@ -32,7 +32,7 @@ Some prominent kittens:
|
|||||||
images
|
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.
|
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
|
kitty has a powerful framework for scripting. You can create small terminal
|
||||||
programs called :doc:`kittens <kittens_intro>`. These can used to add features
|
programs called :doc:`kittens <kittens_intro>`. These can used to add features
|
||||||
to kitty, for example, :doc:`editing remote files <kittens/remote_file>` or
|
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,
|
used to create programs that leverage kitty's powerful features, for example,
|
||||||
:doc:`viewing images <kittens/icat>` or :doc:`diffing files with images
|
:doc:`viewing images <kittens/icat>` or :doc:`diffing files with images
|
||||||
<kittens/diff>`.
|
<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>`,
|
:doc:`various enhancements to the terminal protocol <protocol-extensions>`,
|
||||||
etc. These features allow the development of rich terminal applications, such
|
etc. These features allow the development of rich terminal applications, such
|
||||||
as :doc:`Side-by-side diff <kittens/diff>` and :doc:`Unicode input
|
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,
|
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.
|
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:
|
def kitten_link(text: str) -> str:
|
||||||
x = text.split()
|
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):
|
for group in sorted(allg, key=key):
|
||||||
title = group_title(group)
|
title = group_title(group)
|
||||||
|
|||||||
@ -1407,7 +1407,7 @@ class Boss:
|
|||||||
if data is not None:
|
if data is not None:
|
||||||
end_kitten(data, target_window_id, self)
|
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:
|
def input_unicode_character(self) -> None:
|
||||||
self._run_kitten('unicode_input')
|
self._run_kitten('unicode_input')
|
||||||
|
|
||||||
|
|||||||
26
publish.py
26
publish.py
@ -80,16 +80,9 @@ def run_html(args: Any) -> None:
|
|||||||
add_old_redirects('docs/_build/dirhtml')
|
add_old_redirects('docs/_build/dirhtml')
|
||||||
|
|
||||||
|
|
||||||
def add_old_redirects(loc: str) -> None:
|
def generate_redirect_html(link_name: str, bname: str) -> None:
|
||||||
for dirpath, dirnames, filenames in os.walk(loc):
|
with open(link_name, 'w') as f:
|
||||||
if dirpath != loc:
|
f.write(f'''
|
||||||
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'
|
|
||||||
with open(link_name, 'w') as f:
|
|
||||||
f.write(f'''
|
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Redirecting...</title>
|
<title>Redirecting...</title>
|
||||||
@ -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:
|
def run_docs(args: Any) -> None:
|
||||||
subprocess.check_call(['make', 'docs'])
|
subprocess.check_call(['make', 'docs'])
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user