GithubHelp home page GithubHelp logo

retchut / srt-editor Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 73 KB

Simple srt file editing tool created to aid in my manual modification (and occasional creation) of subtitle files.

License: GNU General Public License v3.0

Makefile 4.24% C++ 94.91% C 0.85%

srt-editor's Introduction

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;

srt-editor's People

Contributors

retchut avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.