23 Commits

Author SHA1 Message Date
Kovid Goyal
29cd8d64ea
Change shebangs to python from python2
Also remove a few other miscellaneous references to python2
2020-08-22 18:47:51 +05:30
Kovid Goyal
8813a31a38
Handle direct querying of class attribute across BS versions 2019-03-24 12:18:43 +05:30
Kovid Goyal
f91b9c8e51
pep8 2018-09-11 10:54:01 +05:30
Flaviu Tamas
655ab21b0b
Fix from __future__ import order 2018-09-10 12:11:29 +05:30
Flaviu Tamas
0889ee85ec
Fix syntax errors
Command used:

futurize --no-diffs -f libfuturize.fixes.fix_print_with_import -f lib2to3.fixes.fix_throw -f lib2to3.fixes.fix_numliterals -f lib2to3.fixes.fix_except -f lib2to3.fixes.fix_exec -f lib2to3.fixes.fix_raise -f lib2to3.fixes.fix_tuple_params -f lib2to3.fixes.fix_ne -j20 -w -n setup recipes src manual setup.py recipes/*.recipe

And manual adjustments of print((...)) -> print(...)
2018-09-10 12:11:28 +05:30
Sergiy Kibrik
986ccd6a30 lwn_weekly: fix security section articles parsing
As security section has no URLs in article titles, findNext() boldly returns whatever
next link is encounered after the anchor. This leads to downloading and including in generated
document of heavy CVE reports, as links to them usually placed after the article title.

Instead we'd better search under anchor tag only, this way we'll filter useful articles' links.
2018-05-25 23:41:55 +03:00
Kovid Goyal
7eea7600ae
Update LWN Weekly
Fix #809 (lwn weekly shows "Unknown feed" and "Undefined article title" for almost all TOC items)
2018-02-01 06:27:59 +05:30
Marco Villegas
7a5c16fdc0 lwn_weekly: Prevents fail if article title is not defined.
More resilient behavior if article title contains non-html-encoded
characters. E.g. "<Programming>" string in the title start is recognized
by beatiful soup as html tag, but it is not, making the title a
NoneType, and raising an exception on Article creation.

This is actually a bug in the news page itself, but it anyways breaks
the recipe; hence, adding here a fixed string if for any reason the
article title end up with a NoneType.
2016-10-29 21:10:36 -05:00
Kovid Goyal
567040ee1e Perform PEP8 compliance checks on the entire codebase
Some bits of PEP 8 are turned off via setup.cfg
2016-07-29 21:25:17 +05:30
Kovid Goyal
ef09e886b3 Change all shebangs to use python2 2015-01-23 19:08:21 +05:30
Sergiy Kibrik
c98eb806f5 recipes: lwn_weekly: improve table handling
Site uses table layout a lot, both for page formatting
and within article's text, yet we clean up all tags
before & after article text, and remove what's left
from tables in-between, also removing useful tables
often embedded within articles. The better way seems
to keep only parts we actually interested about:
PageHeadline (article's title) and ArticleText and
not linearize table within ArticleText tag, thus
preserving useful tables.

Signed-off-by: Sergiy Kibrik <sakib@meta.ua>
2014-11-13 08:13:31 +05:30
Sergiy Kibrik
29fd4d5b2e recipes: lwn_weekly: outline quize box & authors
Fill authors names in articles headers with bg color
to separate them from article body. The same for
quiz boxes, plus outline them with border line,
as they're put directly within article's text.

Signed-off-by: Sergiy Kibrik <sakib@meta.ua>
2014-11-13 08:12:34 +05:30
Sergiy Kibrik
a51338f8f6 recipes: lwn_weekly: distinguish quotes by font style
Quotes and block quotes are widely used in LWN articles and
distinguished from other text by quotation marks and color.
Grayscale displays of ebook readers can't highlight them with
color, so change text style to italic for better reading experience.

Signed-off-by: Sergiy Kibrik <sakib@meta.ua>
2014-10-21 15:57:34 +05:30
Kovid Goyal
826d5ab725 pep8 2013-05-29 08:01:36 +05:30
Kovid Goyal
eaf9e2adc0 Fix recipes that use get_browser as a classmethod 2013-01-25 18:19:36 +05:30
Kovid Goyal
9c208906b7 ... 2012-10-19 08:21:22 +05:30
Kovid Goyal
b7e058518d Update LWN Weekly 2012-10-16 18:15:38 +05:30
Kovid Goyal
5dd6c7d9d1 ... 2012-01-12 23:17:01 +05:30
Kovid Goyal
deef06d0d5 Fix LWN Weekly 2012-01-07 07:45:35 +05:30
Kovid Goyal
53f0f353c4 Fix LWN and Cicero (DE) 2011-09-23 09:32:49 -06:00
Kovid Goyal
32ed063b5b ... 2011-03-22 18:38:07 -06:00
Kovid Goyal
377fd1d058 Updated LWN weekly 2011-03-22 15:02:28 -06:00
Kovid Goyal
014d4b50ed Store recipes in the calibre install folder in a zip file 2011-03-19 00:40:36 -06:00