Another repo - https://github.com/EbookFoundation/regluit will be the place for collaborative development for Unglue.it. Add issues and submit pull requests there. As of January 19, 2017, https://github.com/Gluejar/regluit is still being used for production builds.
The partitioning between these modules is not as clean as would be ideal. `payment` is particularly messy because we had to retool it twice because we had to switch from Paypal to Amazon Payments to Stripe.
regluit was originally developed on Django 1.3 (python 2.7) and currently runs on Django 1.8.
1. edit `settings/me.py` with path info, etc. to make things work
1. edit the files in settings/keys filling in account and key information OR if you have the ansible vault password, install ansible, then from the vagrant directory run `ansible-playbook create_keys.yml`
1.`django-admin.py celeryd --loglevel=INFO` start the celery daemon to perform asynchronous tasks like adding related editions, and display logging information in the foreground.`
1. Study the latest changes in the master branch, especially keep in mind how
it has [changed from what's in production](https://github.com/Gluejar/regluit/compare/production...master).
1. Update the production branch accordingly. If everything in `master` is ready to be moved into `production`, you can just merge `master` into `production`. Otherwise, you can grab specific parts. (How to do so is something that should probably be described in greater detail.)
1. Login to unglue.it and run [`/opt/regluit/deploy/update-prod`](https://github.com/Gluejar/regluit/blob/master/deploy/update-prod)
### For unglued books with existing print edition MARC records
1. Get the MARCXML record for the print edition from the Library of Congress.
1. Find the book in [catalog.loc.gov](http://catalog.loc.gov/)
1. Click on the permalink in its record (will look something like [lccn.loc.gov/2009009516](http://lccn.loc.gov/2009009516))
1. Download MARCXML
1. At /marc/ungluify/ , enter the _unglued edition_ in the Edition field, upload file, choose license
1. The XML record will be automatically...
* converted to suitable MARCXML and .mrc records, with both direct and via-unglue.it download links
* written to S3
* added to a new instance of MARCRecord
* provided to ungluers at /marc/
### For CC/PD books with existing records that link to the ebook edition
1. Use /admin to create a new MARC record instance
1. Upload the MARC records to s3 (or wherever)
1. Add the URLs of the .xml and/or .mrc record(s) to the appropriate field(s)
1. Select the relevant edition
1. Select an appropriate marc_format:
* use DIRECT if it links directly to the ebook file
* use UNGLUE if it links to the unglue.it download page
* if you have records with both DIRECT and UNGLUE links, you'll need two MARCRecord instances
* if you have both kinds of link, put them in _separate_ records, as marc_format can only take one value
`ungluify_record.py` should only be used to modify records of print editions of unglued ebooks. It will not produce appropriate results for CC/PD ebooks.
### For unglued ebooks without print edition MARC records, or CC/PD books without ebook MARC records
1. Get a contract cataloger to produce quality records (.xml and .mrc formats)
* we are using ung[x] as the format for our accession numbers, where [x] is the id of the MARCRecord instance, plus leading zeroes
1. Upload those records to s3 (or wherever)
1. Create a MARCRecord instance in /admin
1. Add the URLs of the .xml and .mrc records to the appropriate fields
1. Select the relevant edition
1. Select an appropriate marc_format:
* use DIRECT if it links directly to the ebook file
* use UNGLUE if it links to the unglue.it download page
* if you have records with both DIRECT and UNGLUE links, you'll need two MARCRecord instances