Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --export-texts option #31

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Conversation

olaf-mandel
Copy link
Contributor

@olaf-mandel olaf-mandel commented Dec 15, 2023

Add a new option --export-texts that extracts several texts from the various webpages and stores them as text-files:

  • summary.txt contains the series summary from the series list page
  • *_title.txt contains the title of each chapter
  • *_notes.txt contains the author notes of each chapter, if present

If --export-texts is used together with --separate, then this changes the names of the chapter-directores: they now have a suffix based on the title.

Add --export-format option

Add an option that modifies how --export-texts behaves: either write the texts to individual plain text files or to a single JSON file or write both.

@Zehina
Copy link
Owner

Zehina commented Dec 17, 2023

Thank you @olaf-mandel for the multiple PRs you submitted, I'll make sure to have a look at all of them.

I think this is a great addition and all looks good just a few minor notes

Copy link
Owner

@Zehina Zehina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks all looks great, just a minor point about the interaction of separate and export-texts

Add a new option --export-texts that extracts several texts from the
various webpages and stores them as text-files:

 * `summary.txt` contains the series summary from the series list page
 * `*_title.txt` contains the title of each chapter
 * `*_notes.txt` contains the author notes of each chapter, if present
Copy link
Owner

@Zehina Zehina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick change. Looks good

Add an option that modifies how --export-texts behaves: either write the
texts to individual plain text files or to a single JSON file or write
both.

Notes:

* this changes the default behaviour from text to JSON
* the `<chapter>_notes.txt` file is now only created if there are
  actually any notes present
@Zehina Zehina merged commit 3677c3d into Zehina:master Dec 19, 2023
@olaf-mandel olaf-mandel deleted the feature/text-exports branch December 20, 2023 06:51
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