Want to consolidate multiple registries onto one website?
Want to regularly update your fulfillment counts?
This (work in progress) is for you!
Right now, works with:
- Zola — https://www.zola.com
- REI — http://www.rei.com
- Heath Ceramics — http://www.heathceramics.com
- Crate & Barrel — http://www.crateandbarrel.com
- Williams Sonoma — http://www.williams-sonoma.com
I intend to get this working with:
- Sur la Table
- Pottery Barn
Add to your Gemfile
gem 'wedding-registry-scraper'
Use WeddingRegistryScraper#scrape
:
require 'wedding_registry_scraper'
WeddingRegistryScraper.scrape([
"http://www.heathceramics.com/giftregistry/view/index/id/YOUR_UNIQUE_REGISTRY_ID",
"http://www.crateandbarrel.com/Gift-Registry/YOUR_NAMES/YOUR_UNIQUE_REGISTRY_ID",
"https://www.zola.com/registry/YOUR_REGISTRY_SLUG",
"http://www.rei.com/GiftRegistryDetails/YOUR_UNIQUE_REGISTRY_ID",
"https://secure.williams-sonoma.com/registry/YOUR_UNIQUE_REGISTRY_ID/registry-list.html",
])
The ./example
folder provides a simple example of how how you might
use the wedding_registry_scraper
gem to generate html for your wedding
website's registry.
It uses Mustache for templating. It also relies on Normalize and some custom css to make the generated page look reasonable.
# Go to the example folder and install gem dependencies
cd ./example
bundle
# Execute the example html generator, `registries.rb`, with your
# Zola and Williams-Sonoma registries (use your actual URLs),
bundle exec registries.rb "https://www.zola.com/registry/YOUR_REGISTRY_SLUG" "https://secure.williams-sonoma.com/registry/YOUR_UNIQUE_REGISTRY_ID/registry-list.html" > registries.html
# Open the file
open registries.html
It should be simple to add another registry by cloning a Regsitry
inside lib/wedding_registry_scraper/registries
.
I look forward to your pull-request.
Why don't you register for Zola using my invite code: https://www.zola.com/invite/pariser
Thanks!