|
|
#1 |
|
Member
![]() Posts: 17
Karma: 10
Join Date: Mar 2025
Device: Moon+ Reader
|
[Metadata Source Plugin] DriveThruRPG
I wrote this plugin to bring some semblance of order to my nearly 2k TTRPG PDF collection. A lot of those PDFs are purchased from DriveThruRPG, and they have an API, so I thought "how hard could it be?". I'm satisfied with how it's working, and figure it was time to share.
And when I say wrote, I mean I took kiwidude's FictionDB plugin and mangled it into this. Main Features:
I'll post a link to a GitHub repo as soon as I get that set up, so you can point and laugh at my code. |
|
|
|
|
|
#2 |
|
Member
![]() Posts: 17
Karma: 10
Join Date: Mar 2025
Device: Moon+ Reader
|
Test Builds
This is a placeholder post for potential future test builds
|
|
|
|
|
|
#3 |
|
Member
![]() Posts: 17
Karma: 10
Join Date: Mar 2025
Device: Moon+ Reader
|
Well, apparently my karma or post count or whatever is still too low to edit messages, so here's the GitHub link in a new post.
https://github.com/quickwick/driveth...calibre-plugin |
|
|
|
|
|
#4 |
|
Junior Member
![]() Posts: 8
Karma: 10
Join Date: Jul 2024
Device: Boox TUC
|
This plugin seems like it could be really useful for adding a bunch of TTRPG material, but there are a few things I'm unclear on and a few requests I'd like to make.
First, you said that it's possible to add DriveThruRPG item categories and filters, but what exactly does that cover? Whatever they cover, downloading the meta data seems to pull in a lot of duplicate and not particularly helpful tags, so it might be nice if we could have a bit more fine grained control over what gets imported, at the settings level. I'm hoping there might be a way to clean up some of the manual cleanup that way. Beyond that, it would also be really useful if there was a defined way to include the rule system in such a way that you could tell it's a rule system without comparing it to a list of rule systems. The goal would be to have some way to easily sort or filter by rule system, just like you can sort and filter by author and publisher. My naive suggestion would be co-opting the Series field, since it's a dedicated field and TTRPGs are unlikely to make use of it, but I'm rather new to Calibre and I don't know if something else, like structured tags, would be better. By the same token, would it be possible to automatically add a TTRPG tag to any content that has its meta data downloaded, so it would be easier to separate out TTRPG material from regular books. Finally, the whole process seems very manual, especially if you need to find the DriveThruRPG ID, manually copy it into the Id field, run the download for a single file, and then manually clean up the tags field. (And it's even worse if you can't copy and paste, for unrelated reasons). Is there any way to automate the process a bit more, or at least make it a bit less individual? |
|
|
|
|
|
#5 | ||||
|
Member
![]() Posts: 17
Karma: 10
Join Date: Mar 2025
Device: Moon+ Reader
|
First off, thanks for the feedback. It's good to know at least one person out there has tried it.
Quote:
Quote:
Quote:
Quote:
|
||||
|
|
|
|
|
#6 | ||
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Dec 2025
Device: boox note air 5c
|
I was looking for something my use TTRPG PDF collection and I found your plugin. I think it is very interesting. I think I have the same suggestion as @Epsilon Rose.
Quote:
Quote:
One more question, how do you manage titles which provide several files? |
||
|
|
|
|
|
#7 | ||
|
Member
![]() Posts: 17
Karma: 10
Join Date: Mar 2025
Device: Moon+ Reader
|
Quote:
Quote:
I add each file as a separate entry in Calibre, and pull the same product information for each entry, then manually tweak the Title afterwards to indicate what the specific file is (Character Sheet, Map, etc). Last edited by memory_dump; 12-15-2025 at 02:18 AM. Reason: typo correction. and -> end |
||
|
|
|
|
|
#8 |
|
Member
![]() Posts: 17
Karma: 10
Join Date: Mar 2025
Device: Moon+ Reader
|
edit: accidentally double-posted due to forum being weird
Last edited by memory_dump; 12-15-2025 at 02:17 AM. Reason: removing accidental double-post due to forum being weird |
|
|
|
|
|
#9 |
|
Junior Member
![]() Posts: 3
Karma: 10
Join Date: May 2025
Device: Kindle Paperwhite, Onyx Boox Air 3C
|
Oh, that's wonderful. I'm so happy right now. Works like a charm.
|
|
|
|
|
|
#10 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Oct 2026
Device: none
|
This plugin looks really promising for me. I have over 1800 DriveThruRPG titles. My early experiments with the plugin look great, including genre and rules in the tags in the downloaded metadata.
Calibre gives me its generic warning that metadata sources may block excessive requests. DriveThruRPG is my only enabled metadata source. This makes me reluctant to download metadata for too many titles at a time, especially if it might disrupt or block my access to the DriveThruRPG website. Is there a recommended size or frequency for downloading metadata? Is DriveThruRPG likely to throttle or block me? Thanks. |
|
|
|
|
|
#11 | |
|
Member
![]() Posts: 17
Karma: 10
Join Date: Mar 2025
Device: Moon+ Reader
|
Quote:
For me, the limiting factor is the quality of API search. I find I have to do one item at a time, to make sure it's connecting to the correct DTRPG record. If you can get good results for multiple items simultaneously, consider me impressed. |
|
|
|
|
|
|
#12 |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Oct 2026
Device: none
|
I exported my purchased library to CSV, extracted each product ID from its URL, and used Calibre’s Import List plugin to populate ID:drivethrurpg. I'm hoping that addresses a product matching problem. I tried downloading metadata for a batch of 26 and everything looks good.
|
|
|
|
|
|
#13 | |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,709
Karma: 30496938
Join Date: Mar 2010
Location: UK
Device: Kobo Elipsa 2e, Kobo Forma, iPad, Kobo Touch
|
Quote:
Short of scraping all the links from multiple pages, I don't see an automated way to do it. |
|
|
|
|
|
|
#14 | |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Oct 2026
Device: none
|
Quote:
First, I ran dtrpg_convert.py. I followed the steps as listed in its comments. A small correction to the comments: It says "Run: `python dtrpg_convert.py data.json export.json`" and then "Your data is in `export.csv` file." That should actually be export.csv in the Python command line. The CSV file contains the columns Title, Publisher, Updated, and URL. Fortunately, the URL format is completely consistent and it contains the product number, so I pulled the CSV into Excel and used the Excel formula =TEXTBEFORE(TEXTAFTER(D2,"/product/"),"/") That gave me an additional column ("Product") with the DTRPG product number (and only the product number). I saved the result as a CSV file. I added the Import List addon in Calibre and selected the CSV file. I found I had to change the encoding from utf-8 to Windows-1252 because one DTRPG title included odd double quotes. You might not run into this. (Side note: Later checking revealed that even though the quotes in text were funny, the product ID was correct and the downloaded metadata wasn't a problem.) I had Delimiter set to Other with a comma in the box (because it's a CSV). I also checked "Skip first row" because I had a header row in my CSV files. I checked Unquote and Tidy, which seems to have worked out for me; I suspect whether you do or don't check Unquote and Tidy is a combination of your list of titles and your preferences. I believe I had to hit the Preview button (in Import List) before I could take the following step. Set the Identifier (still in Import List) to drivethrurpg. I mapped the Import List columns as follows: Title in column 1, Authors in column 0 (because the CSV didn't include authors), Publisher in column 2, and ID:drivethrurpg in column 5 (because that's where I had the product numbers).\ The next step was to hit Next. I selected all the imported entries and clicked the "Create empty books" button. This creates books in Calibre without additional metadata. In Calibre's Prefernces / Plugins, I made DriveThruRPG my only Metadata source. I'm hoping that has made the metadata download faster and more accurate. I then selected a group of records and hit ctrl-D to download metadata. I used the "Download Both" button to get both the metadata and the covers. You can then review the results and commit them. So far, I haven't run into any problems with product mismatches. I *think* that's because it's using the real DTRPG product number instead of a title search that might or might not get the right title. Because of Calibre's warning against excessive downloads, I've done only 50 or so entries so far. I haven't run into any download problems. All the products matched correctly. |
|
|
|
|
|
|
#15 | |
|
Junior Member
![]() Posts: 5
Karma: 10
Join Date: Oct 2026
Device: none
|
Quote:
Trying again... I extracted the DTRPG product number from the URL in the CSV file. I used this formula in Excel: =TEXTBEFORE(TEXTAFTER(D2,"/product/"),"/") Of course, that's the formula that extracted from the URL in cell D2. Successive rows used D3, D4, etc. Fortunately, the URL structure was completely consistent, so the formula was successful in retrieving the DTRPG product numbers. Note that the resulting column contained only the product numbers. I then saved the result as a CSV file. In Import List, I selected the CSV file. I had to hit the Preview button before I could take this next step... I switched Match Method to Identifier: drivethrurpg. It had been Title/Author by default. The Identifier button had been grayed out until I got the Preview. I mapped the columns (still in Import List) like this: Title in column 1, Authors in column 0, Publisher in column 2, and ID:drivethrurpg in column 5 (corresponding to how I structured the CSV file). I clicked Next. I selected all the entries and clicked "Create Empty Books." I then selected a batch of entries and used ctrl-D to Download Metadata. When prompted, I clicked "Download Both" to get the metadata and the covers. I've done about 50 records so far. All of the products have matched correctly. I suspect that's because it can match the product number exactly instead of hoping that a title/author search gets the right thing on the first try. Here's hoping that a) the above steps are reasonably complete, accurate, and clear, and b) this time, I don't toss my reply into the bit bucket. |
|
|
|
|
![]() |
| Tags |
| drivethrurpg |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Metadata Source Plugin] Show multiple results for single source? | memory_dump | Plugins | 7 | 10-09-2025 02:50 AM |
| [Metadata Source Plugin] Ark-metadata | mortenlj | Plugins | 1 | 09-21-2025 05:25 PM |
| How do I know which Metadata Source Plugin was called from fetch-ebook-metadata? | eryMpexI | Library Management | 6 | 04-22-2023 09:58 AM |
| Read a book's metadata in a Metadata source plugin? | J-H | Development | 2 | 03-30-2021 10:08 AM |
| [Metadata Source Plugin] Empty Plugin? (Fake Identifier) | mneimeyer | Plugins | 3 | 11-11-2019 09:07 PM |