Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/retchut/srt-editor
Simple srt file editing tool created to aid in my manual modification (and occasional creation) of subtitle files.
https://github.com/retchut/srt-editor
Last synced: 19 days ago
JSON representation
Simple srt file editing tool created to aid in my manual modification (and occasional creation) of subtitle files.
- Host: GitHub
- URL: https://github.com/retchut/srt-editor
- Owner: Retchut
- License: gpl-3.0
- Created: 2021-06-17T15:33:53.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-08T20:09:47.000Z (over 2 years ago)
- Last Synced: 2024-11-02T01:05:10.580Z (2 months ago)
- Language: C++
- Homepage:
- Size: 71.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# srt-editor
Simple srt file editing tool created to aid in my manual modification (and occasional creation) of subtitle files.
## Building
Navigate to the src folder and make:***make*** (if on an unix-based system)
***mingw32-make.exe*** (if on windows, using gnu make)
## Running
To run the program, simply run one of the following commands from a terminal, while inside the src folder:>./srt-editor +/- hh:mm:ss:msc h1:m1:s1:ms1 h2:m2:s2:ms2 srtFile
***adds/subtracts hh:mm:ss:msc to all subtitles on srtFile beginning between h1:m1:s1:ms1 and h2:m2:s2:ms2 (inclusive)***
>./srt-editor +/- hh:mm:ss:msc srtFile
***adds/subtracts hh:mm:ss:msc to all subtitles on srtFile***
After running the program on one file, an edited file, aptly named "'original-file-name'-edited.srt" will be created on the same directory as the original file.
## Notes
-hh, mm, ss and msc are the offset to add to the hours, minutes, seconds and milisseconds, respectively-srtFile is either the relative path to the file, or an absolute path to the file you want to edit.
-on windows, replace *srt-editor* with *srt-editor.exe*
Line endings will be preserved, save for the line with the timestamps. The line ending in each timestamp will follow the conventions for the OS this program is run in.
Eventually, I'll take the time to fix this, but it shouldn't cause any issues whatsoever.## TODO
---> Clean up "modular arithmetic-like" code up (I was sleep deprived while writing it, don't judge)
---> Change all files in directory if the path provided was a directory;
---> Maybe maybe maybe add an option to overwrite the old file;
---> Add utility to create an empty subtitle at any timestamp (taken up by another sub or not);
---> Simple cli to allow selecting the utility to be used;
---> Abstract file generation into a function;
---> Abstract sub reading loop into a function;