![]() |
#7381 |
Custom User Title
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 10,988
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
|
I assume DisturbedDragon is not the owner of the router.
|
![]() |
![]() |
![]() |
#7382 |
Member
![]() Posts: 14
Karma: 10
Join Date: Jul 2022
Device: none
|
Assuming it has the ability, whitelist the URL.
|
![]() |
![]() |
![]() |
#7383 |
Member
![]() Posts: 22
Karma: 10
Join Date: May 2016
Device: Kindle paperwhite
|
Fixed it by installing Nord on the desktop, while removing it from the router, so my laptop can update while their browsing is still secure. I'm now just annoyed they didn't think to tell me about this beforehand
![]() |
![]() |
![]() |
![]() |
#7384 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 125
Karma: 295674
Join Date: Jul 2021
Device: iPhone
|
Back again with another question, is it possible to format the date depending on whether the date published and date updated are the same or not? For example a fic from Ao3 has a published date of January 1, 2022 and an updated date of January 2, 2022, the final date string should be January 1-2, 2022. If it's a different month, January 1-February 2, 2022. If a different year, January 1, 2021-February 2, 2022.
So far this is what I've done: Code:
add_to_extra_valid_entries:,finalDate,publishedMonth,updatedMonth,publishedDay,updatedDay,publishedYear,updatedYear include_in_publishedMonth:datePublished include_in_updatedMonth:dateUpdated include_in_publishedDay:datePublished include_in_updatedDay:dateUpdated include_in_publishedYear:datePublished include_in_updatedYear:dateUpdated publishedMonth_format:%%B updatedMonth_format:%%B publishedDay_format:%%d updatedDay_format:%%d publishedYear_format:%%Y updatedYear_format:%%Y Code:
add_to_replace_metadata: publishedMonth,updatedMonth=>(January|February|March|April|May|June|July|August|September|October|November|December)(\s+\d{1,2})(,\s+)(\d{4})=>\1 publishedDay,updatedDay=>(January|February|March|April|May|June|July|August|September|October|November|December)(\s+\d{1,2})(,\s+)(\d{4})=>\2 publishedYear,updatedYear=>(January|February|March|April|May|June|July|August|September|October|November|December)(\s+\d{1,2})(,\s+)(\d{4})=>4 |
![]() |
![]() |
![]() |
#7385 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
And each replace_metadata line only works on one value at a time without knowledge of any other entry. But I think it's possible to do what you want by using the _LIST feature of replace_metadata, this seems to work for me: Code:
datePublished_format:%%B %%d, %%Y dateUpdated_format:%%B %%d, %%Y add_to_extra_valid_entries:,dateRange include_in_dateRange:datePublished,dateUpdated keep_in_order_dateRange:true add_to_replace_metadata: # same year 1 2 3 4 5 dateRange_LIST=>([^\s]+)\s+(\d{1,2}),\s+(\d{4}), ([^\s]+)\s+(\d{1,2}),\s+\3=>\1 \2-\4 \5, \3 # same month 1 2 3 4 dateRange_LIST=>([^\s]+)\s+(\d{1,2})-\1\s+(\d{1,2}),\s+(\d{4})=>\1 \2-\3, \4 # don't need regexp for date day, handled by de-dup.
|
|
![]() |
![]() |
![]() |
#7386 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 125
Karma: 295674
Join Date: Jul 2021
Device: iPhone
|
Ah so it wasn't as complicated as I thought, thank you. Though it only seems to be working for dates that are the exact same. When I check what dateRange is for the ones that didn't work the string is something like "April 11, 2021, September 15, 2021" or "March 15, 2019, March 16, 2019" so the two regexp's should've worked accordingly.
|
![]() |
![]() |
![]() |
#7387 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
I'd have to see the story URLs and your personal.ini(there's a button for a safe version) to comment on why those particular strings didn't. |
|
![]() |
![]() |
![]() |
#7388 | |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 125
Karma: 295674
Join Date: Jul 2021
Device: iPhone
|
Quote:
![]() It might have had something to do with the order of my settings. I also added another one for completely different dates so the structure is "published date-updated date" instead of "published date, updated date". Sharing my .ini anyway for posterity. Spoiler:
|
|
![]() |
![]() |
![]() |
#7389 |
Zealot
![]() Posts: 105
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Kobo Libra 2
|
I have a regex question. My ini the following lines:
Code:
## Full name or additional info for relationships ## 1. Make these two word names one word before the 'first part only' line. ships_CHARS=>[pP]ast (.*)=>past_\1 ## strip each ships char down to first part only ships_CHARS=>^([^ ]+).*$=>\1 ## 2. Change the two words names back into separate words ships_CHARS=>past_(.*)=>past \1 For example, in this story https://archiveofourown.org/works/28197405, the regex results in "Claude/past Sylvain", which is expected. What I would like to get is something like "past Claude/Sylvain". I'm not sure how to do that because FFF sorts the ships alphabetically, but in this instance I don't want it to sort the ship. I want "past" to be the first part of the whole ship. Could someone help me? |
![]() |
![]() |
![]() |
#7390 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
ships_CHARS specifically operates on the individual characters, those replace lines can't see the whole ships entry value they come from. What seems to work for me is to temporarily split 'past' out as it's own 'person' (\, operator), force it to be at the front, then replace it later: Code:
sort_ships:true add_to_replace_metadata: # Split leading 'past' to own (temp) entry, 00 to put at # front(sort_ships:true assumed) ships_CHARS=>^[pP]ast (.*)=>00past\,\1 ## strip each ships char down to first part only ships_CHARS=>^([^ ]+).*$=>\1 ## Change 00past/ back to "Past " ships=>^00past\s*(/|&)\s*=>Past\s |
|
![]() |
![]() |
![]() |
#7391 |
Member
![]() Posts: 23
Karma: 10
Join Date: Jul 2021
Device: none
|
Hello! I modified the ao3 adapter a bit to get the inspired works metadata and it works, but only for single chaptered stories, since this information only shows up in the last chapter.
But since there is a method for FFF to use the full_work view to download the entire work, I was wondering if it was possible to use this to get the metadata from the end as well. I'm not a programmer so I don't know how complicated this would be. It's not a problem if it's not possible, but I thought I'd ask. ![]() example link: https://archiveofourown.org/works/29...pters/71633358 Code:
inspired = metasoup.find('div',{'id':'children'}) if inspired: self.story.setMetadata('inspired',stripHTML(inspired.text)) |
![]() |
![]() |
![]() |
#7392 |
Zealot
![]() Posts: 105
Karma: 10
Join Date: Nov 2012
Location: Germany
Device: Kobo Libra 2
|
|
![]() |
![]() |
![]() |
#7393 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
Because it's at the end of the last chapter, it's included as a chapter note element and controlled by the exclude_notes setting. There are other notes that are only included at the end of the 'final' chapter--which moves when a story updates. FFF operates on a paradigm of getting metadata separately from chapter data. Metadata is collected first, then used to make decisions about chapters to fetch and to allow for metadata update with less traffic. FFF does have a AO3 only feature use_view_full_work (on by default), but that's not invoked until chapter fetching. To reliably include AO3 'Inspired by' links in the metadata would require fetching the last chapter text in extractChapterUrlsAndMetadata() to look for the 'inspired by' links. Ideally, it would then use the make_linkhtml_entries feature (and keep_in_order_) to make proper HTML links rather than just a strings. The author links could not currently preserved. IMO, it's rare enough to not be worth the extra network hit. But if you really want it, I'd accept it as a default-off optional feature. |
|
![]() |
![]() |
![]() |
#7394 | |
Member
![]() Posts: 23
Karma: 10
Join Date: Jul 2021
Device: none
|
Quote:
Code:
inspired = metasoup.find('div',{'id':'children'}) seetheend = metasoup.find('p',{'class':'jump'}) if inspired: self.story.setMetadata('inspired',stripHTML(inspired.text)) elif seetheend: self.story.setMetadata('seetheend',stripHTML(seetheend.text)) single chaptered work with inspired: https://archiveofourown.org/works/234459 single chaptered work with endnotes: https://archiveofourown.org/works/3968443 Also, does make_linkhtml_entries only work for the titlepage? Is there a way to preserve the links in long text columns, or would that not work since the links are only partial? |
|
![]() |
![]() |
![]() |
#7395 | ||
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
BTW, doing both .text and stripHTML() is redundant. I prefer stripHTML() because it does some other stuff and definitely gets all sub tags. I would suggest that if you're just making them general links you change the text anyway. "End Notes" and "Works inspired by this one", for example, instead of just keep the lower case as-is. Quote:
As for partial links, it's the adapter file's responsibility to finish out the URL before setting it into metadata. Look in adapter_archiveofourownorg.py for all the places it does 'https://' + self.getSiteDomain() + alink['href'] and such. |
||
![]() |
![]() |
![]() |
Tags |
fanfiction |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 523 | 07-15-2025 06:45 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 404 | 02-21-2025 05:42 AM |
[GUI Plugin] Marvin XD | Philantrop | Plugins | 126 | 01-29-2017 12:48 PM |
[GUI Plugin] KiNotes | -axel- | Plugins | 0 | 07-14-2013 06:39 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |