- Add new subcommands: convert, preflight, server, templates, webpage - Migrate config from bin/config.json to ~/.config/mytoolkit - Fix expand_bookmarks to modify writer objects instead of reader - Improve md_to_pdf with CJK bookmark support - Update README and project metadata
55 lines
1.3 KiB
Python
55 lines
1.3 KiB
Python
"""MyCLI main entry point."""
|
|
|
|
from pathlib import Path
|
|
|
|
import click
|
|
|
|
from bin.commands import pdf, image, latex, video, bib, utils
|
|
from bin.commands.convert import convert_cmd
|
|
from bin.commands.env import env_cmd
|
|
from bin.commands.templates import templates_cmd
|
|
from bin.commands.ssh import ssh_cmd
|
|
from bin.commands.git import git_cmd
|
|
from bin.commands.server import server_cmd
|
|
from bin.commands.webpage import webpage_cmd
|
|
from bin.commands.mail import mail
|
|
from bin.commands.preflight import preflight_cmd
|
|
from bin.commands.self_mgmt import update_cmd, uninstall_cmd, self_cmd
|
|
from bin.utils import handle_errors
|
|
|
|
|
|
@click.group()
|
|
@click.version_option(version="0.1.0", prog_name="mytoolkit")
|
|
def cli():
|
|
"""Personal CLI toolkit."""
|
|
pass
|
|
|
|
|
|
# Register command groups
|
|
cli.add_command(convert_cmd)
|
|
cli.add_command(pdf.pdf)
|
|
cli.add_command(image.image)
|
|
cli.add_command(latex.latex)
|
|
cli.add_command(video.video)
|
|
cli.add_command(bib.bib)
|
|
cli.add_command(utils.utils)
|
|
cli.add_command(env_cmd)
|
|
cli.add_command(templates_cmd)
|
|
cli.add_command(ssh_cmd)
|
|
cli.add_command(git_cmd)
|
|
cli.add_command(server_cmd)
|
|
cli.add_command(webpage_cmd)
|
|
cli.add_command(mail)
|
|
cli.add_command(preflight_cmd)
|
|
cli.add_command(update_cmd)
|
|
cli.add_command(uninstall_cmd)
|
|
cli.add_command(self_cmd)
|
|
|
|
|
|
def main():
|
|
cli()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|