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
toconfig.ps
. Edit it to add your names and ids. Then copy it to the other system, so you have the sameconfig.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 &UG1Pxa6....
License
© 2018 cel
Creative Commons BY-SA 4.0
Hermies icon by Matt: %7AkRFfL..., original by Paul: %6Ykl7b5...
Small hermes hearts icon, and invite letterhead, by Angelica: %9X92J7gS6NYrPwRXxmmpNUM7esI/XXi5j7ZSx2cyK1k=.sha256 %w1wPSI8...
Built with git-ssb-web