Move the kittens Go code into the kittens folder
This commit is contained in:
parent
3f9579d61d
commit
ff55121094
@ -267,7 +267,6 @@ if you specify a program-to-run you can use the special placeholder
|
|||||||
p('.. program::', 'kitty @', func.name)
|
p('.. program::', 'kitty @', func.name)
|
||||||
p('\n\n' + as_rst(*cli_params_for(func)))
|
p('\n\n' + as_rst(*cli_params_for(func)))
|
||||||
from kittens.runner import get_kitten_cli_docs
|
from kittens.runner import get_kitten_cli_docs
|
||||||
from kitty.fast_data_types import wrapped_kitten_names
|
|
||||||
|
|
||||||
for kitten in all_kitten_names:
|
for kitten in all_kitten_names:
|
||||||
data = get_kitten_cli_docs(kitten)
|
data = get_kitten_cli_docs(kitten)
|
||||||
@ -277,9 +276,6 @@ if you specify a program-to-run you can use the special placeholder
|
|||||||
p('.. program::', 'kitty +kitten', kitten)
|
p('.. program::', 'kitty +kitten', kitten)
|
||||||
p('\nSource code for', kitten)
|
p('\nSource code for', kitten)
|
||||||
p('-' * 72)
|
p('-' * 72)
|
||||||
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}'
|
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(f'\nThe source code for this kitten is `available on GitHub <{scurl}>`_.')
|
||||||
p('\nCommand Line Interface')
|
p('\nCommand Line Interface')
|
||||||
|
|||||||
@ -336,7 +336,7 @@ def wrapped_kittens() -> Sequence[str]:
|
|||||||
|
|
||||||
|
|
||||||
def generate_conf_parser(kitten: str, defn: Definition) -> None:
|
def generate_conf_parser(kitten: str, defn: Definition) -> None:
|
||||||
with replace_if_needed(f'tools/cmd/{kitten}/conf_generated.go'):
|
with replace_if_needed(f'kittens/{kitten}/conf_generated.go'):
|
||||||
print(f'package {kitten}')
|
print(f'package {kitten}')
|
||||||
print(gen_go_code(defn))
|
print(gen_go_code(defn))
|
||||||
|
|
||||||
@ -370,11 +370,11 @@ def kitten_clis() -> None:
|
|||||||
ecp = get_kitten_extra_cli_parsers(kitten)
|
ecp = get_kitten_extra_cli_parsers(kitten)
|
||||||
if ecp:
|
if ecp:
|
||||||
for name, spec in ecp.items():
|
for name, spec in ecp.items():
|
||||||
with replace_if_needed(f'tools/cmd/{kitten}/{name}_cli_generated.go'):
|
with replace_if_needed(f'kittens/{kitten}/{name}_cli_generated.go'):
|
||||||
print(f'package {kitten}')
|
print(f'package {kitten}')
|
||||||
generate_extra_cli_parser(name, spec)
|
generate_extra_cli_parser(name, spec)
|
||||||
|
|
||||||
with replace_if_needed(f'tools/cmd/{kitten}/cli_generated.go'):
|
with replace_if_needed(f'kittens/{kitten}/cli_generated.go'):
|
||||||
od = []
|
od = []
|
||||||
kcd = kitten_cli_docs(kitten)
|
kcd = kitten_cli_docs(kitten)
|
||||||
has_underscore = '_' in kitten
|
has_underscore = '_' in kitten
|
||||||
@ -722,7 +722,7 @@ def generate_ssh_kitten_data() -> None:
|
|||||||
for f in filenames:
|
for f in filenames:
|
||||||
path = os.path.join(dirpath, f)
|
path = os.path.join(dirpath, f)
|
||||||
files.add(path.replace(os.sep, '/'))
|
files.add(path.replace(os.sep, '/'))
|
||||||
dest = 'tools/cmd/ssh/data_generated.bin'
|
dest = 'kittens/ssh/data_generated.bin'
|
||||||
|
|
||||||
def normalize(t: tarfile.TarInfo) -> tarfile.TarInfo:
|
def normalize(t: tarfile.TarInfo) -> tarfile.TarInfo:
|
||||||
t.uid = t.gid = 0
|
t.uid = t.gid = 0
|
||||||
|
|||||||
@ -12,8 +12,8 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"kitty/kittens/ssh"
|
||||||
"kitty/tools/cli"
|
"kitty/tools/cli"
|
||||||
"kitty/tools/cmd/ssh"
|
|
||||||
"kitty/tools/config"
|
"kitty/tools/config"
|
||||||
"kitty/tools/tui/loop"
|
"kitty/tools/tui/loop"
|
||||||
"kitty/tools/utils"
|
"kitty/tools/utils"
|
||||||
@ -5,9 +5,9 @@ package main
|
|||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"kitty/kittens/ssh"
|
||||||
"kitty/tools/cli"
|
"kitty/tools/cli"
|
||||||
"kitty/tools/cmd/completion"
|
"kitty/tools/cmd/completion"
|
||||||
"kitty/tools/cmd/ssh"
|
|
||||||
"kitty/tools/cmd/tool"
|
"kitty/tools/cmd/tool"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@ package pytest
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"kitty/kittens/ssh"
|
||||||
"kitty/tools/cli"
|
"kitty/tools/cli"
|
||||||
"kitty/tools/cmd/ssh"
|
|
||||||
"kitty/tools/utils/shm"
|
"kitty/tools/utils/shm"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -5,19 +5,19 @@ package tool
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"kitty/kittens/ask"
|
||||||
|
"kitty/kittens/clipboard"
|
||||||
|
"kitty/kittens/diff"
|
||||||
|
"kitty/kittens/hints"
|
||||||
|
"kitty/kittens/hyperlinked_grep"
|
||||||
|
"kitty/kittens/icat"
|
||||||
|
"kitty/kittens/ssh"
|
||||||
|
"kitty/kittens/themes"
|
||||||
|
"kitty/kittens/unicode_input"
|
||||||
"kitty/tools/cli"
|
"kitty/tools/cli"
|
||||||
"kitty/tools/cmd/ask"
|
|
||||||
"kitty/tools/cmd/at"
|
"kitty/tools/cmd/at"
|
||||||
"kitty/tools/cmd/clipboard"
|
|
||||||
"kitty/tools/cmd/diff"
|
|
||||||
"kitty/tools/cmd/edit_in_kitty"
|
"kitty/tools/cmd/edit_in_kitty"
|
||||||
"kitty/tools/cmd/hints"
|
|
||||||
"kitty/tools/cmd/hyperlinked_grep"
|
|
||||||
"kitty/tools/cmd/icat"
|
|
||||||
"kitty/tools/cmd/pytest"
|
"kitty/tools/cmd/pytest"
|
||||||
"kitty/tools/cmd/ssh"
|
|
||||||
"kitty/tools/cmd/themes"
|
|
||||||
"kitty/tools/cmd/unicode_input"
|
|
||||||
"kitty/tools/cmd/update_self"
|
"kitty/tools/cmd/update_self"
|
||||||
"kitty/tools/tui"
|
"kitty/tools/tui"
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user