View Single Post
Old 09-06-2020, 02:07 AM   #1
ownedbycats
Custom User Title
ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.ownedbycats ought to be getting tired of karma fortunes by now.
 
ownedbycats's Avatar
 
Posts: 11,000
Karma: 75337983
Join Date: Oct 2018
Location: Canada
Device: Kobo Libra H2O, formerly Aura HD
Converting URL identifiers to custom ones

As mentioned in this post, I got stumped on a search-and-replace and corresponding regexes. I sort of know how to replace the identifier type, but I'm not sure how to proceed with this:

I made two identifiers, ao3 and ffnet, for the respective fanfiction sites.

Attachment 181789

For both of them, the {id} is a series of numbers. The number of digits can vary.

Here's what I'd like to do:
url:https://archiveofourown.org/works/00000000 => ao3:00000000
url:https://www.fanfiction.net/s/0000000/1/ => ffnet:0000000

I think I managed (after a lot of trial-and-error) to make a regex that matches the entire URL, but couldn't figure out how to match just the numbers or replace the identifier type.

If at all possible, I'd prefer this to apply only if the #fanficstatus column is not set to "In-Progress." But if this is not possible I think FanFicFare can put the urls back when I check for updates.

Is what I'm trying to do here even possible?


Last edited by ownedbycats; 09-06-2020 at 02:28 AM.
ownedbycats is offline   Reply With Quote