acrlakshman / profileio-resume

Resume generator from .json designed for profileio

Home Page:https://pkg.go.dev/github.com/acrlakshman/profileio-resume/profileio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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
}

About

Resume generator from .json designed for profileio

https://pkg.go.dev/github.com/acrlakshman/profileio-resume/profileio

License:MIT License


Languages

Language:Go 100.0%