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

[Feature Request] Mark New Anthology Entries (New) When Updating #977

Closed
Chirishman opened this issue Jul 12, 2023 · 14 comments
Closed

[Feature Request] Mark New Anthology Entries (New) When Updating #977

Chirishman opened this issue Jul 12, 2023 · 14 comments

Comments

@Chirishman
Copy link

Ability to mark new entries into an anthology as (new) when first added/detected when updating an Anthology (current behavior only marks new chapters in existing Stories)

I've been using the URLs from Web Page option to create anthologies out of AO3 series and it can get confusing to find the new content in a large anthology when an author adds a new entry into a collection of a lot of short oneshots.

@JimmXinu
Copy link
Owner

By 'new entries' I assume you mean new books/stories within the anthology?

Not sure how FFF would do that, but it's not an unreasonable idea. I'll consider it.

@Chirishman
Copy link
Author

Chirishman commented Jul 12, 2023

Yep, that's exactly what I mean.

There are several scenarios I've seen where this is relevant, most especially as it pertains to dealing with various author behaviors on AO3:

  • Sometimes people reorder stuff so it's not added right at the bottom. Most often this happens when they have what would be considered normal mainline series entries and then they have a fic that's an entry in the series which they use for oneshots in the setting, snippets, notes or things like that. When a new main series entry is added the former last entry in the series gets bumped down one.
  • Sometimes there has been a hiatus and they come back and post a whole fic in a short period of time after not updating a series for a year or two.
  • There are also people on AO3 who use series when they should be using chapters which is annoying as hell but those stories can be worth reading

@JimmXinu
Copy link
Owner

All valid points. I'm thinking about a couple possible implementations.

  1. Make mark_new_chapters mark all the chapters in new stories also. It would match the existing behavior for new chapters in existing stories and should be doable.
  2. Mark new (& updated?) stories by changing their title. While nice, that would a lot more challenging.

I should be able to make 1 work. 2 would be rather difficult to fit in with all the existing customization and everything.

@Chirishman
Copy link
Author

Honestly I think #1 makes total sense with current expected behaviors when working with a single story and keeps it simple by reusing the existing setting.

@JimmXinu
Copy link
Owner

Test version posted.

This is implemented by using an internal metadata entry newforanthology. So you can also 'mark' the title of a new story with replace_metadata like so:

# or more likely add_to_replace_metadata
replace_metadata:
 title=>^=>(new) &&newforanthology=>true

But, it will only be removed from the story title when that particular story is updated. Either because it has new chapters, or because you used 'Update EPUB Always'. And it's up to you to make it play nice with any other replace_metadata settings you have.

From updated plugin-defaults.ini:

## If true, when updating an epub that already has old chapters, new
## chapters will be marked in the TOC and chapter header by using
## chapter_title_new_pattern and chapter_title_addnew_pattern to set
## the chapter title.
## If set to latestonly, only new chapters downloaded this time will
## be marked (new) and existing chapters will have any (new) marks
## removed.
##
## (Plugin Only) - New stories added to an existing anthology will
## have *all* chapters marked (new).  If set to latestonly, existing
## (new) marks will only be removed when that particular story within
## the anthology is updated--either because it has new chapter(s) or
## you are using Update Always.
##
## mark_new_chapters can be true, false or latestonly
mark_new_chapters:false

@Chirishman
Copy link
Author

Cool, now to find an anthology in my library which has had a new story added to it since I last checked...

@Chirishman
Copy link
Author

So I found a series of oneshots that someone recced me that I hadn't gotten around to reading yet, here's how it came out:
2023-07-12 22_36_29-Izuku Midoriya is So Done_ A Series of Oneshots Anthology  EPUB  — E-book viewer

I hadn't noticed this before but apparently oneshots in anthologies that contain a piece embedded art that gets picked up for cover art get title page entries and a single eponymous chapter entry and oneshots with no art do not. This is resulting in onshots with art embedded gettng (new) markings and oneshots without not getting them.

This seems a little inconsistent. Here's the result I got with the Replace_Metadata configuration set

2023-07-13 00_35_41- UpdatedReplacement  Izuku Midoriya is So Done_ A Series of Oneshots Anthology

@JimmXinu
Copy link
Owner

That's a good point.

EpubMerge (the underlying mechanism used for creating anthologies) has special handling for single chapter FFF stories. I'll look into it.

Can I have the series URL you used?

@JimmXinu
Copy link
Owner

I suppose I should also ask: Which behavior is preferred in this case?

My immediate thought was 'EpubMerge should be fixed to also ignore cover for one chapter stories'.

But given the context, perhaps you meant 'One chapter stories should show nested TOC so the (new) marking shows'?

@JimmXinu
Copy link
Owner

This is actually rather more involved than I thought. And the two 'options' are diametrically opposed.

EpubMerge should be fixed to also ignore cover for one chapter stories

When a cover is present for a book, it's used as the target for the book title in the anthology TOC. The current code that hides FFF's title page / log page when only one chapter is rather ugly and only applies when there's a title page first, and then a log page. The presence of a cover disrupts it.

Current code does work as expected (no nested TOC) when there's a cover and one chapter, no title page or log page.

It should be possible to achieve 'also ignore cover', but I'd have to significantly rewrite the existing code--it's not pretty and I'd rather not. It's not handling the FFF books that is the issue, it's handling all of the other weird books out there with the same code.

One chapter stories should show nested TOC so the (new) marking shows

Identifying when a story has a '(new)' chapter and not hiding TOC is also difficult: The string '(new)' is configurable in FFF and could be changed by the user; or used by the author in the official chapter title.

EM currently never looks inside the epubs' text and I really don't want to change that.

The easiest solution to implement here would be to add an option switch to EpubMerge to enable/disable making single chapter books one TOC entry, trading the condensed TOC for visibility of chapters. It's more properly an EpubMerge option than an FFF option. It could arguably be both--an over all setting in EpubMerge and a similar setting in FFF for anthologies only.

I'm honestly inclined to just leave it and direct users to either search for the string '(new)' or use the title replace_metadata discussed above.

@Chirishman
Copy link
Author

Can I have the series URL you used?

https://archiveofourown.org/series/2474827

I suppose I should also ask: Which behavior is preferred in this case?

I think a configurable option for the non-condensed TOC would make sense here as a solution and would solve my usecase here.

As to the replace_metadata option I dislike the fact that the normal procedure for marking something read doesn't unnew content which is marked in that way.

@JimmXinu
Copy link
Owner

Okay, I bit the bullet and changed the EpubMerge code to better handle FFF title/log pages so it works as I expect when there's also a cover.

I've also implemented an option in EpubMerge to enable/disable making single chapter books one TOC entry. It's currently in EpubMerge PR10.

Because FFF calls EM's internals and ignores the user's EM plugin settings, it also had to be added as an option to FFF.

I put the option in personal.ini rather than GUI. I can put a lot more explanatory text there, and honestly, this is an option of an option of an optional feature. And the FFF config GUI is cluttered enough already.

## (Plugin Only) - When mark_new_chapters:true, new stories added to
## an existing anthology will have *all* chapters marked (new).  If
## set to latestonly, existing (new) marks will only be removed when
## that particular story within the anthology is updated--either
## because it has new chapter(s) or you are using Update Always.
##
## By default, EpubMerge only creates one TOC entry for a story that
## has only one chapter (not counting titlepage and logpage).  Because
## that TOC entry is the story title, the *chapter* title doesn't
## appear in the anthology TOC.  Setting
## anthology_merge_keepsingletocs:true will keep the full TOC for all
## anthology stories, even when only one chapter.  Helpful to see
## (new) marks in TOC when mark_new_chapters:true
#anthology_merge_keepsingletocs:false

I've put up new versions of EpubMerge plugin(test version) and FanFicFare plugin(test version, announcement) that you can try. You need both to use anthology_merge_keepsingletocs.

@Chirishman
Copy link
Author

image

Test versions look like they're working as expected 👍

@JimmXinu
Copy link
Owner

Great. New version will probably be released later this week.

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

No branches or pull requests

2 participants