GithubHelp home page GithubHelp logo

honorifics's Introduction

honorifics

Swaps terms in ass subtitles with alternatives, useful for handling Japanese honorifics.

scripts/

Scripts can run by in-system Python. All scripts reads from stdin and output to stdout.

subtitles.py

Read line by line. If in line is text between marks {*}...{*...} then swap it. Marks can be changed by providing arguments to class TextSwapperInMark constructor in script.

Example

python3 ./scripts/subtitles.py < input > output

honorifics's People

Contributors

fadion96 avatar owoc avatar kajeczko avatar michcioperz avatar lukaszklekowski avatar

Watchers

 avatar James Cloos avatar  avatar

honorifics's Issues

Apply timing offsets specified in comments

If a line of dialogue ends with a comment like {+50 ms} or {-50 ms}, change the timing of the line to appear 50ms later or earlier respectively.

If a line of dialogue ends {+1 frame} or {-5 frames}, calculate the duration of a frame and shift accordingly. If no constant framerate is specified in the subtitle file, assume 23.976 fps.

Handle substitutions specified in comments

The python3 script should turn the ASS subtitle line

timing,and,styling,garbage,This is the real line of dialogue and it was written in {*}PRL{*Trzecia Rzeczpospolita} and it's awesome.

into

timing,and,styling,garbage,This is the real line of dialogue and it was written in {*}Trzecia Rzeczpospolita{*PRL} and it's awesome.

Generic syntax:

timing,and,styling,garbage,Some dialogue {*}replace me{*use me as replacement} some more dialogue.

ASS comments that don't match this syntax should be ignored.

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.