Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidafsilva/subfixer
A command line based subtitle timing fixer
https://github.com/davidafsilva/subfixer
Last synced: 8 days ago
JSON representation
A command line based subtitle timing fixer
- Host: GitHub
- URL: https://github.com/davidafsilva/subfixer
- Owner: davidafsilva
- License: mit
- Created: 2015-08-08T22:24:35.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-23T15:55:41.000Z (over 9 years ago)
- Last Synced: 2024-11-16T04:41:46.524Z (2 months ago)
- Language: Java
- Size: 199 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# subfixer [![Build Status](https://jenkins-davidafsilva.rhcloud.com/job/subfixer/badge/icon)](https://jenkins-davidafsilva.rhcloud.com/job/subfixer/)[![Coverage Status](https://coveralls.io/repos/davidafsilva/subfixer/badge.svg?branch=master&service=github)](https://coveralls.io/github/davidafsilva/subfixer?branch=master)
A CLI tool for subtitle delay fixing.This tool does not fully sync the subs, it only applies a global (positive or negative) delay to all of the entries.
## Usage
```
java -jar subtitle-fixer.jar
```
Where the <delay pattern> follows a [custom flavor](https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html#parse-java.lang.CharSequence-) of the ISO-8601 standard and the <input file> is the path for the subtitle file.Optionally, there are two properties that can be specified via the `-Dproperty=value` option.
| Property | Possible values | Default |
|----------|---------------------------------------------|---------|
| logLevel | `OFF` `SEVERE` `INFO` | `OFF` |
| encoding | `ISO-8859-1` `US-ASCII` `UTF-8` `UTF-16` .. | `UTF-8` |## File format
The supported format for the subtitle file is the following:
```..
```
where the <entry> format:
```-->
..
```
- <index> range is [1..N]
- the timeframe (start and end times) has the format: *HH:mm:ss,SSS*
- the entry text can contain multiple lines, but at least 1 is required
- the <line break> is OS dependent
- the last <line break> is optional for the last entry of the file.## Notes
I did this project entirely on default installation of Atom editor, without any fancy (in fact, none at all) Java IDE related features. Also, no internet access, yes, not even mobile networks - vacations they say :)It was really, really fun. Every Java developer should try this every once in a while with a small project such as this. After a few years working with IDEs, such as Intellij or Eclipse, you'll miss every single feature of them, i can promise you that! :)
You'll learn, at least, that:
1. you do need to declare imports, no one will do that for you
2. you do need to declare imports, no one will do that for you
3. you do need to declare imports, no one will do that for you
4. imports. imports.Well, this is almost a blog post, lets stop it here. ~~Bottom line is, the code might have some weird formatting as well as unused imports and other smelly lines of code. I did not review the code nor implement the proper tests, yet~~.