n3bulous-resume2 0.2.0 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,22 +2,68 @@
2
2
 
3
3
  ## Description ##
4
4
 
5
- Resume2 is a command line tool to manage your resume from a central data (YAML) file.
5
+ Resume2 is a command line tool to manage your resume from a central data (YAML) file. Why YAML? Because no one should ever have to write an XML file.
6
6
 
7
7
  Right now it will process a Markdown file and merge the data into it. From there you can create a PDF or HTML via TextMate. Plenty of refinements before I even contemplate labeling it ready for public consumption.
8
8
 
9
9
  ## Installation ##
10
10
 
11
- (once the gemspec has been written and tested...)
12
-
13
11
  sudo gem install n3bulous-resume2 --source=http://gems.github.com
14
12
 
15
-
16
13
  ## Usage ##
17
14
 
15
+ Initial instructions:
16
+
17
+ 1. Create a resume.yml file, nesting your data as appropriate to capture the data, basically a collection of hashes and arrays:
18
+
19
+ name:
20
+ given: Kevin
21
+ surname: McFadden
22
+
23
+ skills:
24
+ brief:
25
+ - [ "Databases", "MySQL, Oracle 8i/9i, Informix 7, PostgreSQL" ]
26
+ - [ "Programming", "Ruby, PHP, Java, BASH, Forth, Perl, C, C++, Objective C" ]
27
+ - [ "Operating Systems", "Linux, Solaris, OS X, HP-UX, MS Windows" ]
28
+ - [ "Miscellaneous", "Scrum, XP, Subversion, Git, CVS, XHTML, XML, XML-RPC, AJAX" ]
29
+
30
+ 2. Create a [Markdown](http://daringfireball.net/projects/markdown/syntax) template to style the resume.
31
+
32
+ <div style="font-style: bold; font-size: 1.4em; text-align: center"><%= "#{name.given} #{name.surname}" %></div>
33
+ <div style="text-align: center">
34
+ <p>
35
+ <%= "#{address.street}, #{address.city}, #{address.state}, #{address.postal.to_s}" %><br/>
36
+ <%= "#{contact.email} | #{contact.mobile}" %><br/>
37
+ <%= contact.urls.linkedin %><br/>
38
+ </p>
39
+ </div>
40
+
41
+ <table>
42
+ <% skills.brief.each do |a| %>
43
+ <tr>
44
+ <th><%= a[0] %></th>
45
+ <td><%= a[1] %></td>
46
+ </tr>
47
+ <% end %>
48
+ </table>
49
+
50
+ 3. Combine the two with resume2 to generate the Markdown output.
51
+
52
+ resume2 markdown resume.markdown.erb resume.yml > resume.markdown
53
+
54
+ 4. Right now I'm using [MultiMarkDown](http://fletcherpenney.net/multimarkdown/multimarkdown_bundle_for_textm/) with TextMate to generate the HTML/PDF, but I'm aiming to streamline the process and avoid using TextMate in my process. MultiMarkDown supports CSS allowing for better styling.
55
+
56
+ MultiMarkDown is a Perl script, so the final version may require its installation...
18
57
 
19
58
  ## TODO ##
20
59
 
60
+ * .resume2rc config file to specify defaults for resume file paths, resume.yml, and theme.
61
+ * Refine
62
+ * Refactor generator to handle the different outputs.
63
+ * Support direct, PDF output.
64
+ * Support RTF templates.
65
+ * Support XHTML, Markdown, and text templates. (essentially done, needs cleanup)
66
+ * Full examples.
21
67
 
22
68
  ## License ##
23
69
 
data/Rakefile CHANGED
@@ -17,7 +17,7 @@ spec = Gem::Specification.new do |s|
17
17
  s.email = 'kevin+github@conceptsahead.com'
18
18
  s.homepage = 'http://conceptsahead.com'
19
19
  s.files = %w(README.markdown Rakefile) + Dir.glob("{lib,test}/**/*")
20
- s.executables = ['resume2']
20
+ s.executables = ['resume2', 'resume2markdown', 'resume2pdf', 'resume2txt', 'resume2html', 'resume2rtf', 'resume2all']
21
21
 
22
22
  s.add_dependency('rdiscount', '~> 1.2.0')
23
23
  end
@@ -0,0 +1 @@
1
+ resume2
@@ -0,0 +1 @@
1
+ resume2
@@ -0,0 +1 @@
1
+ resume2
@@ -0,0 +1 @@
1
+ resume2
@@ -0,0 +1 @@
1
+ resume2
@@ -0,0 +1 @@
1
+ resume2
@@ -0,0 +1,11 @@
1
+ class Hash
2
+ # Access a hash as a JavaScript hash: foo.bar.baz
3
+ # Gavin Kistner -- http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/92897
4
+ def method_missing(meth,*args)
5
+ if /=$/=~(meth=meth.id2name) then
6
+ self[meth[0...-1]] = (args.length<2 ? args[0] : args)
7
+ else
8
+ self[meth]
9
+ end
10
+ end
11
+ end
@@ -1,5 +1,6 @@
1
1
  $:.unshift File.dirname(__FILE__)
2
2
 
3
+ require 'core_ext/hash'
3
4
  require 'rubygems'
4
5
  require 'rdiscount'
5
6
  require 'erb'
@@ -8,3 +9,6 @@ require 'ostruct'
8
9
  require 'resume2/version'
9
10
  require 'resume2/resume2_application'
10
11
  require 'resume2/generator'
12
+
13
+
14
+
@@ -1,14 +1,18 @@
1
1
  class Generator
2
2
  def initialize(template_file, resume_file)
3
- yaml_data = YAML::load_file(resume_file)
4
- data = OpenStruct.new(yaml_data.to_hash)
5
-
6
- template = IO.read(template_file)
3
+ begin
4
+ yaml_data = YAML::load_file(resume_file)
5
+ # data = OpenStruct.new(yaml_data.to_hash)
6
+ data = yaml_data.to_hash
7
+ template = IO.read(template_file)
7
8
 
8
- @template_with_data = ERB.new(template, 0, ">").result(data.send(:binding))
9
- puts @template_with_data
10
- markdown = RDiscount.new(@template_with_data)
11
- # puts markdown.to_html
9
+ @template_with_data = ERB.new(template, 0, ">").result(data.send(:binding))
10
+ puts @template_with_data
11
+ markdown = RDiscount.new(@template_with_data)
12
+ # puts markdown.to_html
13
+ rescue
14
+ puts $!
15
+ end
12
16
  end
13
17
 
14
18
  def write(output, format)
@@ -3,7 +3,7 @@ module Resume2
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 2
6
- TINY = 0
6
+ TINY = 5
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: n3bulous-resume2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin McFadden
@@ -10,7 +10,7 @@ bindir: bin
10
10
  cert_chain: []
11
11
 
12
12
  date: 2009-01-18 00:00:00 -08:00
13
- default_executable: resume2
13
+ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rdiscount
@@ -25,6 +25,12 @@ description:
25
25
  email: kevin+github@conceptsahead.com
26
26
  executables:
27
27
  - resume2
28
+ - resume2markdown
29
+ - resume2pdf
30
+ - resume2txt
31
+ - resume2html
32
+ - resume2rtf
33
+ - resume2all
28
34
  extensions: []
29
35
 
30
36
  extra_rdoc_files:
@@ -32,6 +38,8 @@ extra_rdoc_files:
32
38
  files:
33
39
  - README.markdown
34
40
  - Rakefile
41
+ - lib/core_ext
42
+ - lib/core_ext/hash.rb
35
43
  - lib/resume2
36
44
  - lib/resume2/generator.rb
37
45
  - lib/resume2/resume2_application.rb
@@ -41,6 +49,12 @@ files:
41
49
  - test/unit
42
50
  - test/unit/resume2_test.rb
43
51
  - bin/resume2
52
+ - bin/resume2markdown
53
+ - bin/resume2pdf
54
+ - bin/resume2txt
55
+ - bin/resume2html
56
+ - bin/resume2rtf
57
+ - bin/resume2all
44
58
  has_rdoc: true
45
59
  homepage: http://conceptsahead.com
46
60
  post_install_message: