View Single Post
Old 02-21-2017, 11:59 AM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,657
Karma: 205039118
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Sorry, but nobody "manually" made ids like that. Those were automatically generated by a program of some sort. You can change them to anything you like. Unfortunately, changing them WILL be a manual process. And if the book has lots and lots of links, it may also prove painful.

No regex is gong to do what you want. You'd likely have to write a parsing algorithm that is capable of examining the current id and matching it with url fragments throughout the book so it could change them all to match. It would also need to maintain a list of all id's currently in use to ensure that your short, yet random id generator (which will need to be taught to create valid ids) creates ids that are guaranteed to be unique for that file. Your algorithm could also just create ids that started with a letter and added an auto-incrementing number (but would still need to parse the rest of the book to adjust all links as it went).

Whether you do it manually, or you write a program/script to do it for you. there's nothing but hard work and time ahead of you.

Last edited by DiapDealer; 02-21-2017 at 12:16 PM.
DiapDealer is offline   Reply With Quote