![]() |
#2146 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 124
Karma: 3804
Join Date: May 2016
Device: Kindle Oasis 2
|
That's a user ID, not a storyID. Note the /u/ not /s/. It can easily be adjusted to pull one (or both) but you really don't want to extract a userID into a storyID column.
But, for your specific question/request: (.*?) href="http(s?)://www.fanfiction.net/u/(.*?)/(?s).* -or- ([\s\S]*) href="http(s?)://www.fanfiction.net/u/(.*?)/([\s\S]*) will isolate and pull out the ID you're looking for. Change /u/ to /s/ if you want only story ID's. The matching item is: \3 for the "replace with" box. It's possible to do: (.*?) href="http(s?)://www.fanfiction.net/(u|s)/(.*?)/(?s).* -or- ([\s\S]*) href="http(s?)://www.fanfiction.net/(u|s)/(.*?)/([\s\S]*) and use \4 - but keep in mind by doing this you're not distinguishing between what type of ID it is, so I would avoid that unless you have a specific reason for it. NOTE: edited above string from initial post, to allow for additional lines of text Not sure what the before/after text looks like, but that should take care of anything else. Anything newer seems to be HTTPS on ff.net, but I have a lot of older stuff, so I always use the http(s?) function to ensure that anything that's http:// is captured as well. Last edited by Atherton25; 06-02-2017 at 10:20 AM. Reason: modified regex, added another string too. |
![]() |
![]() |
![]() |
#2147 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Maybe it's just me but I just tried what you posted and can't get it to work.
|
![]() |
![]() |
Advert | |
|
![]() |
#2148 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 124
Karma: 3804
Join Date: May 2016
Device: Kindle Oasis 2
|
Give me a little more info. What column are you pulling from, and what's an example of the entire text there? I had assumed that it was comments, and so I did a test, then I added some lines and saw that new lines broke it, that's why I edited and adjusted the regex to include other lines. If you didn't see the edit, please try those before getting back to me.
|
![]() |
![]() |
![]() |
#2149 | |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
Quote:
GComyn should have been notified about the issue already. I'll look into in a few days if they don't respond. Remind me if gets to be more than a week. ![]() |
|
![]() |
![]() |
![]() |
#2150 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
I'm pulling the information from a comments column with sideheader.
The html-part is only visible in the HTML version of the column, like this: Code:
<a class="titlelink" href="https://www.fanfiction.net/s/12513078/1/">cape is good</a> |
![]() |
![]() |
Advert | |
|
![]() |
#2151 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 124
Karma: 3804
Join Date: May 2016
Device: Kindle Oasis 2
|
Er, I forgot to mention this - I thought about it when I was writing the expression (not the post) and forgot to mention it in the post. There is one (possibly) problem with the comments section. I'm not sure exactly how it works, but basically, it goes like this, if you've never edited the comments, then it doesn't get stored (locally?) in the database.
EDIT:Is this a custom column? I can try and duplicate it if you give me the column name/settings. Also, I have no idea what sideheader is? It basically means that in order for the regex to work and for calibre S&R to find the HTML, you have to have first opened up the HTML source side of the comment and (maybe) edited it. I've never experimented with it myself, but I know I had problems in the past and happened across the thread semi-recently (within the last few weeks) while I was exploring the forums. I read it, stored it in my long-term memory and most of it's a haze beyond knowing that's what the problem was. I haven't spent the time to experiment and find out how to 'fix' the issue. Found it. Try editing the comment in plain text, see if that works, if it doesn't try editing in the HTML source (add a space or something to either). If it doesn't work after that I don't know what to tell you. As for mass S&R? possibly doing a S&R replacing ' ' (space) with ' ' (two spaces) might modify and store the HTML locally. I really don't know how it all works and haven't sat down to see what will affect it. Last edited by Atherton25; 06-02-2017 at 11:15 AM. |
![]() |
![]() |
![]() |
#2152 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
When I select multiple stories I can only edit the comments columns in S&R. The screenshot shows how it looks when I choose my Author_URL column.
Yes, it's a custom column, see the second screenshot. The Story URL column I have is the same except of course for the name of it. ![]() Code:
authorHTML=>#author_url titleHTML=>#story_url |
![]() |
![]() |
![]() |
#2153 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 124
Karma: 3804
Join Date: May 2016
Device: Kindle Oasis 2
|
Alright, I grabbed a brand new ff.net story in my test database, with those two extra columns. I'm not sure why the initial expression didn't work, but with a few adjustments, I got something that does.
Removing the quotes IE, no extra spaces especially at the end since that'll screw up the regex: Code:
"(.*?)http(s?)://www.fanfiction.net/u/(.*?)/(?s).*" -or- "([\s\S]*)http(s?)://www.fanfiction.net/u/(.*?)/([\s\S]*)" Search mode: regex, search field: #author_url Search for: (either above option) Replace with:\3 Destination field: (your choice) Keep in mind to change /u/ and /s/ for whichever you're using. Note: I didn't try it with the title (storyID) since it didn't download for some reason and since the author one works fine, I'm assuming the title one will too. If not I'll go back and figure it out. Nevermind, checked and it works. Also, I'd like to add if you weren't aware, " storyId=>#id" that's an easier way to keep the story ID number in a custom column (#id in my case) for newly downloaded (or updated) fics. I don't think there's one for author ID though. Last edited by Atherton25; 06-02-2017 at 11:55 AM. |
![]() |
![]() |
![]() |
#2154 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Thanks so much. It works fine with both story and author URL.
|
![]() |
![]() |
![]() |
#2155 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 124
Karma: 3804
Join Date: May 2016
Device: Kindle Oasis 2
|
No problem. I've dabbled in regex off and on, generally in calibre, my renaming program and mp3tag. While it's not super complicated sometimes it's annoying to work with. Though, when it does finally work, it does wonders for getting what you want.
|
![]() |
![]() |
![]() |
#2156 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Mar 2017
Device: none
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#2157 | |
Member
![]() Posts: 20
Karma: 10
Join Date: Jun 2017
Device: kindle
|
![]()
royalroadl has stopped working, both in plugin and cli. Here is what the cli output looks like, tried it on two different books with identical results:
Quote:
|
|
![]() |
![]() |
![]() |
#2158 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
|
![]() |
![]() |
![]() |
#2160 |
Plugin Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,973
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
|
New test version posted
2017-06-04 - Fix for RoyalRoadL adapter - thanks, cryzed! - Update translations. |
![]() |
![]() |
![]() |
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 |