by mattkevan · 5y ago · 0 comments
I run an Etsy store that sells artwork. One of the most time-consuming tasks was creating the mock-ups for product listings, so I wrote a shell script that used Imagemagick to automatically generate all the images.
I was pretty pleased as I’d never written a Bash script before and it saves hours and hours of work.
I also wrote a Ruby script that uses the Etsy API to generate a fully-working Jekyll e-commerce site from my Etsy store’s listings. Much better that paying Shopify plus a bunch of other apps for pretty much the same thing.
I'm sure there's some sort of rule against posting code this bad on HN, bit worried it'll get my hacker status revoked :). Was a total Ruby n00b when I wrote this (still am) - haven't even worked out how to handle offsets in the Etsy API.
Anyway, it does a good job of creating Jekyll collection items from Etsy listings – here's the site I'm building with it, though it's still a work-in-progress [2].