From 1c91b64f7f4cf1ab1db38e084a3692cf74649266 Mon Sep 17 00:00:00 2001 From: Johnny Huynh <27847622+johnnyhuy@users.noreply.github.com> Date: Mon, 20 May 2024 07:18:28 +1000 Subject: [PATCH] Enhance transcription instructions and CLI parsing - Add instructions for transcribing only audio files that have not been transcribed in README.md - Update Docker instructions for the application in README.md - Add `"only"` as a choice in the argument parser in cli.py - Add conditional to process audio files if the command is "only" in cli.py --- README.md | 6 ++++++ transcribe_me/cli.py | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e1606a5..9054dda 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,12 @@ This has been tested with macOS, your mileage may vary on other operating system transcribe-me archive ``` +5. (Optional) You can also transcribe only the audio files that have not been transcribed yet: + + ```bash + transcribe-me only + ``` + ### Docker You can also run the application using Docker: diff --git a/transcribe_me/cli.py b/transcribe_me/cli.py index 6304839..208683a 100644 --- a/transcribe_me/cli.py +++ b/transcribe_me/cli.py @@ -11,7 +11,7 @@ def parse_arguments(): parser.add_argument( "command", nargs="?", - choices=["install", "archive"], + choices=["install", "archive", "only"], help="Install the configuration file or archive files.", ) parser.add_argument( @@ -40,6 +40,10 @@ def main(): config_manager.archive_files(args.input, args.output) return + if args.command == "only": + transcription.process_audio_files(input_folder, output_folder, config) + return + config = config_manager.load_config() input_folder = args.input