Quote:
Originally Posted by estherflails
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'))