05-07-2013, 07:03 AM | #1366 |
Groupie
Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
|
I've decided to redo the way my personal ini file handles tags I do not want to keep for AO3. It seems that every metadata section that I want (character, ships, genre) to grab from the site has a slew of tags that I do not want.
I had been listing the tags I didn't want and setting them blank, like this: genre=>Until it isn't=> However, this was making it hard to search the code. I was wondering if it were possible to set it so it would only apply if it did not match? For example, say I have a genre 'Angst' and 'Adventure'. I would want it to keep those two tags, but not 'Until it isn't'. genre!=>(Angst|Adventure)=> I want the code to only erase the tag if it does not match anything in the parenthesis. ie 'Until it isn't' does not equal Angst or Adventure, so erase the tag. I looked up the Regexp Tutorial and found how to negate a character, but I do not think that will work as it needed at least one character and I want to negate a whole string. Is there any way me to do this? |
05-07-2013, 02:11 PM | #1367 | |
Plugin Developer
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Quote:
genre=>^.*?(|Angst|Adventure)$=>\1 |
|
Advert | |
|
05-09-2013, 12:08 PM | #1368 |
Member
Posts: 23
Karma: 10
Join Date: Apr 2013
Device: Digma s602
|
Is it possible to make FFDL to set "Date" column not as the day when story was downloaded, but with the date when the story was last updated?
In personal.ini it is only possible to change what will be added to title page, not what will go to which columns. |
05-09-2013, 12:13 PM | #1369 | |
Well trained by Cats
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
Pubdate would be a better choice for a new 'Edition' |
|
05-09-2013, 01:30 PM | #1370 | ||
Plugin Developer
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Quote:
As theducks said, calibre sets the Date field in at least some cases. As I recall, I tried setting it to dateUpdated, but couldn't reliably. Quote:
What I (and many other users) do is have a custom Updated date column(#updated) that I have FFDL populate from the Custom Columns tab of FFDL config. No personal.ini changes are needed. |
||
Advert | |
|
05-09-2013, 01:46 PM | #1371 |
Member
Posts: 23
Karma: 10
Join Date: Apr 2013
Device: Digma s602
|
theducks, JimmXinu, thank you.
I already made that custom column, but I need that date in completely different place - when converting to fb2 - and I can't find a way to access that #updated column there. So I wanted to see if I can cheat that in your plugin somehow. |
05-09-2013, 01:52 PM | #1372 |
Plugin Developer
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
I was going to suggest Metadata Plugboards or Find & Replace under 'Edit Metadata in Bulk', but it doesn't look like either of those can write to date. I don't have any other ideas.
|
05-09-2013, 02:30 PM | #1373 |
Groupie
Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
|
I've almost got my personal ini set for Hobbit stories on AO3 when I ran into an output I didn't expect.
There are certain tags that I want at the end of a ship in parenthesis. However, I only want one per tag. So instead of: Book/Comics.LOTR.Bilbo Baggins/Kíli (Friendship) (Family) I want to break it down to: Book/Comics.LOTR.Bilbo Baggins/Kíli (Friendship) and Book/Comics.LOTR.Bilbo Baggins/Kíli (Family) I added code # 5 to seperate the tags out. Spoiler:
However, when I did this, code # 6 only applied to the first one. So, I got: Book/Comics.LOTR.Bilbo Baggins/Kíli (Friendship) and Bilbo Baggins/Kíli (Family) The same thing happened if the two parenthesis were the same (like (Friendship) (Friendship)). I don't understand why the second tag is not going through the final step. Unless it doesn't seperate the commas into tags until the personal ini is finished. If so, is there a way I can fix this? A couple urls that have this problem are: http://archiveofourown.org/works/659182 http://archiveofourown.org/works/639...apters/1160141 |
05-09-2013, 03:22 PM | #1374 | |
Plugin Developer
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Quote:
FFDL keeps ships (etc) as a list of strings internally and applies metadata_replacements to each string separately. You're changing one of those strings from: "Baggins/Kíli (Friendship) (Family)" into "Baggins/Kíli (Friendship), Baggins/Kíli (Family)". That part works because when FFDL hands it to calibre to put in a column, the list gets flattened into a comma separated string anyway. ["aa","ba, bb", "ca"] => "aa, ba, bb, ca" (It's not practical for FFDL to split that new comma sep string into two list entries for you internally because commas can legitimately appear in the strings.) For this particular problem, I think it's as simple as switching #5 & #6--do #6 then #5. |
|
05-09-2013, 04:36 PM | #1375 | |
Groupie
Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
|
Quote:
So the ship: Bilbo/Kili (Friendship), Bilbo/Kili (Family) returned: Books.Bilbo/Kili (Friendship) Bilbo/Kili (Family) while the character: Bilbo, Kili returned: Book.Bilbo Book.Kili Thanks again. |
|
05-09-2013, 05:34 PM | #1376 | |
Plugin Developer
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
Quote:
Once you've got this all working to your satisfaction, if you'd be willing to share it, I'd be interested in posting on the project wiki as an example for others. |
|
05-10-2013, 12:02 PM | #1377 |
Plugin Developer
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
FYI, while searching for existing stories to update, FFDL ignores the current Virtual Library setting.
At this time, I don't have any plans to change that. |
05-11-2013, 04:12 PM | #1378 | |
Groupie
Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
|
Quote:
However, it occurred to me that I might have problems if the character or ship contained parenthesis. So I'm trying to figure out what I want to change it to. For example there is a character that I renamed as Gollum (Smeagol) as the character has two valid names. The only symbols I can think to use aside from ( ) are [ ], { }, < >. I know that [ ] has special meaning in Python. But does either { } or < > have any special meaning in Python? |
|
05-11-2013, 05:07 PM | #1379 |
Plugin Developer
Posts: 6,284
Karma: 3966249
Join Date: Dec 2011
Location: Midwest USA
Device: Kindle Paperwhite(10th)
|
@Jade Aislin - Without experimenting, I don't really know. You'll have to try each to see. FYI, for < > you should use < > Otherwise it wouldn't show up correctly inside the epub/html/etc. I expect that one may be best.
That does give me an idea for a new FFDL feature, though. I've always had the test1.com adapter that returns dummy stories for testing output and metadata process testing. I could make maybe that configurable so you could set the title, author(s), ships, characters, etc, etc for a test story URL to try out different things without hitting real servers over and over. |
05-11-2013, 06:11 PM | #1380 | ||
Groupie
Posts: 164
Karma: 3100
Join Date: Sep 2011
Device: Kobo Auro H2O, PRS-T1
|
Quote:
I tried it on one of the ships that contains a name with the < >. It went from: implied Sam/Frodo=>Sam <Samwise Gamgee>/Frodo Baggins=>Frodo Baggins/Sam <Samwise Gamgee> with no problem. It doesn't seem like the < is needed, but I could be wrong. Quote:
|
||
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] Resize Cover | kiwidude | Plugins | 95 | 03-16-2024 11:55 PM |
[GUI Plugin] Open With | kiwidude | Plugins | 402 | 03-16-2024 11:44 PM |
[GUI Plugin] Find Duplicates | kiwidude | Plugins | 1096 | 03-16-2024 11:28 PM |
[GUI Plugin] Count Pages | kiwidude | Plugins | 1744 | 03-02-2024 05:39 PM |
[GUI Plugin] Plugin Updater **Deprecated** | kiwidude | Plugins | 159 | 06-19-2011 12:27 PM |