resme 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/Gemfile +6 -0
  4. data/LICENSE.txt +21 -0
  5. data/README.md +170 -0
  6. data/Rakefile +2 -0
  7. data/bin/console +14 -0
  8. data/bin/setup +8 -0
  9. data/exe/resme +6 -0
  10. data/lib/resme.rb +4 -0
  11. data/lib/resme/cli/command_semantics.rb +155 -0
  12. data/lib/resme/cli/command_syntax.rb +192 -0
  13. data/lib/resme/renderer/renderer.rb +103 -0
  14. data/lib/resme/templates/europass/eu.xml.erb +405 -0
  15. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Achievement.xsd +91 -0
  16. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Certificate.xsd +62 -0
  17. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/CommonTypes.xsd +139 -0
  18. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/ComputerSkill.xsd +112 -0
  19. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/ContactInformation.xsd +321 -0
  20. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Demographics.xsd +122 -0
  21. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/DigitalContent.xsd +164 -0
  22. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/DocumentInformation.xsd +119 -0
  23. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Documentation.xsd +122 -0
  24. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/DrivingSkill.xsd +71 -0
  25. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/EducationalExperience.xsd +137 -0
  26. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/EmploymentExperience.xsd +65 -0
  27. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/EuropassCoverLetter.xsd +70 -0
  28. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/EuropassLearnerInformation.xsd +91 -0
  29. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/EuropassPrintingPreferences.xsd +247 -0
  30. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/EuropassSchema.xsd +133 -0
  31. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Experience.xsd +75 -0
  32. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Headline.xsd +97 -0
  33. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Identification.xsd +54 -0
  34. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Language.xsd +107 -0
  35. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Letter.xsd +129 -0
  36. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/LinguisticSkill.xsd +189 -0
  37. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/OccupationalField.xsd +68 -0
  38. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Organisation.xsd +129 -0
  39. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/PersonName.xsd +71 -0
  40. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/Skill.xsd +71 -0
  41. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/imported/EQF_08_V1.0.0.xsd +115 -0
  42. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/imported/EUDrivingLicence_V1.1.0.xsd +28 -0
  43. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/imported/ISCED97_V1.0.0.xsd +981 -0
  44. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/imported/NACE_COM_V1.0.0.xsd +5630 -0
  45. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/included/EuropassAddressFormats_V1.3.0.xsd +117 -0
  46. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/included/EuropassISCO_88_COM_V1.4.0.xsd +15116 -0
  47. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/included/EuropassISOCountries_V1.6.0.xsd +6180 -0
  48. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/included/EuropassISOLanguages_V1.8.0.xsd +7645 -0
  49. data/lib/resme/templates/europass/europass-xml-schema-definition-v3.3.0/included/EuropassNationalities_V1.6.0.xsd +6179 -0
  50. data/lib/resme/templates/europass/europass-xml-schema-doc-v3.3.0.pdf +0 -0
  51. data/lib/resme/templates/html/css/main.css +87 -0
  52. data/lib/resme/templates/html/css/normalize.css +424 -0
  53. data/lib/resme/templates/html/index.html.erb +22 -0
  54. data/lib/resme/templates/html/js/main.js +0 -0
  55. data/lib/resme/templates/html/js/plugins.js +24 -0
  56. data/lib/resme/templates/html/js/vendor/jquery-1.12.0.min.js +5 -0
  57. data/lib/resme/templates/html/js/vendor/modernizr-2.8.3.min.js +4 -0
  58. data/lib/resme/templates/resume.json.erb +137 -0
  59. data/lib/resme/templates/resume.md.erb +120 -0
  60. data/lib/resme/templates/resume.yml +240 -0
  61. data/lib/resme/version.rb +3 -0
  62. data/resme.gemspec +28 -0
  63. metadata +151 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 41210e013344cdaa0ebf2bda62cb32e6a7ab12d0
4
+ data.tar.gz: 502428f940851e89c7d67434d1a7e159c51e8115
5
+ SHA512:
6
+ metadata.gz: 3bbb1d5a0b1ec9a4aaecc61878d87cbb34c922058073c2660f4e06bdd42286d55956d49bccc988693d8ea4fd8dc28b58f89ab5052f4f7f9ae87c8fc0cccc6efb
7
+ data.tar.gz: 3376bfe326cc4bb00c97d858cabc4df8793408a9b5a979090dab19710bce64bb674e16dff02465a6fedb6defa125d02591c9fd939c47f2515190f26f42441034
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *~
11
+ *.bak
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in resme.gemspec
6
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Adolfo Villafiorita
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,170 @@
1
+ # RESME - A Resume Generator
2
+
3
+ Keep your resume in YAML and output it in various formats, including
4
+ markdown, json, and the Europass XML format.
5
+
6
+ Interesting features:
7
+
8
+ - the rendering engine is based on ERB. This simplifies the creation
9
+ of new output formats (and extending/modifying the YML structure to
10
+ one's needs).
11
+ - no gem/cli application I am aware of outputs in the Europass format
12
+
13
+
14
+ ## Installation
15
+
16
+ Add this line to your application's Gemfile:
17
+
18
+ ```ruby
19
+ gem 'resme'
20
+ ```
21
+
22
+ And then execute:
23
+
24
+ $ bundle
25
+
26
+ Or install it yourself as:
27
+
28
+ $ gem install resme
29
+
30
+ ## Usage
31
+
32
+ Start with:
33
+
34
+ $ resme init
35
+
36
+ whih generates a YML template for your resume in the current
37
+ directory. Comments in the YML file should help you fill the various
38
+ entries. Notice that most entries are optional and you can remove
39
+ sectins hich are not relevant for your resume.
40
+
41
+ Once you have started filling you resume, you can then generate a
42
+ resume using the existing templates or by writing your own template
43
+ (see below).
44
+
45
+ To generate a resume in Markdown using the provided template:
46
+
47
+ $ resme md [-o output_filename] file.yml ...
48
+
49
+ To generate a resume in the Europass XML format using the provided template:
50
+
51
+ $ resme europass [-o output_filename] file.yml ...
52
+
53
+ To generate a resume in the Json format (https://jsonresume.org/):
54
+
55
+ $ resme json [-o output_filename] file.yaml ...
56
+
57
+ Remarks:
58
+
59
+ * you can specify more than one YML file in input. This allows you to store
60
+ data about your resume in different files, if you like to do so (e.g., work
61
+ experiences could be in one file and talks in another). The YML files are
62
+ merged before processing them.
63
+ * the output filename is optional. If you do not specify one, the resume is
64
+ generated to `resume-YYYY.MM.DD.format`, where `YYYY-MM-DD` is today's date
65
+ and `format` is the chosen output format
66
+
67
+ ## Dates in the resume
68
+
69
+ Enter dates in the resume in one of the following formats:
70
+
71
+ * Any format accepted by Ruby for a full date (year, month, day)
72
+ * YYYY-MM-DD
73
+ * YYYY-MM
74
+ * YYYY
75
+
76
+ The third and the forth format allows you to enter "partial" dates
77
+ (e.g., when the month or the day have been forgotten or are
78
+ irrelevant).
79
+
80
+ ## Creating your own templates
81
+
82
+ The resumes are generated from the YML matter using ERB templates,
83
+ similar to what Jekyll and Middleman do with data files. (See,
84
+ e.g., [data files](https://middlemanapp.com/advanced/data-files/.)
85
+ You can define your own templates if you wish to do so.
86
+
87
+ All the data in the resume is made available in the `data` variable.
88
+ Thus, for instance, the following code snippets generates a list of
89
+ all the work experiences:
90
+
91
+ <% data.work each do |exp| %>
92
+ - <%= exp.who %>
93
+ From: <%= exp.from %> till: <%= exp.till %>
94
+ <% end %>
95
+
96
+ To specify your own ERB template use the option `-t`. Thus, for instance:
97
+
98
+ $ resme render -t template.md.erb [-o output_filename] file.yaml ...
99
+
100
+ uses `template.md.erb` to generate the resume.
101
+
102
+ Some functions can be used in the templates to better control the output.
103
+
104
+ String manipulation functions:
105
+
106
+ * `clean string` removes any space at the beginning of `string`
107
+ * `reflow string, n` makes `string` into an array of strings of
108
+ length lower or equal to `n` (useful if you are outputing a txt format,
109
+ for instance.
110
+
111
+ Dates manipulation functions:
112
+
113
+ * `year string`, `month string`, `day string` return, respectively the
114
+ year, month and day from strings in the format `YYYY-MM-DD`s
115
+ * `has_month input` returns true if `input` has a month, that is, it is
116
+ a date or it is in the form `YYYY-MM`
117
+ * `has_day input` returns true if `input` has a day, that is, it is
118
+ a date or it is in the form `YYYY-MM-DD`
119
+
120
+ You can find some templates in `lib/resme/templates`. These might be
121
+ good starting points if you want to develop your own.
122
+
123
+ ## Contributing your templates
124
+
125
+ If you develop an output template and want to make it available,
126
+ please let me know, so that I can include it in future releases of
127
+ this gem.
128
+
129
+ ## Development
130
+
131
+ After checking out the repo, run `bin/setup` to install
132
+ dependencies. You can also run `bin/console` for an interactive prompt
133
+ that will allow you to experiment.
134
+
135
+ To install this gem onto your local machine, run `bundle exec rake
136
+ install`. To release a new version, update the version number in
137
+ `version.rb`, and then run `bundle exec rake release`, which will
138
+ create a git tag for the version, push git commits and tags, and push
139
+ the `.gem` file to [rubygems.org](https://rubygems.org).
140
+
141
+ ## Contributing
142
+
143
+ Bug reports and pull requests are welcome on GitHub at
144
+ https://github.com/avillafiorita/resme.
145
+
146
+ ## License
147
+
148
+ The gem is available as open source under the terms of
149
+ the [MIT License](http://opensource.org/licenses/MIT).
150
+
151
+ ## Roadmap
152
+
153
+ In `doc/todo.org` ... guess what is my preferred editor!
154
+
155
+ ## Bugs
156
+
157
+ There are slight differences in the information outputted in the
158
+ various formats. For instance, gender and birthdate are used in the
159
+ Europass format, but not in the Markdown format. This is in part due
160
+ to the different standards and in part due to personal choices (here
161
+ "personal choices" could be also read "bug").
162
+
163
+ Entries are not sorted by date before outputting them. Make sure you
164
+ put them in the order you want them to appear in your resume.
165
+
166
+ Unkown number of unkown bugs.
167
+
168
+ ## Release History
169
+
170
+ * **0.1** is th first release
@@ -0,0 +1,2 @@
1
+ require "bundler/gem_tasks"
2
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "resme"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'resme'
4
+
5
+ # read-eval-print-step passing all commands and the argument
6
+ Resme::CommandSemantics.reps Resme::CommandSyntax.commands, ARGV
@@ -0,0 +1,4 @@
1
+ require "resme/version"
2
+ require "resme/renderer/renderer"
3
+ require "resme/cli/command_syntax"
4
+ require "resme/cli/command_semantics"
@@ -0,0 +1,155 @@
1
+ require 'resme/version'
2
+ require 'readline'
3
+ require 'fileutils'
4
+ require 'date'
5
+ require 'yaml'
6
+ require 'erb'
7
+
8
+ module Resme
9
+ module CommandSemantics
10
+ APPNAME = 'resme'
11
+ VERSION = Resme::VERSION
12
+
13
+ #
14
+ # Main App Starts Here!
15
+ #
16
+ def self.version opts = nil, argv = []
17
+ puts "#{APPNAME} version #{VERSION}"
18
+ end
19
+
20
+ def self.man opts = nil, argv = []
21
+ path = File.join(File.dirname(__FILE__), "/../../../README.md")
22
+ file = File.open(path, "r")
23
+ contents = file.read
24
+ puts contents
25
+ end
26
+
27
+ def self.help opts = nil, argv = []
28
+ all_commands = CommandSyntax.commands
29
+
30
+ if argv != []
31
+ argv.map { |x| puts all_commands[x.to_sym][2] }
32
+ else
33
+ puts "#{APPNAME} command [options] [args]"
34
+ puts ""
35
+ puts "Available commands:"
36
+ puts ""
37
+ all_commands.keys.each do |key|
38
+ puts " " + all_commands[key][0].banner
39
+ end
40
+ end
41
+ end
42
+
43
+ def self.console opts, argv = []
44
+ all_commands = CommandSyntax.commands
45
+ all_commands.delete(:console)
46
+
47
+ i = 0
48
+ while true
49
+ string = Readline.readline("#{APPNAME}:%03d> " % i, true)
50
+ string.gsub!(/^#{APPNAME} /, "") # as a courtesy, remove any leading appname string
51
+ if string == "exit" or string == "quit" or string == "." then
52
+ exit 0
53
+ end
54
+ reps all_commands, string.split(' ')
55
+ i = i + 1
56
+ end
57
+ end
58
+
59
+ # read-eval-print step
60
+ def self.reps all_commands, argv
61
+ if argv == [] or argv[0] == "--help" or argv[0] == "-h"
62
+ CommandSemantics.help
63
+ exit 0
64
+ else
65
+ command = argv[0]
66
+ syntax_and_semantics = all_commands[command.to_sym]
67
+ if syntax_and_semantics
68
+ opts = syntax_and_semantics[0]
69
+ function = syntax_and_semantics[1]
70
+
71
+ begin
72
+ parser = Slop::Parser.new(opts)
73
+
74
+ result = parser.parse(argv[1..-1])
75
+ options = result.to_hash
76
+ arguments = result.arguments
77
+
78
+ eval "CommandSemantics::#{function}(options, arguments)"
79
+ rescue Slop::Error => e
80
+ puts "#{APPNAME}: #{e}"
81
+ rescue Exception => e
82
+ puts e
83
+ end
84
+ else
85
+ puts "#{APPNAME}: '#{command}' is not a valid command. See '#{APPNAME} help'"
86
+ end
87
+ end
88
+ end
89
+
90
+ #
91
+ # APP SPECIFIC COMMANDS
92
+ #
93
+ def self.init opts, argv
94
+ output = opts[:output] || "resume.yml"
95
+ force = opts[:force]
96
+ template = File.join(File.dirname(__FILE__), "/../templates/resume.yml")
97
+
98
+ # avoid catastrophy
99
+ if File.exist?(output) and not force
100
+ puts "Error: file #{output} already exists. Use --force if you want to overwrite it"
101
+ else
102
+ content = File.read(template)
103
+ backup_and_write output, content
104
+ puts "YML resume template generated in #{output}"
105
+ end
106
+ end
107
+
108
+ def self.md opts, argv
109
+ output = opts[:output] || "resume-#{Date.today}.md"
110
+ template = File.join(File.dirname(__FILE__), "/../templates/resume.md.erb")
111
+
112
+ render argv, template, output
113
+ puts "Resume generated in #{output}"
114
+ end
115
+
116
+ def self.json opts, argv
117
+ output = opts[:output] || "resume-#{Date.today}.json"
118
+ template = File.join(File.dirname(__FILE__), "/../templates/resume.json.erb")
119
+
120
+ render argv, template, output
121
+ puts "Resume generated in #{output}"
122
+ end
123
+
124
+ def self.europass opts, argv
125
+ output = opts[:output] || "resume-#{Date.today}.xml"
126
+ template = File.join(File.dirname(__FILE__), "/../templates/europass/eu.xml.erb")
127
+
128
+ render argv, template, output
129
+ puts "Resume generated in #{output}"
130
+ puts "Render via, e.g., http://interop.europass.cedefop.europa.eu/web-services/remote-upload/"
131
+ end
132
+
133
+ private
134
+
135
+ def self.render yml_files, template_filename, output_filename
136
+ data = Hash.new
137
+ yml_files.each do |file|
138
+ data = data.merge(YAML.load_file(file))
139
+ end
140
+ template = File.read(template_filename)
141
+ output = ERB.new(template).result(binding)
142
+ backup_and_write output_filename, output
143
+ end
144
+
145
+ def self.backup filename
146
+ FileUtils::cp filename, filename + "~"
147
+ puts "Backup copy #{filename} created in #{filename}~."
148
+ end
149
+
150
+ def self.backup_and_write filename, content
151
+ backup(filename) if File.exist?(filename)
152
+ File.open(filename, "w") { |f| f.puts content }
153
+ end
154
+ end
155
+ end
@@ -0,0 +1,192 @@
1
+ require 'slop'
2
+
3
+ module Resme
4
+ module CommandSyntax
5
+ # return a hash with all the commands and their options
6
+ def self.commands
7
+ h = Hash.new
8
+ self.methods.each do |method|
9
+ if method.to_s.include?("_opts") then
10
+ h = h.merge(eval(method.to_s))
11
+ end
12
+ end
13
+ return h
14
+ end
15
+
16
+ private
17
+
18
+ def self.version_opts
19
+ opts = Slop::Options.new
20
+ opts.banner = "version -- print version information"
21
+ help = <<EOS
22
+ NAME
23
+ #{opts.banner}
24
+
25
+ SYNOPSYS
26
+ #{opts.to_s}
27
+
28
+ DESCRIPTION
29
+ return version information
30
+
31
+ EXAMPLES
32
+ # resme version
33
+ resme version #{VERSION}
34
+ EOS
35
+ return { :version => [opts, :version, help] }
36
+ end
37
+
38
+ def self.console_opts
39
+ opts = Slop::Options.new
40
+ opts.banner = "console [options] -- Enter the console"
41
+ help = <<EOS
42
+ NAME
43
+ #{opts.banner}
44
+
45
+ SYNOPSYS
46
+ #{opts.to_s}
47
+
48
+ DESCRIPTION
49
+ Invoke a console, from which you can more easily run
50
+ resme commands.
51
+
52
+ EXAMPLES
53
+ resme console
54
+ resme:000>
55
+ resme:001>
56
+ resme:002>
57
+ EOS
58
+ return { :console => [opts, :console, help] }
59
+ end
60
+
61
+ def self.man_opts
62
+ opts = Slop::Options.new
63
+ opts.banner = "man -- print a manual page"
64
+ help = <<EOS
65
+ NAME
66
+ #{opts.banner}
67
+
68
+ SYNOPSYS
69
+ #{opts.to_s}
70
+
71
+ DESCRIPTION
72
+ Print the README file of this gem
73
+
74
+ EXAMPLES
75
+ resme man
76
+ EOS
77
+ return { :man => [opts, :man, help] }
78
+ end
79
+
80
+ def self.help_opts
81
+ opts = Slop::Options.new
82
+ opts.banner = "help [command] -- print usage string"
83
+ help = <<EOS
84
+ NAME
85
+ #{opts.banner}
86
+
87
+ SYNOPSYS
88
+ #{opts.to_s}
89
+
90
+ DESCRIPTION
91
+ Print help about a command
92
+
93
+ EXAMPLES
94
+ resme help
95
+ resme help generate
96
+ EOS
97
+ return { :help => [opts, :help, help] }
98
+ end
99
+
100
+ def self.init_opts
101
+ opts = Slop::Options.new
102
+ opts.banner = "init [-o output_filename]"
103
+ opts.string "-o", "--output", "Output filename"
104
+ opts.boolean "-f", "--force", "Overwrite existing file (if present)"
105
+ help = <<EOS
106
+ NAME
107
+ #{opts.banner}
108
+
109
+ SYNOPSYS
110
+ #{opts.to_s}
111
+
112
+ DESCRIPTION
113
+
114
+ Generate a YML template for your resume in the current directory.
115
+
116
+ EXAMPLES
117
+
118
+ resme init
119
+ resme -o r.yml
120
+ resme -o r.yml --force
121
+ EOS
122
+ return { init: [opts, :init, help] }
123
+ end
124
+
125
+ def self.md_opts
126
+ opts = Slop::Options.new
127
+ opts.banner = "md [-o output_filename] file.yml ..."
128
+ opts.string "-o", "--output", "Output filename"
129
+ help = <<EOS
130
+ NAME
131
+ #{opts.banner}
132
+
133
+ SYNOPSYS
134
+ #{opts.to_s}
135
+
136
+ DESCRIPTION
137
+
138
+ Generate a markdown resume from the YML input files.
139
+
140
+ EXAMPLES
141
+
142
+ resme md -o r.md resume.yml
143
+ EOS
144
+ return { md: [opts, :md, help] }
145
+ end
146
+
147
+ def self.json_opts
148
+ opts = Slop::Options.new
149
+ opts.banner = "json [-o output_filename] file.yml ..."
150
+ opts.string "-o", "--output", "Output filename"
151
+ help = <<EOS
152
+ NAME
153
+ #{opts.banner}
154
+
155
+ SYNOPSYS
156
+ #{opts.to_s}
157
+
158
+ DESCRIPTION
159
+
160
+ Generate a JSON resume from the YML input files.
161
+
162
+ EXAMPLES
163
+
164
+ resme json -o r.md resume.yml
165
+ EOS
166
+ return { json: [opts, :json, help] }
167
+ end
168
+
169
+ def self.europass_opts
170
+ opts = Slop::Options.new
171
+ opts.banner = "europass [-o output_filename] file.yml ..."
172
+ opts.string "-o", "--output", "Output filename"
173
+ help = <<EOS
174
+ NAME
175
+ #{opts.banner}
176
+
177
+ SYNOPSYS
178
+ #{opts.to_s}
179
+
180
+ DESCRIPTION
181
+
182
+ Generate a Europass XML resume from the YML input files.
183
+
184
+ EXAMPLES
185
+
186
+ resme europass -o r.md resume.yml
187
+ EOS
188
+ return { europass: [opts, :europass, help] }
189
+ end
190
+
191
+ end
192
+ end