View Single Post
Old 08-06-2022, 07:56 PM   #7394
estherflails
Member
estherflails began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jul 2021
Device: none
Quote:
Originally Posted by JimmXinu View Post
I didn't remember it, but this was brought up once before.
Thank you, but I figured it would be good enough if I could have it set metadata if a story has works inspired by it, which is noted in the first chapter. I got it to work by using the "jump" class but unfortunately that also exists when the story has endnotes, not just inspired works, and I can't figure out how to get around that.

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))
multi-chaptered work with inspired: https://archiveofourown.org/works/29...pters/71633358
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?
estherflails is offline   Reply With Quote