Giter Site home page Giter Site logo

there4 / markdown-resume Goto Github PK

View Code? Open in Web Editor NEW
1.8K 62.0 522.0 10.4 MB

Generate a responsive CSS3 and HTML5 resume with Markdown, with optional PDF output.

License: MIT License

PHP 31.28% CSS 24.77% HTML 2.39% Dockerfile 1.40% Twig 2.25% Less 37.91%

markdown-resume's Introduction

Markdown Resume Generator Build Statusnodesource/node

Convert markdown to HTML and PDF resumes

Turn a simple Markdown document into an elegant resume with both a perfect pdf printable format, and a responsive css3 html5 file. You can view a sample at the blog post for the project, or look in examples/output to see sample PDFs.

Features

  • Multiple styles to choose from: modern, blockish, unstyled, readable, swissen (Fork and add more!)
  • PDF generation via wkhtmltopdf
  • Responsive design for multiple device viewport sizes
  • Simple Markdown formatting
  • Single file deployment (no external stylesheets)
  • You can now version control and branch your resume.

Installation

Docker

Run those commands in the directory where you put your markdown resume.

Oneshot command

This is best suited for use in scripts or in CI environments:

docker run -v ${PWD}:/resume there4/markdown-resume md2resume [options] command [arguments]

Interactive console

This allows you to enter an interactive console where you can easily experiment and run different commands:

docker run -it -v ${PWD}:/resume there4/markdown-resume

Local

  1. Clone the repo git clone [email protected]:there4/markdown-resume.git or Download ZIP

  2. PHP 7 and composer are installed and on your PATH

  3. composer install inside of the project directory to install dependencies

  4. For generating PDF files, you need to install wkhtmltopdf

    • OSX: brew cask install wkhtmltopdf via Homebrew Cask
    • Debian: sudo apt install php7.0-mbstring wkhtmltopdf
    • Fedora sudo dnf install php-mbstring wkhtmltopdf

Usage

The two most important commands are the following two. Run them inside the cloned directory

./bin/md2resume html examples/source/sample.md examples/output/
./bin/md2resume pdf examples/source/sample.md examples/output/

Help

Markdown Resume Generator version 2.3.0 by Craig Davis

Usage:
  [options] command [arguments]

Options:
  --help           -h Display this help message.
  --quiet          -q Do not output any message.
  --verbose        -v|vv|vvv Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
  --version        -V Display this application version.
  --ansi              Force ANSI output.
  --no-ansi           Disable ANSI output.
  --no-interaction -n Do not ask any interactive question.

Available commands:
  help        Displays help for a command
  html        Generate an HTML resume from a markdown file
  list        Lists commands
  pdf         Generate a PDF from a markdown file
  stats       Generate a word frequency analysis of your resume
  templates   List available templates
  version     Show current version information

Examples

Choose a template with the -t option.

./bin/md2resume html --template blockish examples/source/sample.md examples/output/

If you want to edit your markdown resume in your editor while watching it update in your browser, run this command:

watch ./bin/md2resume html --refresh yes --template modern examples/source/sample.md examples/output/

This makes the build script run periodically, and html document will refresh every two seconds via a meta tag. Open the ./examples/ouput/sample.html file in your browser, and then just save your markdown document when you want to see a fresh preview.

Authoring Your Resume

Markdown is limited to basic html markup. Follow the examples/source/sample.md file as a guideline. This file includes various headers and several nested elements. This allows us to construct a semantic HTML document for the resume, and then use CSS rules to display a nicely formatted resume. Note that because we have very few ways to nest or identify elements that many of the css rules are based on descendant and adjacent selectors.

Feature Development

In order to add new commands, you'll need to first install the dependencies via composer install

After that, you can run the md2resume_dev.php file from the command line.

Building a Release

  1. Tag the repo with the new build number.
  2. Run composer build.
  3. Push both the tag and the code.

Acknowledgments

The initial inspiration is from the Sample Resume Template. However, no HTML from that project has been used in this. General layout has been reused, and media queries have been added. It's a nice template, and if you are a more comfortable with html than markdown, you should use it.

Changelog

  • 2.3.1 : Fix embedded images in PDF generation with Docker @danielklim
  • 2.3.0 : Add Docker support to ease the installation process @spawnia
  • 2.2.0 : Dropped phar file distribution, removed Pake and migrated to composer commands
  • 2.1.0 : Dropped PHP5 support
  • 2.0.12 : Added new Roboto template from @ejwaibel
  • 2.0.10 : Updated spacing in moder template with commites from @501st-alpha1
  • 2.0.9 : Updated Modern template with improved spacing. Update parsing of --template option to close issue #7
  • 2.0.8 : New readable theme contributed by @ahmadnazir, minor refactor to support a /links directory
  • 2.0.7 : Update composer to use sunra/php-simple-html-dom-parser this appears to be better maintained and more popular to close #27
  • 2.0.6 : Fix empty template list from phar file to close #24
  • 2.0.5 : Remove default value for the --refresh option to close #22
  • 2.0.4 : Fix path resolution problem with absolute paths to close #16
  • 2.0.3 : Add optional duration to the --refresh option to close #15
  • 2.0.2 : Add new dependency check for mbstring to close #20
  • 2.0.1 : Add new swissen template with Helvetica styling @beautifulcode
  • 2.0.0 : Complete rewrite with the symfony console component. Deployment is now done with a compiled phar file, and development dependencies are managed with composer.
  • 0.9.0 : Add composer and update README with new changelog
  • 0.8.8 : Add Chinese text example @ishitcno1
  • 0.8.7 : Update pdf formatting of the modern template @roleary
  • 0.8.6 : Fix output path @abhikandoi2000
  • 0.8.5 : Fix issue #2
  • 0.8.4 : Correct chmod and add parameter for output directory @kevinxucs
  • 0.8.2 : Update build script and add refresh command option
  • 0.8.1 : Updating formatting of initial templates
  • 0.8 : Initial Release to Public

markdown-resume's People

Contributors

501st-alpha1 avatar abhikandoi2000 avatar ahmadnazir avatar aleksandrbogdanov avatar asbjornu avatar bebound avatar craig-davis avatar danielklim avatar doew avatar ishitcno1 avatar jake-low avatar johnpneumann avatar kevinxucs avatar m5oul avatar molecule avatar oflannabhra avatar spawnia avatar tigerclaw-az avatar tribela 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  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

markdown-resume's Issues

指標計算

人格特質指標數值分析

一、基礎指標計算方式:

1.1 以本命盤為計算基礎。
1.2 以個星曜所在的位置計算出分數。
計算數值內容:
1.2.1各星曜之數值。
1.2.2各宮之祿、權、科、忌各數值。
1.2.3各宮職之總分。

1.3 基礎指標:以各動盤(本命、十年、流年、流月、流日)所計算出之各數值計算。

1.3.1 計算說明:各宮職無主星不借對宮主星計算;星曜及四化數值分開計算,有加權分別計算,再按比例加總。
1.3.2 指標建立(基礎指標):先要建立各指標名稱及所使用的星曜及該星曜所在之四化數值之組合,
1.3.3 應用指標建立:是由數個基礎指標所組合而成,成為新指指標。

1.3.4 各星曜數值計算方式,指標所定義之星曜,分為星曜基本數值及加權比例,每一星曜計算方式如下:
例如基礎指標名稱「表達能力」,是由巨門、天機、奏書、天梁四顆星曜所組合而成。
找出各星曜之基本數值、在何宮職、該宮之四化各數值(祿權科忌)及該宮位總分。
各星曜在此「表達能力」是佔多少比例之分配;以例為例巨門(100%)、天機(50%)、奏書(100%)、天梁(50%),比例是可以調整。各星曜計算完成,再乘上權重。若上述星曜是在宮職在「命宮」預設值為130%、「遷移宮」預設值為120%、「財帛宮」或「官祿宮」預設值為110%
例巨門星在財帛宮基礎數值為5*100%(星曜分配比例)*110%(財帛加權)星曜總分為5.5

1.3.5 四化數值計算,指標所定義之星曜所在的宮位四化數值列出。
四化計算是各星曜在各宮之四化數值做計算,各四化都有獨自加權計算。
以上例巨門星為例,巨門星在財帛宮,四化數值(祿28.3100%+權0100%+科1100%+忌-5100%)*100%(星曜分配比例)=24.3

1.3.6 星與四化數值分配比例(需可調)。
預設值為星曜佔50%、四化佔50%。
以上述例子星曜總分為5.550%+四化總分24.350%=14.9

1.3.7 宮位總分計算。
除上述之計算以外,以宮職總分*40%(星曜、四化分配比例)。

1.3.8 指標總分計算。
由上述數個星曜及四化分數加總,加上宮位總分計算,為指標總分。

計算樣如 Excel 檔案所示。

二、應用指標計算方式:

2.1 建立應用指標:應用指標是以數個基礎指標加以組合,分例分配成為新應用指標。

2.1.1 計算說明:先定義新指標名稱,將基礎指標依例計算加總。

2.1.2 混合計算:基礎指標+基本星曜、四化、宮職計算。

三、需求說明:

3.1 建立指標名稱:可以分別新增、修改、刪除各指標內容及計算方式。

3.1.1 數值比較:可以複製完整數值備份使用,可以同時比較三種不同設定數值差異。

3.1.2 指標輸出:可以選擇部份數值顯示或比較。

3.2 基礎指標運算。(各項指標完成定義後,再執行,內部研究用)

3.2.1 指標完成定義,要全部計算一次,時間從民國13年(甲子年)農曆一月一日子時開始,每一個時辰計算一組指標,到民七十二年(癸亥年)農曆十二月三十日亥時止。合計有約262,800盤。

3.2.2 計算出各指標統計值,例如,最高值、最低值,峰值、組距、標準差、中間值等。

Nice! Just a few questions...

Can it create a hash table of linked pages and make a bibliography or references list to add at the end of the document automatically? With [n] besides the link and everything? That'd be great for writing dissertations in Markdown and then easily converting it to pdf to print it.

Also, I said hash so there are no repeated links, but, yeah, that's pretty much what I mean.

Please respond soon as I'm writing a book on Markdown and would like to see it printed maybe before next month ends.

Running ./bin/md2resume results in error message - Linux

$ ./bin/md2resume 

The dependency '' was not found. Please run `composer install` to install dependencies.

I have run composer install as instructed and all dependencies have been installed, but still receive the error message. This is happening in Ubuntu.

Make PDF File Size Smaller

Is there any way to compress the size of the generated PDF output? I'm getting a file that's 1.7MB for a single file, and a few sites I've tried to upload to (Nordstrom, Dice) are rejecting it because their systems can't handle files that large.

Thanks!

Error running

The phar file isn't running after cloning the repository for some reason. Running this: ./bin/md2resume html examples/source/sample.md examples/output/

Results in the following error:
PHP Fatal error: Call to undefined function mb_detect_encoding() in phar:///home/abrarisme/Downloads/markdown-resume/bin/md2resume/vendor/simple- html-dom/simple-html-dom/simple_html_dom.php on line 1234

I'm pretty sure I'm doing something wrong and I'm not quite sure what that is.

Emacs users, beware of auto-saved files overwriting your template edits

I am an Emacs user and if you're one too, you might be wondering why all the edits you made to the css files weren't reflected.

Markdown Resume Generator takes all the css files in the template folders and concatenate them in the html file according to alphabetical order: normalize.css -> pdf.css -> resume.css -> screen.css (and other css files that you may have created in the folder).

By default, Emacs autosaves your files in the same working directory of the files you edit. These files are named exactly the same as your original file, but with a '~' at the end. These files will also go into the Markdown resume generator machinery! So if you edited resume.css, Emacs autosaves the original version of that file and this is what you have in your html: normalize.css -> pdf.css -> resume.css -> resume.css~ -> screen.css. Therefore, any changes you made in resume.css will be reversed!

You can remove the autosaved files before you generate your new html resume, but a more convenient way to deal with it is to instruct Emacs to either (1) not autosave files or (2) autosaved files in separate location. I chose the latter solution.

You can find information on how to do that and other information about auto-saving in Emacs here: Emacs Wiki: Auto Save

This is what I did in my Emacs init (.emacs) file (copied from the Emacs Wiki, but here for easy yanking):

;; Save all tempfiles in $TMPDIR/emacs$UID/                                                        
(defconst emacs-tmp-dir (format "%s%s%s/" temporary-file-directory "emacs" (user-uid)))
(setq backup-directory-alist
    `((".*" . ,emacs-tmp-dir)))
(setq auto-save-file-name-transforms
    `((".*" ,emacs-tmp-dir t)))
(setq auto-save-list-file-prefix
      emacs-tmp-dir)

Auto-saved files are therefore saved in /tmp/emacs$UID/

Thank you @adilapapaya for helping me get started and explaining how Markdown Resume Generator works!

Allow user to set paper size for PDF command

Currently defaults to A4. Would be nice to have an optional argument for this.
Wkhtmltopdf has an argument for it:

  -s, --page-size <Size>              Set paper size to: A4, Letter, etc. (default A4)

Going through the source code leads me to believe the following sizes are supported:

  • A0
  • A1
  • A2
  • A3
  • A4
  • A5
  • A6
  • A7
  • A8
  • A9
  • B0
  • B1
  • B2
  • B3
  • B4
  • B5
  • B6
  • B7
  • B8
  • B9
  • B10
  • C5E
  • Comm10E
  • DLE
  • Executive
  • Folio
  • Ledger
  • Legal
  • Letter
  • Tabloid

Wrong indentation in new page(pdf)

Hi, thanks for developing this powerful tool, but there is a bug when generate CV in pdf,

for example ### Experience {#experience}, when its content are in a new page and the ### Experience {#experience} is in the previous page, the contents are not in correct indentation.

Add CSS for regular ul / li

Rationale: I want to put a list of publications in the CV (important for academic people). This is currently not possible with most templates (with the exception of readable) because the CSS for lists is used to display items in line, instead of one per line.

Extra CSS (a specific ID, perhaps, like footer already does) would definitely helpon that regard.

Can't generate resume to /home/* path

I was trying to run md2resume from the project folder and set my destination folder to "/home/Work/":

md2resume html /home/Work/resume.md /home/Work/

After running the command I received an error that PHP couldn't write to folder "home/Work/". Notice the missing '/' at the beginning of the path.

Allow for custom output file

Instead of forcing the output filename to match the source file appended with ".html", why not allow for a custom output file?

e.g. md2resume html resume.md index.html

Issues getting started -- some hints/tips

I'm trying to modify the css files for my purposes, which include adding a Publications section that @lbeltrame also suggested. I also wanted to see if I can have my paragraphs start all the way to the left of the page (not after the h3 headings) so that I can also write my personal statement using the same css template.

With no experience using php and whatnot, I tried to use the CSS files directly with my .md file using pandoc. However, the output is not the same as the generator-produced one.

May I know why this is and if anyone knows, how to tinker the CSS files and test the changes effectively (I guess not having to build a release every time)?

Links strangely generated

It seems that the links, ex: [damir.tech](https://damir.tech) are not being generated properly.

Example: https://damir.tech/ddulic.pdf
Which is generated via docker from https://github.com/ddulic/resume

When generated locally everything is normal.

Searched through the issues but couldn't find any issue like mine.

Here is a link to the Dockerfile: https://github.com/ddulic/markdown-resume/blob/master/Dockerfile
The issue occurs in every template.

#46
#65

Anyone have any thoughts on where the problem might be?

Other then that the docker image and pdf are generated without a problem via docker and travis-ci.

Great work on the project!

Usage with Docker

Hi, i have been using the project for a bit now - it has been great so far.

However, i did run it on Docker and while it was not hard to set up, i thought we could ease the installation process by prebuilding an image. Would you be willing to link the repo with Docker Hub and build an easy-to-use image?

I can help you with setting that up and also have a Dockerfile ready which we can use. Let me know if you are interested.

README has incorrect instructions

The README.md has an instuction for You may need to run './compos er.phar update', but there is no more composer.phar file included. Should this just say to run composer update && composer install?

How to change fonts ?

Hi,
Thanks for the good Resume creator.
I used it (no customization at all) on 2 different Linux installations and on the last one the <sample.pdf> created using the default "template" for PDF outputs is generated with "Arial" fonts ( ? ) and not "Times Roman" as usual in the standard short example.
Which is the way to restore or keep the default fonts ?
Is there any particular Latex configuration to respect ?

PS: Is there a way to generate HTML links as in Pandoc/markdown into the Resume?
Thanks...

sample-page-001

include example pdf or html resume in repo.

Just cloned and used your resume generator. I like it, although it would be nice to have a sample pdf/html resume in the repo so prospective users can get a feel for the style before deciding to clone, install software dependencies, generate a sample, etc

Unwanted boxes in PDF conversion

Hi,
Fantastic project. I'm getting unwanted boxes in the PDF conversion. These are not present in the HTML conversion. I reinstalled wkhtmltopdf, but I'm still getting the issue. Any guidance on how to fix this issue?

screen shot 2015-01-21 at 2 21 32 pm

Project is unlicensed

There is no license for this project; would you mind putting it under a software license so users can know what they can do legally with the code?

Update simple-html-dom source repo

Hi,

Wanted to say a huge thank you for the great project and your time answering issues. I'm having trouble editing the css of the templates - any changes I make are not reflected in the output files. Such as making an element a massive font size and then running ./bin/md2resume html --template swissen examples/source/stevevandervalk_resume.md examples/output/ produces the same file as before so obviously I am doing something wrong... Any advice would be very appreciated!

Thanks.

Split index.html templates into header/content/footer sections

I was trying to write a template that would allow the "header" portion of my resume to stay fixed at the top of the page. However, I realized that the format of the index.html doesn't really make the CSS for this very easy. However, if I could have "header", "content", and "footer" sections, then I could easily style my CSS for those specific sections.

If there is a way to do this by manipulating my Markdown in a specific way, I would love to know the solution! Thanks!

Running `composer install` doesn't produce md2resume_dev.php file

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

After command is finished, the md2resume_dev.php file doesn't get created.

Release 2.0.7 is not tagged

The latest release has not been tagged which is why the version details are automatically updated to the previous version when the build task is run.

Run md2resume in docker

I am trying to build my resume as pdf from within a docker container. I am getting this error

QXcbConnection: Could not connect to display

Is there a workaround for this? My Dockerfile looks like this

FROM php:5-cli
VOLUME /out
ENV DEBIAN_FRONTEND noninteractive
RUN docker-php-ext-install mbstring
RUN apt-get update && apt-get -qqy install wget wkhtmltopdf
RUN wget https://github.com/there4/markdown-resume/raw/master/bin/md2resume && chmod +x md2resume
CMD ./md2resume html /out/sklose.md /out/html && ./md2resume pdf /out/sklose.md /out/pdf

The output I get is this

Wrote resume to: /out/html/sklose.html
QXcbConnection: Could not connect to display
Aborted (core dumped)
Wrote pdf resume to: /out/pdf/sklose.pdf

... it says the pdf was created, but it's actually not

Trailing spaces required for linebreak

In the header information section, i get some unexpected/undocumented behaviour.

So at first, i took the template from the example and edited some text - all was good:
image

Then, i removed the trailing spaces (which you can see marked underlined as green by the markdown linter i am using) and this happened:
image

So next, i tried adding new lines in between, which gave me too much spacing inbetween.
image

Also, a single trailing space does not do it, i has to be 2 or more trailing spaces. I think there is a good chance that other people might run into this issue as well, so i would suggest either:

  1. Change the behaviour so that this list shows up in a newline regardless of trailing spaces
  2. Explicitely mention that you can have simple linebreaks by adding two trailing spaces

While it is not really intuitive, option 2 seems like it is actually a feature. For example, i found that i can control the way linebreaks are handled in paragraphs of text more fine-grained because of this:
image

PDF output is tiny

All I did was run the example command:

$ ./bin/md2resume pdf examples/source/sample.md examples/output/

See the attached screenshot:

screen shot 2017-07-05 at 10 51 47 pm

OS: macOS Sierra 10.12.5 (16F73)
Safari: 10.1.1 (12603.2.4)

Add avatar to modern version.

Hey guys,

I'm using this repo to generate my own resume and it is fantastic! What about modify the modern template and add the avatar left to the Name part?

Please run `composer install` to install dependencies

After going through the required steps to get there4/markdown-resume and all of its dependencies (leafo/scssphp, symfony/event-dispatcher) installed with composer, I now have the ./vendor/bin/md2resume binary available. But executing it only yields the following:

Please run composer install to install dependencies

However, executingcomposer install doesn't actually install anything because everything seems to be installed:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files

Ideas on what I might be missing or doing wrong?

Modern template exception

If I setup dev to use md2resume_dev.php or "compile" using pake I get an exception for the modern template. I know at least blockish doesn't have this problem. I haven't changed anything in the templates folder. Maybe composer updated a package that is causing the problem. I'd really like to tweak some of the templates or create my own.

Here it the exception. I included the newlines in case that helped find the problem. Thanks!
[Exception]
parse error: failed at `Bud1
ents.l

elements.lessIlocblobF(
normalize.cssIlocblob?(??????pdf
.cssIlocblobR(??` line: 1

Move common template index.html and css files into "default" folder

I noticed that each of the /template/* folders have almost the exact same CSS and the exact same index.html file. Can these be moved into /templates/default and inserted into the template being used during generation?

Then each template folder would only contain the necessary CSS required to overwrite the common styling.

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.