Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.55 KB

README.aeidon.md

File metadata and controls

52 lines (38 loc) · 1.55 KB

Python Package Aeidon for Subtitles

PyPI Downloads

aeidon is a Python package that provides classes and functions for dealing with text-based subtitle files of many different formats. Functions exist for reading and writing subtitle files as well as manipulating subtitle data, i.e. positions (times or frames) and texts.

Examples

Converting a file from the SubRip format to the MicroDVD format:

project = aeidon.Project()
project.open_main("/path/to/file.srt", "utf_8")
project.set_framerate(aeidon.framerates.FPS_23_976)
project.save_main(aeidon.files.new(aeidon.formats.MICRODVD,
                                   "/path/to/file.sub",
                                   "utf_8"))

Making all subtitles in a file appear two seconds earlier:

project = aeidon.Project()
project.open_main("/path/to/file.srt", "utf_8")
project.shift_positions(None, aeidon.as_seconds(-2))
project.save_main()

Installation

pip install -U aeidon

Documentation

https://otsaloma.io/gaupol/doc/api/aeidon.html

The API documentation is for an older version, but it applies 99% to the latest version as well. There's currently no build mechanism for up-to-date API documentation. Restoring that is a known low-priority issue.

History

aeidon is part of the Gaupol subtitle editor, where the other package, gaupol, provides the GTK user interface.