# ssb-invitation-cards ## Requirements - A SSB pub that can serve static web pages. - To build cards PDF files, the `gs` command (`ghostscript` package). ## Usage - Clone the repo on your pub and on your local computer: on the pub to generate and serve invite code pages, and on the local computer to build the cards PDF files. Or, clone it once on the pub and do the PDF building there instead of locally. - Copy `config.example.ps` to `config.ps`. Edit it to add your names and ids. Then copy it to the other system, so you have the same `config.ps` locally and on the pub. - On the pub, run the following, setting the variables to appropriate values. The command will generate invite codes, write them into files, and output their URLs to a file. ``` count=10 # Number of codes/cards to generate. Should be a multiple of 10. dir=~/www # Where to save the invite code pages base=https://example.com # URL for the directory of invite code pages ./geninvitecodepaths.sh "$count" | tee -a codepaths | ./geninvitecodepages.sh "$dir" "$base" > urls ``` The invite code pages use `invite.html` as a template, and get some values from `config.ps`. If you change `invite.html` or `config.ps` and want to regenerate the invite code pages (while keeping the same invite codes), run: ``` ./geninvitecodepages "$dir" "$base" < codepaths | wc -l ``` That should output the number of pages written. - Copy the resulting `urls` file to your local computer. Run the following locally to generate a PDF file for your invite code cards. ``` ./gencards.sh > cards.pdf < urls ``` - Print your `cards.pdf` on a printer, color, double-sided (left/right-bound). - Cut out the cards. I recommend if you have a cutting table use that. Otherwise use a blade and ruler. Place the ruler across each set of outside guide lines and cut between them. Do this for the center vertical line and then for each of the six horizontal lines. Then cut the two outside vertical lines. Take care the cards don't move while you are cutting the lines. Alternatively, you could use some pre-perforated business card paper. But I have not checked that the cards match business card template paper dimensions. - Now you have some invite cards. You can give them to people or do whatever you want with them. ## Development notes To preview `cards.pdf` while editing `cards.ps`, run `make`. It will launch `mupdf` or reload an existing mupdf process. Uncomment `DrawBorder` to get a thin border around each card on the page. To convert a SVG file to EPS format, use `rsvg-convert` (from `librsvg2-bin` package on Debian): ``` rsvg-convert rainbow-ssb.svg -f eps -o rainbow-ssb.eps ``` To convert other formats, use `convert` (from ImageMagick). If you want to include a JPEG file into `cards.ps`, there is a better way than using EPS - For an example, see &UG1Pxa6Q9gKkA9ux/Hyn7FL0QJlhd8/4o1GuIQK4+ik=.sha256. ## License © 2018 [cel](@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519) [Creative Commons BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/) Hermies icon by [Matt](@FbGoHeEcePDG3Evemrc+hm+S77cXKf8BRQgkYinJggg=.ed25519): %7AkRFfLkuCb++9rEfuZf/vy2zPIGa7yh6qcclaMxQuA=.sha256, original by [Paul](@hxGxqPrplLjRG2vtjQL87abX4QKqeLgCwQpS730nNwE=.ed25519): %6Ykl7b5uYr429NTJEvtPYQijCvyA5nK/EZh55mj5574=.sha256 Small hermes hearts icon, and invite letterhead, by [Angelica](@eANNuLfzX/9rlGODXHYV8WJb+zw2h+d7YsT4vpYPvD0=.ed25519): %9X92J7gS6NYrPwRXxmmpNUM7esI/XXi5j7ZSx2cyK1k=.sha256 %w1wPSI8UiOtadwp/e+t7+aXoumNOjzBo8PxOF3walWE=.sha256