dxing97 / subs2cia

Condensed Immersive Audiovisual media generator from subtitles for language learning
MIT License
89 stars 10 forks source link

Adding additional preset through reading in a file #32

Open kaneyumin opened 1 year ago

kaneyumin commented 1 year ago

Expanded on the option to let users add a preset as long as file contains same format as specified.

dxing97 commented 1 year ago

After list_presets() is called subs2cia will exit, so right now this won't cause subs2cia to run with a custom defined preset. I think a separate command line option for reading in a custom preset would work better for users.

Can you switch to using JSON for the config file type? Also, I get this error when running with --list-presets now:

$ subs2cia/main.py condense --list-presets
subs2cia:INFO:subs2cia version v0.4.2
Enter the path to the file containing a presettest
File path does not exist
Traceback (most recent call last):
  File "/home/dxing97/Downloads/subs2cia/subs2cia/main.py", line 264, in <module>
    start()
  File "/home/dxing97/Downloads/subs2cia/subs2cia/main.py", line 190, in start
    list_presets()
  File "/home/dxing97/Downloads/subs2cia/subs2cia/main.py", line 51, in list_presets
    if abs(args['preset']) >= len(presets):
NameError: name 'args' is not defined