| 565 | |
| 566 | |
| 567 | def usage(script): |
| 568 | text = f""" |
| 569 | ⢿⣆⠀⠀⣼⡗⢀⣴⡿⠿⢷⠄⢺⣧⠀⠀⣰⡿ |
| 570 | ⠈⢿⣆⣼⡟⠀⢸⣿⠰⣿⠀⠀⠀⢻⣧⣰⡿⠁ |
| 571 | ⠀⠈⢿⡟⠀⠀⠈⠻⣷⣶⡾⠂⠀⠀⢻⡿⠁ |
| 572 | |
| 573 | Usage: {script} <command> ... |
| 574 | Commands: |
| 575 | |
| 576 | createplugin <slug> [plugin dir] |
| 577 | |
| 578 | A directory will be created and initialized with a minimal plugin template. |
| 579 | If no plugin directory is given, the slug is used. |
| 580 | |
| 581 | createmanifest <slug> [plugin dir] |
| 582 | |
| 583 | Creates a `plugin.json` manifest file in an existing plugin directory. |
| 584 | If no plugin directory is given, the current directory is used. |
| 585 | |
| 586 | createmodule <module slug> [panel file] [source file] |
| 587 | |
| 588 | Adds a new module to the plugin manifest in the current directory. |
| 589 | If a panel and source file are given, generates a template source file initialized with components from a panel file. |
| 590 | If only a panel is given, prints the generated source code. |
| 591 | Example: |
| 592 | {script} createmodule MyModule res/MyModule.svg src/MyModule.cpp |
| 593 | |
| 594 | See https://vcvrack.com/manual/Panel for creating SVG panel files. |
| 595 | """ |
| 596 | eprint(text) |
| 597 | |
| 598 | |
| 599 | def parse_args(args): |