-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub Digest: Script to Python #27
Comments
via ChatGPT:
To convert this batch script into one file that can process subtitle files by drag-and-dropping them onto it, you need to adapt it to work as a standalone script. This is achieved by using the following approach:
Here is how you can modify the script: @echo off
:: Loop through all files dragged and dropped onto the batch script
for %%I in (%*) do (
:: Run your python command for each file
python -m subdigest -i "%%~I" --selection-set "text" "\\p" --remove-selected --selection-set style "Sign|OP|ED|op|ed|kfx|Karaoke|Eyecatch|Signs" --remove-selected --remove-all-tags --remove-comments --get-field text -o "%%~nI.txt"
)
pause Explanation:
Usage:
This way, you don't have to run the script manually for each file. Just drag and drop the files onto the batch script. |
How do I convert this script into a working python (.py) file where I can drag and drop the subtitle files to extract the necessary text from it?
for %I in (*.ass) do python -m subdigest -i "%I" --selection-set "text" "\\p" --remove-selected --selection-set style "Sign|OP|ED|op|ed|kfx|Karaoke|Eyecatch|Signs" --remove-selected --remove-all-tags --remove-comments --get-field text -o "%~nI.txt"
The text was updated successfully, but these errors were encountered: