Module: Vtt2ass
- Defined in:
- lib/vtt2ass/version.rb,
lib/vtt2ass.rb
Overview
Vtt2ass module to provide the version number
Constant Summary collapse
- VERSION =
This is the version of the application. This needs to be changed for each gem release.
"0.2.9"
Class Method Summary collapse
-
.main ⇒ Object
This function creates a new application instance and starts the process.
Class Method Details
.main ⇒ Object
This function creates a new application instance and starts the process.
It also defines the arguments that can be provided from the CLI.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/vtt2ass.rb', line 13 def main = {} OptionParser.new do |opts| opts. = "Usage: vtt2ass [options]" opts.separator "" opts.separator "Specific options:" opts.on("-i", "--input PATH", "Specify a custom input file or directory (default: './')") do |file_path| [:input] = file_path end opts.on("-o", "--output PATH", "Specify a custom output directory (default: './')") do |file_path| [:output] = file_path end opts.on("-f", "--font-family FONT", String, "Specify a font family for the subtitles (default: 'Open Sans Semibold')") do |font_family| [:font_family] = font_family end opts.on("-s", "--font-size SIZE", Integer, "Specify a font size for the subtitles (default: 52)") do |font_size| [:font_size] = font_size end opts.on("-t", "--title TITLE", String, "Specify a title for you file. If the input is a directory, all files will share the same title.") do |title| [:title] = title end opts.on("-v", "--version", "Show version") do puts Vtt2ass::VERSION exit end end.parse! app = Application.new() app.start end |