Skip to content

SummaryWriter#65

Open
Rowan-McKereghan wants to merge 8 commits intogutenbergtools:v11from
Rowan-McKereghan:v11
Open

SummaryWriter#65
Rowan-McKereghan wants to merge 8 commits intogutenbergtools:v11from
Rowan-McKereghan:v11

Conversation

@Rowan-McKereghan
Copy link

Adding gutenberg-updates summary generation into ebookconverter workflow.

Needs OpenAI API key in .env file to work.

@eshellman
Copy link
Contributor

eshellman commented Dec 12, 2025

Good start.

  1. if you inherit from ebookmaker.writers.TxtWriter, you can pull off the txt directly from the source using the code that makes the txt file. (hint: the text is wrapped in a TxtParser)
  2. important to use ORM to load untrusted data. the code I used to load summaries from Johannes is here: https://github.com/JohannesSeikowsky/gutenberg_updates/blob/eric/load_summaries_from_table.py

@eshellman
Copy link
Contributor

Might be good to load the prompt from a txt file.

@Rowan-McKereghan
Copy link
Author

replaced database + SQL with ORM, got text from parser (job.url was None running locally, but when I tested with manually set url var, it worked – let me know if I need to debug further)

@Rowan-McKereghan
Copy link
Author

added prompts to local py file classes

@Rowan-McKereghan
Copy link
Author

added wikipedia summaries (in native languages if possible)

@Rowan-McKereghan
Copy link
Author

add wiki urls to database if summary comes from wikipedia

@Rowan-McKereghan
Copy link
Author

if wiki article already exists in database, pull from there (if link is still valid)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants