npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@reagent/resume-generator

v1.0.0

Published

This is a commandline utility that allows you to generate a PDF résumé from a collection of [Markdown] content and associated template(s).

Downloads

2

Readme

Résumé Generator

This is a commandline utility that allows you to generate a PDF résumé from a collection of Markdown content and associated template(s).

Installation

Install globally with Yarn:

yarn global add @reagent/resume-generator

Or NPM:

npm install --global @reagent/resume-generator

Quickstart

This tool ships with some sample files that will allow you to create and iterate on your résumé:

resume init my-resume && resume generate my-resume

You can now open the generated PDF file to see the result (macOS):

open my-resume/output/resume.pdf

You can modify the included content and templates and re-run the generate subcommand to generate a new PDF file.

Deeper Dive

This tool is designed to separate the content of your résumé (Markdown files) from the presentation (EJS template files) of said content. Your content files and template file are combined to build an HTML document that can then be rendered as a PDF.

Initializing the Directory

Start by using the init subcommand to create the directory template:

resume init my-resume

This creates the following structure:

my-resume
├── assets
│   └── fonts
│       └── icons.ttf
├── config.json
├── content
│   └── readme.md
└── templates
    └── resume.html.ejs

The major components of importance are:

  • templates - The location of template files that determine the pages and layout for your résumé. This becomes the HTML that is rendered and used to generate the final PDF. See Working with Templates for more details.
  • content - Directory where Markdown-formatted source content is located. The content is designed to be modular in order to be mixed and matched inside of your template(s). See Defining and Using Content Blocks for more.
  • config.json - Configuration file that determines the templates used, the output filename, and any additional PDF formatting options. See Configuring Output for details.

Working with Templates

The templates directory contains one or more Embedded JavaScript templates that define the layout and formatting of any content you provide.

Defining and Using Content Blocks

Any Markdown files you add to the content directory will be available to embed in your EJS templates. For example, this content file:

<!-- content/summary.md -->

# Summary

I am a great ape characterized by my hairlessness, bipedalism, and high
intelligence. I have a large brain, which provides me with more advanced
cognitive skills that enable me to thrive and adapt in varied environments.

Can now be embedded and rendered as part of a template:

<!-- templates/resume.html.ejs -->
<!doctype html>
<html>
  <head>
    <title>About Me</title>
  </head>
  <body>
    <%- content.render('summary') %>
  </body>
</html>

Note: Your content files must end with the .md extension in order to be discovered and rendered.

As you add more content to embed in your templates, you're not limited to a single directory - you can nest content in subdirectories as well:

<!-- content/experience/bigco.md -->

### Software Engineer

#### [BigCo] | January 2000 - Present

- Built a cutting-edge software platform to deliver widgets faster and at a
  lower cost to the company
- Improved throughput of our widget-ordering system by replacing our slow
  JSON-over-HTTP service layer with GRPC inside of an event-based architecture

[BigCo]: https://bigco.example

You need only to include the subdirectory when embedding the content:

<%- content.render('experience/bigco') %>

Using Custom Fonts

You can further customize the formatting of your résumé by adding additional font files and including them in your template. Simply drop your font file (.ttf, .woff, or .woff2) in the assets/fonts directory and include it in your template:

<!doctype html>
<html>
  <head>
    <style>
      <%- fonts.embed('SuperSpecialCustomFont.ttf') %>

      body {
        font-family: "SuperSpecialCustomFont";
      }
    </style>
  </head>
  <body><%- content.render('summary') %></body>
</html>

This will create the necessary @font-face CSS rule to make it available in your rendered HTML document.

Note: You can find a additional web fonts on the Internet at places like Google Fonts or even icon fonts at Fontello.

Configuring Output

The default config.json defines the input, output, and formatting of your final PDF file:

{
  "filename": "resume.pdf",
  "templates": ["resume.html.ejs"],
  "options": {
    "margins": {
      "top": "0.25in",
      "bottom": "0.25in",
      "left": "0.25in",
      "right": "0.25in"
    }
  }
}

By default, it generates a file named output/resume.pdf from the templates/resume.html.ejs template file. You can change the output filename as desired or even use different templates that will be combined into your resulting PDF:

{
  "filename": "my-awesome-resume.pdf",
  "templates": ["page-1.html.ejs", "page-2.html.ejs"]
}

You can also change the margins to any values supported by Puppeteer (used for HTML -> PDF rendering).

Generating Your PDF

Once everything is configured, you need only to run the generate subcommand:

resume generate my-resume

The resulting PDF will appear in the output directory based on the filename value in config.json.

Contributing

If there is a feature or bug you would like to see addressed, open an Issue or a Pull Request.

Copyright

© 2023 Patrick Reagan.