Skip to content

Commit 54bed17

Browse files
committed
cli in lib
1 parent c1cc5a0 commit 54bed17

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

.github/workflows/publish-binary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
python -m pip install pyinstaller
2424
- name: Build Executable Binary
2525
run: |
26-
pyinstaller cli.py --onefile
26+
pyinstaller callscript/cli.py --onefile
2727
ls -a dist
2828
- name: Upload binaries to release
2929
uses: svenstaro/upload-release-action@v2

callscript/cli.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from argparse import ArgumentParser
2+
from pathlib import Path
3+
from typing import List
4+
5+
from callscript import modify_code
6+
7+
8+
def main(args: List[str] = None):
9+
parser = ArgumentParser(description="Extract Script into a Module using Comment Tags")
10+
parser.add_argument('script', help="Path to the script")
11+
12+
args = parser.parse_args(args=args)
13+
14+
code = Path(args.script).read_text()
15+
meta = modify_code(code=code)
16+
new_code = meta['code']
17+
print(new_code)
18+
19+
20+
if __name__ == '__main__':
21+
main()

cli.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)