Skip to main content

Renders your (JSON) resume/CV for online & pretty terminal display

Project description

ancv

Getting your resume aka an CV (ANSI-v 🤡) straight to your and anyone else's terminals:

showcase cv terminal output


Be warned though, for this is kinda useless and just for fun:

users venn diagram

Getting started

  1. Create your resume according to the JSON Resume Schema (see also the schema specification) either:

    • use ChatGPT (or another LLM) with the following prompt (you need to fill in the spaces for [resume] and [json_schema]):
      Resume:[resume]
      
      JSON Resume Schema:[json_schema]
      
      Provide JSON data structure of the resume, formatted according to the JSON Resume Schema
      
      Output json, no yapping
      
      Note: for json_schema you can just use the example from here
    • manually (see the heyho sample for a possible starting point),
    • exporting from LinkedIn using Joshua Tzucker's LinkedIn exporter (repo)[^1], or
    • exporting from one of the platforms advertised as offering JSON resume integration.
  2. Create a public gist named resume.json with your resume contents.

  3. You're now the proud owner of an ancv. Time to try it out.

    The following examples work out-of-the-box. Replace heyho with your GitHub username once you're all set up.

    • curl:

      curl -L ancv.io/heyho
      

      with -L being shorthand for --location, allowing you to follow the redirect from http://ancv.io through to https://ancv.io. It's shorter than its also perfectly viable alternative:

      curl https://ancv.io/heyho
      

      Lastly, you might want to page the output for easiest reading, top-to-bottom:

      curl -sL ancv.io/heyho | less
      

      If that garbles the rendered output, try less -r aka --raw-control-chars.

    • wget:

      wget -O - --quiet ancv.io/heyho
      

      where -O is short for --output-document, used here to redirect to stdout.

    • PowerShell 7:

      (iwr ancv.io/heyho).Content
      

      where iwr is an alias for Invoke-Webrequest, returning an object whose Content we access.

    • PowerShell 5:

      (iwr -UseBasicParsing ancv.io/heyho).Content
      

      where -UseBasicParsing is only required if you haven't set up Internet Explorer yet (yes, really). If you have, then it works as PowerShell 7 (where that flag is deprecated and the default anyway).

Configuration

All configuration is optional.

The CV is constructed as follows:

conceptual flow chart

In summary:

  • you control:

    • the template.

      Essentially the order of items, indentations, text alignment, position of dates and more. Templates are like layouts/skeletons.

    • the theme.

      This controls colors, italics, boldface, underlining, blinking (yes, really) and more. A couple themes exist but you can easily add your own one.

    • the language to use.

      Pre-set strings like section titles (Education, ...), names of months etc. are governed by translations, of which there are a couple available already. All other text is free-form.

    • text content like emojis and newlines to control paragraph breaks.

      Emojis are user-controlled: if you want them, use them in your resume.json; in the future, there might be templates with emojis baked in, but you'd have to actively opt into using one.

    • date formatting, in a limited fashion through a special dec31_as_year toggle. If that toggle is true, dates in the format YYYY-12-31 will be displayed as YYYY only.

    • lastly, there's a toggle for ASCII-only output.

      It only concerns the template and controls the drawing of boxes and such (e.g., - versus : only the latter will produce gapless rules). If you yourself use non-ASCII characters in your texts, use a language containing non-ASCII characters (Spanish, French, ...) or a theme with non-ASCII characters (e.g., a theme might use the character to print bullet points), non-ASCII Unicode will still occur. As such, this toggle currently isn't very powerful, but with some care it does ultimately allow you to be ASCII-only.

    If you come up with new templates, themes or translations, a PR would be highly appreciated.

  • you do not control:

    • anything about a viewer's terminal!

      Any recent terminal will support a baseline of features (e.g., colors), but large parts of the functionalities depend on the font used: proper Unicode support is needed for pretty output (see ascii_only), and ideally emojis if you're into that (although it's easy to pick an emoji-free template). Many themes leverage Unicode characters as well.

    • access to your CV: like the gist itself, it will be publicly available on GitHub.

How to configure

Configuring ancv requires going beyond the vanilla JSON Resume schema. You will need to add an (entirely optional) $.meta.ancv field to your resume.json. The provided schema will be of help here: an editor capable of providing auto-completion based on it, like Visual Studio Code, will make filling out the additional configuration a breeze.

The schema will further inform you of the default values (used for unspecified fields). Since everything is optional, a valid JSON resume (without an ancv section) is valid for ancv use as well.

Installation

As a library

Install the package as usual:

pip install ancv

This also allows you to import whatever you could want or need from the package, if anything. Note that it's pretty heavy on the dependencies.

As a container

See also the available packages aka images:

docker pull ghcr.io/alexpovel/ancv

Versioned tags (so you can pin a major) are available.

Local usage

Once installed, you could for example check whether your resume.json is valid at all (validate) or get a glimpse at the final product (render):

# pip route:
$ ancv render resume.json
# container route:
$ docker run -v $(pwd)/resume.json:/app/resume.json ghcr.io/alexpovel/ancv render

Alternatively, you can directly serve your resume from any HTTP URL using he built-in web server:

# pip route:
$ ancv serve web https://raw.githubusercontent.com/alexpovel/ancv/refs/heads/main/ancv/data/showcase.resume.json
# container route:
$ docker run -p 8080:8080 ghcr.io/alexpovel/ancv serve web https://raw.githubusercontent.com/alexpovel/ancv/refs/heads/main/ancv/data/showcase.resume.json

Test it:

curl http://localhost:8080

The web server includes useful features like:

  • Automatic refresh of resume content (configurable interval)
  • Fallback to cached version if source is temporarily unavailable
  • Configurable host/port binding (default: http://localhost:8080)

Self-hosting

Self-hosting is a first-class citizen here.

Context: Cloud Hosting

The https://ancv.io site is hosted on Google Cloud Run (serverless) and deployed there automatically, such that the latest release you see here is also the code executing in that cloud environment. That's convenient to get started: simply create a resume.json gist and you're good to go within minutes. It can also be used for debugging and playing around; it's a playground of sorts.

You're invited to use this service for as much and as long as you'd like. However, obviously, as an individual I cannot guarantee its availability in perpetuity. You might also feel uncomfortable uploading your CV onto GitHub, since it has to be public for this whole exercise to work. Lastly, you might also be suspicious of me inserting funny business into your CV before serving it out. If this is you, self-hosting is for you.

Setup

For simplicity, using Docker Compose (with Docker's recent Compose CLI plugin):

  1. Clone this repository onto your server (or fork it, make your edits and clone that)
  2. cd self-hosting
  3. Edit Caddy's config file (more info) to contain your own domain name
  4. Place your resume.json into the directory
  5. Run docker compose up

Caddy (chosen here for simplicity) will handle HTTPS automatically for you, but will of course require domain names to be set up correctly to answer ACME challenges. Handling DNS is up to you; for dynamic DNS, I can recommend qmcgaw/ddns-updater.

If you self-host in the cloud, the server infrastructure might be taken care of for you by your provider already (as is the case for Google Cloud Run). In these cases, a dedicated proxy is unnecessary and a single Dockerfile might suffice (adjusted to your needs). True serverless is also a possibility and an excellent fit here. For example, one could use Digital Ocean's Functions. If you go that route and succeed, please let me know! (I had given up with how depressingly hard dependency management was, as opposed to tried-and-tested container images.)


github logo

[^1]: The exporter has a couple caveats. You will probably not be able to paste its result into a gist and have it work out of the box. It is recommended to paste the export into an editor capable of helping you find errors against the contained $schema, like VS Code. Alternatively, a local ancv render your-file.json will print pydantic validation errors, which might be helpful in debugging. For example, the exporter might leave $.basics.url an empty string, which isn't a valid URI and therefore fails the schema and, by extension, ancv. Similarly, endDate keys might get empty string values. Remove these entries entirely to stay conformant to the JSON Resume Schema (to which ancv stays conformant).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ancv-1.5.1.tar.gz (38.9 kB view details)

Uploaded Source

Built Distribution

ancv-1.5.1-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file ancv-1.5.1.tar.gz.

File metadata

  • Download URL: ancv-1.5.1.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ancv-1.5.1.tar.gz
Algorithm Hash digest
SHA256 eef4d648d8714e726dcfa37611967eeac5431f19ac32b8875a3503a2afad785b
MD5 f80cc27355f6edb71a2d80e38496ac27
BLAKE2b-256 5b7c6b4b7c90190edeab7bdf9cf6bc15074daa830651e3edae55b50afdb928c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for ancv-1.5.1.tar.gz:

Publisher: publish.yml on alexpovel/ancv

Attestations:

File details

Details for the file ancv-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: ancv-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 36.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ancv-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5986bd162fb7695d2aa492a08d5c7fda8ffbf02fe70008fe5a7da4958011ea21
MD5 b8effe99478f24103645ffb505504492
BLAKE2b-256 efda449268e63883629463946e05d518081daca2cb3a4ef0f4f2fafa3fdc5c52

See more details on using hashes here.

Provenance

The following attestation bundles were made for ancv-1.5.1-py3-none-any.whl:

Publisher: publish.yml on alexpovel/ancv

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page