profileio-resume

module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2021 License: MIT

README

ProfileIO Resume

LaTeX based resume generator for ProfileIO

How to use?

While profileio-resume is primarily designed to work with ProfileIO, it can be used standalone or in a different project. Basic usage looks as follows:

go get github.com/acrlakshman/profileio-resume
// main.go
package main

import (
	"io/ioutil"
	"log"
	"os"
	"os/exec"

	"github.com/acrlakshman/profileio-resume/profileio"
)

func main() {
	// For sample profile_resume.json, please refer to
	// "profileio-resume -> profileio -> samples -> profile_resume.json
	jsonData, _ := ioutil.ReadFile("./profile_resume.json")
	profileio.ProfileIO(jsonData)

	app := "xelatex"
	if !commandExists(app) {
		app = "pdflatex"
		if !commandExists(app) {
			log.Fatal("Cannot compile resume.tex")
		}
	}

	// profileio-resume, writes tex and cls files to a
	// folder "resume" in the current directory.
	os.Chdir("./resume")
	cmd := exec.Command(app, "resume.tex")
	_, err := cmd.Output()
	if err != nil {
		log.Fatal(err)
	}
}

func commandExists(cmd string) bool {
	_, err := exec.LookPath(cmd)

	return err == nil
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL