gogadget
Usage:
Options:
--version
: Display application version.--help
: Show this message and exit.
Commands:
anki-deck
: Build an Anki deck using the most common...download
: Download a video or playlist from a...download-audio
: Download a video or playlist from a...download-subtitles
: Download subtitles from an online video...frequency-analysis
: Produce a frequency analysis of the most...transcribe
: Produce subtitle file(s) from audio or...install
: Download models for a given --language and...list-languages
: Display languages supported by the tool.set-defaults
: Configure your default paths so that don't...update-downloader
: Update the downloader to use the latest...
gogadget anki-deck
Build an Anki deck using the most common vocabulary in a subtitles file or a folder of subtitles. Optionally include audio and / or screenshots from the source media file(s).
If you use this regularly, it's highly recommended to set the default paths to your dictionary, excluded words, etc. and preferred processing options to simplify the process. You can set your defaults using the following command: gogadget set-defaults --custom
Examples: 1. Normal usage using standard names where your target language is italian and your native language is English. gogadget anki-deck --input "folder containing subtitles and media files" --language it --translation-language en
2. As per (1) but uses dictionary, word exclude list and word audio bank. Also uses --exclude-no-definition to filter out proper nouns / non-target language words. gogadget anki-deck --input "folder containing subtitles and media files" --language it --translation-language en --dictionary "dictionary.json" --word_audio "folder_name" --excluded-words "excel_name.xlsx" --exclude-no-definition
3. Equivalent of (2) using short names. gogadget anki-deck -i "folder containing subtitles and media files" -l it -t en -d "dictionary.json" -w "folder_name" -e "excel_name.xlsx" -h
4. If you have set all of your defaults as described above, you can just run. gogadget anki-deck -i "folder containing subtitles and media files"
Usage:
Options:
-i, --input PATH
: Directory (folder) containing the video file(s) and subtitle files(s) to be turned into an Anki deck. [required]-l, --language TEXT
: Language to use for processing. This should be a two letter language code, e.g. en (for English), es (for Spanish) or it (Italian). Run gogadget list-languages for a list of supported languages. [default: it]-t, --translation-language TEXT
: [Optional] Language to use for translations. Translation quality is generally best if either the target language or the translation is set to en (English). This should be a two letter language code, e.g. en (for English), es (for Spanish) or it (Italian). Run gogadget list-languages for a list of supported languages. [default: en]-f, --offset INTEGER
: [Optional] Time, in milliseconds, to offset the subtitles by when extracting audio. Not normally required if subtitles were generated by gogadget transcribe. [default: 0]-b, --buffer INTEGER
: [Optional] Extra time, in milliseconds, to add to the extracted audio to avoid it being cut off. Not normally required if subtitles were generated by gogadget transcribe. [default: 50]-x, --max-cards INTEGER
: [Optional] Maximum number of cards to include in the deck. [default: 100]-w, --word-audio PATH
: [Optional] Directory of mp3 files of individual words to include in the Anki cards. [default: /Users/jonathan/Library/Mobile Documents/com~apple~CloudDocs/Italian/Dictionaries/Audio]-d, --dictionary PATH
: [Optional] Dictionary in json format to retrieve definitions from for the Anki cards. [default: /Users/jonathan/Library/Mobile Documents/com~apple~CloudDocs/Italian/Dictionaries/Dictionaries/Migaku/Vicon_Ita_to_Eng_Dictionary.json]-e, --excluded-words PATH
: [Optional] Spreadsheet containing words to exclude from the analysis (e.g. the most common words in a language, words already learned). Words should be in the first column of the spreadsheet but can be split across multiple sub-sheets within the file. [default: /Users/jonathan/Library/Mobile Documents/com~apple~CloudDocs/Italian/Dictionaries/Frequency_lists/ita_exclude.xlsx]-m, --lemma / -n, --no-lemma
: [Optional] Enable or disable lemmatisation. If supported for your language, this is generally recommended. [default: lemma]-s, --stop-words / -p, --no-stop-words
: [Optional] If lemmatisation is enabled, you can include or exclude stop words. Stop words are short 'function' words such as 'the', 'that', 'which', etc. [default: no-stop-words]-q, --media / -r, --no-media
: [Optional] Media to extract sentence audio and screenshots from to display on the Anki card. This can either be a video or audio only source. [default: media]-g, --include-no-definition / -h, --exclude-no-definition
: [Optional] Include cards where the definition can't be found in the dictionary. Setting --exclude-no-definition may improve the quality of the deck as it will likely filter many proper nouns, words not from the target language, etc. [default: exclude-no-definition]--help
: Show this message and exit.
gogadget download
Download a video or playlist from a website URL.
Examples:
1. Normal usage using standard names. gogadget download --url "https://www.videosite.com/watch?v=videoid"
2. More advanced usage using standard names. gogadget download --url "https://www.videosite.com/watch?v=videoid" --output "immersion videos" --subtitle_language en --format "best"
3. Equivalent of (2) using short names. gogadget download -i "https://www.videosite.com/watch?v=videoid" -o "immersion videos" -l en -f "best"
Usage:
Options:
-i, --url TEXT
: URL of the video or playlist. Supports any website supported by yt-dlp. [required]-o, --output PATH
: [Optional] Directory (aka folder) to save the files to. Defaults to the current working directory where the user is running the script from. [default: .]-f, --format TEXT
: [Optional] Specify the format of the video. Accepts yt-dlp's format options.-l, --subtitle-language TEXT
: [Optional] Language of subtitles to download. If you want to download these, you should enter a two letter language code such as en, es or it. It will try to download manual subtitles first and fallback to automatically generated subtitles if these aren't found.-a, --advanced-options TEXT
: [Optional][Advanced] Custom yt-dlp options, should accept any command line arguments on the github page. Please format these as a string, enclosed by quotes.--help
: Show this message and exit.
gogadget download-audio
Download a video or playlist from a website URL and convert it to an audio file.
Examples:
1. Normal usage using standard names. gogadget download-audio --url "https://www.videosite.com/watch?v=videoid"
2. More advanced usage using standard names. gogadget download-audio --url "https://www.videosite.com/watch?v=videoid" --output "immersion videos"
3. Equivalent of (2) using short names. gogadget download-audio -i "https://www.videosite.com/watch?v=videoid" -o "immersion videos"
Usage:
Options:
-i, --url TEXT
: URL of the video or playlist. Supports any website supported by yt-dlp. [required]-o, --output PATH
: [Optional] Directory (aka folder) to save the files to. Defaults to the current working directory where the user is running the script from. [default: .]-a, --advanced-options TEXT
: [Optional][Advanced] Custom yt-dlp options, should accept any command line arguments on the github page. Please format these as a string, enclosed by quotes.--help
: Show this message and exit.
gogadget download-subtitles
Download subtitles from an online video service.
Examples: 1. Download english subtitles for a given video. gogadget download-subtitles --url "https://www.videosite.com/watch?v=videoid" --subtitle-language en
2. Equivalent of (1) using short names. gogadget download-subtitles -i "https://www.videosite.com/watch?v=videoid" -l en
Usage:
Options:
-i, --url TEXT
: URL of the video or playlist. Supports any website supported by yt-dlp. [required]-l, --subtitle-language TEXT
: Language of subtitles to download. You should enter a two letter language code such as en, es or it. It will try to download manual subtitles first and fallback to automatically generated subtitles if these aren't found.-o, --output PATH
: [Optional] Directory (aka folder) to save the files to. Defaults to the current working directory where the user is running the script from. [default: .]-a, --advanced-options TEXT
: [Optional][Advanced] Custom yt-dlp options, should accept any command line arguments on the github page. Please format these as a string, enclosed by quotes.--help
: Show this message and exit.
gogadget frequency-analysis
Produce a frequency analysis of the most common vocabulary in a subtitles file or a folder of subtitles. Useful for priming, also used as a pre-processing stage for some other functions.
If you use this regularly, it's highly recommended to set the default paths to your excluded words and preferred processing options to simplify the process. You can set your defaults using the following command: gogadget set-defaults --custom
Examples: 1. Normal usage using standard names where your target language is italian. gogadget frequency-analysis --input "folder containing subtitles" --language it
2. As per (1) but uses word exclude list. gogadget frequency-analysis --input "folder containing subtitles" --language it --excluded-words "excel_name.xlsx"
3. Equivalent of (2) using short names. gogadget frequency-analysis -i "folder containing subtitles" -l it -e "excel_name.xlsx"
4. If you have set all of your defaults as described above, you can just run. gogadget frequency-analysis -i "folder containing subtitles"
Usage:
Options:
-i, --input PATH
: Directory (folder) containing the subtitle files(s) to be analysed. [required]-l, --language TEXT
: Language to use for processing. This should be a two letter language code, e.g. en (for English), es (for Spanish) or it (Italian). Run gogadget list-languages for a list of supported languages. [default: it]-o, --output PATH
: [Optional] Directory (aka folder) to save the files to. Defaults to the current working directory where the user is running the script from. [default: .]-e, --excluded-words PATH
: [Optional] Spreadsheet containing words to exclude from the analysis (e.g. the most common words in a language, words already learned). Words should be in the first column of the spreadsheet but can be split across multiple sub-sheets within the file. [default: /Users/jonathan/Library/Mobile Documents/com~apple~CloudDocs/Italian/Dictionaries/Frequency_lists/ita_exclude.xlsx]-m, --lemma / -n, --no-lemma
: [Optional] Enable or disable lemmatisation. If supported for your language, this is generally recommended. [default: lemma]-s, --stop-words / -p, --no-stop-words
: [Optional] If lemmatisation is enabled, you can include or exclude stop words. Stop words are short 'function' words such as 'the', 'that', 'which', etc. [default: no-stop-words]--help
: Show this message and exit.
gogadget transcribe
Produce subtitle file(s) from audio or video using whisperX.
--input and -i accept both files and directories of files.
If you have an NVIDIA GPU that is set up for CUDA, it's strongly recommended to pass the --gpu flag as this significantly speeds up the tool.
You can also reduce runtime (at the expense of accuracy) by specifying --whisper-model small
Examples: 1. Transcribe a media file or folder of media files that is in English. gogadget transcribe --input "path to media file or folder containing media files" --language en
2. As per (1) but using the GPU to process the model. gogadget transcribe --input "path to media file or folder containing media files" --language en --gpu
3. Example using short names where the output folder is also specified. gogadget transcribe -i "path to media file or folder containing media files" -o "folder to save to" -l en -g
Usage:
Options:
-i, --input PATH
: Path to the video or audio file to transcribe. This can be either a specific video / audio file or a folder of files. [required]-l, --language TEXT
: Language to use for processing. This should be a two letter language code, e.g. en (for English), es (for Spanish) or it (Italian). Run gogadget list-languages for a list of supported languages. [default: it]-o, --output PATH
: [Optional] Directory (aka folder) to save the files to. Defaults to the current working directory where the user is running the script from. [default: .]-m, --max-length INTEGER
: [Optional] The absolute maximum length that a subtitle can be. [default: 94]-s, --split-length INTEGER
: [Optional] The length at which the tool considers splitting a subtitle. [default: 70]-w, --whisper-model TEXT
: [Optional] Specify the whisper model to use for transcription. By default, this is large-v3 turbo but setting this to small can significantly speed the process up at the cost of accuracy. [default: deepdml/faster-whisper-large-v3-turbo-ct2]-a, --align-model TEXT
: [Optional] Specify the model from hugging face to use to align the subtitles with the audio. For the most common languages, the tool will find this for you.-g, --gpu / -c, --cpu
: [Optional] You can specify --gpu if you have a CUDA enabled Nvidia graphics card to significantly speed up the processing. [default: cpu]-f, --subtitle-format TEXT
: [Optional] File format for the subtitles. You can specify vtt, srt, json, txt, tsv or aud. Vtt is the preferred format of the other tools in this suite. [default: vtt]--help
: Show this message and exit.
gogadget install
Download models for a given --language and initialises tools.
Examples: 1. Install modules to process Italian and produce English translations. gogadget install --language it --translation-language en
2. To get a list of language codes to use in the command, run: gogadget list-languages
Usage:
Options:
-l, --language TEXT
: Language to use for processing. This should be a two letter language code, e.g. en (for English), es (for Spanish) or it (Italian). Run gogadget list-languages for a list of supported languages. [default: it]-t, --translation-language TEXT
: [Optional] Language to use for translations. Translation quality is generally best if either the target language or the translation is set to en (English). This should be a two letter language code, e.g. en (for English), es (for Spanish) or it (Italian). Run gogadget list-languages for a list of supported languages. [default: en]--help
: Show this message and exit.
gogadget list-languages
Display languages supported by the tool.
Examples: 1. List languages supported by all functions of the tool. gogadget list-languages
2. List languages supported or partially supported by each module. gogadget list-languages --detailed
Usage:
Options:
-a, --detailed
: [Optional] List the languages supported by each module of the tool.--help
: Show this message and exit.
gogadget set-defaults
Configure your default paths so that don't need to specify them each time.
Examples:
1. Open the settings file on your folder in your default text editor. gogadget set-defaults --custom
2. Reset to factory defaults. gogadget set-defaults --factory
~~~~ WARNING ~~~~ It is possible to break the tool by setting incorrect values in the config file. Reset to factory defaults if you experience errors or unexpected behaviour.
Usage:
Options:
-f, --factory
: [Optional] Load factory default settings. These settings are chosen to be compatible with most systems and languages with minimal tweaking.-c, --custom
: [Optional] Set custom settings in a text file. Useful for setting default paths to resources.--help
: Show this message and exit.
gogadget update-downloader
Update the downloader to use the latest version of yt-dlp.
Examples:
1. Update downloader. gogadget update-downloader
Usage:
Options:
--help
: Show this message and exit.