latinchart 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,8 @@
1
+ *.sw*
2
+ .*.sw*
3
+ .rvmrc
4
+ *.gem
5
+ .bundle
6
+ Gemfile.lock
7
+ pkg/*
8
+ doc/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in latinirb.gemspec
4
+ gemspec
data/README.markdown ADDED
@@ -0,0 +1,12 @@
1
+ # Latinchart
2
+
3
+ ## DESCRIPTION
4
+
5
+ Latinchart is a utility based off of [Steven G.
6
+ Harms'](http://stevengharms.com) Latinverb library. It provides a quick CLI
7
+ interface for getting a fully conjugated, terminal-friendly chart of all the
8
+ conjugations and forms of a Latin Verb.
9
+
10
+ ## AUTHOR
11
+
12
+ Steven G. Harms
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
data/bin/latinchart ADDED
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env ruby
2
+ require 'latinverb'
3
+ require 'getoptlong'
4
+
5
+ $:.push File.expand_path("../../lib", __FILE__)
6
+ require 'latinchart'
7
+
8
+ def print_help
9
+ puts <<EOH
10
+
11
+ Welcome to LatinChart. This is a command-line tool that will print out a
12
+ chart-based example of one of each of the verbal paradigms in classical Latin.
13
+
14
+ You select which paradigm to use by providing the -p option. The possible values are:
15
+
16
+ * 1
17
+ * 2
18
+ * 3
19
+ * 4
20
+ * 3io
21
+
22
+ You will probably want to pass this output to a pager like more or less.
23
+
24
+ EOH
25
+ end
26
+
27
+ opts = GetoptLong.new(
28
+ [ '--help', '-h', GetoptLong::NO_ARGUMENT ],
29
+ [ '--paradigm', '-p', GetoptLong::REQUIRED_ARGUMENT ]
30
+ )
31
+
32
+ opts.each do |opt, arg|
33
+ case opt
34
+ when '--help'
35
+ print_help
36
+ when '--paradigm'
37
+ unless Latinchart::MAPPING.keys.any?{|j| j == arg}
38
+ print_help
39
+ exit
40
+ end
41
+ puts Latinchart::MAPPING[arg].chart
42
+ else
43
+ print_help
44
+ end
45
+ end
46
+
47
+ if opts.each.nil?
48
+ if ARGV.length == 0
49
+ print_help
50
+ else
51
+ puts Latinchart::MAPPING[ARGV[0]].chart if Latinchart::MAPPING.keys.any?{|j| j == ARGV[0]}
52
+ end
53
+ end
54
+
@@ -0,0 +1,30 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "latinchart/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "latinchart"
7
+ s.version = Latinchart::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Steven G. Harms"]
10
+ s.email = ["steven.harms@gmail.com"]
11
+ s.homepage = "http://rubygems.org/gems/latinverb"
12
+ s.summary = %q{Gem designed to display paradigmatic verb charts created by LatinVerb}
13
+ s.description = %q{This gem allows one to generate a chart of the full conjugations of one
14
+ of each of the 5 paradigmatic verb types.}
15
+
16
+
17
+ s.rubyforge_project = "latinverb"
18
+
19
+ s.files = `git ls-files`.split("\n")
20
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ s.require_paths = ["lib"]
23
+
24
+ s.add_runtime_dependency 'latinverb', '>= 0.9.0'
25
+ s.add_runtime_dependency 'macronconversions'
26
+ s.add_runtime_dependency 'verbvector'
27
+ s.add_runtime_dependency 'active_support', '>= 3.0'
28
+
29
+
30
+ end
@@ -0,0 +1,3 @@
1
+ module Latinchart
2
+ VERSION = "0.0.1"
3
+ end
data/lib/latinchart.rb ADDED
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+ module Latinchart
3
+ MAPPING = {
4
+ "1" => Linguistics::Latin::Verb::LatinVerb.new(%q(amō amāre amāvī amatum)),
5
+ "2" => Linguistics::Latin::Verb::LatinVerb.new(%q(moneō monēre monvī monitum)) ,
6
+ "3" => Linguistics::Latin::Verb::LatinVerb.new(%q(agō agere ēgī actum)),
7
+ "4" => Linguistics::Latin::Verb::LatinVerb.new(%q(capiō capere cēpī captum)),
8
+ "3io" => Linguistics::Latin::Verb::LatinVerb.new(%q(audiō audīre audīvī auditum))
9
+ }
10
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: latinchart
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.0.1
6
+ platform: ruby
7
+ authors:
8
+ - Steven G. Harms
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+
13
+ date: 2011-06-09 00:00:00 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: latinverb
17
+ prerelease: false
18
+ requirement: &id001 !ruby/object:Gem::Requirement
19
+ none: false
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 0.9.0
24
+ type: :runtime
25
+ version_requirements: *id001
26
+ - !ruby/object:Gem::Dependency
27
+ name: macronconversions
28
+ prerelease: false
29
+ requirement: &id002 !ruby/object:Gem::Requirement
30
+ none: false
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: "0"
35
+ type: :runtime
36
+ version_requirements: *id002
37
+ - !ruby/object:Gem::Dependency
38
+ name: verbvector
39
+ prerelease: false
40
+ requirement: &id003 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: "0"
46
+ type: :runtime
47
+ version_requirements: *id003
48
+ - !ruby/object:Gem::Dependency
49
+ name: active_support
50
+ prerelease: false
51
+ requirement: &id004 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: "3.0"
57
+ type: :runtime
58
+ version_requirements: *id004
59
+ description: |-
60
+ This gem allows one to generate a chart of the full conjugations of one
61
+ of each of the 5 paradigmatic verb types.
62
+ email:
63
+ - steven.harms@gmail.com
64
+ executables:
65
+ - latinchart
66
+ extensions: []
67
+
68
+ extra_rdoc_files: []
69
+
70
+ files:
71
+ - .gitignore
72
+ - Gemfile
73
+ - README.markdown
74
+ - Rakefile
75
+ - bin/latinchart
76
+ - latinchart.gemspec
77
+ - lib/latinchart.rb
78
+ - lib/latinchart/version.rb
79
+ homepage: http://rubygems.org/gems/latinverb
80
+ licenses: []
81
+
82
+ post_install_message:
83
+ rdoc_options: []
84
+
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ none: false
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: "0"
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: "0"
99
+ requirements: []
100
+
101
+ rubyforge_project: latinverb
102
+ rubygems_version: 1.8.5
103
+ signing_key:
104
+ specification_version: 3
105
+ summary: Gem designed to display paradigmatic verb charts created by LatinVerb
106
+ test_files: []
107
+