Giter VIP home page Giter VIP logo

resume.md's Introduction

resume.md

Resume

Write your resume in Markdown, style it with CSS, output to HTML and PDF.

Prerequisites

  • Python ≥ 3.6
  • python-markdown (pip install markdown)
  • Optional, required for PDF output: Google Chrome or Chromium

Usage

  1. Download resume.py, resume.md and resume.css (or make a copy of this repository by using the template, forking, or cloning).

  2. Edit resume.md (the placeholder text is taken with thanks from the JSON Resume Project)

  3. Run python3 resume.py to build resume.html and resume.pdf.

    • Use --no-html or --no-pdf to disable HTML or PDF output.

    • Use --chrome-path=/path/to/chrome if resume.py cannot find your Chrome or Chromium executable.

Customization

Edit resume.css to change the appearance of your resume. The default style is extremely generic, which is perhaps what you want in a resume, but CSS gives you a lot of flexibility. See, e.g. The Tech Resume Inside-Out for good advice about what a resume should look like (and what it should say).

Change the appearance of the PDF version (without affecting the HTML version) by adding rules under the @media print CSS selector.

Change the margins and paper size of the PDF version by editing the @page CSS rule.

python-markdown is by default a very basic markdown compiler, but it has a number of optional extensions that you may want to enable (by adding to the list of extensions here). attr_list in particular may by useful if you are editing the CSS. abbreviations extension is already enabled.

resume.md's People

Contributors

alpaca1thunder avatar cernymichal avatar mikepqr avatar oupala avatar rifazn 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

resume.md's Issues

Why markdown over json?

Hey,

really cool project. I especially like your simple and clean design. I am in the process of switching from MSWord to something closer to raw text and was wondering what your reasons are for using markdown instead of json... especially because you know about jsonresume, which I just found out about because of your project.

So... why? :D

Having an empty line before the first `#` gives an IndexError

In the function:

def title(md: str) -> str:
    for line in md.splitlines():
        if line[0] == "#":  # IndexError if line is empty
            return line.strip("#").strip()
    raise ValueError("Cannot find any lines that look like markdown headings")

If there is an empty line in md, that line is just an empty string in the list returned by md.splitlines(). Accessing the empty string gives the IndexError.

Checking truthfulness on the line before accessing line[0] should be enough:

        if line and line[0] == "#":  # Check that line is truthy first

May I do a Pull Request if the issue and the resolution proposed is satisfactory?

[Help] Date right aligned when using bullet points

I want to be able to align the date to the right when I am using a bulleted list.

I have this:

**Formación Complementaria**

- **Título de socorrismo y priemeros auxilios, Cruz Roja** [40h] <span>2022<span>

The problem is that the 2022 is not right aligned in the pdf nor the html.

I want the same output that generates this:

### <span>Título de socorrismo y priemeros auxilios, Cruz Roja</span> <span>2022</span>

But preceded with a bullet point.

Fix PermissionError when removing TemporaryDirectory on Windows

I don't know if this only happens when it runs as a Github Action, or if it happens on regular Windows, but this is a pretty scary message for Windows users to see.

The access denied error is due to https://bugs.python.org/issue26660 (fixed in 3.8, but the Github windows environment uses 3.7, and I would rather not require 3.8 for users).

I am not sure why the exception we catch is bubbling up as "Exception ignored".

Could not delete C:\Users\RUNNER~1\AppData\Local\Temp\resume.md_3lhv1lk9
[WinError 5] Access is denied: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\resume.md_3lhv1lk9\\CrashpadMetrics-active.pma'
Exception ignored in: <finalize object at 0x263c82064d0; dead>
Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\weakref.py", line 572, in __call__
    return info.func(*info.args, **(info.kwargs or {}))
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\tempfile.py", line 797, in _cleanup
    _shutil.rmtree(name)
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\shutil.py", line 516, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\shutil.py", line 400, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "C:\hostedtoolcache\windows\Python\3.7.9\x64\lib\shutil.py", line 398, in _rmtree_unsafe
    os.unlink(fullname)
PermissionError: [WinError 5] Access is denied: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\resume.md_3lhv1lk9\\CrashpadMetrics-active.pma'

Warnings about box-shadow and media type

Hi thanks for the awesome project.

I got the following warnings after running make resume

WARNING: Ignored `box-shadow: 2px 2px 4px #AAAAAA` at 14:5, unknown property.
WARNING: Ignored `box-shadow: none` at 79:9, unknown property.
WARNING: Expected a media type, got screen/**/and/**/(max-width: 800px)
WARNING: Invalid media type " screen and (max-width: 800px) " the whole @media rule was ignored at 95:1.

Looks like weasyprint does not support box-shadow.

chrome branch fails on windows

The python script is able to detect my chrome install, but fails at making the pdf. This fails regardless of whether or not the pdf already exists:

Wrote resume.html
Found Chrome or Chromium at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[0419/104241.939:ERROR:headless_shell.cc(595)] Writing to file resume.pdf was unsuccessful, could not open file: FILE_ERROR_ACCESS_DENIED

The program hangs at this point, and I need to interrupt it to gain control again.

Add table support

Description

Render markdown tables. Should be able to add something along these lines and have it render.

| asdf | fdas |
| --- | --- |
| 123 | 321 |

Could be nice to have some nice CSS for the tables too.

Minimal Fix

Change

python -m markdown -x smarty resume.md >> $@

to

python -m markdown -x smarty -x tables resume.md >> $@

Reference

Eliminate weasyprint dependency

weasyprint's dependencies are non-trivial to install on Windows and macOS (especially Apple Silicon).

Chrome or chromium are much bigger dependencies, but much easier to install for most users (if not already installed).

This will generate resume.pdf from resume.html.

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --headless --print-to-pdf="resume.pdf" --print-to-pdf-no-header resume.html

The difficulty is figuring out the path of Chrome on all platforms (and especially Windows).

Fix Chrome SIGABRT on macOS

python resume.py on macOS results in:

Wrote resume.html
Found Chrome or Chromium at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[0316/071703.668323:WARNING:crash_report_exception_handler.cc(240)] UniversalExceptionRaise: (os/kern) failure (5)
Chrome died with <Signals.SIGABRT: 6> but you may find resume.pdf was created succesfully.

This appears to be harmless. resume.pdf is created just fine. But it's not a great UX.

[Feature Request] Hot reload on file change (.md/.css)

[Feature Request]

Use case: when writing my resume, I want to make sure that my PDF output does not exceed one page. Currently, I have to update the .md or .css file and run the command every time and check the PDF output. A better UX would be to have a watcher that would run the .py script every time the .md or .css file changes.
It would be great if we did not have to run the command again and again when updating my resume.

I will get my hands dirty on this, next weekend. However, I can test this only on win32 and I will need support for testing on macOS and Linux.

Make this project a pip-installable package

Ship the CSS file embedded in resume.py or in a data file documented in MANIFEST.in, and provide a command line option to point to custom CSS that should be embedded in the CSS file. (WIll need to verify CSS cascade behavior for this.)

(We don't want to go dependency crazy, but once this is done the additional burden of e.g. watchdog for #17 becomes small.)

Use Github Actions to build PDF

While the requirements are not particularly onerous, it would be nice to be able to build with zero dependencies, just by pushing to Github. I've set up the machinery to do this on the workflow branch. It basically works fine, but the PDF output doesn't look great because Times New Roman is not installed in the container that does the build. I cannot figure out how to install it in a headless (i.e. non-interactive and license compliant way).

This issue can be resolved by either:

  • Changing the default font to one that is installed or easy to install in the environment Github Workflows run
  • Figuring out how to install TNR in that environment
  • Deciding to live with the difference in output

Thoughts welcome!

Headers & Footers on latest Chrome

Hey, apologies for the brief issue report. I'm using this to help with a school assignment and have to get back to writing it.

I tried with the latest Google Chrome on macOS (120.0.6099.62, installed with brew) , and with the Chromium that ships with the latest Debian stable (120.0.6099.71, tried via a Docker container), and it seems to print headers and footers on the output pdf.

I'm able to generate the expected pdf by pulling in a earlier debian container (buster) that ships with version 90 or so of Chromium, and I'm able to generate a correct pdf with that. I'm assuming it worked with 119, and broke with 120.

Thanks for this wonderful project! Let me know if I can help at all.

Font awesome support for PDF

First of all, thanks for this repo! I really like this workflow. I did run into one issue when I inserted Font Awesome icons via a Font Awesome kit. The icons show up fine on the HTML version of the resume, but they do not show up in the PDF.

However, if I manually use my Chrome browser to print the HTML resume to PDF then the icons do show up in the saved PDF. This makes me think the base64 HTML encoding step might be causing an issue with the Font Awesome icons. Do you know if there is a different way I can encode the HTML content so that the Font Awesome icons will be preserved?

For reference below is the HTML content for a Font Awesome icon (you can set the kit to use either the web font or the SVG version).

Web font (default):

<i class="fa fa-envelope" aria-hidden="true"></i>

SVG:

<svg class="svg-inline--fa fa-envelope" aria-hidden="true" focusable="false" data-prefix="fas" data-icon="envelope" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" data-fa-i2svg=""><path fill="currentColor" d="M464 64C490.5 64 512 85.49 512 112C512 127.1 504.9 141.3 492.8 150.4L275.2 313.6C263.8 322.1 248.2 322.1 236.8 313.6L19.2 150.4C7.113 141.3 0 127.1 0 112C0 85.49 21.49 64 48 64H464zM217.6 339.2C240.4 356.3 271.6 356.3 294.4 339.2L512 176V384C512 419.3 483.3 448 448 448H64C28.65 448 0 419.3 0 384V176L217.6 339.2z"></path></svg>

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.