File: __main__.py

package info (click to toggle)
python-trame 3.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 101,620 kB
  • sloc: python: 13,515; sh: 183; javascript: 93; makefile: 7
file content (27 lines) | stat: -rw-r--r-- 598 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import argparse
import asyncio

from .generator import generate_trame_package


async def main():
    parser = argparse.ArgumentParser(description="Trame component generator")

    parser.add_argument(
        "--config",
        default="trame",
        help="Path to config file that specify the widgets definition",
    )

    parser.add_argument(
        "--output",
        help="Directory where the generated files will be stored",
    )

    args, _ = parser.parse_known_args()

    await generate_trame_package(args.config, args.output)


if __name__ == "__main__":
    asyncio.run(main())