Skip to content

Process cvs file to process simple csv file to generate and send qr's from URLs

License

Notifications You must be signed in to change notification settings

JaviMaciasG/gen-qr-email

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

qr generate+send

This quick and dirty script processes a simple ; delimited csv files to:

  • Extract data from the csv (name, surname, email, url)
  • Shorten the URL using tinyurl
  • Generate a QR for the url and shortened url (in png format)
  • Add some text info to the generated pngs
  • Convert the png files to their pdf versions
  • Customize email body text
  • Send email with attached png's and pdf's

Requirements

The script requires imagemagick convert, qrencode, curl and mutt.

Notes

If you get an error when converting from png to pdf using convert, continue reading.

To make convert work from png to pdf, there is a known bug in old ghostcript versions. See https://stackoverflow.com/questions/52998331/imagemagick-security-policy-pdf-blocking-conversion for further info.

In my case, this is the relevant section I applied:

On Ubuntu 19.04 through 22.04 and probably any later versions coming with ImageMagick 6, here's how you fix the issue by removing that workaround:

Make sure you have Ghostscript ≥9.24:

gs --version If yes, just remove this whole following section from /etc/ImageMagick-6/policy.xml:

About

Process cvs file to process simple csv file to generate and send qr's from URLs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages