View Single Post
Old 04-20-2013, 08:56 PM   #69
buffaloseven
Watching the Sky
buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.buffaloseven ought to be getting tired of karma fortunes by now.
 
buffaloseven's Avatar
 
Posts: 231
Karma: 634112
Join Date: Oct 2012
Location: Winnipeg, MB
Device: Kobo Aura
Made a few modifications to the code for (IMO) slightly better formatting:

Code:
...

    oldest_article        = 0
    no_stylesheets        = False
    extra_css = 'q { font-style: italic; } .size3mode { color: black; }'
    remove_javascript     = True
    remove_tags              = [
        dict(name='div', attrs={'id':'text_controls_toggle'})
        ,dict(name='script')
        ,dict(name='div', attrs={'id':'text_controls'})
        ,dict(name='div', attrs={'id':'editing_controls'})
        ,dict(name='div', attrs={'class':'bar bottom'})
        ,dict(name='div', attrs={'id':'controlbar_container'})
        ,dict(name='div', attrs={'id':'footer'})
        ,dict(name='label')
         ]
    use_embedded_content  = False
    needs_subscription    = True

...
Changed no stylesheets to False to retrieve basic styling information from Instapaper. Added CSS to italicize captions/quotations and change the text colour back to black from the default #222 that Instapaper defines in the .size3font class. Added in a line to remove the LABEL tags from the returned HTML so that headers are not duplicated.

So far I've had no problems with any articles and no images are centred and captions/quotes stand out from the rest of the article better. Hopefully this can help out someone else too.

EDIT: I've also submitted this as a proposed enhancement to the bitbucket repo for the plugin just in case.

Last edited by buffaloseven; 04-20-2013 at 09:03 PM.
buffaloseven is offline   Reply With Quote