View Single Post
Old 08-07-2022, 02:26 PM   #7401
JimmXinu
Plugin Developer
JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.JimmXinu ought to be getting tired of karma fortunes by now.
 
JimmXinu's Avatar
 
Posts: 7,017
Karma: 4604635
Join Date: Dec 2011
Location: Midwest USA
Device: Kobo Clara Colour running KOReader
Quote:
Originally Posted by estherflails View Post
I tried yourentryHTML but I couldn't get it to work, it ends up not fetching anything. Here are the relevant parts from my personal.ini:
...
Rather than go back and forth more times, here is an implementation that works for me for what I think you want.

Is this something other users would like included in FFF?


Code:
add_to_extra_valid_entries:,inspired, inspiredUrl, inspiredHTML, endnotes, endnotesUrl, endnotesHTML
add_to_make_linkhtml_entries:,inspired, endnotes
add_to_extra_titlepage_entries:,inspiredHTML,endnotesHTML
add_to_custom_columns_settings:
 inspiredHTML=>#long_text1
 endnotesHTML=>#long_text2
Code:
        notesdiv = metasoup.find('div', {'class' : "notes module"})
        if notesdiv:
            endnotesurl = notesdiv.find('a',href=re.compile('#work_endnotes$'))
            if endnotesurl:
                self.story.setMetadata('endnotesUrl',self.url+'?view_full_work=true'+'#work_endnotes')
                self.story.setMetadata('endnotes','Story has end notes')
            # logger.debug(self.story.getMetadata('endnotesUrl'))
            inspiredurl = notesdiv.find('a',href=re.compile('#children$'))
            if inspiredurl:
                self.story.setMetadata('inspiredUrl',self.url+'?view_full_work=true'+'#children')
                self.story.setMetadata('inspired','Story has inspired works')
            # logger.debug(self.story.getMetadata('inspiredUrl'))
JimmXinu is offline   Reply With Quote