Skip to content
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

enable transcript rename for non-srt files #174

Closed
wants to merge 4 commits into from

Conversation

schrauger
Copy link
Contributor

@schrauger schrauger commented Oct 4, 2024

Fixes #173

This will rename any transcription file if the "rename" checkbox is checked. It will use the video recording filename, plus the transcript filename suffix.

  • "transcript.txt" renamed to "2024-10-01 12-11-10.txt"

It also checks the video recording suffix to compare with the transcript suffix to ensure it doesn't overwrite the video, if the user set the suffix to ".mkv" or ".mp4" for some reason (for example). In that case, it will append a hardcoded ".txt" suffix to the renamed transcript file.

  • "why-would-you-name-your-transcript-this.mkv" renamed to "2024-10-01 12-11-10.mkv.txt"

@royshil
Copy link
Collaborator

royshil commented Oct 9, 2024

@schrauger do you mind running clang-format on it?
thanks for the contributon!

@schrauger
Copy link
Contributor Author

@royshil I am unfamiliar with clang-format. I tried installing it locally, but when running it against the cpp file I changed, the command had an error with the .clang-format config file.

$ clang-format transcription-filter-callbacks.cpp 
/obs-localvocal/.clang-format:115:3: error: unknown enumerated scalar
  Enabled: true
  ^
Error reading /obs-localvocal/.clang-format: Invalid argument

However, I did check it for standard linting inconsistencies by hand, and I removed an extra empty line and changed some space indents to tabs, to match the rest of the file. Hopefully the changes will be enough for clang to accept it, but if not, let me know and I'll look into clang-format more to see what I'm missing.

@royshil
Copy link
Collaborator

royshil commented Oct 10, 2024

i've fixed it on #179
unfortunately i can't commit directly to your branch on your fork

@royshil royshil closed this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatic file renaming only works when SRT format is checked
2 participants