-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Creating Community Lists
The purpose of this guide is helping librarians and individuals take a list of Open Library keys (e.g. /works/OL123W, /works/OL234W
) and populate a themed list in bulk
Open Library has an account specifically for featuring organization-vetted lists: https://openlibrary.org/people/booklists
An administrator may login to this account by going to: https://openlibrary.org/admin/people/booklists
- You must be logged in to Open Library in order to create or add to a list.
- These same instructions should work for your own personal account if you have a list of Open Library identifiers (olids) and want to test creating a list in bulk.
-
Once logged in, a list must be created manually for at least 1 seed and given a "title" and a "description".
-
At this point, the list should exist and appear under the booklists account's lists page: e.g. https://openlibrary.org/people/booklists/lists/OL194558L/International_Women%27s_Day_Celebrate_Women_Authors
-
Next, open up your browser's developer javascript console by pressing "control + shift + i" (linux/windows) or right-click on page and select the "Inspect" option in the right-click menu. Navigate to the
console
tab which will let you submit code. -
If you know the Open Library IDs (olids) of works and editions in advance, you may use the following javascript incantation to add them in bulk to the list you created above.
-
Remove the human readable slug portion of the URL from step (3) -- in this example "/International_Women%27s_Day_Celebrate_Women_Authors" -- and add /seeds.json: e.g. https://openlibrary.org/people/booklists/lists/OL194558L/seeds.json
This url will be added into line 1 of the code below:
await fetch("https://openlibrary.org/people/booklists/lists/OL194558L/seeds.json", {
"credentials": "include",
"body": JSON.stringify({add: [
// IDs here
]}),
"method": "POST",
"mode": "cors"
});
Replace the // IDs here
with a list of IDs of the form {key: '/works/OL20008022W'}, ...
- A complete example should look like:
await fetch("https://openlibrary.org/people/booklists/lists/OL194558L/seeds.json", {
"credentials": "include",
"body": JSON.stringify({add: [
{key: '/works/OL20008022W'}, {key: '/works/OL5731542W'}, {key: '/works/OL19966826W'},
{key: '/works/OL8476068W'}, {key: '/works/OL2335989W'}, {key: '/works/OL21097322W'},
]}),
"method": "POST",
"mode": "cors"
});
There is a limit of how many keys you can include in each request submitting the above code, which I (@mekarpeles) believe is either 100 or 50. You can resubmit the code as many times as needed with different batches of keys.
Getting Started & Contributing
- Setting up your developer environment
- Using
git
in Open Library - Finding good
First Issues
- Code Recipes
- Testing Your Code, Debugging & Performance Profiling
- Loading Production Site Data ↦ Dev Instance
- Submitting good Pull Requests
- Asking Questions on Gitter Chat
- Joining the Community Slack
- Attending Weekly Community Calls @ 9a PT
- Applying to Google Summer of Code & Fellowship Opportunities
Developer Resources
- FAQs: Frequently Asked Questions
- Front-end Guide: JS, CSS, HTML
- Internationalization
- Infogami & Data Model
- Solr Search Engine Manual
- Imports
- BookWorm / Affiliate Server
- Writing Bots
Developer Guides
- Developing the My Books & Reading Log
- Developing the Books page
- Understanding the "Read" Button
- Using cache
- Creating and Logging into New Users
- Feature Flagging
Other Portals
- Design
- Librarianship
- Communications
- Staff (internal)
Legacy
Old Getting Started
Orphaned Editions Planning
Canonical Books Page