GithubHelp home page GithubHelp logo

prat0318 / json_resume Goto Github PK

View Code? Open in Web Editor NEW
1.4K 33.0 117.0 2.36 MB

Generates pretty HTML, LaTeX, markdown, with biodata feeded as input in JSON

Home Page: http://prat0318.github.io/json_resume

License: MIT License

Ruby 39.63% HTML 30.93% CSS 29.44%
json html latex resume cv

json_resume's People

Contributors

delucas avatar drorata avatar guidobr avatar jremes-foss avatar juneqch avatar newproggie avatar prat0318 avatar ryeyao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

json_resume's Issues

Undefined method `convert_to_pdf'

Just pulled in the latest gem update and I'm seeing a different error now, convert_to_pdf method missing:

┌─[jonathan@thinkpad]─[~/tmp]
└──╼ json_resume convert --out=pdf resume.json 
Generating the pdf type...
/var/lib/gems/1.9.1/gems/json_resume-1.0.1/bin/json_resume:29:in `convert': undefined method `convert_to_pdf' for #<JsonResumeCLI:0x0000000319c460> (NoMethodError)
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /var/lib/gems/1.9.1/gems/json_resume-1.0.1/bin/json_resume:170:in `<top (required)>'
    from /usr/local/bin/json_resume:23:in `load'
    from /usr/local/bin/json_resume:23:in `<main>'
┌─[✗]─[jonathan@thinkpad]─[~/tmp]
└──╼ json_resume convert --out=pdf resume.json 
Generating the pdf type...
/var/lib/gems/1.9.1/gems/json_resume-1.0.1/bin/json_resume:29:in `convert': undefined method `convert_to_pdf' for #<JsonResumeCLI:0x00000001f8d5d0> (NoMethodError)
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /var/lib/gems/1.9.1/gems/json_resume-1.0.1/bin/json_resume:170:in `<top (required)>'
    from /usr/local/bin/json_resume:23:in `load'
    from /usr/local/bin/json_resume:23:in `<main>'

Am I doing something wrong? Using --out=tex_pdf works since it pushes it to writelatex.com.

Degree minor

It would be great to have support for minor in the bio_data.education.schools sections.

And maybe it would be useful to support arrays for major, which people could use for double majors. Though this is probably more complex than it's worth, when you could just have both majors in one string.

recreate the file automatically when it undergoes change

Nice project, I'm very gratefull ;)

I'm writting my cv now, but all the time when I save a file I need to go my terminal and type json_resume again. If it had a way to make rebuild every time I change a file.

Can be like json_resume convert file.json --watch

What you think about it?

Converting to PDF on linux (64bit) requires manual install of wkhtmltopdf

After installing json_resume and trying to convert it to a pdf (--out=pdf and --out=html_pdf), I see this error:

Generating the html_pdf type...
/var/lib/gems/1.9.1/gems/pdfkit-0.6.2/lib/pdfkit/pdfkit.rb:32:in `initialize': No wkhtmltopdf executable found at  (PDFKit::NoExecutableError)
>> Please install wkhtmltopdf - https://github.com/pdfkit/PDFKit/wiki/Installing-WKHTMLTOPDF
    from /var/lib/gems/1.9.1/gems/json_resume-0.3.2/bin/json_resume:68:in `new'
    from /var/lib/gems/1.9.1/gems/json_resume-0.3.2/bin/json_resume:68:in `convert_to_html_pdf'
    from /var/lib/gems/1.9.1/gems/json_resume-0.3.2/bin/json_resume:20:in `convert'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /var/lib/gems/1.9.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /var/lib/gems/1.9.1/gems/json_resume-0.3.2/bin/json_resume:131:in `<top (required)>'
    from /usr/local/bin/json_resume:23:in `load'
    from /usr/local/bin/json_resume:23:in `<main>'

The fix is to install the following:

apt-get install libfontconfig1
gem install wkhtmltopdf

This should probably be documented somewhere.

option method not found

OS - OSX Yosemite. Ruby - ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-darwin13.0]

Error on running "json_resume --help"
json_resume:27:in <class:JsonResumeCLI>': undefined methodoption' for JsonResumeCLI:Class (NoMethodError)

UTF-8 issues with mustache/ruby on Ubuntu when converting to any format.

/home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/mustache-0.99.6/lib/mustache/template.rb:3842:in block in render': incompatible character encodings: ISO-8859-1 and UTF-8 (Encoding::CompatibilityError) from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/mustache-0.99.6/lib/mustache/template.rb:3842:inmap'
from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/mustache-0.99.6/lib/mustache/template.rb:3842:in render' from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/mustache-0.99.6/lib/mustache/template.rb:43:inrender'
from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/mustache-0.99.6/lib/mustache.rb:124:in render' from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/mustache-0.99.6/lib/mustache.rb:85:inrender'
from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/json_resume-1.0.2/bin/json_resume:167:in generate_file' from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/json_resume-1.0.2/bin/json_resume:66:inconvert_to_html'
from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/json_resume-1.0.2/bin/json_resume:29:in convert' from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/thor-0.19.1/lib/thor/command.rb:27:inrun'
from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/thor-0.19.1/lib/thor.rb:359:indispatch'
from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /home/vagrant/.rvm/gems/ruby-2.1.2@global/gems/json_resume-1.0.2/bin/json_resume:176:in<top (required)>'
from /home/vagrant/.rvm/rubies/ruby-2.1.2/bin/json_resume:23:in load' from /home/vagrant/.rvm/rubies/ruby-2.1.2/bin/json_resume:23:in

'
from /home/vagrant/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in eval' from /home/vagrant/.rvm/gems/ruby-2.1.2@global/bin/ruby_executable_hooks:15:in'

i18n on templates

Add support for different languages.
I'd love to help with Spanish, and a PR with the basic mechanism for i18n templating.
Can we discuss the implementation?

tex_pdf output raises InvalidByteSequenceError

json_resume convert --out=tex_pdf ./petrus_resume.json

Generating the tex_pdf type...
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in encode': "\xE2" on US-ASCII (Encoding::InvalidByteSequenceError) from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:ininitialize'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:in new' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/json/common.rb:155:inparse'
from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/lib/json_resume/reader.rb:20:in initialize' from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/lib/json_resume/json_resume.rb:15:innew'
from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/lib/json_resume/json_resume.rb:15:in initialize' from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/lib/json_resume/json_resume.rb:7:innew'
from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/lib/json_resume/json_resume.rb:7:in new' from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/bin/json_resume:121:ingenerate_file'
from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/bin/json_resume:76:in convert_to_tex' from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/bin/json_resume:81:inconvert_to_tex_pdf'
from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/bin/json_resume:20:in convert' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:inrun'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in invoke_command' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:indispatch'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in start' from /Library/Ruby/Gems/2.0.0/gems/json_resume-0.3.2/bin/json_resume:131:in<top (required)>'
from /usr/bin/json_resume:23:in load' from /usr/bin/json_resume:23:in

'

Escape special characters in LaTeX

# and other special characters are not escaped when generating the LaTeX output. This then causes errors when using the generated tex file.

Enable using local settings for locale

Current implementation uses the locale settings as can be found in the gem's directory. This is very limiting and it would be helpful to support custom locales. Probably, the simplest is to use the approach as the one with the templates.

enhancement suggestion

Thank you for contributing to this excellent project.
I think there should be a key like href in papers/publications section to add href attribute to paper title. For example,

"papers": {
	   "items": [
	   		{
			"authors":"imtypist",
			"title":"This is a title",
                        "href":"http://xxx.com",  // add the key 'href'
			"misc":"Journal of Computer Applications, August 2017"
			}
		   ]
	}

Or you can delete the mark <a> outside title in HTML template, then we can use markdown-style to add a link to paper title. For example,

"papers": {
	   "items": [
	   		{
			"authors":"imtypist",
			"title":"[This is a title](http://xx.com)", // use markdown-style
			"misc":"Journal of Computer Applications, August 2017"
			}
		   ]
	}

I think the latter may be easier to modify.

Changing the locale

Hi,

I would like to add a new element in the education table (starting year). I managed to do it manually:

  • Added the field to the locale en.yml
  • Created a custom template for HTML

I managed to make it work. However, I would like to develop this further in my fork. To that end, I have a question:

I installed the tool using the gem install. How could I replace this with my fork? How to install/deploy changes that I make in my fork? Sorry for the naive question, I have never wrote anything in Ruby...

No wkhtmltopdf executable found at Could not locate Gemfile (PDFKit::NoExecutableError)

I've installed json_resume, pdfkit and wkhtmltopdf using gem install in a RVM environment.
Even though I can access wkhtmltopdf from the shell:

$ which wkhtmltopdf
/home/andre/.rvm/gems/ruby-2.1.2/bin/wkhtmltopdf
$

pdfkit cannot find the path itself:

$ json_resume convert --out=html_pdf andre_miras_cv.json
Generating the html_pdf type...
/home/andre/.rvm/gems/ruby-2.1.2/gems/pdfkit-0.6.2/lib/pdfkit/pdfkit.rb:32:in `initialize': No wkhtmltopdf executable found at Could not locate Gemfile (PDFKit::NoExecutableError)
>> Please install wkhtmltopdf - https://github.com/pdfkit/PDFKit/wiki/Installing-WKHTMLTOPDF
        from /home/andre/.rvm/gems/ruby-2.1.2/gems/json_resume-0.3.2/bin/json_resume:68:in `new'
        from /home/andre/.rvm/gems/ruby-2.1.2/gems/json_resume-0.3.2/bin/json_resume:68:in `convert_to_html_pdf'
        from /home/andre/.rvm/gems/ruby-2.1.2/gems/json_resume-0.3.2/bin/json_resume:20:in `convert'
        from /home/andre/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from /home/andre/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /home/andre/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
        from /home/andre/.rvm/gems/ruby-2.1.2/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from /home/andre/.rvm/gems/ruby-2.1.2/gems/json_resume-0.3.2/bin/json_resume:131:in `'
        from /home/andre/.rvm/gems/ruby-2.1.2/bin/json_resume:23:in `load'
        from /home/andre/.rvm/gems/ruby-2.1.2/bin/json_resume:23:in `'
        from /home/andre/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
        from /home/andre/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `'
$

Hardcoding the path in PDFKit.configure do |config| block of the convert_to_html_pdf method temporary solved the issue:

PDFKit.configure do |config|
  # dirty "PDFKit::NoExecutableError" workaround
  config.wkhtmltopdf = '/home/andre/.rvm/gems/ruby-2.1.2/bin/wkhtmltopdf'
  config.default_options = {
    :footer_right => "Page [page] of [toPage]    .\n",
    :footer_font_size => 10,
    :footer_font_name => "Georgia"   
  }
end

Unless pdfkit was installed properly and could find wkhtmltopdf by itself (e.g. which wkhtmltopdf), we could workaround this issue in json_resume by allowing the user to provide wkhtmltopdf path from command line.
This is some how related to #5, but not a duplicate.
I can try to come with a pull request later if you want me to, even though I'm not a Ruby dev.

single quotes converted to escape code &#39;

When compiling to tex_pdf with Ruby 2.1.3, single quotes in some (not all) fields -- like bio_data.other_projects.items[0].time -- appear to get converted to XML-like escape codes: &#39;. This isn't a problem with 1.9.3. Intended behavior, or a bug?

add support for YAML

It'd be awesome if you added support for YAML, since it's a little more human friendly for both reading and writing than JSON.

Website not showing examples

In the website of the project, when you try to see the examples of html version, a message appears: "This page has been blocked by Kerio Control". It seems an issue with firewall is messing with an ajax request.

wish to use some file in another project

Thanks for your OSS.

I wish to create a project for our own CV, so could I use some of the files (like the template) without the whole project (since we will do another design) ?

Getting errors when trying to convert to PDF

Getting the following errors when trying to convert to pdf

$ json_resume convert --out=pdf juanpaulo_cv.json
Generating the pdf type...
/Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/json_resume-0.3.2/bin/json_resume:20:in `convert': undefined method `convert_to_pdf' for #<JsonResumeCLI:0x007ff8a26ada90> (NoMethodError)
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/json_resume-0.3.2/bin/json_resume:131:in `<top (required)>'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/bin/json_resume:23:in `load'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/bin/json_resume:23:in `<main>'

Same thing happens when trying to convert to html_pdf

$ json_resume convert --out=html_pdf juanpaulo_cv.json
Generating the html_pdf type...
/Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/pdfkit-0.6.2/lib/pdfkit/pdfkit.rb:32:in `initialize': No wkhtmltopdf executable found at  (PDFKit::NoExecutableError)
>> Please install wkhtmltopdf - https://github.com/pdfkit/PDFKit/wiki/Installing-WKHTMLTOPDF
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/json_resume-0.3.2/bin/json_resume:68:in `new'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/json_resume-0.3.2/bin/json_resume:68:in `convert_to_html_pdf'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/json_resume-0.3.2/bin/json_resume:20:in `convert'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/json_resume-0.3.2/bin/json_resume:131:in `<top (required)>'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/bin/json_resume:23:in `load'
    from /Users/juanpaulo/.rbenv/versions/2.1.2/bin/json_resume:23:in `<main>'

By the way, I tried it on both 2.0.0-p353 and 2.1.2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.