Faerbit / left

generates pdf formatted letters from plain text files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

left

Description

left generates pdf formatted letters from plain text files. Hence the name left as in "LEtter From Txt".

License

left is licensed under the GPL, version 3.
left uses go-fpdf to render PDF files, which is licensed under the MIT license

Usage

To get information on how to use left, run

left -help

Configuration

left reads configuration files in the following order, where settings in later files override settings read from earlier files:

  • /etc/left/defaults.json (when running on linux)
  • ${UserConfigDir}/left/defaults.json (also see UserConfigDir documentation)
  • optionally the config file specified via command line argument
  • the configuration in the letter input file

left can dump a sample configuration to stdout that can be used as a starting point:

left -dump-config

Creating letters

As stated above, left creates letters from simple text input files. To get started, run the following command and left will output a working letter input file to stdout:

left -create

Building from source

To build the project from source you first need to install go.

Then cd into the project root folder and type:

go build left

Tips & Tooling

vim

I edit my letters with vim. While left does not care about the file extension, I find it useful to give my letters the extension .left. Then I add the following section to my vim config and get reasonable syntax highlighting:

augroup left_ft
au!
  autocmd BufNewFile,BufRead *.left set syntax=javascript
augroup END

About

generates pdf formatted letters from plain text files.

License:GNU General Public License v3.0


Languages

Language:Go 95.4%Language:Shell 4.6%