Skip to content

Latest commit

 

History

History
124 lines (82 loc) · 2.4 KB

README.md

File metadata and controls

124 lines (82 loc) · 2.4 KB

The Letter Generator in Go

This tool helps you to generate form letters, based on a template for multiple recipients.

Setup

  • Install the letter generator

    go get -u github.com/feduxorg/letter-generator
  • Install LaTeX

    Make sure, you installed LaTeX on your system. This tools uses pdflatex in the background to generate the PDF from your letter template.

Usage

Initialize directory for your letter

  • (optional) Install examples

    # Clone repository
    git clone https://github.com/feduxorg/letter-generator /tmp/letter-generator
    
    # Either create your own templates or use our examples
    
    ## Move examples to the correct place
    mv /tmp/letter-generator/docs/examples/en/ ~/.local/share/letter-template/
    ## or
    mv /tmp/letter-generator/docs/examples/de/ ~/.local/share/letter-template/
    
    # setup git repository
    cd ~/.local/share/letter-template/
    git init
    git add .
    git commit -m "Init"
  • Create directory for your letter

    mkdir my-letter
    cd my-letter
  • Setup directory

    • – with local repository ~/.local/share/letter-template/.git

      # current directory
      lg init -V
      
      # given directory
      lg init -V my/dir
    • – with remote repository https://github.com/xxxxx/xxxx.git

      lg init -V --template-source `https://github.com/xxxxx/xxxx.git`

Build letters

This will build the letters. Make sure you've initialized the directory before.

lg build -V

After building letters, you will find a directory called letters in the current directory.

Development

Build letter-generator from its sources

bin/setup
bin/build
bin/test

Central configuration file for helper scripts

Configuration for helper scripts is done via environment variables in env.sh.

Install locally after build

make install

Upgrade git2go / libgit2

See https://github.com/libgit2/git2go#master-branch-or-vendored-static-linking for more information about this.

If you plan to upgrade your version, you need to modify a few files.

  1. Update version for "libgit2" in env.sh
: ${LIBGIT2_TAG:=release-1.1}
  1. Update version of "git2go" in go.mod
# [...]
github.com/libgit2/git2go/v31 v31.4.7
# [...]
replace github.com/libgit2/git2go/v31 => ./ext_deps/git2go

Copyright

(c) 2021, Dennis Günnewig