sync with Kovid's branch
1618
Changelog.old.yaml
1890
Changelog.yaml
@ -44,6 +44,14 @@ Example:
|
||||
{"contentGuid":"d8c14b0","asin":"B000JML5VM","cdeType":"EBOK","fileRevisionId":"1296874359405"}
|
||||
|
||||
|
||||
In devices with KF8 support, we're seeing an extended content header (which seems to be required by some FW versions for KF8 files, like FW 3.4):
|
||||
|
||||
format Mobi version. MOBI_8 for KF8, MOBI_7 for legacy mobi files.
|
||||
acr Palm DB name
|
||||
|
||||
Example:
|
||||
{"contentGuid":"f2fc7597","asin":"B003M68YKM","cdeType":"EBOK","format":"MOBI_8","fileRevisionId":"1342776186889","acr":"CR!1F5WDHWWVN4Y78MA87Z13H9K6RKE"}
|
||||
|
||||
Page Mapping Header
|
||||
-------------------
|
||||
|
||||
|
BIN
icons/install.ico
Normal file
After Width: | Height: | Size: 25 KiB |
237
imgsrc/mimetypes/azw2.svg
Normal file
@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
width="128"
|
||||
height="128"
|
||||
id="svg2606"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="azw2.svg"
|
||||
inkscape:export-filename="/home/niluje/Patchland/calibre/imgsrc/mimetypes/azw2.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1025"
|
||||
id="namedview45"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.84375"
|
||||
inkscape:cx="-11.118644"
|
||||
inkscape:cy="42.305085"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2606" />
|
||||
<defs
|
||||
id="defs2608">
|
||||
<linearGradient
|
||||
id="linearGradient10207">
|
||||
<stop
|
||||
id="stop10209"
|
||||
style="stop-color:#a2a2a2;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop10211"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
x1="96"
|
||||
y1="104"
|
||||
x2="88.000198"
|
||||
y2="96.000198"
|
||||
id="XMLID_12_"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop83"
|
||||
style="stop-color:#888a85;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop85"
|
||||
style="stop-color:#8c8e89;stop-opacity:1"
|
||||
offset="0.0072" />
|
||||
<stop
|
||||
id="stop87"
|
||||
style="stop-color:#abaca9;stop-opacity:1"
|
||||
offset="0.0673" />
|
||||
<stop
|
||||
id="stop89"
|
||||
style="stop-color:#c5c6c4;stop-opacity:1"
|
||||
offset="0.1347" />
|
||||
<stop
|
||||
id="stop91"
|
||||
style="stop-color:#dbdbda;stop-opacity:1"
|
||||
offset="0.2652576" />
|
||||
<stop
|
||||
id="stop93"
|
||||
style="stop-color:#ebebeb;stop-opacity:1"
|
||||
offset="0.37646064" />
|
||||
<stop
|
||||
id="stop95"
|
||||
style="stop-color:#f7f7f6;stop-opacity:1"
|
||||
offset="0.48740286" />
|
||||
<stop
|
||||
id="stop97"
|
||||
style="stop-color:#fdfdfd;stop-opacity:1"
|
||||
offset="0.6324091" />
|
||||
<stop
|
||||
id="stop99"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="102"
|
||||
cy="112.3047"
|
||||
r="139.55859"
|
||||
id="XMLID_8_"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop41"
|
||||
style="stop-color:#b7b8b9;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop47"
|
||||
style="stop-color:#ececec;stop-opacity:1"
|
||||
offset="0.18851049" />
|
||||
<stop
|
||||
id="stop49"
|
||||
style="stop-color:#fafafa;stop-opacity:1"
|
||||
offset="0.25718147" />
|
||||
<stop
|
||||
id="stop51"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0.30111277" />
|
||||
<stop
|
||||
id="stop53"
|
||||
style="stop-color:#fafafa;stop-opacity:1"
|
||||
offset="0.53130001" />
|
||||
<stop
|
||||
id="stop55"
|
||||
style="stop-color:#ebecec;stop-opacity:1"
|
||||
offset="0.84490001" />
|
||||
<stop
|
||||
id="stop57"
|
||||
style="stop-color:#e1e2e3;stop-opacity:1"
|
||||
offset="1" />
|
||||
</radialGradient>
|
||||
<filter
|
||||
x="-0.19200002"
|
||||
y="-0.19199999"
|
||||
width="1.3839999"
|
||||
height="1.3839999"
|
||||
color-interpolation-filters="sRGB"
|
||||
id="filter6697">
|
||||
<feGaussianBlur
|
||||
id="feGaussianBlur6699"
|
||||
stdDeviation="1.9447689" />
|
||||
</filter>
|
||||
<clipPath
|
||||
id="clipPath7084">
|
||||
<path
|
||||
d="m 72,88 -32,32 -8,0 0,-40 40,0 0,8 z"
|
||||
id="path7086"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
cx="102"
|
||||
cy="112.3047"
|
||||
r="139.55859"
|
||||
id="radialGradient9437"
|
||||
xlink:href="#XMLID_8_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.9996653,2e-6,0.00301608)" />
|
||||
<linearGradient
|
||||
x1="98.617439"
|
||||
y1="106.41443"
|
||||
x2="91.228737"
|
||||
y2="99.254974"
|
||||
id="linearGradient10213"
|
||||
xlink:href="#linearGradient10207"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<filter
|
||||
color-interpolation-filters="sRGB"
|
||||
id="filter2770">
|
||||
<feGaussianBlur
|
||||
id="feGaussianBlur2772"
|
||||
stdDeviation="2.0786429" />
|
||||
</filter>
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2611">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<path
|
||||
d="m 16,8 0,112 c 0,0 63.15625,0 63.15625,0 l 0.03125,0 c 3e-6,0 11.90625,-9.90625 17.40625,-15.40625 C 102.09375,99.09375 112,87.1875 112,87.1875 L 112,87.15625 112,8 16,8 z"
|
||||
transform="matrix(1.0416667,0,0,1.0267857,-2.6666667,-1.2142891)"
|
||||
id="path7865"
|
||||
style="opacity:0.5;fill:#000000;fill-opacity:1;filter:url(#filter2770)" />
|
||||
<path
|
||||
d="M 16.000001,8 16,120 c 0,0 63.146418,0 63.146418,0 L 112,87.14642 112,8 16.000001,8 z"
|
||||
id="path34"
|
||||
style="fill:#ffffff;fill-opacity:1" />
|
||||
<path
|
||||
d="m 18.000002,9.0000034 c -0.551,0 -1,0.44885 -1,0.999665 l 0,107.9638516 c 0,0.55181 0.449,0.99966 1,0.99966 l 59.171997,0 c 0.263,0 2.76268,0.11813 2.948681,-0.0688 L 110.707,88.094202 C 110.894,87.907264 111,85.40942 111,85.146508 l 0,-75.1468396 c 0,-0.550815 -0.448,-0.999665 -1,-0.999665 l -91.999998,0 z"
|
||||
id="path59"
|
||||
style="fill:url(#radialGradient9437);fill-opacity:1" />
|
||||
<path
|
||||
d="m 41.879531,115.98249 c 0,0 24.309609,-24.309614 24.309609,-24.309614 0,0 -9.35314,2.913124 -19.60314,2.913124 0,10.25 -4.706469,21.39649 -4.706469,21.39649 z"
|
||||
transform="translate(40,0)"
|
||||
clip-path="url(#clipPath7084)"
|
||||
id="path5540"
|
||||
style="opacity:0.4;fill:#000000;fill-opacity:1;filter:url(#filter6697)" />
|
||||
<path
|
||||
d="m 79.172,120 c 0,0 11.914,-9.914 17.414,-15.414 5.5,-5.5 15.414,-17.414 15.414,-17.414 0,0 -13.75,8.828 -24,8.828 0,10.25 -8.828,24 -8.828,24 z"
|
||||
id="path14523"
|
||||
style="fill:url(#linearGradient10213);fill-opacity:1" />
|
||||
<text
|
||||
x="63.980469"
|
||||
y="32.160156"
|
||||
id="text3772"
|
||||
xml:space="preserve"
|
||||
style="font-size:24px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
|
||||
sodipodi:linespacing="125%"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3021"
|
||||
x="63.980469"
|
||||
y="32.160156">Kindlet</tspan></text>
|
||||
<path
|
||||
d="m 68.227,60.477999 c 0,2.157 0.052,3.954 -1.035,5.874 -0.88,1.561 -2.279,2.517 -3.833,2.517 -2.121,0 -3.366,-1.62 -3.366,-4.015 C 59.993,60.14 64.225,59.283 68.226,59.283 v 1.194999 z m 5.579,13.496 c -0.365,0.332 -0.896,0.352 -1.307,0.132 -1.838,-1.528 -2.167,-2.231 -3.174,-3.69 -3.035,3.094 -5.188,4.023 -9.123,4.023 -4.663,0 -8.284,-2.876 -8.284,-8.629 0,-4.49 2.433,-7.543999 5.899,-9.044999 3.005,-1.317 7.202,-1.556 10.41,-1.914 v -0.723 c 0,-1.313 0.104,-2.875 -0.671,-4.012 -0.674,-1.021 -1.968,-1.437 -3.106,-1.437 -2.111,0 -3.99,1.078 -4.45,3.321 -0.097,0.498 -0.46,0.991 -0.962,1.017 l -5.364,-0.581 c -0.456,-0.102 -0.958,-0.463 -0.828,-1.155 1.233,-6.511 7.109,-8.475 12.378,-8.475 2.693,0 6.215,0.719 8.335,2.757 2.692997,2.515 2.431997,5.869 2.431997,9.524 v 8.622999 c 0,2.596 1.081,3.732 2.091,5.128 0.354,0.503 0.434,1.103 -0.018,1.473 -1.131,0.949 -3.138997,2.693 -4.243997,3.676 l -0.014,-0.013 z"
|
||||
id="path4047"
|
||||
style="fill-rule:evenodd" />
|
||||
<path
|
||||
d="m 99.325111,79.885297 c -8.716894,6.432161 -21.357191,9.853809 -32.243032,9.853809 -15.251419,0 -28.989193,-5.636741 -39.38419,-15.021522 -0.815557,-0.738364 -0.08726,-1.746902 0.89191,-1.173831 C 39.807066,80.071565 53.675732,84 68,84 c 9.664184,0 20.284886,-2.004491 30.058986,-6.151079 1.474215,-0.623415 2.709284,0.97246 1.266125,2.036376 z"
|
||||
id="path3858"
|
||||
style="fill:#ff9201;fill-rule:evenodd" />
|
||||
<path
|
||||
d="m 104,76 c -1.11342,-1.426386 -7.371903,-0.676274 -10.179364,-0.337298 -0.853315,0.09817 -0.984206,-0.641874 -0.217315,-1.184739 4.990671,-3.505554 13.168059,-2.491141 14.119539,-1.318987 0.95736,1.187256 -0.25087,9.384779 -4.92858,13.293915 -0.71907,0.604117 -1.40373,0.286117 -1.08573,-0.510142 C 102.75988,83.311486 105.11761,77.427225 104,76 z"
|
||||
id="path3860"
|
||||
style="fill:#ff9201;fill-rule:evenodd" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 9.1 KiB |
237
imgsrc/mimetypes/azw3.svg
Normal file
@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
width="128"
|
||||
height="128"
|
||||
id="svg2606"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="azw3.svg"
|
||||
inkscape:export-filename="/home/niluje/Patchland/calibre/imgsrc/mimetypes/azw3.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1025"
|
||||
id="namedview45"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.84375"
|
||||
inkscape:cx="-11.118644"
|
||||
inkscape:cy="42.305085"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2606" />
|
||||
<defs
|
||||
id="defs2608">
|
||||
<linearGradient
|
||||
id="linearGradient10207">
|
||||
<stop
|
||||
id="stop10209"
|
||||
style="stop-color:#a2a2a2;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop10211"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
x1="96"
|
||||
y1="104"
|
||||
x2="88.000198"
|
||||
y2="96.000198"
|
||||
id="XMLID_12_"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop83"
|
||||
style="stop-color:#888a85;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop85"
|
||||
style="stop-color:#8c8e89;stop-opacity:1"
|
||||
offset="0.0072" />
|
||||
<stop
|
||||
id="stop87"
|
||||
style="stop-color:#abaca9;stop-opacity:1"
|
||||
offset="0.0673" />
|
||||
<stop
|
||||
id="stop89"
|
||||
style="stop-color:#c5c6c4;stop-opacity:1"
|
||||
offset="0.1347" />
|
||||
<stop
|
||||
id="stop91"
|
||||
style="stop-color:#dbdbda;stop-opacity:1"
|
||||
offset="0.2652576" />
|
||||
<stop
|
||||
id="stop93"
|
||||
style="stop-color:#ebebeb;stop-opacity:1"
|
||||
offset="0.37646064" />
|
||||
<stop
|
||||
id="stop95"
|
||||
style="stop-color:#f7f7f6;stop-opacity:1"
|
||||
offset="0.48740286" />
|
||||
<stop
|
||||
id="stop97"
|
||||
style="stop-color:#fdfdfd;stop-opacity:1"
|
||||
offset="0.6324091" />
|
||||
<stop
|
||||
id="stop99"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="102"
|
||||
cy="112.3047"
|
||||
r="139.55859"
|
||||
id="XMLID_8_"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop41"
|
||||
style="stop-color:#b7b8b9;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop47"
|
||||
style="stop-color:#ececec;stop-opacity:1"
|
||||
offset="0.18851049" />
|
||||
<stop
|
||||
id="stop49"
|
||||
style="stop-color:#fafafa;stop-opacity:1"
|
||||
offset="0.25718147" />
|
||||
<stop
|
||||
id="stop51"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0.30111277" />
|
||||
<stop
|
||||
id="stop53"
|
||||
style="stop-color:#fafafa;stop-opacity:1"
|
||||
offset="0.53130001" />
|
||||
<stop
|
||||
id="stop55"
|
||||
style="stop-color:#ebecec;stop-opacity:1"
|
||||
offset="0.84490001" />
|
||||
<stop
|
||||
id="stop57"
|
||||
style="stop-color:#e1e2e3;stop-opacity:1"
|
||||
offset="1" />
|
||||
</radialGradient>
|
||||
<filter
|
||||
x="-0.19200002"
|
||||
y="-0.19199999"
|
||||
width="1.3839999"
|
||||
height="1.3839999"
|
||||
color-interpolation-filters="sRGB"
|
||||
id="filter6697">
|
||||
<feGaussianBlur
|
||||
id="feGaussianBlur6699"
|
||||
stdDeviation="1.9447689" />
|
||||
</filter>
|
||||
<clipPath
|
||||
id="clipPath7084">
|
||||
<path
|
||||
d="m 72,88 -32,32 -8,0 0,-40 40,0 0,8 z"
|
||||
id="path7086"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
cx="102"
|
||||
cy="112.3047"
|
||||
r="139.55859"
|
||||
id="radialGradient9437"
|
||||
xlink:href="#XMLID_8_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.9996653,2e-6,0.00301608)" />
|
||||
<linearGradient
|
||||
x1="98.617439"
|
||||
y1="106.41443"
|
||||
x2="91.228737"
|
||||
y2="99.254974"
|
||||
id="linearGradient10213"
|
||||
xlink:href="#linearGradient10207"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<filter
|
||||
color-interpolation-filters="sRGB"
|
||||
id="filter2770">
|
||||
<feGaussianBlur
|
||||
id="feGaussianBlur2772"
|
||||
stdDeviation="2.0786429" />
|
||||
</filter>
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2611">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<path
|
||||
d="m 16,8 0,112 c 0,0 63.15625,0 63.15625,0 l 0.03125,0 c 3e-6,0 11.90625,-9.90625 17.40625,-15.40625 C 102.09375,99.09375 112,87.1875 112,87.1875 L 112,87.15625 112,8 16,8 z"
|
||||
transform="matrix(1.0416667,0,0,1.0267857,-2.6666667,-1.2142891)"
|
||||
id="path7865"
|
||||
style="opacity:0.5;fill:#000000;fill-opacity:1;filter:url(#filter2770)" />
|
||||
<path
|
||||
d="M 16.000001,8 16,120 c 0,0 63.146418,0 63.146418,0 L 112,87.14642 112,8 16.000001,8 z"
|
||||
id="path34"
|
||||
style="fill:#ffffff;fill-opacity:1" />
|
||||
<path
|
||||
d="m 18.000002,9.0000034 c -0.551,0 -1,0.44885 -1,0.999665 l 0,107.9638516 c 0,0.55181 0.449,0.99966 1,0.99966 l 59.171997,0 c 0.263,0 2.76268,0.11813 2.948681,-0.0688 L 110.707,88.094202 C 110.894,87.907264 111,85.40942 111,85.146508 l 0,-75.1468396 c 0,-0.550815 -0.448,-0.999665 -1,-0.999665 l -91.999998,0 z"
|
||||
id="path59"
|
||||
style="fill:url(#radialGradient9437);fill-opacity:1" />
|
||||
<path
|
||||
d="m 41.879531,115.98249 c 0,0 24.309609,-24.309614 24.309609,-24.309614 0,0 -9.35314,2.913124 -19.60314,2.913124 0,10.25 -4.706469,21.39649 -4.706469,21.39649 z"
|
||||
transform="translate(40,0)"
|
||||
clip-path="url(#clipPath7084)"
|
||||
id="path5540"
|
||||
style="opacity:0.4;fill:#000000;fill-opacity:1;filter:url(#filter6697)" />
|
||||
<path
|
||||
d="m 79.172,120 c 0,0 11.914,-9.914 17.414,-15.414 5.5,-5.5 15.414,-17.414 15.414,-17.414 0,0 -13.75,8.828 -24,8.828 0,10.25 -8.828,24 -8.828,24 z"
|
||||
id="path14523"
|
||||
style="fill:url(#linearGradient10213);fill-opacity:1" />
|
||||
<text
|
||||
x="64.392578"
|
||||
y="32.103516"
|
||||
id="text3772"
|
||||
xml:space="preserve"
|
||||
style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
|
||||
sodipodi:linespacing="125%"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3026"
|
||||
x="64.392578"
|
||||
y="32.103516">KF8</tspan></text>
|
||||
<path
|
||||
d="m 68.227,60.477999 c 0,2.157 0.052,3.954 -1.035,5.874 -0.88,1.561 -2.279,2.517 -3.833,2.517 -2.121,0 -3.366,-1.62 -3.366,-4.015 C 59.993,60.14 64.225,59.283 68.226,59.283 v 1.194999 z m 5.579,13.496 c -0.365,0.332 -0.896,0.352 -1.307,0.132 -1.838,-1.528 -2.167,-2.231 -3.174,-3.69 -3.035,3.094 -5.188,4.023 -9.123,4.023 -4.663,0 -8.284,-2.876 -8.284,-8.629 0,-4.49 2.433,-7.543999 5.899,-9.044999 3.005,-1.317 7.202,-1.556 10.41,-1.914 v -0.723 c 0,-1.313 0.104,-2.875 -0.671,-4.012 -0.674,-1.021 -1.968,-1.437 -3.106,-1.437 -2.111,0 -3.99,1.078 -4.45,3.321 -0.097,0.498 -0.46,0.991 -0.962,1.017 l -5.364,-0.581 c -0.456,-0.102 -0.958,-0.463 -0.828,-1.155 1.233,-6.511 7.109,-8.475 12.378,-8.475 2.693,0 6.215,0.719 8.335,2.757 2.692997,2.515 2.431997,5.869 2.431997,9.524 v 8.622999 c 0,2.596 1.081,3.732 2.091,5.128 0.354,0.503 0.434,1.103 -0.018,1.473 -1.131,0.949 -3.138997,2.693 -4.243997,3.676 l -0.014,-0.013 z"
|
||||
id="path4047"
|
||||
style="fill-rule:evenodd" />
|
||||
<path
|
||||
d="m 99.325111,79.885297 c -8.716894,6.432161 -21.357191,9.853809 -32.243032,9.853809 -15.251419,0 -28.989193,-5.636741 -39.38419,-15.021522 -0.815557,-0.738364 -0.08726,-1.746902 0.89191,-1.173831 C 39.807066,80.071565 53.675732,84 68,84 c 9.664184,0 20.284886,-2.004491 30.058986,-6.151079 1.474215,-0.623415 2.709284,0.97246 1.266125,2.036376 z"
|
||||
id="path3858"
|
||||
style="fill:#ff9201;fill-rule:evenodd" />
|
||||
<path
|
||||
d="m 104,76 c -1.11342,-1.426386 -7.371903,-0.676274 -10.179364,-0.337298 -0.853315,0.09817 -0.984206,-0.641874 -0.217315,-1.184739 4.990671,-3.505554 13.168059,-2.491141 14.119539,-1.318987 0.95736,1.187256 -0.25087,9.384779 -4.92858,13.293915 -0.71907,0.604117 -1.40373,0.286117 -1.08573,-0.510142 C 102.75988,83.311486 105.11761,77.427225 104,76 z"
|
||||
id="path3860"
|
||||
style="fill:#ff9201;fill-rule:evenodd" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 9.1 KiB |
@ -8,10 +8,37 @@
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
width="128"
|
||||
height="128"
|
||||
id="svg2606">
|
||||
id="svg2606"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="mobi.svg"
|
||||
inkscape:export-filename="/home/niluje/Patchland/calibre/imgsrc/mimetypes/mobi.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1025"
|
||||
id="namedview45"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.84375"
|
||||
inkscape:cx="64"
|
||||
inkscape:cy="64"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2606" />
|
||||
<defs
|
||||
id="defs2608">
|
||||
<linearGradient
|
||||
@ -184,15 +211,16 @@
|
||||
id="path14523"
|
||||
style="fill:url(#linearGradient10213);fill-opacity:1" />
|
||||
<text
|
||||
x="32"
|
||||
y="32"
|
||||
x="64.902344"
|
||||
y="32.103516"
|
||||
id="text3772"
|
||||
xml:space="preserve"
|
||||
style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:FreeSans;-inkscape-font-specification:FreeSans"><tspan
|
||||
x="32"
|
||||
y="32"
|
||||
style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
|
||||
sodipodi:linespacing="125%"><tspan
|
||||
x="64.902344"
|
||||
y="32.103516"
|
||||
id="tspan3774"
|
||||
style="font-size:28px;fill:#000000;fill-opacity:1">mobi</tspan></text>
|
||||
style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans">mobi</tspan></text>
|
||||
<path
|
||||
d="m 68.227,60.477999 c 0,2.157 0.052,3.954 -1.035,5.874 -0.88,1.561 -2.279,2.517 -3.833,2.517 -2.121,0 -3.366,-1.62 -3.366,-4.015 C 59.993,60.14 64.225,59.283 68.226,59.283 v 1.194999 z m 5.579,13.496 c -0.365,0.332 -0.896,0.352 -1.307,0.132 -1.838,-1.528 -2.167,-2.231 -3.174,-3.69 -3.035,3.094 -5.188,4.023 -9.123,4.023 -4.663,0 -8.284,-2.876 -8.284,-8.629 0,-4.49 2.433,-7.543999 5.899,-9.044999 3.005,-1.317 7.202,-1.556 10.41,-1.914 v -0.723 c 0,-1.313 0.104,-2.875 -0.671,-4.012 -0.674,-1.021 -1.968,-1.437 -3.106,-1.437 -2.111,0 -3.99,1.078 -4.45,3.321 -0.097,0.498 -0.46,0.991 -0.962,1.017 l -5.364,-0.581 c -0.456,-0.102 -0.958,-0.463 -0.828,-1.155 1.233,-6.511 7.109,-8.475 12.378,-8.475 2.693,0 6.215,0.719 8.335,2.757 2.692997,2.515 2.431997,5.869 2.431997,9.524 v 8.622999 c 0,2.596 1.081,3.732 2.091,5.128 0.354,0.503 0.434,1.103 -0.018,1.473 -1.131,0.949 -3.138997,2.693 -4.243997,3.676 l -0.014,-0.013 z"
|
||||
id="path4047"
|
||||
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 9.3 KiB |
237
imgsrc/mimetypes/tpz.svg
Normal file
@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
width="128"
|
||||
height="128"
|
||||
id="svg2606"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="tpz.svg"
|
||||
inkscape:export-filename="/home/niluje/Patchland/calibre/imgsrc/mimetypes/tpz.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1025"
|
||||
id="namedview45"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.84375"
|
||||
inkscape:cx="-11.118644"
|
||||
inkscape:cy="42.305085"
|
||||
inkscape:window-x="-2"
|
||||
inkscape:window-y="-3"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2606" />
|
||||
<defs
|
||||
id="defs2608">
|
||||
<linearGradient
|
||||
id="linearGradient10207">
|
||||
<stop
|
||||
id="stop10209"
|
||||
style="stop-color:#a2a2a2;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop10211"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
x1="96"
|
||||
y1="104"
|
||||
x2="88.000198"
|
||||
y2="96.000198"
|
||||
id="XMLID_12_"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop83"
|
||||
style="stop-color:#888a85;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop85"
|
||||
style="stop-color:#8c8e89;stop-opacity:1"
|
||||
offset="0.0072" />
|
||||
<stop
|
||||
id="stop87"
|
||||
style="stop-color:#abaca9;stop-opacity:1"
|
||||
offset="0.0673" />
|
||||
<stop
|
||||
id="stop89"
|
||||
style="stop-color:#c5c6c4;stop-opacity:1"
|
||||
offset="0.1347" />
|
||||
<stop
|
||||
id="stop91"
|
||||
style="stop-color:#dbdbda;stop-opacity:1"
|
||||
offset="0.2652576" />
|
||||
<stop
|
||||
id="stop93"
|
||||
style="stop-color:#ebebeb;stop-opacity:1"
|
||||
offset="0.37646064" />
|
||||
<stop
|
||||
id="stop95"
|
||||
style="stop-color:#f7f7f6;stop-opacity:1"
|
||||
offset="0.48740286" />
|
||||
<stop
|
||||
id="stop97"
|
||||
style="stop-color:#fdfdfd;stop-opacity:1"
|
||||
offset="0.6324091" />
|
||||
<stop
|
||||
id="stop99"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
cx="102"
|
||||
cy="112.3047"
|
||||
r="139.55859"
|
||||
id="XMLID_8_"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop41"
|
||||
style="stop-color:#b7b8b9;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop47"
|
||||
style="stop-color:#ececec;stop-opacity:1"
|
||||
offset="0.18851049" />
|
||||
<stop
|
||||
id="stop49"
|
||||
style="stop-color:#fafafa;stop-opacity:1"
|
||||
offset="0.25718147" />
|
||||
<stop
|
||||
id="stop51"
|
||||
style="stop-color:#ffffff;stop-opacity:1"
|
||||
offset="0.30111277" />
|
||||
<stop
|
||||
id="stop53"
|
||||
style="stop-color:#fafafa;stop-opacity:1"
|
||||
offset="0.53130001" />
|
||||
<stop
|
||||
id="stop55"
|
||||
style="stop-color:#ebecec;stop-opacity:1"
|
||||
offset="0.84490001" />
|
||||
<stop
|
||||
id="stop57"
|
||||
style="stop-color:#e1e2e3;stop-opacity:1"
|
||||
offset="1" />
|
||||
</radialGradient>
|
||||
<filter
|
||||
x="-0.19200002"
|
||||
y="-0.19199999"
|
||||
width="1.3839999"
|
||||
height="1.3839999"
|
||||
color-interpolation-filters="sRGB"
|
||||
id="filter6697">
|
||||
<feGaussianBlur
|
||||
id="feGaussianBlur6699"
|
||||
stdDeviation="1.9447689" />
|
||||
</filter>
|
||||
<clipPath
|
||||
id="clipPath7084">
|
||||
<path
|
||||
d="m 72,88 -32,32 -8,0 0,-40 40,0 0,8 z"
|
||||
id="path7086"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none" />
|
||||
</clipPath>
|
||||
<radialGradient
|
||||
cx="102"
|
||||
cy="112.3047"
|
||||
r="139.55859"
|
||||
id="radialGradient9437"
|
||||
xlink:href="#XMLID_8_"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(1,0,0,0.9996653,2e-6,0.00301608)" />
|
||||
<linearGradient
|
||||
x1="98.617439"
|
||||
y1="106.41443"
|
||||
x2="91.228737"
|
||||
y2="99.254974"
|
||||
id="linearGradient10213"
|
||||
xlink:href="#linearGradient10207"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<filter
|
||||
color-interpolation-filters="sRGB"
|
||||
id="filter2770">
|
||||
<feGaussianBlur
|
||||
id="feGaussianBlur2772"
|
||||
stdDeviation="2.0786429" />
|
||||
</filter>
|
||||
</defs>
|
||||
<metadata
|
||||
id="metadata2611">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1">
|
||||
<path
|
||||
d="m 16,8 0,112 c 0,0 63.15625,0 63.15625,0 l 0.03125,0 c 3e-6,0 11.90625,-9.90625 17.40625,-15.40625 C 102.09375,99.09375 112,87.1875 112,87.1875 L 112,87.15625 112,8 16,8 z"
|
||||
transform="matrix(1.0416667,0,0,1.0267857,-2.6666667,-1.2142891)"
|
||||
id="path7865"
|
||||
style="opacity:0.5;fill:#000000;fill-opacity:1;filter:url(#filter2770)" />
|
||||
<path
|
||||
d="M 16.000001,8 16,120 c 0,0 63.146418,0 63.146418,0 L 112,87.14642 112,8 16.000001,8 z"
|
||||
id="path34"
|
||||
style="fill:#ffffff;fill-opacity:1" />
|
||||
<path
|
||||
d="m 18.000002,9.0000034 c -0.551,0 -1,0.44885 -1,0.999665 l 0,107.9638516 c 0,0.55181 0.449,0.99966 1,0.99966 l 59.171997,0 c 0.263,0 2.76268,0.11813 2.948681,-0.0688 L 110.707,88.094202 C 110.894,87.907264 111,85.40942 111,85.146508 l 0,-75.1468396 c 0,-0.550815 -0.448,-0.999665 -1,-0.999665 l -91.999998,0 z"
|
||||
id="path59"
|
||||
style="fill:url(#radialGradient9437);fill-opacity:1" />
|
||||
<path
|
||||
d="m 41.879531,115.98249 c 0,0 24.309609,-24.309614 24.309609,-24.309614 0,0 -9.35314,2.913124 -19.60314,2.913124 0,10.25 -4.706469,21.39649 -4.706469,21.39649 z"
|
||||
transform="translate(40,0)"
|
||||
clip-path="url(#clipPath7084)"
|
||||
id="path5540"
|
||||
style="opacity:0.4;fill:#000000;fill-opacity:1;filter:url(#filter6697)" />
|
||||
<path
|
||||
d="m 79.172,120 c 0,0 11.914,-9.914 17.414,-15.414 5.5,-5.5 15.414,-17.414 15.414,-17.414 0,0 -13.75,8.828 -24,8.828 0,10.25 -8.828,24 -8.828,24 z"
|
||||
id="path14523"
|
||||
style="fill:url(#linearGradient10213);fill-opacity:1" />
|
||||
<text
|
||||
x="64.703125"
|
||||
y="32.175781"
|
||||
id="text3772"
|
||||
xml:space="preserve"
|
||||
style="font-size:28px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:none;font-family:DejaVu Sans;-inkscape-font-specification:DejaVu Sans"
|
||||
sodipodi:linespacing="125%"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan3021"
|
||||
x="64.703125"
|
||||
y="32.175781">Topaz</tspan></text>
|
||||
<path
|
||||
d="m 68.227,60.477999 c 0,2.157 0.052,3.954 -1.035,5.874 -0.88,1.561 -2.279,2.517 -3.833,2.517 -2.121,0 -3.366,-1.62 -3.366,-4.015 C 59.993,60.14 64.225,59.283 68.226,59.283 v 1.194999 z m 5.579,13.496 c -0.365,0.332 -0.896,0.352 -1.307,0.132 -1.838,-1.528 -2.167,-2.231 -3.174,-3.69 -3.035,3.094 -5.188,4.023 -9.123,4.023 -4.663,0 -8.284,-2.876 -8.284,-8.629 0,-4.49 2.433,-7.543999 5.899,-9.044999 3.005,-1.317 7.202,-1.556 10.41,-1.914 v -0.723 c 0,-1.313 0.104,-2.875 -0.671,-4.012 -0.674,-1.021 -1.968,-1.437 -3.106,-1.437 -2.111,0 -3.99,1.078 -4.45,3.321 -0.097,0.498 -0.46,0.991 -0.962,1.017 l -5.364,-0.581 c -0.456,-0.102 -0.958,-0.463 -0.828,-1.155 1.233,-6.511 7.109,-8.475 12.378,-8.475 2.693,0 6.215,0.719 8.335,2.757 2.692997,2.515 2.431997,5.869 2.431997,9.524 v 8.622999 c 0,2.596 1.081,3.732 2.091,5.128 0.354,0.503 0.434,1.103 -0.018,1.473 -1.131,0.949 -3.138997,2.693 -4.243997,3.676 l -0.014,-0.013 z"
|
||||
id="path4047"
|
||||
style="fill-rule:evenodd" />
|
||||
<path
|
||||
d="m 99.325111,79.885297 c -8.716894,6.432161 -21.357191,9.853809 -32.243032,9.853809 -15.251419,0 -28.989193,-5.636741 -39.38419,-15.021522 -0.815557,-0.738364 -0.08726,-1.746902 0.89191,-1.173831 C 39.807066,80.071565 53.675732,84 68,84 c 9.664184,0 20.284886,-2.004491 30.058986,-6.151079 1.474215,-0.623415 2.709284,0.97246 1.266125,2.036376 z"
|
||||
id="path3858"
|
||||
style="fill:#ff9201;fill-rule:evenodd" />
|
||||
<path
|
||||
d="m 104,76 c -1.11342,-1.426386 -7.371903,-0.676274 -10.179364,-0.337298 -0.853315,0.09817 -0.984206,-0.641874 -0.217315,-1.184739 4.990671,-3.505554 13.168059,-2.491141 14.119539,-1.318987 0.95736,1.187256 -0.25087,9.384779 -4.92858,13.293915 -0.71907,0.604117 -1.40373,0.286117 -1.08573,-0.510142 C 102.75988,83.311486 105.11761,77.427225 104,76 z"
|
||||
id="path3860"
|
||||
style="fill:#ff9201;fill-rule:evenodd" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 9.1 KiB |
140
manual/catalogs.rst
Normal file
@ -0,0 +1,140 @@
|
||||
|
||||
.. include:: global.rst
|
||||
|
||||
.. _catalog_tut:
|
||||
|
||||
Creating AZW3 • EPUB • MOBI Catalogs
|
||||
=====================================
|
||||
|
||||
|app|'s Create catalog feature enables you to create a catalog of your library in a variety of formats. This help file describes cataloging options when generating a catalog in AZW3, EPUB and MOBI formats.
|
||||
|
||||
.. contents::
|
||||
:depth: 1
|
||||
:local:
|
||||
|
||||
Selecting books to catalog
|
||||
-------------------------------
|
||||
|
||||
If you want *all* of your library cataloged, remove any search or filtering criteria in the main window. With a single book selected, all books in your library will be candidates for inclusion in the generated catalog. Individual books may be excluded by various criteria; see the :ref:`excluded_genres` section below for more information.
|
||||
|
||||
If you want only *some* of your library cataloged, you have two options:
|
||||
|
||||
* Create a multiple selection of the books you want cataloged. With more than one book selected in |app|'s main window, only the selected books will be cataloged.
|
||||
* Use the Search field or the Tag Browser to filter the displayed books. Only the displayed books will be cataloged.
|
||||
|
||||
To begin catalog generation, select the menu item :guilabel:`Convert books > Create a catalog of the books in your calibre library`. You may also add a :guilabel:`Create Catalog` button to a toolbar in :guilabel:`Preferences > Interface > Toolbars` for easier access to the Generate catalog dialog.
|
||||
|
||||
.. image:: images/catalog_options.png
|
||||
:alt: Catalog options
|
||||
:align: center
|
||||
|
||||
In :guilabel:`Catalog options`, select **AZW3, EPUB or MOBI** as the Catalog format. In the :guilabel:`Catalog title` field, provide a name that will be used for the generated catalog. If a catalog of the same name and format already exists, it will be replaced with the newly-generated catalog.
|
||||
|
||||
.. image:: images/catalog_send_to_device.png
|
||||
:alt: Catalog send to device
|
||||
:align: center
|
||||
|
||||
Enabling :guilabel:`Send catalog to device automatically` will download the generated catalog to a connected device upon completion.
|
||||
|
||||
Included sections
|
||||
-------------------
|
||||
|
||||
.. image:: images/included_sections.png
|
||||
:alt: Included sections
|
||||
:align: center
|
||||
|
||||
Sections enabled by a checkmark will be included in the generated catalog:
|
||||
|
||||
* :guilabel:`Authors` - all books, sorted by author, presented in a list format. Non-series books are listed before series books.
|
||||
* :guilabel:`Titles` - all books, sorted by title, presented in a list format.
|
||||
* :guilabel:`Series` - all books that are part of a series, sorted by series, presented in a list format.
|
||||
* :guilabel:`Genres` - individual genres presented in a list, sorted by Author and Series.
|
||||
* :guilabel:`Recently` Added - all books, sorted in reverse chronological order. List includes books added in the last 30 days, then a month-by-month listing of added books.
|
||||
* :guilabel:`Descriptions` - detailed description page for each book, including a cover thumbnail and comments. Sorted by author, with non-series books listed before series books.
|
||||
|
||||
Prefixes
|
||||
---------
|
||||
|
||||
.. image:: images/prefix_rules.png
|
||||
:alt: Prefix rules
|
||||
:align: center
|
||||
|
||||
Prefix rules allow you to add a prefix to book listings when certain criteria are met. For example, you might want to mark books you've read with a checkmark, or books on your wishlist with an X.
|
||||
|
||||
The checkbox in the first column enables the rule. :guilabel:`Name` is a rule name that you provide. :guilabel:`Field` is either :guilabel:`Tags` or a custom column from your library. :guilabel:`Value` is the content of :guilabel:`Field` to match. When a prefix rule is satisfied, the book will be marked with the selected :guilabel:`Prefix`.
|
||||
|
||||
Three prefix rules have been specified in the example above:
|
||||
|
||||
1. :guilabel:`Read book` specifies that a book with any date in a custom column named :guilabel:`Last read` will be prefixed with a checkmark symbol.
|
||||
2. :guilabel:`Wishlist` item specifies that any book with a :guilabel:`Wishlist` tag will be prefixed with an X symbol.
|
||||
3. :guilabel:`Library` books specifies that any book with a value of True (or Yes) in a custom column :guilabel:`Available in Library` will be prefixed with a double arrow symbol.
|
||||
|
||||
The first matching rule supplies the prefix. Disabled or incomplete rules are ignored.
|
||||
|
||||
Excluded books
|
||||
-----------------
|
||||
|
||||
.. image:: images/excluded_books.png
|
||||
:alt: Excluded books
|
||||
:align: center
|
||||
|
||||
Exclusion rules allow you to specify books that will not be cataloged.
|
||||
|
||||
The checkbox in the first column enables the rule. :guilabel:`Name` is a rule name that you provide. :guilabel:`Field` is either :guilabel:`Tags` or a custom column in your library. :guilabel:`Value` is the content of :guilabel:`Field` to match. When an exclusion rule is satisfied, the book will be excluded from the generated catalog.
|
||||
|
||||
Two exclusion rules have been specified in the example above:
|
||||
|
||||
1. The :guilabel:`Catalogs` rule specifies that any book with a :guilabel:`Catalog` tag will be excluded from the generated catalog.
|
||||
2. The :guilabel:`Archived` Books rule specifies that any book with a value of :guilabel:`Archived` in the custom column :guilabel:`Status` will be excluded from the generated catalog.
|
||||
|
||||
All rules are evaluated for every book. Disabled or incomplete rules are ignored.
|
||||
|
||||
.. _excluded_genres:
|
||||
|
||||
Excluded genres
|
||||
---------------
|
||||
|
||||
.. image:: images/excluded_genres.png
|
||||
:alt: Excluded genres
|
||||
:align: center
|
||||
|
||||
When the catalog is generated, tags in your database are used as genres. For example, you may use the tags ``Fiction`` and ``Nonfiction``. These tags become genres in the generated catalog, with books listed under their respective genre lists based on their assigned tags. A book will be listed in every genre section for which it has a corresponding tag.
|
||||
|
||||
You may be using certain tags for other purposes, perhaps a + to indicate a read book, or a bracketed tag like ``[Amazon Freebie]`` to indicate a book's source. The :guilabel:`Excluded genres` regex allows you to specify tags that you don't want used as genres in the generated catalog. The default exclusion regex pattern ``\[.+\]\+`` excludes any tags of the form ``[tag]``, as well as excluding ``+``, the default tag for read books, from being used as genres in the generated catalog.
|
||||
|
||||
You can also use an exact tag name in a regex. For example, ``[Amazon Freebie]`` or ``[Project Gutenberg]``. If you want to list multiple exact tags for exclusion, put a pipe (vertical bar) character between them: ``[Amazon Freebie]|[Project Gutenberg]``.
|
||||
|
||||
:guilabel:`Results of regex` shows you which tags will be excluded when the catalog is built, based on the tags in your database and the regex pattern you enter. The results are updated as you modify the regex pattern.
|
||||
|
||||
Other options
|
||||
--------------
|
||||
|
||||
.. image:: images/other_options.png
|
||||
:alt: Other options
|
||||
:align: center
|
||||
|
||||
:guilabel:`Catalog cover` specifies whether to generate a new cover or use an existing cover. It is possible to create a custom cover for your catalogs - see :ref:`Custom catalog covers` for more information. If you have created a custom cover that you want to reuse, select :guilabel:`Use existing cover`. Otherwise, select :guilabel:`Generate new cover`.
|
||||
|
||||
:guilabel:`Extra Description note` specifies a custom column's contents to be inserted into the Description page, next to the cover thumbnail. For example, you might want to display the date you last read a book using a :guilabel:`Last Read` custom column. For advanced use of the Description note feature, see `this post in the calibre forum <http://www.mobileread.com/forums/showpost.php?p=1335767&postcount=395>`_.
|
||||
|
||||
:guilabel:`Thumb width` specifies a width preference for cover thumbnails included with Descriptions pages. Thumbnails are cached to improve performance.To experiment with different widths, try generating a catalog with just a few books until you've determined your preferred width, then generate your full catalog. The first time a catalog is generated with a new thumbnail width, performance will be slower, but subsequent builds of the catalog will take advantage of the thumbnail cache.
|
||||
|
||||
:guilabel:`Merge with Comments` specifies a custom column whose content will be non-destructively merged with the Comments metadata during catalog generation. For example, you might have a custom column :guilabel:`Author Bio` that you'd like to append to the Comments metadata. You can choose to insert the custom column contents *before or after* the Comments section, and optionally separate the appended content with a horizontal rule separator. Eligible custom column types include ``text, comments, and composite``.
|
||||
|
||||
.. _Custom catalog covers:
|
||||
|
||||
Custom catalog covers
|
||||
-----------------------
|
||||
|
||||
.. |cc| image:: images/custom_cover.png
|
||||
|
||||
|cc| With the `Generate Cover plugin <http://www.mobileread.com/forums/showthread.php?t=124219>`_ installed, you can create custom covers for your catalog.
|
||||
To install the plugin, go to :guilabel:`Preferences > Advanced > Plugins > Get new plugins`.
|
||||
|
||||
Additional help resources
|
||||
---------------------------
|
||||
|
||||
For more information on |app|'s Catalog feature, see the MobileRead forum sticky `Creating Catalogs - Start here <http://www.mobileread.com/forums/showthread.php?t=118556>`_, where you can find information on how to customize the catalog templates, and how to submit a bug report.
|
||||
|
||||
To ask questions or discuss calibre's Catalog feature with other users, visit the MobileRead forum `Calibre Catalogs <http://www.mobileread.com/forums/forumdisplay.php?f=238>`_.
|
||||
|
@ -182,6 +182,10 @@ The plugin API
|
||||
As you may have noticed above, a plugin in |app| is a class. There are different classes for the different types of plugins in |app|.
|
||||
Details on each class, including the base class of all plugins can be found in :ref:`plugins`.
|
||||
|
||||
Your plugin is almost certainly going to use code from |app|. To learn
|
||||
how to find various bits of functionality in the
|
||||
|app| code base, read the section on the |app| :ref:`code_layout`.
|
||||
|
||||
Debugging plugins
|
||||
-------------------
|
||||
|
||||
|
@ -30,6 +30,8 @@ a device driver plugin. You can browse the
|
||||
for new conversion formats involves writing input/output format plugins. Another example of the modular design is the :ref:`recipe system <news>` for
|
||||
fetching news. For more examples of plugins designed to add features to |app|, see the `plugin index <http://www.mobileread.com/forums/showthread.php?p=1362767#post1362767>`_.
|
||||
|
||||
.. _code_layout:
|
||||
|
||||
Code layout
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
|
@ -126,9 +126,11 @@ Device Integration
|
||||
|
||||
What devices does |app| support?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
At the moment |app| has full support for the SONY PRS line, Barnes & Noble Nook line, Cybook Gen 3/Opus, Amazon Kindle line, Entourage Edge, Longshine ShineBook, Ectaco Jetbook, BeBook/BeBook Mini, Irex Illiad/DR1000, Foxit eSlick, PocketBook line, Italica, eClicto, Iriver Story, Airis dBook, Hanvon N515, Binatone Readme, Teclast K3 and clones, SpringDesign Alex, Kobo Reader, various Android phones and the iPhone/iPad. In addition, using the :guilabel:`Connect to folder` function you can use it with any ebook reader that exports itself as a USB disk.
|
||||
|
||||
There is also a special ``User Defined`` device plugin that can be used to connect to arbitrary devices that present their memory as disk drives. See the device plugin ``Preferences -> Plugins -> Device Plugins -> User Defined`` and ``Preferences -> Miscelleaneous -> Get information to setup the user defined device`` for more information.
|
||||
|app| can directly connect to all the major (and most of the minor) ebook reading devices,
|
||||
smarthphones, tablets, etc.
|
||||
In addition, using the :guilabel:`Connect to folder` function you can use it with any ebook reader that exports itself as a USB disk.
|
||||
You can even connect to Apple devices (via iTunes), using the :guilabel:`Connect to iTunes`
|
||||
function.
|
||||
|
||||
.. _devsupport:
|
||||
|
||||
@ -159,8 +161,8 @@ Follow these steps to find the problem:
|
||||
* Make sure that you are connecting only a single device to your computer at a time. Do not have another |app| supported device like an iPhone/iPad etc. at the same time.
|
||||
* If you are connecting an Apple iDevice (iPad, iPod Touch, iPhone), use the 'Connect to iTunes' method in the 'Getting started' instructions in `Calibre + Apple iDevices: Start here <http://www.mobileread.com/forums/showthread.php?t=118559>`_.
|
||||
* Make sure you are running the latest version of |app|. The latest version can always be downloaded from `the calibre website <http://calibre-ebook.com/download>`_.
|
||||
* Ensure your operating system is seeing the device. That is, the device should be mounted as a disk, that you can access using Windows explorer or whatever the file management program on your computer is. On Windows your device **must have been assigned a drive letter**, like K:.
|
||||
* In calibre, go to Preferences->Plugins->Device Interface plugin and make sure the plugin for your device is enabled, the plugin icon next to it should be green when it is enabled.
|
||||
* Ensure your operating system is seeing the device. That is, the device should show up in Windows Explorer (in Windows) or Finder (in OS X).
|
||||
* In |app|, go to Preferences->Plugins->Device Interface plugin and make sure the plugin for your device is enabled, the plugin icon next to it should be green when it is enabled.
|
||||
* If all the above steps fail, go to Preferences->Miscellaneous and click debug device detection with your device attached and post the output as a ticket on `the calibre bug tracker <http://bugs.calibre-ebook.com>`_.
|
||||
|
||||
My device is non-standard or unusual. What can I do to connect to it?
|
||||
@ -285,20 +287,47 @@ This method only works on Windows XP and higher, and OS X 10.5 and higher. Linux
|
||||
How do I use |app| with my Android phone/tablet?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
There are two ways that you can connect your Android device to calibre. Using a USB cable-- or wirelessly, over the air.
|
||||
**The USB cable method only works if your Android device can act as a USB disk, that means in windows it must have a drive letter, like K:**. Some devices may have a setting to put them in "disk mode" or "USB Transfer mode" that is needed before they act as USB disks.
|
||||
There are two ways that you can connect your Android device to calibre. Using a USB cable -- or wirelessly, over the air.
|
||||
The first step to using an Android device is installing an ebook reading
|
||||
application on it. There are many free and paid ebook reading applications for
|
||||
Android: Some examples (in no particular order):
|
||||
`FBReader <https://play.google.com/store/apps/details?id=org.geometerplus.zlibrary.ui.android&hl=en>`_,
|
||||
`Moon+ <https://play.google.com/store/apps/details?id=com.flyersoft.moonreader&hl=en>`_,
|
||||
`Mantano <https://play.google.com/store/apps/details?id=com.mantano.reader.android.lite&hl=en>`_,
|
||||
`Aldiko <https://play.google.com/store/apps/details?id=com.aldiko.android&hl=en>`_,
|
||||
`Kindle <https://play.google.com/store/apps/details?id=com.amazon.kindle&feature=related_apps>`_.
|
||||
|
||||
Using a USB cable
|
||||
^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
First install either the WordPlayer or Aldiko ebook reading apps from the Android Marketplace onto your phone. Then simply plug your phone into the computer with a USB cable. |app| should automatically detect the phone and then you can transfer books to it by clicking the Send to Device button. |app| does not have support for every single android device out there, so if your device is not automatically detected, follow the instructions at :ref:`devsupport` to get your device supported in |app|.
|
||||
Simply plug your device into the computer with a USB cable. |app| should
|
||||
automatically detect the device and then you can transfer books to it by
|
||||
clicking the Send to Device button. |app| does not have support for every
|
||||
single android device out there, so if your device is not automatically
|
||||
detected, follow the instructions at :ref:`devsupport` to get your device
|
||||
supported in |app|.
|
||||
|
||||
.. note:: With newer Android devices, the USB connection is only supported on
|
||||
Windows Vista and newer and Linux. If you are on Windows XP or OS X,
|
||||
you should use one of the wireless connection methods.
|
||||
|
||||
Over the air
|
||||
^^^^^^^^^^^^^^
|
||||
|
||||
The easiest way to browse your |app| collection on your Android device is by using the calibre content server, which makes your collection available over the net. First perform the following steps in |app|
|
||||
The easiest way to transfer books wirelessly to your Android device is to use
|
||||
the `Calibre Companion <http://www.multipie.co.uk/calibre-companion/>`_
|
||||
Android app. This app is maintained by a core calibre developer and allows
|
||||
|app| to connect to your Android device wirelessly, just as though you
|
||||
plugged in the device with a USB cable. You can browse files on the device
|
||||
in |app| and use the :guilabel:`Send to device` button to transfer files to
|
||||
your device wirelessly.
|
||||
|
||||
* Set the Preferred Output Format in |app| to EPUB (The output format can be set under :guilabel:`Preferences->Interface->Behavior`)
|
||||
|app| also has a builtin web server, the :guilabel:`Content Server`.
|
||||
You can browse your |app| collection on your Android device is by using the
|
||||
calibre content server, which makes your collection available over the net.
|
||||
First perform the following steps in |app|
|
||||
|
||||
* Set the :guilabel:`Preferred Output Format` in |app| to EPUB (The output format can be set under :guilabel:`Preferences->Interface->Behavior`)
|
||||
* Set the output profile to Tablet (this will work for phones as well), under :guilabel:`Preferences->Conversion->Common Options->Page Setup`
|
||||
* Convert the books you want to read on your device to EPUB format by selecting them and clicking the Convert button.
|
||||
* Turn on the Content Server in |app|'s preferences and leave |app| running.
|
||||
@ -307,11 +336,22 @@ Now on your Android device, open the browser and browse to
|
||||
|
||||
http://192.168.1.2:8080/
|
||||
|
||||
Replace ``192.168.1.2`` with the local IP address of the computer running |app|. If your local network supports the use of computer names, you can replace the IP address with the network name of the computer. If you have changed the port the |app| content server is running on, you will have to change ``8080`` as well to the new port.
|
||||
Replace ``192.168.1.2`` with the local IP address of the computer running
|
||||
|app|. If your local network supports the use of computer names, you can
|
||||
replace the IP address with the network name of the computer. If you have
|
||||
changed the port the |app| content server is running on, you will have to
|
||||
change ``8080`` as well to the new port.
|
||||
|
||||
The local IP address is the IP address you computer is assigned on your home network. A quick Google search will tell you how to find out your local IP address. You can now browse your book collection and download books from |app| to your device to open with whatever ebook reading software you have on your android device.
|
||||
The local IP address is the IP address you computer is assigned on your home
|
||||
network. A quick Google search will tell you how to find out your local IP
|
||||
address. You can now browse your book collection and download books from |app|
|
||||
to your device to open with whatever ebook reading software you have on your
|
||||
android device.
|
||||
|
||||
Some reading programs support browsing the Calibre library directly. For example, in Aldiko, click My Catalogs, then + to add a catalog, then give the catalog a title such as "Calibre" and provide the URL listed above. You can now browse the Calibre library and download directly into the reading software.
|
||||
Some reading programs support browsing the Calibre library directly. For
|
||||
example, in Aldiko, click My Catalogs, then + to add a catalog, then give the
|
||||
catalog a title such as "Calibre" and provide the URL listed above. You can now
|
||||
browse the Calibre library and download directly into the reading software.
|
||||
|
||||
Can I access my |app| books using the web browser in my Kindle or other reading device?
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@ -515,7 +555,7 @@ There can be two reasons why |app| is showing a empty list of books:
|
||||
|
||||
* Your |app| library folder changed its location. This can happen if it was on an external disk and the drive letter for that disk changed. Or if you accidentally moved the folder. In this case, |app| cannot find its library and so starts up with an empty library instead. To remedy this, do a right-click on the |app| icon in the |app| toolbar (it will say 0 books underneath it) and select Switch/create library. Click the little blue icon to select the new location of your |app| library and click OK.
|
||||
|
||||
* Your metadata.db file was deleted/corrupted. In this case, you can ask |app| to rebuild the metadata.db from its backups. Click-and-hold the |app| icon in the |app| toolbar (it will say 0 books underneath it) and select Library maintenance->Restore database. |app| will automatically rebuild metadata.db.
|
||||
* Your metadata.db file was deleted/corrupted. In this case, you can ask |app| to rebuild the metadata.db from its backups. Right click the |app| icon in the |app| toolbar (it will say 0 books underneath it) and select Library maintenance->Restore database. |app| will automatically rebuild metadata.db.
|
||||
|
||||
|
||||
Content From The Web
|
||||
|
@ -103,10 +103,9 @@ The :guilabel:`Convert books` action has three variations, accessed by doing a r
|
||||
3. **Create a catalog of the books in your calibre library**: Allows you to generate a complete listing of the books in your library, including all metadata,
|
||||
in several formats such as XML, CSV, BiBTeX, EPUB and MOBI. The catalog will contain all the books currently showing in the library view.
|
||||
This allows you to use the search features to limit the books to be catalogued. In addition, if you select multiple books using the mouse,
|
||||
only those books will be added to the catalog. If you generate the catalog in an ebook format such as EPUB or MOBI,
|
||||
only those books will be added to the catalog. If you generate the catalog in an ebook format such as EPUB, MOBI or AZW3,
|
||||
the next time you connect your ebook reader the catalog will be automatically sent to the device.
|
||||
For more information on how catalogs work, read the `catalog creation tutorial <http://www.mobileread.com/forums/showthread.php?p=755468#post755468>`_
|
||||
at MobileRead.
|
||||
For more information on how catalogs work, read the :ref:`catalog_tut`.
|
||||
|
||||
.. _view:
|
||||
|
||||
|
BIN
manual/images/catalog_options.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
manual/images/catalog_send_to_device.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
manual/images/custom_cover.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
manual/images/excluded_books.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
manual/images/excluded_genres.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
manual/images/included_sections.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
manual/images/other_options.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
manual/images/prefix_rules.png
Normal file
After Width: | Height: | Size: 38 KiB |
@ -108,10 +108,10 @@ After creating the saved search, you can use it as a restriction.
|
||||
Useful Template Functions
|
||||
-------------------------
|
||||
|
||||
You might want to use the genre information in a template, such as with save to disk or send to device. The question might then be "How do I get the outermost genre name or names?" An |app| template function, subitems, is provided to make doing this easier.
|
||||
You might want to use the genre information in a template, such as with save to disk or send to device. The question might then be "How do I get the outermost genre name or names?" A |app| template function, subitems, is provided to make doing this easier.
|
||||
|
||||
For example, assume you want to add the outermost genre level to the save-to-disk template to make genre folders, as in "History/The Gathering Storm - Churchill, Winston". To do this, you must extract the first level of the hierarchy and add it to the front along with a slash to indicate that it should make a folder. The template below accomplishes this::
|
||||
|
||||
{#genre:subitems(0,1)||/}{title} - {authors}
|
||||
|
||||
See :ref:`The |app| template language <templatelangcalibre>` for more information templates and the subitem function.
|
||||
See :ref:`The template language <templatelangcalibre>` for more information templates and the :func:`subitems` function.
|
||||
|
@ -240,9 +240,11 @@ The following functions are available in addition to those described in single-f
|
||||
* ``and(value, value, ...)`` -- returns the string "1" if all values are not empty, otherwise returns the empty string. This function works well with test or first_non_empty. You can have as many values as you want.
|
||||
* ``add(x, y)`` -- returns x + y. Throws an exception if either x or y are not numbers.
|
||||
* ``assign(id, val)`` -- assigns val to id, then returns val. id must be an identifier, not an expression
|
||||
* ``approximate_formats()`` -- return a comma-separated list of formats that at one point were associated with the book. There is no guarantee that the list is correct, although it probably is. This function can be called in template program mode using the template ``{:'approximate_formats()'}``. Note that format names are always uppercase, as in EPUB.
|
||||
* ``booksize()`` -- returns the value of the |app| 'size' field. Returns '' if there are no formats.
|
||||
* ``cmp(x, y, lt, eq, gt)`` -- compares x and y after converting both to numbers. Returns ``lt`` if x < y. Returns ``eq`` if x == y. Otherwise returns ``gt``.
|
||||
* ``current_library_name() -- `` return the last name on the path to the current calibre library. This function can be called in template program mode using the template ``{:'current_library_name()'}``.
|
||||
* ``current_library_path() -- `` eturn the path to the current calibre library. This function can be called in template program mode using the template ``{:'current_library_path()'}``..
|
||||
* ``days_between(date1, date2)`` -- return the number of days between ``date1`` and ``date2``. The number is positive if ``date1`` is greater than ``date2``, otherwise negative. If either ``date1`` or ``date2`` are not dates, the function returns the empty string.
|
||||
* ``divide(x, y)`` -- returns x / y. Throws an exception if either x or y are not numbers.
|
||||
* ``eval(string)`` -- evaluates the string as a program, passing the local variables (those ``assign`` ed to). This permits using the template processor to construct complex results from local variables. Because the `{` and `}` characters are special, you must use `[[` for the `{` character and `]]` for the '}' character; they are converted automatically. Note also that prefixes and suffixes (the `|prefix|suffix` syntax) cannot be used in the argument to this function when using template program mode.
|
||||
@ -284,6 +286,7 @@ The following functions are available in addition to those described in single-f
|
||||
)
|
||||
|
||||
* ``formats_modtimes(date_format)`` -- return a comma-separated list of colon_separated items representing modification times for the formats of a book. The date_format parameter specifies how the date is to be formatted. See the date_format function for details. You can use the select function to get the mod time for a specific format. Note that format names are always uppercase, as in EPUB.
|
||||
* ``formats_paths()`` -- return a comma-separated list of colon_separated items representing full path to the formats of a book. You can use the select function to get the path for a specific format. Note that format names are always uppercase, as in EPUB.
|
||||
* ``formats_sizes()`` -- return a comma-separated list of colon_separated items representing sizes in bytes of the formats of a book. You can use the select function to get the size for a specific format. Note that format names are always uppercase, as in EPUB.
|
||||
* ``has_cover()`` -- return ``Yes`` if the book has a cover, otherwise return the empty string
|
||||
* ``not(value)`` -- returns the string "1" if the value is empty, otherwise returns the empty string. This function works well with test or first_non_empty. You can have as many values as you want.
|
||||
|
@ -59,10 +59,10 @@
|
||||
<a href="http://calibre-ebook.com"><img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/></a>
|
||||
</p>
|
||||
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" title="Contribute to support calibre development">
|
||||
<input type="hidden" name="cmd" value="_s-xclick" />
|
||||
<input type="hidden" name="hosted_button_id" value="AF4H3B8QVDG6N" />
|
||||
<input type="image" src="http://manual.calibre-ebook.com/simple_donate_button.gif" border="0" name="submit" alt="Donate to support calibre development" style="border:0pt" />
|
||||
<input type="image" src="http://manual.calibre-ebook.com/simple_donate_button.gif" border="0" name="submit" alt="Contribute to support calibre development" style="border:0pt" />
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
|
||||
</form>
|
||||
<hr/>
|
||||
|
@ -19,4 +19,5 @@ Here you will find tutorials to get you started using |app|'s more advanced feat
|
||||
server
|
||||
creating_plugins
|
||||
typesetting_math
|
||||
catalogs
|
||||
|
||||
|
@ -48,7 +48,7 @@ This snippet looks like the following screen shot in the |app| viewer.
|
||||
.. figure:: images/lorentz.png
|
||||
:align: center
|
||||
|
||||
:guilabel:`The Lorentz Equations`
|
||||
:guilabel:`The Lorenz Equations`
|
||||
|
||||
The complete HTML file, with more equations and inline mathematics is
|
||||
reproduced below. You can convert this HTML file to EPUB in |app| to end up
|
||||
|
@ -12,25 +12,26 @@ class anan(BasicNewsRecipe):
|
||||
|
||||
title = 'Anandtech'
|
||||
description = 'comprehensive Hardware Tests'
|
||||
__author__ = 'Oliver Niesner'
|
||||
__author__ = 'Oliver Niesner' # 2012-09-20 AGE: update
|
||||
use_embedded_content = False
|
||||
language = 'en'
|
||||
timefmt = ' [%d %b %Y]'
|
||||
oldest_article = 7 # 2012-09-20 AGE: update
|
||||
max_articles_per_feed = 40
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
encoding = 'utf-8'
|
||||
|
||||
cover_url = 'http://www.anandtech.com/content/images/globals/header_logo.png' # 2012-09-20 AGE: new
|
||||
masthead_url = 'http://www.anandtech.com/content/images/globals/printheader.png' # 2012-09-20 AGE: update
|
||||
|
||||
|
||||
remove_tags=[
|
||||
dict(name='a', attrs={'style':'width:110px; margin-top:0px;text-align:center;'}),
|
||||
dict(name='a', attrs={'style':'width:110px; margin-top:0px; margin-right:20px;text-align:center;'}),
|
||||
{'attrs':{'class':['article_links', 'header', 'body_right']}},
|
||||
{'id':['crumbs']},
|
||||
]
|
||||
dict(name='a', attrs={'class': 'bluebutton noprint'}),
|
||||
dict(name='img', attrs={'alt': 'header'}),
|
||||
] # 2012-09-20 AGE: update
|
||||
|
||||
feeds = [ ('Anandtech', 'http://www.anandtech.com/rss/')]
|
||||
|
||||
def print_version(self,url):
|
||||
return url.replace('/show/', '/print/')
|
||||
|
||||
|
||||
return url.replace('0Cshow0C', '0Cprint0C') # 2012-09-20 AGE: update
|
35
recipes/arcadia.recipe
Normal file
@ -0,0 +1,35 @@
|
||||
# -*- coding: utf8 -*-
|
||||
|
||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||
import re
|
||||
|
||||
class Arcadia_BBS(BasicNewsRecipe):
|
||||
title = u'Arcadia'
|
||||
__author__ = 'Masahiro Hasegawa'
|
||||
language = 'ja'
|
||||
encoding = 'utf8'
|
||||
filter_regexps = [r'ad\.jp\.ap\.valuecommerce.com',]
|
||||
timefmt = '[%Y/%m/%d]'
|
||||
remove_tags_before = dict(name='a', attrs={'name':'kiji'})
|
||||
|
||||
sid_list = [] #some sotory id
|
||||
|
||||
def parse_index(self):
|
||||
result = []
|
||||
for sid in self.sid_list:
|
||||
s_result = []
|
||||
soup = self.index_to_soup(
|
||||
'http://www.mai-net.net/bbs/sst/sst.php?act=dump&all=%d'
|
||||
% sid)
|
||||
sec = soup.findAll('a', attrs={'href':re.compile(r'.*?kiji')})
|
||||
for s in sec[:-2]:
|
||||
s_result.append(dict(title=s.string,
|
||||
url="http://www.mai-net.net" + s['href'],
|
||||
date=s.parent.parent.parent.findAll('td')[3].string[:-6],
|
||||
description='', content=''))
|
||||
result.append((s_result[0]['title'], s_result))
|
||||
return result
|
||||
|
||||
|
||||
|
||||
|
@ -31,55 +31,53 @@ class Arcamax(BasicNewsRecipe):
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'class':['comics-header']}),
|
||||
dict(name='b', attrs={'class':['current']}),
|
||||
dict(name='article', attrs={'class':['comic']}),
|
||||
keep_only_tags = [dict(name='article', attrs={'class':['comic']}),
|
||||
]
|
||||
|
||||
remove_tags = [dict(name='div', attrs={'id':['comicfull' ]}),
|
||||
dict(name='div', attrs={'class':['calendar' ]}),
|
||||
dict(name='nav', attrs={'class':['calendar-nav' ]}),
|
||||
]
|
||||
#remove_tags = [dict(name='div', attrs={'id':['comicfull' ]}),
|
||||
#dict(name='div', attrs={'class':['calendar' ]}),
|
||||
#dict(name='nav', attrs={'class':['calendar-nav' ]}),
|
||||
#]
|
||||
|
||||
def parse_index(self):
|
||||
feeds = []
|
||||
for title, url in [
|
||||
######## COMICS - GENERAL ########
|
||||
#(u"9 Chickweed Lane", u"http://www.arcamax.com/ninechickweedlane"),
|
||||
#(u"Agnes", u"http://www.arcamax.com/agnes"),
|
||||
#(u"Andy Capp", u"http://www.arcamax.com/andycapp"),
|
||||
(u"BC", u"http://www.arcamax.com/bc"),
|
||||
#(u"Baby Blues", u"http://www.arcamax.com/babyblues"),
|
||||
#(u"Beetle Bailey", u"http://www.arcamax.com/beetlebailey"),
|
||||
(u"Blondie", u"http://www.arcamax.com/blondie"),
|
||||
#u"Boondocks", u"http://www.arcamax.com/boondocks"),
|
||||
#(u"Cathy", u"http://www.arcamax.com/cathy"),
|
||||
#(u"Daddys Home", u"http://www.arcamax.com/daddyshome"),
|
||||
(u"Dilbert", u"http://www.arcamax.com/dilbert"),
|
||||
#(u"Dinette Set", u"http://www.arcamax.com/thedinetteset"),
|
||||
(u"Dog Eat Doug", u"http://www.arcamax.com/dogeatdoug"),
|
||||
(u"Doonesbury", u"http://www.arcamax.com/doonesbury"),
|
||||
#(u"Dustin", u"http://www.arcamax.com/dustin"),
|
||||
(u"Family Circus", u"http://www.arcamax.com/familycircus"),
|
||||
(u"Garfield", u"http://www.arcamax.com/garfield"),
|
||||
#(u"Get Fuzzy", u"http://www.arcamax.com/getfuzzy"),
|
||||
#(u"Girls and Sports", u"http://www.arcamax.com/girlsandsports"),
|
||||
#(u"Hagar the Horrible", u"http://www.arcamax.com/hagarthehorrible"),
|
||||
#(u"Heathcliff", u"http://www.arcamax.com/heathcliff"),
|
||||
#(u"Jerry King Cartoons", u"http://www.arcamax.com/humorcartoon"),
|
||||
#(u"Luann", u"http://www.arcamax.com/luann"),
|
||||
#(u"Momma", u"http://www.arcamax.com/momma"),
|
||||
#(u"Mother Goose and Grimm", u"http://www.arcamax.com/mothergooseandgrimm"),
|
||||
(u"Mutts", u"http://www.arcamax.com/mutts"),
|
||||
#(u"Non Sequitur", u"http://www.arcamax.com/nonsequitur"),
|
||||
#(u"Pearls Before Swine", u"http://www.arcamax.com/pearlsbeforeswine"),
|
||||
#(u"Pickles", u"http://www.arcamax.com/pickles"),
|
||||
#(u"Red and Rover", u"http://www.arcamax.com/redandrover"),
|
||||
#(u"Rubes", u"http://www.arcamax.com/rubes"),
|
||||
#(u"Rugrats", u"http://www.arcamax.com/rugrats"),
|
||||
(u"Speed Bump", u"http://www.arcamax.com/speedbump"),
|
||||
(u"Wizard of Id", u"http://www.arcamax.com/wizardofid"),
|
||||
(u"Zits", u"http://www.arcamax.com/zits"),
|
||||
#(u"9 Chickweed Lane", #u"http://www.arcamax.com/thefunnies/ninechickweedlane"),
|
||||
#(u"Agnes", u"http://www.arcamax.com/thefunnies/agnes"),
|
||||
#(u"Andy Capp", #u"http://www.arcamax.com/thefunnies/andycapp"),
|
||||
(u"BC", u"http://www.arcamax.com/thefunnies/bc"),
|
||||
#(u"Baby Blues", #u"http://www.arcamax.com/thefunnies/babyblues"),
|
||||
#(u"Beetle Bailey", #u"http://www.arcamax.com/thefunnies/beetlebailey"),
|
||||
(u"Blondie", u"http://www.arcamax.com/thefunnies/blondie"),
|
||||
#u"Boondocks", u"http://www.arcamax.com/thefunnies/boondocks"),
|
||||
#(u"Cathy", u"http://www.arcamax.com/thefunnies/cathy"),
|
||||
#(u"Daddys Home", #u"http://www.arcamax.com/thefunnies/daddyshome"),
|
||||
(u"Dilbert", u"http://www.arcamax.com/thefunnies/dilbert"),
|
||||
#(u"Dinette Set", #u"http://www.arcamax.com/thefunnies/thedinetteset"),
|
||||
(u"Dog Eat Doug", u"http://www.arcamax.com/thefunnies/dogeatdoug"),
|
||||
(u"Doonesbury", u"http://www.arcamax.com/thefunnies/doonesbury"),
|
||||
#(u"Dustin", u"http://www.arcamax.com/thefunnies/dustin"),
|
||||
(u"Family Circus", u"http://www.arcamax.com/thefunnies/familycircus"),
|
||||
(u"Garfield", u"http://www.arcamax.com/thefunnies/garfield"),
|
||||
#(u"Get Fuzzy", #u"http://www.arcamax.com/thefunnies/getfuzzy"),
|
||||
#(u"Girls and Sports", #u"http://www.arcamax.com/thefunnies/girlsandsports"),
|
||||
#(u"Hagar the Horrible", #u"http://www.arcamax.com/thefunnies/hagarthehorrible"),
|
||||
#(u"Heathcliff", #u"http://www.arcamax.com/thefunnies/heathcliff"),
|
||||
#(u"Jerry King Cartoons", #u"http://www.arcamax.com/thefunnies/humorcartoon"),
|
||||
#(u"Luann", u"http://www.arcamax.com/thefunnies/luann"),
|
||||
#(u"Momma", u"http://www.arcamax.com/thefunnies/momma"),
|
||||
#(u"Mother Goose and Grimm", #u"http://www.arcamax.com/thefunnies/mothergooseandgrimm"),
|
||||
(u"Mutts", u"http://www.arcamax.com/thefunnies/mutts"),
|
||||
#(u"Non Sequitur", #u"http://www.arcamax.com/thefunnies/nonsequitur"),
|
||||
#(u"Pearls Before Swine", #u"http://www.arcamax.com/thefunnies/pearlsbeforeswine"),
|
||||
#(u"Pickles", u"http://www.arcamax.com/thefunnies/pickles"),
|
||||
#(u"Red and Rover", #u"http://www.arcamax.com/thefunnies/redandrover"),
|
||||
#(u"Rubes", u"http://www.arcamax.com/thefunnies/rubes"),
|
||||
#(u"Rugrats", u"http://www.arcamax.com/thefunnies/rugrats"),
|
||||
(u"Speed Bump", u"http://www.arcamax.com/thefunnies/speedbump"),
|
||||
(u"Wizard of Id", u"http://www.arcamax.com/thefunnies/wizardofid"),
|
||||
(u"Zits", u"http://www.arcamax.com/thefunnies/zits"),
|
||||
]:
|
||||
articles = self.make_links(url)
|
||||
if articles:
|
||||
@ -93,11 +91,11 @@ class Arcamax(BasicNewsRecipe):
|
||||
for page in pages:
|
||||
page_soup = self.index_to_soup(url)
|
||||
if page_soup:
|
||||
title = self.tag_to_string(page_soup.find(name='div', attrs={'class':'comics-header'}).h1.contents[0])
|
||||
title = self.tag_to_string(page_soup.find(name='div', attrs={'class':'columnheader'}).h1.contents[0])
|
||||
page_url = url
|
||||
# orig prev_page_url = 'http://www.arcamax.com' + page_soup.find('a', attrs={'class':'prev'}, text='Previous').parent['href']
|
||||
prev_page_url = 'http://www.arcamax.com' + page_soup.find('span', text='Previous').parent.parent['href']
|
||||
date = self.tag_to_string(page_soup.find(name='b', attrs={'class':['current']}))
|
||||
prev_page_url = 'http://www.arcamax.com' + page_soup.find(name='a', attrs={'class':['prev']})['href']
|
||||
date = self.tag_to_string(page_soup.find(name='span', attrs={'class':['cur']}))
|
||||
current_articles.append({'title': title, 'url': page_url, 'description':'', 'date': date})
|
||||
url = prev_page_url
|
||||
current_articles.reverse()
|
||||
@ -127,3 +125,4 @@ class Arcamax(BasicNewsRecipe):
|
||||
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
|
||||
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
||||
'''
|
||||
|
||||
|
@ -39,7 +39,7 @@ class TheAtlantic(BasicNewsRecipe):
|
||||
|
||||
cover = soup.find('img', src=True, attrs={'class':'cover'})
|
||||
if cover is not None:
|
||||
self.cover_url = cover['src']
|
||||
self.cover_url = cover['src'].replace(' ', '%20')
|
||||
|
||||
feeds = []
|
||||
seen_titles = set([])
|
||||
|
@ -1,45 +1,37 @@
|
||||
from __future__ import with_statement
|
||||
__license__ = 'GPL 3'
|
||||
__copyright__ = 'Original 2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__copyright__= 'Modified 2011, Josh Hall <jwtheiv@gmail.com>'
|
||||
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
__copyright__ = '2012 Josh Hall<jwtheiv@gmail.com>'
|
||||
__docformat__ = 'restructuredtext en'
|
||||
|
||||
'''
|
||||
www.baltimoresun.com
|
||||
'''
|
||||
|
||||
import urllib, re
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class BaltimoreSun(BasicNewsRecipe):
|
||||
|
||||
title = 'The Baltimore Sun'
|
||||
__author__ = 'Josh Hall'
|
||||
description = 'Politics, local and business news from Baltimore'
|
||||
|
||||
description = 'Complete local news and blogs from Baltimore'
|
||||
language = 'en'
|
||||
version = 2
|
||||
oldest_article = 1
|
||||
max_articles_per_feed = 100
|
||||
remove_empty_feeds = True
|
||||
use_embedded_content = False
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
#masthead_url = 'http://www.baltimoresun.com/images/thirdpartylogo.gif'
|
||||
|
||||
remove_tags_before = dict(name='div', attrs={'class':['story', 'entry']})
|
||||
remove_tags_after = [
|
||||
{'class':['photo_article',]},
|
||||
dict(name='div', attrs={'class':'shirttail-promo right clearfix'}),
|
||||
]
|
||||
recursions = 1
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'class':["story","entry-asset asset hentry"]}),
|
||||
dict(name='div', attrs={'id':["pagebody","story","maincontentcontainer"]}),
|
||||
]
|
||||
remove_tags_after = [{'class':['photo_article',]}]
|
||||
|
||||
match_regexps = [r'page=[0-9]+']
|
||||
|
||||
remove_tags = [{'id':["moduleArticleTools","content-bottom","rail","articleRelates module","toolSet","relatedrailcontent","div-wrapper","beta","atp-comments","footer","article-promo"]},
|
||||
{'class':["entry-footer-left","entry-footer-right","shirttail-promo right clearfix","clearfix","relatedTitle","articleRelates module","asset-footer","tools","comments","featurePromo","featurePromo fp-topjobs brownBackground","clearfix fullSpan brownBackground","curvedContent","toppaginate","module","module-header","module-content"]},
|
||||
dict(name='font',attrs={'id':["cr-other-headlines"]}),
|
||||
dict(name=['iframe']),
|
||||
]
|
||||
remove_tags = [{'id':["moduleArticleTools","content-bottom","rail","articleRelates module","toolSet","relatedrailcontent","div-wrapper","beta","atp-comments","footer",'gallery-subcontent','subFooter']},
|
||||
{'class':["clearfix","relatedTitle","articleRelates module","asset-footer","tools","comments","featurePromo","featurePromo fp-topjobs brownBackground","clearfix fullSpan brownBackground","curvedContent",'nextgen-share-tools','outbrainTools', 'google-ad-story-bottom']},
|
||||
dict(name='font',attrs={'id':["cr-other-headlines"]})]
|
||||
extra_css = '''
|
||||
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;}
|
||||
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
|
||||
@ -55,6 +47,7 @@ class BaltimoreSun(BasicNewsRecipe):
|
||||
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
||||
'''
|
||||
feeds = [
|
||||
## News ##
|
||||
(u'Top Headlines', u'http://www.baltimoresun.com/rss2.0.xml'),
|
||||
(u'Breaking News', u'http://www.baltimoresun.com/news/breaking/rss2.0.xml'),
|
||||
(u'Top Maryland', u'http://www.baltimoresun.com/news/maryland/rss2.0.xml'),
|
||||
@ -69,10 +62,10 @@ class BaltimoreSun(BasicNewsRecipe):
|
||||
(u'Local Politics', u'http://www.baltimoresun.com/news/maryland/politics/rss2.0.xml'),
|
||||
(u'Weather', u'http://www.baltimoresun.com/news/weather/rss2.0.xml'),
|
||||
#(u'Traffic', u'http://www.baltimoresun.com/features/commuting/rss2.0.xml'),
|
||||
(u'Nation/world', u'http://feeds.chicagotribune.com/chicagotribune/news/nationworld/'),
|
||||
(u'Nation/world', u'http://feeds.feedburner.com/baltimoresun/news/nationworld/rss2'),
|
||||
(u'Weird News', u'http://www.baltimoresun.com/news/offbeat/rss2.0.xml'),
|
||||
|
||||
|
||||
##Sports##
|
||||
(u'Top Sports', u'http://www.baltimoresun.com/sports/rss2.0.xml'),
|
||||
(u'Orioles/Baseball', u'http://www.baltimoresun.com/sports/orioles/rss2.0.xml'),
|
||||
(u'Ravens/Football', u'http://www.baltimoresun.com/sports/ravens/rss2.0.xml'),
|
||||
@ -85,6 +78,7 @@ class BaltimoreSun(BasicNewsRecipe):
|
||||
#(u'High School', u'http://www.baltimoresun.com/sports/high-school/rss2.0.xml'),
|
||||
#(u'Outdoors', u'http://www.baltimoresun.com/sports/outdoors/rss2.0.xml'),
|
||||
|
||||
## Entertainment ##
|
||||
(u'Celebrity News', u'http://www.baltimoresun.com/entertainment/celebrities/rss2.0.xml'),
|
||||
(u'Arts & Theater', u'http://www.baltimoresun.com/entertainment/arts/rss2.0.xml'),
|
||||
(u'Movies', u'http://www.baltimoresun.com/entertainment/movies/rss2.0.xml'),
|
||||
@ -92,14 +86,16 @@ class BaltimoreSun(BasicNewsRecipe):
|
||||
(u'Restaurants & Food', u'http://www.baltimoresun.com/entertainment/dining/rss2.0.xml'),
|
||||
(u'TV/Media', u'http://www.baltimoresun.com/entertainment/tv/rss2.0.xml'),
|
||||
|
||||
## Life ##
|
||||
(u'Health&Wellness', u'http://www.baltimoresun.com/health/rss2.0.xml'),
|
||||
(u'Home & Garden', u'http://www.baltimoresun.com/features/home-garden/rss2.0.xml'),
|
||||
(u'Living Green', u'http://www.baltimoresun.com/features/green/rss2.0.xml'),
|
||||
(u'Parenting', u'http://www.baltimoresun.com/features/parenting/rss2.0.xml'),
|
||||
(u'Fashion', u'http://www.baltimoresun.com/features/fashion/rss2.0.xml'),
|
||||
(u'Travel', u'http://www.baltimoresun.com/travel/rss2.0.xml'),
|
||||
(u'Faith', u'http://www.baltimoresun.com/features/faith/rss2.0.xml'),
|
||||
#(u'Faith', u'http://www.baltimoresun.com/features/faith/rss2.0.xml'),
|
||||
|
||||
## Business ##
|
||||
(u'Top Business', u'http://www.baltimoresun.com/business/rss2.0.xml'),
|
||||
(u'Technology', u'http://www.baltimoresun.com/business/technology/rss2.0.xml'),
|
||||
(u'Personal finance', u'http://www.baltimoresun.com/business/money/rss2.0.xml'),
|
||||
@ -109,12 +105,14 @@ class BaltimoreSun(BasicNewsRecipe):
|
||||
(u'Consumer Safety', u'http://www.baltimoresun.com/business/consumer-safety/rss2.0.xml'),
|
||||
(u'Investing', u'http://www.baltimoresun.com/business/money/rss2.0.xml'),
|
||||
|
||||
## Opinion##
|
||||
(u'Sun Editorials', u'http://www.baltimoresun.com/news/opinion/editorial/rss2.0.xml'),
|
||||
(u'Op/Ed', u'http://www.baltimoresun.com/news/opinion/oped/rss2.0.xml'),
|
||||
(u'Readers Respond', u'http://www.baltimoresun.com/news/opinion/readersrespond/'),
|
||||
|
||||
(u'Kevin Cowherd', 'http://www.baltimoresun.com/sports/bal-columnist-cowherd,0,6829726.columnist-rss2.0.xml'),
|
||||
(u'Jay Hancock', u'http://www.baltimoresun.com/business/money/bal-columnist-hancock,0,6673611.columnist-rss2.0.xml'),
|
||||
## Columnists ##
|
||||
(u'Kevin Cowherd', u'http://www.baltimoresun.com/sports/bal-columnist-cowherd,0,6829726.columnist-rss2.0.xml'),
|
||||
(u'Robert Ehrlich', u'http://www.baltimoresun.com/news/opinion/columnists/bal-columnist-ehrlich,0,1825227.columnist-rss2.0.xml'),
|
||||
(u'Jacques Kelly', u'http://www.baltimoresun.com/news/maryland/bal-columnist-kelly,0,1154701.columnist-rss2.0.xml'),
|
||||
(u'Marta H. Mossburg', u'http://www.baltimoresun.com/news/opinion/oped/bal-columnist-mossburg,0,7982155.columnist-rss2.0.xml'),
|
||||
(u'Mike Preston', u'http://www.baltimoresun.com/sports/bal-columnist-preston,0,6169796.columnist-rss2.0.xml'),
|
||||
@ -122,59 +120,80 @@ class BaltimoreSun(BasicNewsRecipe):
|
||||
(u'Dan Rodricks', u'http://www.baltimoresun.com/news/maryland/bal-columnist-rodricks,0,7089843.columnist-rss2.0.xml'),
|
||||
(u'Thomas F. Schaller', u'http://www.baltimoresun.com/news/opinion/columnists/bal-columnist-schaller,0,897397.columnist-rss2.0.xml'),
|
||||
(u'Peter Schmuck', u'http://www.baltimoresun.com/sports/bal-columnist-schmuck,0,7485088.columnist-rss2.0.xml'),
|
||||
(u'Ron Smith', u'http://www.baltimoresun.com/news/opinion/bal-columnist-ronsmith,0,3964803.columnist-rss2.0.xml'),
|
||||
|
||||
(u'Baltimore Crime Beat', u'http://weblogs.baltimoresun.com/news/crime/blog/index.xml'),
|
||||
(u'Getting There', u'http://weblogs.baltimoresun.com/news/traffic/index.xml'),
|
||||
(u'InsideEd', u'http://weblogs.baltimoresun.com/news/education/blog/index.xml'),
|
||||
(u'Maryland Politics', u'http://weblogs.baltimoresun.com/news/local/politics/index.xml'),
|
||||
(u'Maryland Weather', u'http://weblogs.marylandweather.com/index.xml'),
|
||||
(u'Second Opinion', u'http://weblogs.baltimoresun.com/news/opinion/index.xml'),
|
||||
(u'You Dont Say', u'http://weblogs.baltimoresun.com/news/mcintyre/blog/index.xml'),
|
||||
## News Blogs ##
|
||||
(u'Baltimore Crime Beat', u'http://baltimore.feedsportal.com/c/34255/f/623075/index.rss'),
|
||||
(u'InsideEd', u'http://www.baltimoresun.com/news/maryland/education/blog/rss2.0.xml'),
|
||||
(u'Maryland Politics', u'http://www.baltimoresun.com/news/maryland/politics/blog/rss2.0.xml'),
|
||||
(u'Maryland Weather', u'http://www.baltimoresun.com/news/weather/weather-blog/rss2.0.xml'),
|
||||
(u'Second Opinion', u'http://www.baltimoresun.com/news/opinion/second-opinion-blog/rss2.0.xml'),
|
||||
(u'Sun Investigates', u'http://www.baltimoresun.com/news/maryland/sun-investigates/rss2.0.xml'),
|
||||
(u'You Dont Say', u'http://www.baltimoresun.com/news/language-blog/rss2.0.xml'),
|
||||
|
||||
(u'BaltTech', u'http://weblogs.baltimoresun.com/news/technology/index.xml'),
|
||||
(u'Consuming Interests', u'http://weblogs.baltimoresun.com/business/consuminginterests/blog/index.xml'),
|
||||
(u'Jay Hancocks Blog', u'http://weblogs.baltimoresun.com/business/hancock/blog/index.xml'),
|
||||
(u'The Real Estate Wonk', u'http://weblogs.baltimoresun.com/business/realestate/blog/index.xml'),
|
||||
## Business Blogs ##
|
||||
(u'BaltTech', u'http://www.baltimoresun.com/business/technology/blog/rss2.0.xml'),
|
||||
(u'Consuming Interests', u'http://www.baltimoresun.com/business/consuming-interests-blog/rss2.0.xml'),
|
||||
(u'The Real Estate Wonk', u'http://www.baltimoresun.com/business/real-estate/wonk/rss2.0.xml'),
|
||||
|
||||
(u'Clef Notes', 'http://weblogs.baltimoresun.com/entertainment/classicalmusic/index.xml'),
|
||||
(u'Dining at Large', u'http://weblogs.baltimoresun.com/entertainment/dining/reviews/blog/index.xml'),
|
||||
(u'Midnight Sun', u'http://weblogs.baltimoresun.com/entertainment/midnight_sun/blog/index.xml'),
|
||||
(u'Mike Sragow Gets Reel', u'http://weblogs.baltimoresun.com/entertainment/movies/blog/index.xml'),
|
||||
(u'Read Street', u'http://weblogs.baltimoresun.com/entertainment/books/blog/index.xml'),
|
||||
(u'Reality Check', u'http://weblogs.baltimoresun.com/entertainment/realitycheck/blog/index.xml'),
|
||||
(u'Z on TV', u'http://weblogs.baltimoresun.com/entertainment/zontv/index.xml'),
|
||||
## Entertainment Blogs ##
|
||||
(u'Clef Notes & Drama Queens', 'http://weblogs.baltimoresun.com/entertainment/classicalmusic/index.xml'),
|
||||
(u'Baltimore Diner', u'http://baltimore.feedsportal.com/c/34255/f/623088/index.rss'),
|
||||
(u'Midnight Sun', u'http://www.baltimoresun.com/entertainment/music/midnight-sun-blog/rss2.0.xml'),
|
||||
(u'Read Street', u'http://www.baltimoresun.com/features/books/read-street/rss2.0.xml'),
|
||||
(u'Z on TV', u'http://www.baltimoresun.com/entertainment/tv/z-on-tv-blog/rss2.0.xml'),
|
||||
|
||||
## Life Blogs ##
|
||||
(u'BMore Green', u'http://weblogs.baltimoresun.com/features/green/index.xml'),
|
||||
(u'Charm City Moms', u'http://weblogs.baltimoresun.com/features/baltimoremomblog/index.xml'),
|
||||
(u'Exercists', u'http://weblogs.baltimoresun.com/health/fitness/index.xml'),
|
||||
(u'Garden Variety', 'http://weblogs.baltimoresun.com/features/gardening/index.xml'),
|
||||
#(u'In Good Faith', u'http://weblogs.baltimoresun.com/news/faith/index.xml'),
|
||||
(u'Picture of Health', u'http://weblogs.baltimoresun.com/health/index.xml'),
|
||||
(u'Baltimore Insider',u'http://www.baltimoresun.com/features/baltimore-insider-blog/rss2.0.xml'),
|
||||
(u'Homefront', u'http://www.baltimoresun.com/features/parenting/homefront/rss2.0.xml'),
|
||||
(u'Picture of Health', u'http://www.baltimoresun.com/health/blog/rss2.0.xml'),
|
||||
(u'Unleashed', u'http://weblogs.baltimoresun.com/features/mutts/blog/index.xml'),
|
||||
|
||||
## b the site blogs ##
|
||||
(u'Game Cache', u'http://www.baltimoresun.com/entertainment/bthesite/game-cache/rss2.0.xml'),
|
||||
(u'TV Lust', u'http://www.baltimoresun.com/entertainment/bthesite/tv-lust/rss2.0.xml'),
|
||||
|
||||
## Sports Blogs ##
|
||||
(u'Baltimore Sports Blitz', u'http://baltimore.feedsportal.com/c/34255/f/623097/index.rss'),
|
||||
#(u'Faceoff', u'http://weblogs.baltimoresun.com/sports/lacrosse/blog/index.xml'),
|
||||
#(u'MMA Stomping Grounds', u'http://weblogs.baltimoresun.com/sports/mma/blog/index.xml'),
|
||||
(u'Orioles Insider', u'http://weblogs.baltimoresun.com/sports/orioles/blog/index.xml'),
|
||||
#(u'Outdoors Girl', u'http://weblogs.baltimoresun.com/sports/outdoors/blog/index.xml'),
|
||||
(u'Ravens Insider', u'http://weblogs.baltimoresun.com/sports/ravens/blog/index.xml'),
|
||||
(u'Orioles Insider', u'http://baltimore.feedsportal.com/c/34255/f/623100/index.rss'),
|
||||
(u'Ravens Insider', u'http://www.baltimoresun.com/sports/ravens/ravens-insider/rss2.0.xml'),
|
||||
#(u'Recruiting Report', u'http://weblogs.baltimoresun.com/sports/college/recruiting/index.xml'),
|
||||
#(u'Ring Posts', u'http://weblogs.baltimoresun.com/sports/wrestling/blog/index.xml'),
|
||||
(u'The Schmuck Stops Here', u'http://weblogs.baltimoresun.com/sports/schmuck/index.xml'),
|
||||
(u'Toy Department', u'http://weblogs.baltimoresun.com/sports/thetoydepartment/index.xml'),
|
||||
(u'The Schmuck Stops Here', u'http://www.baltimoresun.com/sports/schmuck-blog/rss2.0.xml'),
|
||||
#(u'Tracking the Terps', u'http://weblogs.baltimoresun.com/sports/college/maryland_terps/blog/index.xml'),
|
||||
#(u'Varsity Letters', u'http://weblogs.baltimoresun.com/sports/highschool/varsityletters/index.xml'),
|
||||
(u'Virtual Vensanity', u'http://weblogs.baltimoresun.com/entertainment/bthesite/vensel/index.xml'),
|
||||
|
||||
]
|
||||
|
||||
|
||||
def get_article_url(self, article):
|
||||
print article.get('feedburner_origlink', article.get('guid', article.get('link')))
|
||||
return article.get('feedburner_origlink', article.get('guid', article.get('link')))
|
||||
ans = None
|
||||
try:
|
||||
s = article.summary
|
||||
ans = urllib.unquote(
|
||||
re.search(r'href=".+?bookmark.cfm.+?link=(.+?)"', s).group(1))
|
||||
except:
|
||||
pass
|
||||
if ans is None:
|
||||
ans = article.get('feedburner_origlink', article.get('guid', article.get('link')))
|
||||
if ans is not None:
|
||||
return ans.replace('?track=rss', '')
|
||||
|
||||
def skip_ad_pages(self, soup):
|
||||
text = soup.find(text='click here to continue to article')
|
||||
if text:
|
||||
a = text.parent
|
||||
url = a.get('href')
|
||||
if url:
|
||||
return self.index_to_soup(url, raw=True)
|
||||
|
||||
def postprocess_html(self, soup, first_fetch):
|
||||
# Remove the navigation bar. It was kept until now to be able to follow
|
||||
# the links to further pages. But now we don't need them anymore.
|
||||
for nav in soup.findAll(attrs={'class':['toppaginate','article-nav clearfix']}):
|
||||
nav.extract()
|
||||
|
||||
for t in soup.findAll(['table', 'tr', 'td']):
|
||||
t.name = 'div'
|
||||
|
||||
@ -182,5 +201,3 @@ class BaltimoreSun(BasicNewsRecipe):
|
||||
tag.extract()
|
||||
for tag in soup.findAll('font', dict(attrs={'id':["cr-other-headlines"]})):
|
||||
tag.extract()
|
||||
|
||||
return soup
|
||||
|
@ -1,14 +1,17 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
||||
title = u'Birmingham post'
|
||||
description = 'News for Birmingham UK'
|
||||
timefmt = ''
|
||||
description = 'Author D.Asbury. News for Birmingham UK'
|
||||
#timefmt = ''
|
||||
# last update 8/9/12
|
||||
__author__ = 'Dave Asbury'
|
||||
cover_url = 'http://1.bp.blogspot.com/_GwWyq5eGw9M/S9BHPHxW55I/AAAAAAAAB6Q/iGCWl0egGzg/s320/Birmingham+post+Lite+front.JPG'
|
||||
cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/161987_9010212100_2035706408_n.jpg'
|
||||
oldest_article = 2
|
||||
max_articles_per_feed = 12
|
||||
linearize_tables = True
|
||||
remove_empty_feeds = True
|
||||
remove_javascript = True
|
||||
no_stylesheets = True
|
||||
#auto_cleanup = True
|
||||
language = 'en_GB'
|
||||
|
||||
@ -17,7 +20,8 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
||||
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='h1',attrs={'id' : 'article-headline'}),
|
||||
dict(attrs={'id' : 'article-header'}),
|
||||
#dict(name='h1',attrs={'id' : 'article-header'}),
|
||||
dict(attrs={'class':['article-meta-author','article-meta-date','article main','art-o art-align-center otm-1 ']}),
|
||||
dict(name='div',attrs={'class' : 'article-image full'}),
|
||||
dict(attrs={'clas' : 'art-o art-align-center otm-1 '}),
|
||||
@ -38,10 +42,8 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
||||
|
||||
]
|
||||
extra_css = '''
|
||||
body {font: sans-serif medium;}'
|
||||
h1 {text-align : center; font-family:Arial,Helvetica,sans-serif; font-size:20px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold;}
|
||||
h2 {text-align : center;color:#4D4D4D;font-family:Arial,Helvetica,sans-serif; font-size:15px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:bold; }
|
||||
span{ font-size:9.5px; font-weight:bold;font-style:italic}
|
||||
p { text-align: justify; font-family:Arial,Helvetica,sans-serif; font-size:11px; font-size-adjust:none; font-stretch:normal; font-style:normal; font-variant:normal; font-weight:normal;}
|
||||
|
||||
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:large;text-align:center;}
|
||||
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:small;}
|
||||
p{font-family:Arial,Helvetica,sans-serif;font-size:small;}
|
||||
body{font-family:Helvetica,Arial,sans-serif;font-size:small;}
|
||||
'''
|
||||
|
@ -1,105 +0,0 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008 Kovid Goyal kovid@kovidgoyal.net, 2010 Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
www.businessweek.com
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class BusinessWeek(BasicNewsRecipe):
|
||||
title = 'Business Week'
|
||||
__author__ = 'Kovid Goyal and Darko Miletic'
|
||||
description = 'Read the latest international business news & stock market news. Get updated company profiles, financial advice, global economy and technology news.'
|
||||
publisher = 'Bloomberg L.P.'
|
||||
category = 'Business, business news, stock market, stock market news, financial advice, company profiles, financial advice, global economy, technology news'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 200
|
||||
no_stylesheets = True
|
||||
encoding = 'utf8'
|
||||
use_embedded_content = False
|
||||
language = 'en'
|
||||
remove_empty_feeds = True
|
||||
publication_type = 'magazine'
|
||||
cover_url = 'http://images.businessweek.com/mz/covers/current_120x160.jpg'
|
||||
masthead_url = 'http://assets.businessweek.com/images/bw-logo.png'
|
||||
extra_css = """
|
||||
body{font-family: Helvetica,Arial,sans-serif }
|
||||
img{margin-bottom: 0.4em; display:block}
|
||||
.tagline{color: gray; font-style: italic}
|
||||
.photoCredit{font-size: small; color: gray}
|
||||
"""
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher' : publisher
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
remove_tags = [
|
||||
dict(attrs={'class':'inStory'})
|
||||
,dict(name=['meta','link','iframe','base','embed','object','table','th','tr','td'])
|
||||
,dict(attrs={'id':['inset','videoDisplay']})
|
||||
]
|
||||
keep_only_tags = [dict(name='div', attrs={'id':['story-body','storyBody','article_body','articleBody']})]
|
||||
remove_attributes = ['lang']
|
||||
match_regexps = [r'http://www.businessweek.com/.*_page_[1-9].*']
|
||||
|
||||
|
||||
feeds = [
|
||||
(u'Top Stories', u'http://www.businessweek.com/topStories/rss/topStories.rss'),
|
||||
(u'Top News' , u'http://www.businessweek.com/rss/bwdaily.rss' ),
|
||||
(u'Asia', u'http://www.businessweek.com/rss/asia.rss'),
|
||||
(u'Autos', u'http://www.businessweek.com/rss/autos/index.rss'),
|
||||
(u'Classic Cars', u'http://rss.businessweek.com/bw_rss/classiccars'),
|
||||
(u'Hybrids', u'http://rss.businessweek.com/bw_rss/hybrids'),
|
||||
(u'Europe', u'http://www.businessweek.com/rss/europe.rss'),
|
||||
(u'Auto Reviews', u'http://rss.businessweek.com/bw_rss/autoreviews'),
|
||||
(u'Innovation & Design', u'http://www.businessweek.com/rss/innovate.rss'),
|
||||
(u'Architecture', u'http://www.businessweek.com/rss/architecture.rss'),
|
||||
(u'Brand Equity', u'http://www.businessweek.com/rss/brandequity.rss'),
|
||||
(u'Auto Design', u'http://www.businessweek.com/rss/carbuff.rss'),
|
||||
(u'Game Room', u'http://rss.businessweek.com/bw_rss/gameroom'),
|
||||
(u'Technology', u'http://www.businessweek.com/rss/technology.rss'),
|
||||
(u'Investing', u'http://rss.businessweek.com/bw_rss/investor'),
|
||||
(u'Small Business', u'http://www.businessweek.com/rss/smallbiz.rss'),
|
||||
(u'Careers', u'http://rss.businessweek.com/bw_rss/careers'),
|
||||
(u'B-Schools', u'http://www.businessweek.com/rss/bschools.rss'),
|
||||
(u'Magazine Selections', u'http://www.businessweek.com/rss/magazine.rss'),
|
||||
(u'CEO Guide to Tech', u'http://www.businessweek.com/rss/ceo_guide_tech.rss'),
|
||||
]
|
||||
|
||||
def get_article_url(self, article):
|
||||
url = article.get('guid', None)
|
||||
if 'podcasts' in url:
|
||||
return None
|
||||
if 'surveys' in url:
|
||||
return None
|
||||
if 'images' in url:
|
||||
return None
|
||||
if 'feedroom' in url:
|
||||
return None
|
||||
if '/magazine/toc/' in url:
|
||||
return None
|
||||
rurl, sep, rest = url.rpartition('?')
|
||||
if rurl:
|
||||
return rurl
|
||||
return rest
|
||||
|
||||
def print_version(self, url):
|
||||
if '/news/' in url or '/blog/' in url:
|
||||
return url
|
||||
if '/magazine' in url:
|
||||
rurl = url.replace('http://www.businessweek.com/','http://www.businessweek.com/printer/')
|
||||
else:
|
||||
rurl = url.replace('http://www.businessweek.com/','http://www.businessweek.com/print/')
|
||||
return rurl.replace('/investing/','/investor/')
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
for alink in soup.findAll('a'):
|
||||
if alink.string is not None:
|
||||
tstr = alink.string
|
||||
alink.replaceWith(tstr)
|
||||
return soup
|
68
recipes/bwmagazine2.recipe
Normal file
@ -0,0 +1,68 @@
|
||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||
from collections import OrderedDict
|
||||
|
||||
class BusinessWeekMagazine(BasicNewsRecipe):
|
||||
|
||||
title = 'Business Week Magazine'
|
||||
__author__ = 'Rick Shang'
|
||||
|
||||
description = 'A renowned business publication. Business news, trends and profiles of successful businesspeople.'
|
||||
language = 'en'
|
||||
category = 'news'
|
||||
encoding = 'UTF-8'
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'id':'article_body_container'}),
|
||||
]
|
||||
remove_tags = [dict(name='ui'),dict(name='li')]
|
||||
no_javascript = True
|
||||
no_stylesheets = True
|
||||
|
||||
cover_url = 'http://images.businessweek.com/mz/covers/current_120x160.jpg'
|
||||
|
||||
def parse_index(self):
|
||||
|
||||
#Go to the issue
|
||||
soup = self.index_to_soup('http://www.businessweek.com/magazine/news/articles/business_news.htm')
|
||||
|
||||
#Find date
|
||||
mag=soup.find('h2',text='Magazine')
|
||||
dates=self.tag_to_string(mag.findNext('h3'))
|
||||
self.timefmt = u' [%s]'%dates
|
||||
|
||||
#Go to the main body
|
||||
div0 = soup.find ('div', attrs={'class':'column left'})
|
||||
section_title = ''
|
||||
feeds = OrderedDict()
|
||||
for div in div0.findAll('h4'):
|
||||
articles = []
|
||||
section_title = self.tag_to_string(div.findPrevious('h3')).strip()
|
||||
title=self.tag_to_string(div.a).strip()
|
||||
url=div.a['href']
|
||||
soup0 = self.index_to_soup(url)
|
||||
urlprint=soup0.find('li', attrs={'class':'print'}).a['href']
|
||||
articles.append({'title':title, 'url':urlprint, 'description':'', 'date':''})
|
||||
|
||||
|
||||
if articles:
|
||||
if section_title not in feeds:
|
||||
feeds[section_title] = []
|
||||
feeds[section_title] += articles
|
||||
|
||||
div1 = soup.find ('div', attrs={'class':'column center'})
|
||||
section_title = ''
|
||||
for div in div1.findAll('h5'):
|
||||
articles = []
|
||||
desc=self.tag_to_string(div.findNext('p')).strip()
|
||||
section_title = self.tag_to_string(div.findPrevious('h3')).strip()
|
||||
title=self.tag_to_string(div.a).strip()
|
||||
url=div.a['href']
|
||||
soup0 = self.index_to_soup(url)
|
||||
urlprint=soup0.find('li', attrs={'class':'print'}).a['href']
|
||||
articles.append({'title':title, 'url':urlprint, 'description':desc, 'date':''})
|
||||
|
||||
if articles:
|
||||
if section_title not in feeds:
|
||||
feeds[section_title] = []
|
||||
feeds[section_title] += articles
|
||||
ans = [(key, val) for key, val in feeds.iteritems()]
|
||||
return ans
|
@ -12,7 +12,7 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
||||
class AcademiaCatavencu(BasicNewsRecipe):
|
||||
title = u'Academia Ca\u0163avencu'
|
||||
__author__ = u'Silviu Cotoar\u0103'
|
||||
description = 'Tagma cum laude'
|
||||
description = 'Academia Catavencu. Pamflete!'
|
||||
publisher = u'Ca\u0163avencu'
|
||||
oldest_article = 5
|
||||
language = 'ro'
|
||||
@ -21,7 +21,7 @@ class AcademiaCatavencu(BasicNewsRecipe):
|
||||
use_embedded_content = False
|
||||
category = 'Ziare'
|
||||
encoding = 'utf-8'
|
||||
cover_url = 'http://www.academiacatavencu.info/images/logo.png'
|
||||
cover_url = 'http://www.inpolitics.ro/Uploads/Articles/academia_catavencu.jpg'
|
||||
|
||||
conversion_options = {
|
||||
'comments' : description
|
||||
@ -31,21 +31,21 @@ class AcademiaCatavencu(BasicNewsRecipe):
|
||||
}
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='h1', attrs={'class':'art_title'}),
|
||||
dict(name='div', attrs={'class':'art_text'})
|
||||
dict(name='h1', attrs={'class':'entry-title'}),
|
||||
dict(name='div', attrs={'class':'entry-content'})
|
||||
]
|
||||
|
||||
remove_tags = [
|
||||
dict(name='div', attrs={'class':['desp_m']})
|
||||
, dict(name='div', attrs={'id':['tags']})
|
||||
dict(name='div', attrs={'class':['mr_social_sharing_wrapper']})
|
||||
, dict(name='div', attrs={'id':['fb_share_1']})
|
||||
]
|
||||
|
||||
remove_tags_after = [
|
||||
dict(name='div', attrs={'class':['desp_m']})
|
||||
dict(name='div', attrs={'id':['fb_share_1']})
|
||||
]
|
||||
|
||||
feeds = [
|
||||
(u'Feeds', u'http://www.academiacatavencu.info/rss.xml')
|
||||
(u'Feeds', u'http://www.academiacatavencu.info/feed')
|
||||
]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
|
87
recipes/chronicle_higher_ed.recipe
Normal file
@ -0,0 +1,87 @@
|
||||
import re
|
||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||
from collections import OrderedDict
|
||||
|
||||
class Chronicle(BasicNewsRecipe):
|
||||
|
||||
title = 'The Chronicle of Higher Education'
|
||||
__author__ = 'Rick Shang'
|
||||
|
||||
description = 'Weekly news and job-information source for college and university faculty members, administrators, and students.'
|
||||
language = 'en'
|
||||
category = 'news'
|
||||
encoding = 'UTF-8'
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'class':'article'}),
|
||||
]
|
||||
remove_tags = [dict(name='div',attrs={'class':['related module1','maintitle']}),
|
||||
dict(name='div', attrs={'id':['section-nav','icon-row', 'enlarge-popup']}),
|
||||
dict(name='a', attrs={'class':'show-enlarge enlarge'})]
|
||||
no_javascript = True
|
||||
no_stylesheets = True
|
||||
|
||||
|
||||
needs_subscription = True
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
if self.username is not None and self.password is not None:
|
||||
br.open('http://chronicle.com/myaccount/login')
|
||||
br.select_form(nr=1)
|
||||
br['username'] = self.username
|
||||
br['password'] = self.password
|
||||
br.submit()
|
||||
return br
|
||||
|
||||
def parse_index(self):
|
||||
#Go to the issue
|
||||
soup0 = self.index_to_soup('http://chronicle.com/section/Archives/39/')
|
||||
issue = soup0.find('ul',attrs={'class':'feature-promo-list'}).li
|
||||
issueurl = "http://chronicle.com"+issue.a['href']
|
||||
|
||||
#Find date
|
||||
dates = self.tag_to_string(issue.a).split(': ')[-1]
|
||||
self.timefmt = u' [%s]'%dates
|
||||
|
||||
#Find cover
|
||||
cover=soup0.find('div',attrs={'class':'side-content'}).find(attrs={'src':re.compile("photos/biz/Current")})
|
||||
if cover is not None:
|
||||
if "chronicle.com" in cover['src']:
|
||||
self.cover_url=cover['src']
|
||||
else:
|
||||
self.cover_url="http://chronicle.com" + cover['src']
|
||||
#Go to the main body
|
||||
soup = self.index_to_soup(issueurl)
|
||||
div = soup.find ('div', attrs={'id':'article-body'})
|
||||
|
||||
feeds = OrderedDict()
|
||||
section_title = ''
|
||||
for post in div.findAll('li'):
|
||||
articles = []
|
||||
a=post.find('a', href=True)
|
||||
if a is not None:
|
||||
title=self.tag_to_string(a)
|
||||
url="http://chronicle.com"+a['href'].strip()
|
||||
sectiontitle=post.findPrevious('h3')
|
||||
if sectiontitle is None:
|
||||
sectiontitle=post.findPrevious('h4')
|
||||
section_title=self.tag_to_string(sectiontitle)
|
||||
desc=self.tag_to_string(post.find('p'))
|
||||
articles.append({'title':title, 'url':url, 'description':desc, 'date':''})
|
||||
|
||||
if articles:
|
||||
if section_title not in feeds:
|
||||
feeds[section_title] = []
|
||||
feeds[section_title] += articles
|
||||
ans = [(key, val) for key, val in feeds.iteritems()]
|
||||
return ans
|
||||
|
||||
def preprocess_html(self,soup):
|
||||
#process all the images
|
||||
for div in soup.findAll('div', attrs={'class':'tableauPlaceholder'}):
|
||||
|
||||
noscripts=div.find('noscript').a
|
||||
div.replaceWith(noscripts)
|
||||
for div0 in soup.findAll('div',text='Powered by Tableau'):
|
||||
div0.extract()
|
||||
return soup
|
||||
|
58
recipes/ciperchile.recipe
Normal file
@ -0,0 +1,58 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
ciperchile.cl
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class CiperChile(BasicNewsRecipe):
|
||||
title = 'CIPER Chile'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'El Centro de Investigacion e Informacion Periodistica (CIPER) es una institucion independiente que desarrolla reportajes de investigacion de acuerdo a principios de maxima calidad e integridad profesional. Para lograr dicho objetivo, los profesionales de CIPER incorporan a las tecnicas propias del reporteo el uso sistematico de las leyes chilenas que norman el libre acceso a la informacion, de manera que los documentos que se obtengan por esta via esten puestos a disposicion del publico sin restricciones.'
|
||||
publisher = 'CIPER'
|
||||
category = 'news, politics, Chile'
|
||||
oldest_article = 15
|
||||
max_articles_per_feed = 200
|
||||
no_stylesheets = True
|
||||
encoding = 'utf8'
|
||||
use_embedded_content = False
|
||||
language = 'es_CL'
|
||||
auto_cleanup = False
|
||||
remove_empty_feeds = True
|
||||
publication_type = 'blog'
|
||||
masthead_url = 'http://ciperchile.cl/wp-content/themes/cipertheme/css/ui/ciper-logo.png'
|
||||
extra_css = """
|
||||
body{font-family: Arial,sans-serif}
|
||||
.excerpt{font-family: Georgia,"Times New Roman",Times,serif; font-style: italic; font-size: 1.25em}
|
||||
.author{font-family: Georgia,"Times New Roman",Times,serif; font-style: italic; font-size: small}
|
||||
.date{font-family: Georgia,"Times New Roman",Times,serif; font-size: small; color: grey}
|
||||
.epigrafe{font-size: small; color: grey}
|
||||
img{margin-bottom: 0.4em; display:block}
|
||||
"""
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher' : publisher
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
remove_tags = [
|
||||
dict(name=['meta','link']),
|
||||
dict(attrs={'class':['articleSharingTools','articleNav']})
|
||||
]
|
||||
remove_attributes=['lang']
|
||||
remove_tags_before=dict(name='p', attrs={'class':'epigrafe'})
|
||||
remove_tags_after=dict(name='div', attrs={'class':'articleBody'})
|
||||
keep_only_tags = [dict(name='div', attrs={'class':'articleElements'})]
|
||||
|
||||
feeds = [
|
||||
(u'Opinion del lector', u'http://ciperchile.cl/category/opinion-del-lector/feed/')
|
||||
,(u'Reportajes de investigacion', u'http://ciperchile.cl/category/reportajes-de-investigacion/feed/')
|
||||
,(u'Actualidad y Entrevistas', u'http://ciperchile.cl/category/actualidad-y-entrevistas/feed/')
|
||||
,(u'Opinion', u'http://ciperchile.cl/category/opinion/feed/')
|
||||
,(u'Accesso a la informacion', u'http://ciperchile.cl/category/acceso-a-la-informacion/feed/')
|
||||
,(u'Libros', u'http://ciperchile.cl/category/libros/feed/')
|
||||
,(u'Blog', u'http://ciperchile.cl/category/blog/feed/')
|
||||
]
|
@ -1,7 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2009-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
www.codinghorror.com/blog/
|
||||
'''
|
||||
@ -15,22 +13,20 @@ class CodingHorror(BasicNewsRecipe):
|
||||
category = 'blog, programming'
|
||||
publisher = 'Jeff Atwood'
|
||||
language = 'en'
|
||||
|
||||
author = 'Jeff Atwood'
|
||||
oldest_article = 30
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
use_embedded_content = True
|
||||
encoding = 'cp1252'
|
||||
encoding = 'utf8'
|
||||
auto_cleanup = True
|
||||
|
||||
html2lrf_options = [
|
||||
'--comment' , description
|
||||
, '--category' , category
|
||||
, '--publisher', publisher
|
||||
, '--author' , author
|
||||
]
|
||||
|
||||
html2epub_options = 'publisher="' + publisher + '"\ncomments="' + description + '"\ntags="' + category + '"\nauthors="' + author + '"'
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher': publisher
|
||||
, 'language' : language
|
||||
, 'authors' : publisher
|
||||
}
|
||||
|
||||
remove_tags = [
|
||||
dict(name=['object','link'])
|
||||
@ -38,4 +34,3 @@ class CodingHorror(BasicNewsRecipe):
|
||||
]
|
||||
|
||||
feeds = [(u'Articles', u'http://feeds2.feedburner.com/codinghorror' )]
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
from calibre import browser
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class AdvancedUserRecipe1325006965(BasicNewsRecipe):
|
||||
title = u'Countryfile.com'
|
||||
#cover_url = 'http://www.countryfile.com/sites/default/files/imagecache/160px_wide/cover/2_1.jpg'
|
||||
__author__ = 'Dave Asbury'
|
||||
description = 'The official website of Countryfile Magazine'
|
||||
# last updated 15/4/12
|
||||
# last updated 9/9//12
|
||||
language = 'en_GB'
|
||||
oldest_article = 30
|
||||
max_articles_per_feed = 25
|
||||
@ -17,13 +16,14 @@ class AdvancedUserRecipe1325006965(BasicNewsRecipe):
|
||||
def get_cover_url(self):
|
||||
soup = self.index_to_soup('http://www.countryfile.com/')
|
||||
cov = soup.find(attrs={'class' : 'imagecache imagecache-160px_wide imagecache-linked imagecache-160px_wide_linked'})
|
||||
#print '******** ',cov,' ***'
|
||||
print '******** ',cov,' ***'
|
||||
cov2 = str(cov)
|
||||
cov2=cov2[124:-90]
|
||||
#print '******** ',cov2,' ***'
|
||||
|
||||
cov2=cov2[140:223]
|
||||
print '******** ',cov2,' ***'
|
||||
#cov2='http://www.countryfile.com/sites/default/files/imagecache/160px_wide/cover/1b_0.jpg'
|
||||
# try to get cover - if can't get known cover
|
||||
br = browser()
|
||||
|
||||
br.set_handle_redirect(False)
|
||||
try:
|
||||
br.open_novisit(cov2)
|
||||
|
59
recipes/cumhuriyet.recipe
Normal file
@ -0,0 +1,59 @@
|
||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||
|
||||
from __future__ import unicode_literals
|
||||
# based on a recipe by Darko Miletic
|
||||
#
|
||||
# Cumhuriyet Gazetesi'nin köşe yazıları okuyuculara cumhuriyet.com.tr
|
||||
# adresi üzerinden ücretsiz olarak sunulmaktadır.
|
||||
# Calibre yazılımıyla kullanılabilen bu reçete Cumhuriyet Gazetesi'nin
|
||||
# günlük köşe yazılarını hızlıca derleyip e-okuyucunuzda kolayca okunabilir
|
||||
# hale getirir. Yazıların yayınlanma saati sabah olduğu için reçeteyi
|
||||
# 7:00-24:00 arasında çizelgelemeniz gerekmektedir.
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2012, Sethi Eksi <sethi.eksi at gmail.com>'
|
||||
'''
|
||||
cumhuriyet.com.tr
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Cumhuriyet_tr(BasicNewsRecipe):
|
||||
title = 'Cumhuriyet - Yazarlar'
|
||||
__author__ = 'Cumhuriyet Gazetesi Yazarları'
|
||||
description = 'Günlük Cumhuriyet Gazetesi Köşe Yazıları'
|
||||
publisher = 'Cumhuriyet'
|
||||
category = 'news, politics, Turkey'
|
||||
oldest_article = 1
|
||||
max_articles_per_feed = 150
|
||||
no_stylesheets = True
|
||||
encoding = 'cp1254'
|
||||
use_embedded_content = False
|
||||
masthead_url = 'http://www.cumhuriyet.com.tr/home/cumhuriyet/sablon2000/img/cumlogobeyaz1.gif'
|
||||
language = 'tr'
|
||||
extra_css = """ @font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
|
||||
.article_description,body{font-family: Arial,Verdana,Helvetica,sans1,sans-serif}
|
||||
"""
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher' : publisher
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
remove_tags = [dict(name=['embed','iframe','object','link','base'])]
|
||||
remove_tags_before = dict(attrs={'class':'c565'})
|
||||
remove_tags_after = dict(attrs={'class':'c565'})
|
||||
|
||||
feeds = [
|
||||
(u'Yazarlar' , u'http://www.cumhuriyet.com.tr/?kn=5&xl=rss')
|
||||
]
|
||||
|
||||
def print_version(self, url):
|
||||
articleid = url.rpartition('hn=')[2]
|
||||
return 'http://www.cumhuriyet.com.tr/?hn=' + articleid
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
return self.adeify_images(soup)
|
||||
|
@ -1,71 +1,51 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = u'2011, Silviu Cotoar\u0103'
|
||||
'''
|
||||
dilemaveche.ro
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class DilemaVeche(BasicNewsRecipe):
|
||||
title = u'Dilema Veche' # apare vinerea, mai pe dupa-masa,depinde de Luiza cred (care se semneaza ca fiind creatorul fiecarui articol in feed-ul RSS)
|
||||
__author__ = 'song2' # inspirat din scriptul pentru Le Monde. Inspired from the Le Monde script
|
||||
description = '"Sint vechi, domnule!" (I.L. Caragiale)'
|
||||
publisher = 'Adevarul Holding'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 200
|
||||
encoding = 'utf8'
|
||||
title = u'Dilema Veche'
|
||||
__author__ = u'Silviu Cotoar\u0103'
|
||||
description = 'Sint vechi, domnule! (I.L. Caragiale)'
|
||||
publisher = u'Adev\u0103rul Holding'
|
||||
oldest_article = 5
|
||||
language = 'ro'
|
||||
masthead_url = 'http://www.dilemaveche.ro/sites/all/themes/dilema/theme/dilema_two/layouter/dilema_two_homepage/logo.png'
|
||||
publication_type = 'magazine'
|
||||
feeds = [
|
||||
('Editoriale si opinii - Situatiunea', 'http://www.dilemaveche.ro/taxonomy/term/37/0/feed'),
|
||||
('Editoriale si opinii - Pe ce lume traim', 'http://www.dilemaveche.ro/taxonomy/term/38/0/feed'),
|
||||
('Editoriale si opinii - Bordeie si obiceie', 'http://www.dilemaveche.ro/taxonomy/term/44/0/feed'),
|
||||
('Editoriale si opinii - Talc Show', 'http://www.dilemaveche.ro/taxonomy/term/44/0/feed'),
|
||||
('Tema saptamanii', 'http://www.dilemaveche.ro/taxonomy/term/19/0/feed'),
|
||||
('La zi in cultura - Dilema va recomanda', 'http://www.dilemaveche.ro/taxonomy/term/58/0/feed'),
|
||||
('La zi in cultura - Carte', 'http://www.dilemaveche.ro/taxonomy/term/14/0/feed'),
|
||||
('La zi in cultura - Film', 'http://www.dilemaveche.ro/taxonomy/term/13/0/feed'),
|
||||
('La zi in cultura - Muzica', 'http://www.dilemaveche.ro/taxonomy/term/1341/0/feed'),
|
||||
('La zi in cultura - Arte performative', 'http://www.dilemaveche.ro/taxonomy/term/1342/0/feed'),
|
||||
('La zi in cultura - Arte vizuale', 'http://www.dilemaveche.ro/taxonomy/term/1512/0/feed'),
|
||||
('Societate - Ieri cu vedere spre azi', 'http://www.dilemaveche.ro/taxonomy/term/15/0/feed'),
|
||||
('Societate - Din polul opus', 'http://www.dilemaveche.ro/taxonomy/term/41/0/feed'),
|
||||
('Societate - Mass comedia', 'http://www.dilemaveche.ro/taxonomy/term/43/0/feed'),
|
||||
('Societate - La singular si la plural', 'http://www.dilemaveche.ro/taxonomy/term/42/0/feed'),
|
||||
('Oameni si idei - Educatie', 'http://www.dilemaveche.ro/taxonomy/term/46/0/feed'),
|
||||
('Oameni si idei - Polemici si dezbateri', 'http://www.dilemaveche.ro/taxonomy/term/48/0/feed'),
|
||||
('Oameni si idei - Stiinta si tehnologie', 'http://www.dilemaveche.ro/taxonomy/term/46/0/feed'),
|
||||
('Dileme on-line', 'http://www.dilemaveche.ro/taxonomy/term/005/0/feed')
|
||||
]
|
||||
remove_tags_before = dict(name='div',attrs={'class':'spacer_10'})
|
||||
remove_tags = [
|
||||
dict(name='div', attrs={'class':'art_related_left'}),
|
||||
dict(name='div', attrs={'class':'controale'}),
|
||||
dict(name='div', attrs={'class':'simple_overlay'}),
|
||||
]
|
||||
remove_tags_after = [dict(id='facebookLike')]
|
||||
remove_javascript = True
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
remove_empty_feeds = True
|
||||
extra_css = """
|
||||
body{font-family: Georgia,Times,serif }
|
||||
img{margin-bottom: 0.4em; display:block}
|
||||
"""
|
||||
def get_cover_url(self):
|
||||
cover_url = None
|
||||
soup = self.index_to_soup('http://dilemaveche.ro')
|
||||
link_item = soup.find('div',attrs={'class':'box_dr_pdf_picture'})
|
||||
if link_item and link_item.a:
|
||||
cover_url = link_item.a['href']
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
try:
|
||||
br.open(cover_url)
|
||||
except: #daca nu gaseste pdf-ul
|
||||
self.log("\nPDF indisponibil")
|
||||
link_item = soup.find('div',attrs={'class':'box_dr_pdf_picture'})
|
||||
if link_item and link_item.img:
|
||||
cover_url = link_item.img['src']
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
try:
|
||||
br.open(cover_url)
|
||||
except: #daca nu gaseste nici imaginea mica mica
|
||||
print('Mama lor de nenorociti! nu este nici pdf nici imagine')
|
||||
cover_url ='http://www.dilemaveche.ro/sites/all/themes/dilema/theme/dilema_two/layouter/dilema_two_homepage/logo.png'
|
||||
return cover_url
|
||||
cover_margins = (10, 15, '#ffffff')
|
||||
use_embedded_content = False
|
||||
category = 'Ziare'
|
||||
encoding = 'utf-8'
|
||||
cover_url = 'http://dilemaveche.ro/sites/all/themes/dilema/theme/dilema_two/layouter/dilema_two_homepage/logo.png'
|
||||
|
||||
conversion_options = {
|
||||
'comments' : description
|
||||
,'tags' : category
|
||||
,'language' : language
|
||||
,'publisher' : publisher
|
||||
}
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'class':'c_left_column'})
|
||||
]
|
||||
|
||||
remove_tags = [
|
||||
dict(name='div', attrs={'id':['adshop_widget_428x60']}) ,
|
||||
dict(name='div', attrs={'id':['gallery']})
|
||||
]
|
||||
|
||||
remove_tags_after = [
|
||||
dict(name='div', attrs={'id':['adshop_widget_428x60']})
|
||||
]
|
||||
|
||||
feeds = [
|
||||
(u'Feeds', u'http://dilemaveche.ro/rss.xml')
|
||||
]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
return self.adeify_images(soup)
|
||||
|
52
recipes/doghousediaries.recipe
Normal file
@ -0,0 +1,52 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010-2012, NiLuJe <niluje at ak-team.com>'
|
||||
|
||||
'''
|
||||
Fetch DoghouseDiaries.
|
||||
'''
|
||||
|
||||
import re
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class DoghouseDiaries(BasicNewsRecipe):
|
||||
title = 'Doghouse Diaries'
|
||||
description = 'A webcomic.'
|
||||
__author__ = 'NiLuJe'
|
||||
language = 'en'
|
||||
|
||||
use_embedded_content = False
|
||||
# 14 comics per fetch (not really days... but we can't easily get the date of individual comics, short of parsing each one...)
|
||||
oldest_article = 14
|
||||
|
||||
cover_url = 'http://www.thedoghousediaries.com/logos/logo3.png'
|
||||
masthead_url = 'http://www.thedoghousediaries.com/logos/logo3.png'
|
||||
|
||||
keep_only_tags = [dict(name='img', attrs={'class': re.compile("comic-item*")}), dict(name='h1'), dict(name='div', attrs={'class':'entry'}), dict(name='p', id='alttext')]
|
||||
remove_tags = [dict(name='div', attrs={'class':'pin-it-btn-wrapper'}), dict(name='span'), dict(name='div', id='wp_fb_like_button')]
|
||||
remove_attributes = ['width', 'height']
|
||||
no_stylesheets = True
|
||||
|
||||
# Turn image bubblehelp into a paragraph (NOTE: We run before the remove_tags cleanup, so we need to make sure we only parse the comic-item img, not the pinterest one pulled by the entry div)
|
||||
preprocess_regexps = [
|
||||
(re.compile(r'(<img.*src="http://thedoghousediaries.com/comics/.*title=")([^"]+)(".*>)'),
|
||||
lambda m: '%s%s<p id="alttext"><strong>%s</strong></p>' % (m.group(1), m.group(3), m.group(2)))
|
||||
]
|
||||
|
||||
def parse_index(self):
|
||||
INDEX = 'http://www.thedoghousediaries.com/'
|
||||
|
||||
soup = self.index_to_soup(INDEX)
|
||||
articles = []
|
||||
# Since the feed sucks, and there's no real archive, we use the 'Quick Archive' thingie, but we can't get the date from here, so stop after 14 comics...
|
||||
for item in soup.findAll('option', {}, True, None, self.oldest_article+1):
|
||||
# Skip the quick archive itself
|
||||
if ( item['value'] != '0' ):
|
||||
articles.append({
|
||||
'title': self.tag_to_string(item).encode('UTF-8'),
|
||||
'url': item['value'],
|
||||
'description': '',
|
||||
'content': '',
|
||||
})
|
||||
|
||||
return [('Doghouse Diaries', articles)]
|
||||
|
@ -41,7 +41,7 @@ class ElPais_RSS(BasicNewsRecipe):
|
||||
,dict(attrs={'class':['firma','columna_texto','entrevista_p_r']})
|
||||
]
|
||||
remove_tags = [
|
||||
dict(name=['meta','link','base','iframe','embed','object'])
|
||||
dict(name=['iframe','embed','object'])
|
||||
,dict(attrs={'class':'disposicion_vertical'})
|
||||
]
|
||||
|
||||
@ -74,13 +74,14 @@ class ElPais_RSS(BasicNewsRecipe):
|
||||
,(u'Justicia y Leyes' , u'http://elpais.com/tag/rss/justicia/a/' )
|
||||
,(u'Guerras y conflictos' , u'http://elpais.com/tag/rss/conflictos/a/' )
|
||||
,(u'Politica' , u'http://ep00.epimg.net/rss/politica/portada.xml' )
|
||||
,(u'Opinion' , u'http://ep01.epimg.net/rss/politica/opinion.xml' )
|
||||
,(u'Opinion' , u'http://ep01.epimg.net/rss/elpais/opinion.xml' )
|
||||
]
|
||||
|
||||
def get_article_url(self, article):
|
||||
url = BasicNewsRecipe.get_article_url(self, article)
|
||||
if url and (not('/album/' in url) and not('/futbol/partido/' in url)):
|
||||
return url
|
||||
urlverified = self.browser.open_novisit(url).geturl()
|
||||
return urlverified
|
||||
self.log('Skipping non-article', url)
|
||||
return None
|
||||
|
||||
@ -107,3 +108,7 @@ class ElPais_RSS(BasicNewsRecipe):
|
||||
for item in soup.findAll('img',alt=False):
|
||||
item['alt'] = 'image'
|
||||
return soup
|
||||
|
||||
def preprocess_raw_html(self, raw, url):
|
||||
return '<html><head><title>Untitled</title>'+raw[raw.find('</head>'):]
|
||||
|
19
recipes/fc_knudde.recipe
Normal file
@ -0,0 +1,19 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class AdvancedUserRecipe1347706704(BasicNewsRecipe):
|
||||
title = u'FC Knudde'
|
||||
__author__ = u'DrMerry'
|
||||
description = u'FC Knudde de populaire sport strip van Toon van Driel (http://www.toonvandriel.nl)'
|
||||
language = u'nl'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
auto_cleanup = False
|
||||
cover_url = 'http://a1.mzstatic.com/us/r1000/035/Purple/be/33/70/mzl.qkvshinq.320x480-75.jpg'
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
remove_empty_feeds = True
|
||||
remove_tags_before = dict(id='title')
|
||||
remove_tags_after = dict(attrs={'class':'entry-content rich-content'})
|
||||
use_embedded_content = True
|
||||
|
||||
feeds = [(u'FC Knudde', u'http://www.nusport.nl/feeds/rss/fc-knudde.rss')]
|
@ -1,5 +1,5 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010-2011, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2010-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
www.ft.com/uk-edition
|
||||
'''
|
||||
@ -10,7 +10,7 @@ from calibre import strftime
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class FinancialTimes(BasicNewsRecipe):
|
||||
title = 'Financial Times - UK printed edition'
|
||||
title = 'Financial Times (UK)'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = "The Financial Times (FT) is one of the world's leading business news and information organisations, recognised internationally for its authority, integrity and accuracy."
|
||||
publisher = 'The Financial Times Ltd.'
|
||||
@ -51,10 +51,15 @@ class FinancialTimes(BasicNewsRecipe):
|
||||
return br
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'class':['fullstory fullstoryHeader', 'ft-story-header']})
|
||||
,dict(name='div', attrs={'class':'standfirst'})
|
||||
,dict(name='div', attrs={'id' :'storyContent'})
|
||||
,dict(name='div', attrs={'class':['ft-story-body','index-detail']})
|
||||
dict(name='div' , attrs={'class':['fullstory fullstoryHeader', 'ft-story-header']})
|
||||
,dict(name='div' , attrs={'class':'standfirst'})
|
||||
,dict(name='div' , attrs={'id' :'storyContent'})
|
||||
,dict(name='div' , attrs={'class':['ft-story-body','index-detail']})
|
||||
,dict(name='div' , attrs={'class':['ft-story-body','index-detail']})
|
||||
,dict(name='h2' , attrs={'class':'entry-title'} )
|
||||
,dict(name='span', attrs={'class':lambda x: x and 'posted-on' in x.split()} )
|
||||
,dict(name='span', attrs={'class':'author_byline'} )
|
||||
,dict(name='div' , attrs={'class':'entry-content'} )
|
||||
]
|
||||
remove_tags = [
|
||||
dict(name='div', attrs={'id':'floating-con'})
|
||||
@ -83,9 +88,8 @@ class FinancialTimes(BasicNewsRecipe):
|
||||
if self.test and count > 2:
|
||||
return articles
|
||||
rawlink = item['href']
|
||||
if rawlink.startswith('http://'):
|
||||
url = rawlink
|
||||
else:
|
||||
if not rawlink.startswith('http://'):
|
||||
url = self.PREFIX + rawlink
|
||||
urlverified = self.browser.open_novisit(url).geturl() # resolve redirect.
|
||||
title = self.tag_to_string(item)
|
||||
@ -101,23 +105,25 @@ class FinancialTimes(BasicNewsRecipe):
|
||||
def parse_index(self):
|
||||
feeds = []
|
||||
soup = self.index_to_soup(self.INDEX)
|
||||
dates= self.tag_to_string(soup.find('div', attrs={'class':'btm-links'}).find('div'))
|
||||
self.timefmt = ' [%s]'%dates
|
||||
wide = soup.find('div',attrs={'class':'wide'})
|
||||
if not wide:
|
||||
return feeds
|
||||
strest = wide.findAll('h3', attrs={'class':'section'})
|
||||
if not strest:
|
||||
allsections = wide.findAll(attrs={'class':lambda x: x and 'footwell' in x.split()})
|
||||
if not allsections:
|
||||
return feeds
|
||||
st = wide.find('h4',attrs={'class':'section-no-arrow'})
|
||||
if st:
|
||||
strest.insert(0,st)
|
||||
count = 0
|
||||
for item in strest:
|
||||
for item in allsections:
|
||||
count = count + 1
|
||||
if self.test and count > 2:
|
||||
return feeds
|
||||
ftitle = self.tag_to_string(item)
|
||||
fitem = item.h3
|
||||
if not fitem:
|
||||
fitem = item.h4
|
||||
ftitle = self.tag_to_string(fitem)
|
||||
self.report_progress(0, _('Fetching feed')+' %s...'%(ftitle))
|
||||
feedarts = self.get_artlinks(item.parent.ul)
|
||||
feedarts = self.get_artlinks(item.ul)
|
||||
feeds.append((ftitle,feedarts))
|
||||
return feeds
|
||||
|
||||
@ -164,8 +170,8 @@ class FinancialTimes(BasicNewsRecipe):
|
||||
except:
|
||||
print "Retrying download..."
|
||||
count += 1
|
||||
self.temp_files.append(PersistentTemporaryFile('_fa.html'))
|
||||
self.temp_files[-1].write(html)
|
||||
self.temp_files[-1].close()
|
||||
return self.temp_files[-1].name
|
||||
|
||||
tfile = PersistentTemporaryFile('_fa.html')
|
||||
tfile.write(html)
|
||||
tfile.close()
|
||||
self.temp_files.append(tfile)
|
||||
return tfile.name
|
||||
|
@ -6,40 +6,19 @@ www.foreignpolicy.com
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class ForeignPolicy(BasicNewsRecipe):
|
||||
title = 'Foreign Policy'
|
||||
class AdvancedUserRecipe1349086293(BasicNewsRecipe):
|
||||
title = u'Foreign Policy'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'International News'
|
||||
publisher = 'Washingtonpost.Newsweek Interactive, LLC'
|
||||
category = 'news, politics, USA'
|
||||
oldest_article = 31
|
||||
max_articles_per_feed = 200
|
||||
no_stylesheets = True
|
||||
encoding = 'utf8'
|
||||
use_embedded_content = False
|
||||
language = 'en'
|
||||
remove_empty_feeds = True
|
||||
extra_css = ' body{font-family: Georgia,"Times New Roman",Times,serif } img{margin-bottom: 0.4em} h1,h2,h3,h4,h5,h6{font-family: Arial,Helvetica,sans-serif} '
|
||||
auto_cleanup = True
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher' : publisher
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
keep_only_tags = [dict(attrs={'id':['art-mast','art-body','auth-bio']})]
|
||||
remove_tags = [dict(name='iframe'),dict(attrs={'id':['share-box','base-ad']})]
|
||||
remove_attributes = ['height','width']
|
||||
|
||||
|
||||
feeds = [(u'Articles', u'http://www.foreignpolicy.com/node/feed')]
|
||||
feeds = [(u'Foreign_Policy', u'http://www.foreignpolicy.com/node/feed')]
|
||||
|
||||
def print_version(self, url):
|
||||
return url + '?print=yes&page=full'
|
||||
return url + '?print=yes&hidecomments=yes&page=full'
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
return soup
|
||||
|
||||
|
@ -1,6 +1,4 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
from calibre.ebooks.BeautifulSoup import Tag
|
||||
import re
|
||||
|
||||
class NatureNews(BasicNewsRecipe):
|
||||
title = u'Nature News'
|
||||
@ -11,23 +9,8 @@ class NatureNews(BasicNewsRecipe):
|
||||
max_articles_per_feed = 50
|
||||
|
||||
no_stylesheets = True
|
||||
keep_only_tags = [dict(name='div', attrs={'id':'content'})]
|
||||
# remove_tags_before = dict(name='h1', attrs={'class':'heading entry-title'})
|
||||
# remove_tags_after = dict(name='h2', attrs={'id':'comments'})
|
||||
remove_tags = [
|
||||
dict(name='h2', attrs={'id':'comments'}),
|
||||
dict(attrs={'alt':'Advertisement'}),
|
||||
dict(name='div', attrs={'class':'ad'}),
|
||||
dict(attrs={'class':'Z3988'}),
|
||||
dict(attrs={'class':['formatpublished','type-of-article','cleardiv','disclaimer','buttons','comments xoxo']}),
|
||||
dict(name='a', attrs={'href':'#comments'}),
|
||||
dict(name='h2',attrs={'class':'subheading plusicon icon-add-comment'})
|
||||
]
|
||||
|
||||
preprocess_regexps = [
|
||||
(re.compile(r'<p>ADVERTISEMENT</p>', re.DOTALL|re.IGNORECASE), lambda match: ''),
|
||||
]
|
||||
|
||||
use_embedded_content = False
|
||||
keep_only_tags = [dict(name='div', attrs={'id':'article'})]
|
||||
extra_css = '''
|
||||
.author { text-align: right; font-size: small; line-height:1em; margin-top:0px; margin-left:0; margin-right:0; margin-bottom: 0; }
|
||||
.imagedescription { font-size: small; font-style:italic; line-height:1em; margin-top:5px; margin-left:0; margin-right:0; margin-bottom: 0; }
|
||||
@ -36,51 +19,3 @@ class NatureNews(BasicNewsRecipe):
|
||||
|
||||
feeds = [('Nature News', 'http://feeds.nature.com/news/rss/most_recent')]
|
||||
|
||||
def preprocess_html(self,soup):
|
||||
# The author name is slightly buried - dig it up
|
||||
author = soup.find('p', {'class':'byline'})
|
||||
if author:
|
||||
# Find out the author's name
|
||||
authornamediv = author.find('span',{'class':'author fn'})
|
||||
authornamelink = authornamediv.find('a')
|
||||
if authornamelink:
|
||||
authorname = authornamelink.contents[0]
|
||||
else:
|
||||
authorname = authornamediv.contents[0]
|
||||
# Stick the author's name in the byline tag
|
||||
tag = Tag(soup,'div')
|
||||
tag['class'] = 'author'
|
||||
tag.insert(0,authorname.strip())
|
||||
author.replaceWith(tag)
|
||||
|
||||
# Change the intro from a p to a div
|
||||
intro = soup.find('p',{'class':'intro'})
|
||||
if intro:
|
||||
tag = Tag(soup,'div')
|
||||
tag['class'] = 'intro'
|
||||
tag.insert(0,intro.contents[0])
|
||||
intro.replaceWith(tag)
|
||||
|
||||
# Change span class=imagedescription to div
|
||||
descr = soup.find('span',{'class':'imagedescription'})
|
||||
if descr:
|
||||
tag = Tag(soup,'div')
|
||||
tag['class'] = 'imagedescription'
|
||||
tag.insert(0,descr.renderContents())
|
||||
descr.replaceWith(tag)
|
||||
|
||||
# The references are in a list, let's make them simpler
|
||||
reflistcont = soup.find('ul',{'id':'article-refrences'})
|
||||
if reflistcont:
|
||||
reflist = reflistcont.li.renderContents()
|
||||
tag = Tag(soup,'div')
|
||||
tag['class'] = 'article-references'
|
||||
tag.insert(0,reflist)
|
||||
reflistcont.replaceWith(tag)
|
||||
|
||||
# Within the id=content div, we need to remove all the stuff after the end of the class=entry-content
|
||||
entrycontent = soup.find('div',{'class':'entry-content'})
|
||||
for nextSibling in entrycontent.findNextSiblings():
|
||||
nextSibling.extract()
|
||||
|
||||
return soup
|
||||
|
87
recipes/history_today.recipe
Normal file
@ -0,0 +1,87 @@
|
||||
import re
|
||||
from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||
from collections import OrderedDict
|
||||
|
||||
class HistoryToday(BasicNewsRecipe):
|
||||
|
||||
title = 'History Today'
|
||||
__author__ = 'Rick Shang'
|
||||
|
||||
description = 'UK-based magazine, publishing articles and book reviews covering all types and periods of history.'
|
||||
language = 'en'
|
||||
category = 'news'
|
||||
encoding = 'UTF-8'
|
||||
|
||||
remove_tags = [dict(name='div',attrs={'class':['print-logo','print-site_name','print-breadcrumb']}),
|
||||
dict(name='div', attrs={'id':['ht-tools','ht-tools2','ht-tags']})]
|
||||
no_javascript = True
|
||||
no_stylesheets = True
|
||||
|
||||
|
||||
needs_subscription = True
|
||||
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
if self.username is not None and self.password is not None:
|
||||
br.open('http://www.historytoday.com/user/login')
|
||||
br.select_form(nr=1)
|
||||
br['name'] = self.username
|
||||
br['pass'] = self.password
|
||||
res = br.submit()
|
||||
raw = res.read()
|
||||
if 'Session limit exceeded' in raw:
|
||||
br.select_form(nr=1)
|
||||
control=br.find_control('sid').items[1]
|
||||
sid = []
|
||||
br['sid']=sid.join(control)
|
||||
br.submit()
|
||||
return br
|
||||
|
||||
def parse_index(self):
|
||||
|
||||
#Find date
|
||||
soup0 = self.index_to_soup('http://www.historytoday.com/')
|
||||
dates = self.tag_to_string(soup0.find('div',attrs={'id':'block-block-226'}).span)
|
||||
self.timefmt = u' [%s]'%dates
|
||||
|
||||
#Go to issue
|
||||
soup = self.index_to_soup('http://www.historytoday.com/contents')
|
||||
cover = soup.find('div',attrs={'id':'content-area'}).find('img')['src']
|
||||
self.cover_url=cover
|
||||
|
||||
#Go to the main body
|
||||
|
||||
div = soup.find ('div', attrs={'class':'region region-content-bottom'})
|
||||
|
||||
feeds = OrderedDict()
|
||||
section_title = ''
|
||||
for section in div.findAll('div', attrs={'id':re.compile("block\-views\-contents.*")}):
|
||||
section_title = self.tag_to_string(section.find('h2',attrs={'class':'title'}))
|
||||
sectionbody=section.find('div', attrs={'class':'view-content'})
|
||||
for article in sectionbody.findAll('div',attrs={'class':re.compile("views\-row.*")}):
|
||||
articles = []
|
||||
subarticle = []
|
||||
subarticle = article.findAll('div')
|
||||
if len(subarticle) < 2:
|
||||
continue
|
||||
title=self.tag_to_string(subarticle[0])
|
||||
originalurl="http://www.historytoday.com" + subarticle[0].span.a['href'].strip()
|
||||
originalpage=self.index_to_soup(originalurl)
|
||||
printurl=originalpage.find('div',attrs = {'id':'ht-tools'}).a['href'].strip()
|
||||
url="http://www.historytoday.com" + printurl
|
||||
desc=self.tag_to_string(subarticle[1])
|
||||
articles.append({'title':title, 'url':url, 'description':desc, 'date':''})
|
||||
|
||||
if articles:
|
||||
if section_title not in feeds:
|
||||
feeds[section_title] = []
|
||||
feeds[section_title] += articles
|
||||
|
||||
|
||||
ans = [(key, val) for key, val in feeds.iteritems()]
|
||||
return ans
|
||||
|
||||
|
||||
def cleanup(self):
|
||||
self.browser.open('http://www.historytoday.com/logout')
|
||||
|
@ -13,11 +13,12 @@ class HoustonChronicle(BasicNewsRecipe):
|
||||
no_stylesheets = True
|
||||
use_embedded_content = False
|
||||
remove_attributes = ['style']
|
||||
auto_cleanup = True
|
||||
|
||||
oldest_article = 2.0
|
||||
oldest_article = 3.0
|
||||
|
||||
keep_only_tags = {'class':lambda x: x and ('hst-articletitle' in x or
|
||||
'hst-articletext' in x or 'hst-galleryitem' in x)}
|
||||
#keep_only_tags = {'class':lambda x: x and ('hst-articletitle' in x or
|
||||
#'hst-articletext' in x or 'hst-galleryitem' in x)}
|
||||
remove_attributes = ['xmlns']
|
||||
|
||||
feeds = [
|
||||
@ -37,3 +38,4 @@ class HoustonChronicle(BasicNewsRecipe):
|
||||
]
|
||||
|
||||
|
||||
|
||||
|
BIN
recipes/icons/automatiseringgids.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
recipes/icons/ciperchile.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
recipes/icons/fc_knudde.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
recipes/icons/fokkeensukke.png
Normal file
After Width: | Height: | Size: 55 KiB |
BIN
recipes/icons/monitor.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
recipes/icons/nsfw_corp.png
Normal file
After Width: | Height: | Size: 977 B |
BIN
recipes/icons/stamgasten.png
Normal file
After Width: | Height: | Size: 639 B |
BIN
recipes/icons/tweakers_net.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
recipes/icons/vrijnederland.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
@ -1,21 +1,24 @@
|
||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Index(BasicNewsRecipe):
|
||||
|
||||
title = u'INDEX.HU'
|
||||
oldest_article = 3
|
||||
max_articles_per_feed = 50
|
||||
class AdvancedUserRecipe1348151548(BasicNewsRecipe):
|
||||
title = u'Index.hu'
|
||||
__author__ = 'laca'
|
||||
oldest_article = 2
|
||||
language = 'hu'
|
||||
masthead_url = 'http://index.hu/assets/images/index_logo.gif'
|
||||
auto_cleanup = True
|
||||
|
||||
__author__ = 'Ezmegaz'
|
||||
|
||||
feeds = [(u'ALL', u'http://index.hu/24ora/rss/'),
|
||||
(u'BELF\xd6LD', u'http://index.hu/belfold/rss/default/'),
|
||||
(u'K\xdcLF\xd6LD', u'http://index.hu/kulfold/rss/default/'),
|
||||
(u'BULV\xc1R', u'http://index.hu/bulvar/rss/default/'),
|
||||
(u'GAZDAS\xc1G', u'http://index.hu/gazdasag/rss/default/'),
|
||||
(u'TECH', u'http://index.hu/tech/rss/main/'),
|
||||
(u'KULT\xdaRA', u'http://index.hu/kultur/rss/main/'),
|
||||
(u'TUDOM\xc1NY', u'http://index.hu/tudomany/rss/main/'),
|
||||
(u'V\xc9LEM\xc9NY', u'http://index.hu/velemeny/rss/default/')]
|
||||
simultaneous_downloads= 1
|
||||
max_articles_per_feed = 50
|
||||
|
||||
feeds = [(u'Belföld', u'http://index.hu/belfold/rss/'),
|
||||
(u'Külföld', u'http://index.hu/kulfold/rss/'),
|
||||
(u'Gazdaság', u'http://index.hu/gazdasag/rss/'),
|
||||
(u'Tech', u'http://index.hu/tech/rss/'),
|
||||
(u'Tudomány', u'http://index.hu/tudomany/rss/'),
|
||||
(u'Kultúr', u'http://index.hu/kultur/rss/'),
|
||||
(u'Sport Géza', u'http://sportgeza.hu/24ora/rss/'),
|
||||
(u'Vélemény', u'http://index.hu/velemeny/rss/'),
|
||||
(u'Velvet', u'http://velvet.hu/24ora/rss/'),
|
||||
(u'Totalcar', u'http://totalcar.hu/24ora/rss/'),
|
||||
(u'Dívány', u'http://divany.hu/24ora/rss/')]
|
||||
|
@ -13,9 +13,13 @@ class IndianExpress(BasicNewsRecipe):
|
||||
#remove_tags_after = dict(name='td', attrs={'class':'newptool1'})
|
||||
remove_tags = [
|
||||
dict(name='iframe'),
|
||||
dict(name='div', attrs={'class':['bookmarks_div', 'comment_box', 'bookmarks_div_bot', 'box']}),
|
||||
dict(name='div', attrs={'id':['footer', 'tab_innerhc', 'discussion', 'google_new']}),
|
||||
dict(name='div', attrs={'class':['pagination_new', 'comments_desc',
|
||||
'commenttext', 'postcomm', 'content_right', 'bookmarks_div',
|
||||
'comment_box', 'bookmarks_div_bot', 'box']}),
|
||||
dict(name='div', attrs={'id':['footer', 'tab_innerhc', 'discussion',
|
||||
'google_new', 'header_new', 'slidebox']}),
|
||||
dict(name='a', attrs={'class':'nobdr'}),
|
||||
dict(name='h3', attrs={'class':['readcomm']}),
|
||||
#dict(name='span', text=':'),
|
||||
]
|
||||
|
||||
|
@ -9,7 +9,7 @@ from calibre.web.feeds.recipes import BasicNewsRecipe
|
||||
class LeMonde(BasicNewsRecipe):
|
||||
title = 'Le Monde'
|
||||
__author__ = 'veezh'
|
||||
description = 'Actualités'
|
||||
description = u'Actualités'
|
||||
oldest_article = 1
|
||||
max_articles_per_feed = 100
|
||||
no_stylesheets = True
|
||||
|
132
recipes/le_monde_sub.recipe
Normal file
@ -0,0 +1,132 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2012, Rémi Vanicat <vanicat at debian.org>'
|
||||
'''
|
||||
Lemonde.fr: Version abonnée
|
||||
'''
|
||||
|
||||
|
||||
import os, zipfile, re, time
|
||||
|
||||
from calibre import strftime
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
from calibre.ebooks.BeautifulSoup import BeautifulSoup
|
||||
from calibre.ptempfile import PersistentTemporaryFile
|
||||
|
||||
class LeMondeAbonne(BasicNewsRecipe):
|
||||
|
||||
title = u'Le Monde: Édition abonnés'
|
||||
__author__ = u'Rémi Vanicat'
|
||||
description = u'Actualités'
|
||||
category = u'Actualités, France, Monde'
|
||||
language = 'fr'
|
||||
needs_subscription = True
|
||||
|
||||
no_stylesheets = True
|
||||
|
||||
extra_css = u'''
|
||||
h1{font-size:130%;}
|
||||
.ariane{font-size:xx-small;}
|
||||
.source{font-size:xx-small;}
|
||||
.href{font-size:xx-small;}
|
||||
.LM_caption{color:#666666; font-size:x-small;}
|
||||
.main-article-info{font-family:Arial,Helvetica,sans-serif;}
|
||||
#full-contents{font-size:small; font-family:Arial,Helvetica,sans-serif;font-weight:normal;}
|
||||
#match-stats-summary{font-size:small; font-family:Arial,Helvetica,sans-serif;font-weight:normal;}
|
||||
'''
|
||||
|
||||
zipurl_format = 'http://medias.lemonde.fr/abonnes/editionelectronique/%Y%m%d/html/%y%m%d.zip'
|
||||
coverurl_format = '/img/%y%m%d01.jpg'
|
||||
path_format = "%y%m%d"
|
||||
login_url = 'http://www.lemonde.fr/web/journal_electronique/identification/1,56-0,45-0,0.html'
|
||||
|
||||
keep_only_tags = [ dict(name="div", attrs={ 'class': 'po-prti' }), dict(name=['h1']), dict(name='div', attrs={ 'class': 'photo' }), dict(name='div', attrs={ 'class': 'po-ti2' }), dict(name='div', attrs={ 'class': 'ar-txt' }), dict(name='div', attrs={ 'class': 'po_rtcol' }) ]
|
||||
|
||||
article_id_pattern = re.compile("[0-9]+\\.html")
|
||||
article_url_format = 'http://www.lemonde.fr/journalelectronique/donnees/protege/%Y%m%d/html/'
|
||||
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
if self.username is not None and self.password is not None:
|
||||
br.open(self.login_url)
|
||||
br.select_form(nr=0)
|
||||
br['login'] = self.username
|
||||
br['password'] = self.password
|
||||
br.submit()
|
||||
return br
|
||||
|
||||
decalage = 24 * 60 * 60 # today Monde has tomorow date
|
||||
|
||||
def get_cover_url(self):
|
||||
url = time.strftime(self.coverurl_format, self.ltime)
|
||||
return self.articles_path + url
|
||||
|
||||
def parse_index(self):
|
||||
browser = self.get_browser()
|
||||
|
||||
second = time.time()
|
||||
second += self.decalage
|
||||
ltime = self.ltime = time.gmtime(second)
|
||||
url = time.strftime(self.zipurl_format, ltime)
|
||||
|
||||
self.timefmt=strftime(" %A %d %B %Y", ltime)
|
||||
|
||||
response = browser.open(url)
|
||||
|
||||
tmp = PersistentTemporaryFile(suffix='.zip')
|
||||
self.report_progress(0.1,_('downloading zip file'))
|
||||
tmp.write(response.read())
|
||||
tmp.close()
|
||||
|
||||
zfile = zipfile.ZipFile(tmp.name, 'r')
|
||||
self.report_progress(0.1,_('extracting zip file'))
|
||||
|
||||
zfile.extractall(self.output_dir)
|
||||
zfile.close()
|
||||
|
||||
path = os.path.join(self.output_dir, time.strftime(self.path_format, ltime), "data")
|
||||
|
||||
self.articles_path = path
|
||||
|
||||
files = os.listdir(path)
|
||||
|
||||
nb_index_files = len([ name for name in files if re.match("frame_gauche_[0-9]+.html", name) ])
|
||||
|
||||
flux = []
|
||||
|
||||
article_url = time.strftime(self.article_url_format, ltime)
|
||||
|
||||
for i in range(nb_index_files):
|
||||
filename = os.path.join(path, "selection_%d.html" % (i + 1))
|
||||
tmp = open(filename,'r')
|
||||
soup=BeautifulSoup(tmp)
|
||||
title=soup.find('span').contents[0]
|
||||
tmp.close()
|
||||
|
||||
filename = os.path.join(path, "frame_gauche_%d.html" % (i + 1))
|
||||
tmp = open(filename,'r')
|
||||
soup = BeautifulSoup(tmp)
|
||||
articles = []
|
||||
for link in soup.findAll("a"):
|
||||
article_file = link['href']
|
||||
article_id=self.article_id_pattern.search(article_file).group()
|
||||
article = {
|
||||
'title': link.contents[0],
|
||||
'url': article_url + article_id,
|
||||
'descripion': '',
|
||||
'content': ''
|
||||
}
|
||||
articles.append(article)
|
||||
tmp.close()
|
||||
|
||||
flux.append((title, articles))
|
||||
|
||||
return flux
|
||||
|
||||
|
||||
|
||||
# Local Variables:
|
||||
# mode: python
|
||||
# End:
|
||||
|
@ -7,20 +7,29 @@ class LiveMint(BasicNewsRecipe):
|
||||
#encoding = 'cp1252'
|
||||
oldest_article = 1 #days
|
||||
max_articles_per_feed = 25
|
||||
use_embedded_content = True
|
||||
use_embedded_content = False
|
||||
|
||||
no_stylesheets = True
|
||||
auto_cleanup = True
|
||||
|
||||
|
||||
feeds = [
|
||||
('Latest News',
|
||||
'http://www.livemint.com/StoryRss.aspx?LN=Latestnews'),
|
||||
('Gallery',
|
||||
'http://www.livemint.com/GalleryRssfeed.aspx'),
|
||||
('Companies',
|
||||
'http://www.livemint.com/rss/companies'),
|
||||
('Consumer',
|
||||
'http://www.livemint.com/rss/consumer'),
|
||||
('Top Stories',
|
||||
'http://www.livemint.com/StoryRss.aspx?ts=Topstories'),
|
||||
('Banking',
|
||||
'http://www.livemint.com/StoryRss.aspx?Id=104'),
|
||||
'http://www.livemint.com/rss/homepage'),
|
||||
('Opinion',
|
||||
'http://www.livemint.com/rss/opinion'),
|
||||
('Money',
|
||||
'http://www.livemint.com/rss/money'),
|
||||
('Industry',
|
||||
'http://www.livemint.com/rss/industry'),
|
||||
('Economy Politics',
|
||||
'http://www.livemint.com/rss/economy_politics'),
|
||||
('Lounge',
|
||||
'http://www.livemint.com/rss/lounge'),
|
||||
]
|
||||
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
lrb.co.uk
|
||||
'''
|
||||
import re
|
||||
from calibre import strftime
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class LondonReviewOfBooksPayed(BasicNewsRecipe):
|
||||
title = 'London Review of Books'
|
||||
__author__ = 'Darko Miletic'
|
||||
__author__ = 'Rich Shang, Darko Miletic'
|
||||
description = 'Subscription content. Literary review publishing essay-length book reviews and topical articles on politics, literature, history, philosophy, science and the arts by leading writers and thinkers'
|
||||
category = 'news, literature, UK'
|
||||
publisher = 'LRB Ltd.'
|
||||
@ -41,9 +41,12 @@ class LondonReviewOfBooksPayed(BasicNewsRecipe):
|
||||
articles = []
|
||||
soup = self.index_to_soup(self.INDEX)
|
||||
cover_item = soup.find('p',attrs={'class':'cover'})
|
||||
dates = str(soup.find('span', attrs={'class':'coverdate'}))
|
||||
newdates = re.sub('\<.*\>','',re.split('<br />',dates)[1])
|
||||
self.timefmt = ' [%s]'%newdates
|
||||
lrbtitle = self.title
|
||||
if cover_item:
|
||||
self.cover_url = self.INDEX + cover_item.a.img['src']
|
||||
self.cover_url = re.sub('/m/','/l/',cover_item.a.img['src'])
|
||||
content = self.INDEX + cover_item.a['href']
|
||||
soup2 = self.index_to_soup(content)
|
||||
sitem = soup2.find(attrs={'class':'article-list'})
|
||||
@ -54,7 +57,14 @@ class LondonReviewOfBooksPayed(BasicNewsRecipe):
|
||||
feed_link = item
|
||||
if feed_link.has_key('href'):
|
||||
url = self.INDEX + feed_link['href']
|
||||
title_link = re.split('<br />',str(feed_link))
|
||||
if len (title_link) > 1:
|
||||
title = title_prefix + re.sub('\<.*\>','',title_link[0]) + ' - ' + re.sub('\<.*\>','',title_link[1])
|
||||
else:
|
||||
title = title_prefix + self.tag_to_string(feed_link)
|
||||
desc = item.findNext('li')
|
||||
if desc is not None and desc.find('cite') is not None and desc.find('ul') is None:
|
||||
description=self.tag_to_string(desc)
|
||||
date = strftime(self.timefmt)
|
||||
articles.append({
|
||||
'title' :title
|
||||
|
@ -34,20 +34,21 @@ class macWorld(BasicNewsRecipe):
|
||||
|
||||
remove_javascript = True
|
||||
no_stylesheets = True
|
||||
auto_cleanup = True
|
||||
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'id':'content'})
|
||||
]
|
||||
#keep_only_tags = [
|
||||
#dict(name='div', attrs={'id':'content'})
|
||||
#]
|
||||
|
||||
remove_tags = [
|
||||
{'class':['toolBar','mac_tags','toolBar btmTools','textAds']},
|
||||
dict(name='p', attrs={'class':'breadcrumbs'}),
|
||||
dict(id=['breadcrumb','sidebar','comments','topContentWrapper',
|
||||
'rightColumn', 'aboveFootPromo', 'storyCarousel']),
|
||||
{'class':lambda x: x and ('tools' in x or 'toolBar'
|
||||
in x)}
|
||||
#remove_tags = [
|
||||
#{'class':['toolBar','mac_tags','toolBar btmTools','textAds']},
|
||||
#dict(name='p', attrs={'class':'breadcrumbs'}),
|
||||
#dict(id=['breadcrumb','sidebar','comments','topContentWrapper',
|
||||
#'rightColumn', 'aboveFootPromo', 'storyCarousel']),
|
||||
#{'class':lambda x: x and ('tools' in x or 'toolBar'
|
||||
#in x)}
|
||||
|
||||
]
|
||||
#]
|
||||
|
||||
feeds = [
|
||||
(u'MacWorld Headlines', u'http://rss.macworld.com/macworld/news'),
|
||||
@ -82,3 +83,4 @@ class macWorld(BasicNewsRecipe):
|
||||
.articleInfo {color:#4D4D4D;font-family:Arial,Helvetica,sans-serif;font-size:10px; font-size-adjust:none; font-stretch:normal; font-style:bold; font-variant:normal; font-weight:bold; line-height:10px; text-decoration:none;}
|
||||
img {align:left;}
|
||||
'''
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
from calibre.ptempfile import PersistentTemporaryFile
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class AdvancedUserRecipe1276930924(BasicNewsRecipe):
|
||||
@ -14,30 +13,30 @@ class AdvancedUserRecipe1276930924(BasicNewsRecipe):
|
||||
use_embedded_content = False
|
||||
no_stylesheets = True
|
||||
language = 'en'
|
||||
temp_files = []
|
||||
articles_are_obfuscated = True
|
||||
feeds = [(u'News', u'http://www.maximumpc.com/articles/4/feed'),
|
||||
auto_cleanup = True
|
||||
feeds = [#(u'News', u'http://www.maximumpc.com/articles/all/feed'),
|
||||
(u'News', u'http://www.maximumpc.com/articles/4/feed'),
|
||||
(u'Reviews', u'http://www.maximumpc.com/articles/40/feed'),
|
||||
(u'Editors Blog', u'http://www.maximumpc.com/articles/6/feed'),
|
||||
(u'How-to', u'http://www.maximumpc.com/articles/32/feed'),
|
||||
(u'Features', u'http://www.maximumpc.com/articles/31/feed'),
|
||||
(u'From the Magazine', u'http://www.maximumpc.com/articles/72/feed')
|
||||
]
|
||||
keep_only_tags = [
|
||||
dict(name='div', attrs={'class':['print-title','article_body']}),
|
||||
]
|
||||
remove_tags = [
|
||||
dict(name='div', attrs={'class':'comments-tags-actions'}),
|
||||
]
|
||||
remove_tags_before = dict(name='div', attrs={'class':'print-title'})
|
||||
remove_tags_after = dict(name='div', attrs={'class':'meta-content'})
|
||||
#keep_only_tags = [
|
||||
#dict(name='div', attrs={'class':['print-title','article_body']}),
|
||||
#]
|
||||
#remove_tags = [
|
||||
#dict(name='div', attrs={'class':'comments-tags-actions'}),
|
||||
#]
|
||||
#remove_tags_before = dict(name='div', attrs={'class':'print-title'})
|
||||
#remove_tags_after = dict(name='div', attrs={'class':'meta-content'})
|
||||
|
||||
def get_obfuscated_article(self, url):
|
||||
br = self.get_browser()
|
||||
br.open(url)
|
||||
response = br.follow_link(url_regex = r'/print/[0-9]+', nr = 0)
|
||||
html = response.read()
|
||||
self.temp_files.append(PersistentTemporaryFile('_fa.html'))
|
||||
self.temp_files[-1].write(html)
|
||||
self.temp_files[-1].close()
|
||||
return self.temp_files[-1].name
|
||||
#def get_obfuscated_article(self, url):
|
||||
#br = self.get_browser()
|
||||
#br.open(url)
|
||||
#response = br.follow_link(url_regex = r'/print/[0-9]+', nr = 0)
|
||||
#html = response.read()
|
||||
#self.temp_files.append(PersistentTemporaryFile('_fa.html'))
|
||||
#self.temp_files[-1].write(html)
|
||||
#self.temp_files[-1].close()
|
||||
#return self.temp_files[-1].name
|
||||
|
@ -1,10 +1,10 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
||||
title = u'Metro UK'
|
||||
description = 'Author Dave Asbury : News as provide by The Metro -UK'
|
||||
description = 'Author Dave Asbury : News from The Metro - UK'
|
||||
#timefmt = ''
|
||||
__author__ = 'Dave Asbury'
|
||||
#last update 4/8/12
|
||||
#last update 9/9/12
|
||||
cover_url = 'http://profile.ak.fbcdn.net/hprofile-ak-snc4/276636_117118184990145_2132092232_n.jpg'
|
||||
no_stylesheets = True
|
||||
oldest_article = 1
|
||||
@ -17,7 +17,7 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
||||
language = 'en_GB'
|
||||
masthead_url = 'http://e-edition.metro.co.uk/images/metro_logo.gif'
|
||||
extra_css = '''
|
||||
h1{font-family:Arial,Helvetica,sans-serif; font-weight:bold;font-size:1.6em;}
|
||||
h1{font-family:Arial,Helvetica,sans-serif; font-weight:900;font-size:1.6em;}
|
||||
h2{font-family:Arial,Helvetica,sans-serif; font-weight:normal;font-size:1.2em;}
|
||||
p{font-family:Arial,Helvetica,sans-serif;font-size:1.0em;}
|
||||
body{font-family:Helvetica,Arial,sans-serif;font-size:1.0em;}
|
||||
@ -30,6 +30,7 @@ class AdvancedUserRecipe1306097511(BasicNewsRecipe):
|
||||
#dict(attrs={'class' : 'BText'}),
|
||||
]
|
||||
remove_tags = [
|
||||
dict(name='div',attrs={'class' : 'art-fd fd-gr1-b clrd'}),
|
||||
dict(name='span',attrs={'class' : 'share'}),
|
||||
dict(name='li'),
|
||||
dict(attrs={'class' : ['twitter-share-button','header-forms','hdr-lnks','close','art-rgt','fd-gr1-b clrd google-article','news m12 clrd clr-b p5t shareBtm','item-ds csl-3-img news','c-1of3 c-last','c-1of1','pd','item-ds csl-3-img sport']}),
|
||||
|
@ -1,99 +1,66 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2009, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2009-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
|
||||
'''
|
||||
monitorcg.com
|
||||
www.monitor.co.me
|
||||
'''
|
||||
|
||||
import re
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
from calibre.ebooks.BeautifulSoup import Tag
|
||||
|
||||
class MonitorCG(BasicNewsRecipe):
|
||||
title = 'Monitor online'
|
||||
title = 'MONITOR online'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'News from Montenegro'
|
||||
publisher = 'MONITOR d.o.o. Podgorica'
|
||||
description = 'Nezavisni nedjeljnik Monitor'
|
||||
publisher = '"Monitor" D.O.O. Podgorica'
|
||||
category = 'news, politics, Montenegro'
|
||||
oldest_article = 15
|
||||
max_articles_per_feed = 150
|
||||
no_stylesheets = True
|
||||
encoding = 'utf-8'
|
||||
auto_cleanup = False
|
||||
use_embedded_content = False
|
||||
language = 'sr'
|
||||
|
||||
lang ='sr-Latn-Me'
|
||||
INDEX = 'http://www.monitorcg.com'
|
||||
|
||||
extra_css = ' @font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)} body{font-family: serif1, serif} '
|
||||
remove_empty_feeds = True
|
||||
extra_css = """
|
||||
@font-face {font-family: "serif1";src:url(res:///opt/sony/ebook/FONT/tt0011m_.ttf)}
|
||||
@font-face {font-family: "sans1";src:url(res:///opt/sony/ebook/FONT/tt0003m_.ttf)}
|
||||
h2{font-family: Cambria,"Times New Roman",Times,serif1,serif}
|
||||
body{font-family: Arial,sans1,sans-serif}
|
||||
img{display: block}
|
||||
"""
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher' : publisher
|
||||
, 'language' : lang
|
||||
, 'pretty_print' : True
|
||||
, 'language' : language
|
||||
, 'pretty_print': True
|
||||
}
|
||||
|
||||
preprocess_regexps = [(re.compile(u'\u0110'), lambda match: u'\u00D0')]
|
||||
keep_only_tags = [dict(attrs={'class':['contentheading','article-meta','article-content']})]
|
||||
remove_attributes = ['width','height','font','border','align']
|
||||
|
||||
keep_only_tags = [dict(name='div', attrs={'id':'ja-current-content'})]
|
||||
|
||||
remove_tags = [ dict(name=['object','link','embed'])
|
||||
, dict(attrs={'class':['buttonheading','article-section']})]
|
||||
|
||||
remove_attributes = ['style','width','height','font','border','align']
|
||||
|
||||
def adeify_images2(cls, soup):
|
||||
for item in soup.findAll('img'):
|
||||
for attrib in ['height','width','border','align','style']:
|
||||
if item.has_key(attrib):
|
||||
del item[attrib]
|
||||
oldParent = item.parent
|
||||
if oldParent.name == 'a':
|
||||
oldParent.name == 'p'
|
||||
myIndex = oldParent.contents.index(item)
|
||||
brtag = Tag(soup,'br')
|
||||
oldParent.insert(myIndex+1,brtag)
|
||||
return soup
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
soup.html['xml:lang'] = self.lang
|
||||
soup.html['lang'] = self.lang
|
||||
mlang = Tag(soup,'meta',[("http-equiv","Content-Language"),("content",self.lang)])
|
||||
soup.html.insert(0,mlang)
|
||||
return self.adeify_images2(soup)
|
||||
|
||||
def parse_index(self):
|
||||
totalfeeds = []
|
||||
soup = self.index_to_soup(self.INDEX)
|
||||
cover_item = soup.find('div',attrs={'class':'ja-catslwi'})
|
||||
if cover_item:
|
||||
dt = cover_item['onclick'].partition("location.href=")[2]
|
||||
curl = self.INDEX + dt.strip("'")
|
||||
lfeeds = [(u'Svi clanci', curl)]
|
||||
for feedobj in lfeeds:
|
||||
feedtitle, feedurl = feedobj
|
||||
self.report_progress(0, _('Fetching feed')+' %s...'%(feedtitle if feedtitle else feedurl))
|
||||
articles = []
|
||||
soup = self.index_to_soup(feedurl)
|
||||
contitem = soup.find('div',attrs={'class':'article-content'})
|
||||
if contitem:
|
||||
img = contitem.find('img')
|
||||
if img:
|
||||
self.cover_url = self.INDEX + img['src']
|
||||
for item in contitem.findAll('a'):
|
||||
url = self.INDEX + item['href']
|
||||
title = self.tag_to_string(item)
|
||||
articles.append({
|
||||
'title' :title
|
||||
,'date' :''
|
||||
,'url' :url
|
||||
,'description':''
|
||||
})
|
||||
totalfeeds.append((feedtitle, articles))
|
||||
return totalfeeds
|
||||
|
||||
feeds = [
|
||||
(u'Danas, Sjutra' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=5&Itemid=27&format=feed&type=rss')
|
||||
,(u'Duhankesa' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=13&Itemid=37&format=feed&type=rss')
|
||||
,(u'Znaci prepoznavanja', u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=6&Itemid=358&format=feed&type=rss')
|
||||
,(u'Paralele' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=8&Itemid=359&format=feed&type=rss')
|
||||
,(u'Razbijeno ogledalo' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=18&Itemid=354&format=feed&type=rss')
|
||||
,(u'Tržište' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=26&Itemid=371&format=feed&type=rss')
|
||||
,(u'Feljton' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=29&Itemid=471&format=feed&type=rss')
|
||||
,(u'Monitor' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=1&Itemid=1852&format=feed&type=rss')
|
||||
,(u'Altervizija' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=31&Itemid=2623&format=feed&type=rss')
|
||||
,(u'Fenomeni' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=35&Itemid=3549&format=feed&type=rss')
|
||||
,(u'Fokus' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=19&Itemid=252&format=feed&type=rss')
|
||||
,(u'Monitoring' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=19&Itemid=252&format=feed&type=rss')
|
||||
,(u'Profil' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=21&Itemid=256&format=feed&type=rss')
|
||||
,(u'Intervju' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=27&Itemid=404&format=feed&type=rss')
|
||||
,(u'Društvo' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=14&Itemid=2&format=feed&type=rss')
|
||||
,(u'Region' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=12&Itemid=53&format=feed&type=rss')
|
||||
,(u'Svijet' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=11&Itemid=360&format=feed&type=rss')
|
||||
,(u'Kultura' , u'http://www.monitor.co.me/index.php?option=com_content&view=section&layout=blog&id=9&Itemid=361&format=feed&type=rss')
|
||||
]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008-2011, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2008-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
www.nin.co.rs
|
||||
'''
|
||||
@ -15,11 +15,11 @@ class Nin(BasicNewsRecipe):
|
||||
publisher = 'NIN d.o.o. - Ringier d.o.o.'
|
||||
category = 'news, politics, Serbia'
|
||||
no_stylesheets = True
|
||||
delay = 1
|
||||
oldest_article = 15
|
||||
encoding = 'utf-8'
|
||||
needs_subscription = True
|
||||
remove_empty_feeds = True
|
||||
auto_cleanup = False
|
||||
PREFIX = 'http://www.nin.co.rs'
|
||||
INDEX = PREFIX + '/?change_lang=ls'
|
||||
use_embedded_content = False
|
||||
@ -63,7 +63,11 @@ class Nin(BasicNewsRecipe):
|
||||
keep_only_tags =[dict(name='td', attrs={'width':'520'})]
|
||||
remove_tags_before =dict(name='span', attrs={'class':'izjava'})
|
||||
remove_tags_after =dict(name='html')
|
||||
remove_tags = [dict(name=['object','link','iframe','meta','base'])]
|
||||
remove_tags = [
|
||||
dict(name=['object','link','iframe','meta','base'])
|
||||
,dict(attrs={'class':['fb-like','twitter-share-button']})
|
||||
,dict(attrs={'rel':'nofollow'})
|
||||
]
|
||||
remove_attributes=['border','background','height','width','align','valign']
|
||||
|
||||
def get_cover_url(self):
|
||||
@ -78,10 +82,6 @@ class Nin(BasicNewsRecipe):
|
||||
|
||||
feeds = [(u'NIN Online', u'http://www.nin.co.rs/misc/rss.php?feed=RSS2.0')]
|
||||
|
||||
def get_article_url(self, article):
|
||||
url = BasicNewsRecipe.get_article_url(self, article)
|
||||
return url.replace('.co.yu', '.co.rs')
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
@ -99,4 +99,3 @@ class Nin(BasicNewsRecipe):
|
||||
img.extract()
|
||||
tbl.replaceWith(img)
|
||||
return soup
|
||||
|
||||
|
94
recipes/nsfw_corp.recipe
Normal file
@ -0,0 +1,94 @@
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
www.nsfwcorp.com
|
||||
'''
|
||||
|
||||
import urllib
|
||||
from calibre import strftime
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class NotSafeForWork(BasicNewsRecipe):
|
||||
title = 'Not Safe For Work Corporation'
|
||||
__author__ = 'Darko Miletic'
|
||||
description = 'Not Safe For Work Corporation'
|
||||
publisher = 'Not Safe For Work Corporation'
|
||||
category = 'news, politics, USA, World'
|
||||
no_stylesheets = True
|
||||
oldest_article = 15
|
||||
encoding = 'utf-8'
|
||||
needs_subscription = True
|
||||
auto_cleanup = False
|
||||
INDEX = 'https://www.nsfwcorp.com'
|
||||
LOGIN = INDEX + '/login'
|
||||
use_embedded_content = False
|
||||
language = 'en'
|
||||
publication_type = 'magazine'
|
||||
masthead_url = 'http://assets.nsfwcorp.com/media/headers/nsfw_banner.jpg'
|
||||
extra_css = """
|
||||
body{font-family: Constantia,"Lucida Bright",Lucidabright,"Lucida Serif",Lucida,"DejaVu Serif","Bitstream Vera Serif","Liberation Serif",Georgia,serif}
|
||||
img{margin-top:0.5em; margin-bottom: 0.7em; display: block}
|
||||
.fontFace{font-family: 'LeagueGothicRegular',Arial,sans-serif;}
|
||||
.dispatchTitle{text-transform: uppercase; font-size: x-large; font-weight: bold}
|
||||
.dispatchSubtitle{font-size: x-large; font-weight: bold}
|
||||
#fromLine{color: gray; text-align:right}
|
||||
#toLine{color: gray}
|
||||
#toLine a{color: red}
|
||||
#fromLine a{color: red}
|
||||
.row a{color: red}
|
||||
"""
|
||||
|
||||
conversion_options = {
|
||||
'comment' : description
|
||||
, 'tags' : category
|
||||
, 'publisher' : publisher
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
remove_tags_before = dict(attrs={'id':'fromToLine'})
|
||||
remove_tags_after = dict(attrs={'id':'unlockButtonDiv'})
|
||||
remove_tags=[
|
||||
dict(name=['meta', 'link', 'iframe', 'embed', 'object'])
|
||||
,dict(name='a', attrs={'class':'switchToDeskNotes'})
|
||||
,dict(attrs={'id':'unlockButtonDiv'})
|
||||
]
|
||||
remove_attributes = ['lang']
|
||||
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
br.open(self.LOGIN)
|
||||
if self.username is not None and self.password is not None:
|
||||
data = urllib.urlencode({ 'email':self.username
|
||||
,'password':self.password
|
||||
})
|
||||
br.open(self.LOGIN, data)
|
||||
return br
|
||||
|
||||
def parse_index(self):
|
||||
articles = []
|
||||
soup = self.index_to_soup(self.INDEX)
|
||||
dispatches = soup.find(attrs={'id':'dispatches'})
|
||||
if dispatches:
|
||||
for item in dispatches.findAll('h3'):
|
||||
description = u''
|
||||
title_link = item.find('span', attrs={'class':'dispatchTitle'})
|
||||
description_link = item.find('span', attrs={'class':'dispatchSubtitle'})
|
||||
feed_link = item.find('a', href=True)
|
||||
if feed_link:
|
||||
url = self.INDEX + feed_link['href']
|
||||
title = self.tag_to_string(title_link)
|
||||
description = self.tag_to_string(description_link)
|
||||
date = strftime(self.timefmt)
|
||||
articles.append({
|
||||
'title' :title
|
||||
,'date' :date
|
||||
,'url' :url
|
||||
,'description':description
|
||||
})
|
||||
return [('Dispatches', articles)]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
return soup
|
29
recipes/origo_hu.recipe
Normal file
@ -0,0 +1,29 @@
|
||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
class AdvancedUserRecipe1348136299(BasicNewsRecipe):
|
||||
title = u'[origo]'
|
||||
oldest_article = 2
|
||||
language = 'hu'
|
||||
auto_cleanup = True
|
||||
|
||||
__author__ = 'laca'
|
||||
simultaneous_downloads= 1
|
||||
max_articles_per_feed = 50
|
||||
|
||||
feeds = [(u'Itthon', u'http://origo.hu/contentpartner/rss/itthon/origo.xml'),
|
||||
(u'Nagyvilág', u'http://origo.hu/contentpartner/rss/nagyvilag/origo.xml'),
|
||||
(u'Gazdaság', u'http://origo.hu/contentpartner/rss/uzletinegyed/origo.xml'),
|
||||
(u'Egészség', u'http://static2.origos.hu/contentpartner/rss/egeszseg/origo.xml'),
|
||||
(u'Tudomány', u'http://origo.hu/contentpartner/rss/tudomany/origo.xml'),
|
||||
(u'Techbázis', u'http://origo.hu/contentpartner/rss/techbazis/origo.xml'),
|
||||
(u'Szoftverbázis', u'http://www.szoftverbazis.hu/rss/index.xml'),
|
||||
(u'Sport', u'http://origo.hu/contentpartner/rss/sport/origo.xml'),
|
||||
(u'Szórakozás', u'http://origo.hu/contentpartner/rss/szorakozas/origo.xml'),
|
||||
(u'Időjárás', u'http://static1.origos.hu/contentpartner/rss/idojaras/origo.xml'),
|
||||
(u'Filmklub', u'http://origo.hu/contentpartner/rss/filmklub/origo.xml'),
|
||||
(u'Utazás', u'http://origo.hu/contentpartner/rss/utazas/origo.xml'),
|
||||
(u'Autó', u'http://origo.hu/contentpartner/rss/auto/origo.xml'),
|
||||
(u'Komment.hu', u'http://static5.origos.hu/contentpartner/rss/velemeny/origo.xml'),
|
||||
(u'365.hu', u'http://origo.hu/contentpartner/rss/365/origo.xml'),
|
||||
(u'Quart', u'http://www.quart.hu/contentpartner/rss/quart/origo.xml'),
|
||||
(u'Forma-1', u'http://www.f1hirek.hu/contentpartner/rss/f1hirek/f1hirek.xml')]
|
25
recipes/portfolio_hu.recipe
Normal file
@ -0,0 +1,25 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class AdvancedUserRecipe1348063712(BasicNewsRecipe):
|
||||
title = u'Portfolio.hu - English Edition'
|
||||
__author__ = 'laca'
|
||||
oldest_article = 7
|
||||
language = 'en_HUN'
|
||||
masthead_url = 'http://www.portfolio.hu/img/sit/angolfejlec2010.jpg'
|
||||
use_embedded_content = False
|
||||
auto_cleanup = True
|
||||
encoding = 'cp1252'
|
||||
|
||||
author = 'laca'
|
||||
simultaneous_downloads= 1
|
||||
max_articles_per_feed = 50
|
||||
|
||||
no_stylesheets = True
|
||||
|
||||
feeds = [(u'Equity news', u'http://www.portfolio.hu/en/rss/cikk/equity.xml'),
|
||||
(u'Economy news', u'http://www.portfolio.hu/en/rss/cikkek/economy.xml'),
|
||||
(u'FX&Fixed Income news', u'http://www.portfolio.hu/en/rss/cikkek/fx.xml'),
|
||||
(u'Tax news', u'http://www.portfolio.hu/en/rss/cikkek/tax.xml'),
|
||||
(u'Energy news', u'http://www.portfolio.hu/en/rss/cikkek/energy.xml'),
|
||||
(u'Corpfin news', u'http://www.portfolio.hu/en/rss/cikkek/corpfin.xml'),
|
||||
(u'MNB news', u'http://www.portfolio.hu/en/rss/cikkek/mnb.xml')]
|
23
recipes/portfolio_hu_hu.recipe
Normal file
@ -0,0 +1,23 @@
|
||||
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class AdvancedUserRecipe1348146838(BasicNewsRecipe):
|
||||
title = u'Portfolio.hu'
|
||||
__author__ = 'laca'
|
||||
oldest_article = 2
|
||||
language = 'hu'
|
||||
masthead_url = 'http://www.portfolio.hu/img/logo2010.gif'
|
||||
auto_cleanup = True
|
||||
|
||||
author = 'laca'
|
||||
simultaneous_downloads= 1
|
||||
max_articles_per_feed = 50
|
||||
|
||||
feeds = [(u'Makrogazdaság', u'http://www.portfolio.hu/rss/cikkek/makrogazdasag.xml'),
|
||||
(u'Vállalatok', u'http://www.portfolio.hu/rss/cikkek/vallalatok.xml'),
|
||||
(u'Tőzsdei hírek', u'http://www.portfolio.hu/rss/cikkek/tozsde.xml'),
|
||||
(u'Deviza/kötvény', u'http://www.portfolio.hu/rss/cikkek/penzkotveny.xml'),
|
||||
(u'Befektetési alapok', u'http://www.portfolio.hu/rss/cikkek/befalap.xml'),
|
||||
(u'Ingatlan', u'http://www.portfolio.hu/rss/cikkek/ingatlan.xml'),
|
||||
(u'Pénzcentrum', u'http://www.penzcentrum.hu/rss/all.xml')]
|
21
recipes/pubblico_giornale.recipe
Normal file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python
|
||||
__license__ = 'GPL v3'
|
||||
__author__ = 'iusvar'
|
||||
__description__ = 'Pubblico giornale'
|
||||
|
||||
'''
|
||||
http://pubblicogiornale.it/
|
||||
'''
|
||||
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class Pubblicogiornale(BasicNewsRecipe):
|
||||
description = 'Italian newspaper directed by Luca Telese'
|
||||
cover_url = 'http://pubblicogiornale.it/wp-content/uploads/logo_n.png?84cd58'
|
||||
title = u'Pubblico giornale'
|
||||
publisher = 'PUBBLICO EDIZIONI Srl'
|
||||
category = 'News'
|
||||
language = 'it'
|
||||
__author__ = 'iusvar'
|
||||
|
||||
feeds = [(u'Pubblico giornale', u'http://pubblicogiornale.it/feed/')]
|
@ -39,10 +39,10 @@ class SCMP(BasicNewsRecipe):
|
||||
#br.set_debug_responses(True)
|
||||
#br.set_debug_redirects(True)
|
||||
if self.username is not None and self.password is not None:
|
||||
br.open('http://www.scmp.com/portal/site/SCMP/')
|
||||
br.select_form(name='loginForm')
|
||||
br['Login' ] = self.username
|
||||
br['Password'] = self.password
|
||||
br.open('http://www.scmp.com/')
|
||||
br.select_form(nr=1)
|
||||
br['name'] = self.username
|
||||
br['pass'] = self.password
|
||||
br.submit()
|
||||
return br
|
||||
|
||||
|
18
recipes/stamgasten.recipe
Normal file
@ -0,0 +1,18 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class AdvancedUserRecipe1347706704(BasicNewsRecipe):
|
||||
title = u'Stamgasten'
|
||||
__author__ = u'DrMerry'
|
||||
description = u'Stamgasten de populaire strip van Toon van Driel (http://www.toonvandriel.nl)'
|
||||
language = u'nl'
|
||||
oldest_article = 7
|
||||
max_articles_per_feed = 100
|
||||
auto_cleanup = False
|
||||
cover_url = 'http://shop.toonvandriel.nl/productimg.php?type=canvas&id=15&size=large'
|
||||
no_stylesheets = True
|
||||
remove_javascript = True
|
||||
remove_empty_feeds = True
|
||||
remove_tags_before = dict(id='title')
|
||||
remove_tags_after = dict(attrs={'class':'entry-content rich-content'})
|
||||
|
||||
feeds = [(u'Stamgasten', u'http://toonvandriel.nl/feed/')]
|
@ -1,6 +1,6 @@
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2010-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
www.thesundaytimes.co.uk
|
||||
'''
|
||||
@ -43,13 +43,14 @@ class TimesOnline(BasicNewsRecipe):
|
||||
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
br.open('http://www.timesplus.co.uk/tto/news/?login=false&url=http://www.thesundaytimes.co.uk/sto/')
|
||||
br.open('http://www.thesundaytimes.co.uk/sto/')
|
||||
if self.username is not None and self.password is not None:
|
||||
data = urllib.urlencode({ 'userName':self.username
|
||||
data = urllib.urlencode({
|
||||
'gotoUrl' :self.INDEX
|
||||
,'username':self.username
|
||||
,'password':self.password
|
||||
,'keepMeLoggedIn':'false'
|
||||
})
|
||||
br.open('https://www.timesplus.co.uk/iam/app/authenticate',data)
|
||||
br.open('https://acs.thetimes.co.uk/user/login',data)
|
||||
return br
|
||||
|
||||
remove_tags = [
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid@kovidgoyal.net>'
|
||||
|
||||
'''
|
||||
time.com
|
||||
'''
|
||||
@ -11,28 +12,23 @@ from calibre.web.feeds.news import BasicNewsRecipe
|
||||
from lxml import html
|
||||
|
||||
class Time(BasicNewsRecipe):
|
||||
#recipe_disabled = ('This recipe has been disabled as TIME no longer'
|
||||
# ' publish complete articles on the web.')
|
||||
title = u'Time'
|
||||
__author__ = 'Kovid Goyal'
|
||||
__author__ = 'Kovid Goyal, Rick Shang'
|
||||
description = ('Weekly US magazine.')
|
||||
encoding = 'utf-8'
|
||||
no_stylesheets = True
|
||||
language = 'en'
|
||||
remove_javascript = True
|
||||
#needs_subscription = 'optional'
|
||||
needs_subscription = True
|
||||
|
||||
keep_only_tags = [
|
||||
{
|
||||
'class':['artHd', 'articleContent',
|
||||
'entry-title','entry-meta', 'entry-content', 'thumbnail']
|
||||
'class':['tout1', 'entry-content', 'external-gallery-img', 'image-meta']
|
||||
},
|
||||
]
|
||||
remove_tags = [
|
||||
{'class':['content-tools', 'quigo', 'see',
|
||||
'first-tier-social-tools', 'navigation', 'enlarge lightbox']},
|
||||
{'id':['share-tools']},
|
||||
{'rel':'lightbox'},
|
||||
{'class':['thumbnail', 'button']},
|
||||
|
||||
]
|
||||
|
||||
recursions = 10
|
||||
@ -43,15 +39,23 @@ class Time(BasicNewsRecipe):
|
||||
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser(self)
|
||||
if False and self.username and self.password:
|
||||
# This site uses javascript in its login process
|
||||
res = br.open('http://www.time.com/time/magazine')
|
||||
br.select_form(nr=1)
|
||||
if self.username is not None and self.password is not None:
|
||||
br.open('http://www.time.com/time/magazine')
|
||||
br.select_form(predicate=lambda f: 'action' in f.attrs and f.attrs['action'] == 'https://auth.time.com/login.php')
|
||||
br['username'] = self.username
|
||||
br['password'] = self.password
|
||||
res = br.submit()
|
||||
raw = res.read()
|
||||
if '>Log Out<' not in raw:
|
||||
br['magcode'] = ['TD']
|
||||
br.find_control('turl').readonly = False
|
||||
br['turl'] = 'http://www.time.com/time/magazine'
|
||||
br.find_control('rurl').readonly = False
|
||||
br['rurl'] = 'http://www.time.com/time/magazine'
|
||||
br['remember'] = False
|
||||
raw = br.submit().read()
|
||||
if False and '>Log Out<' not in raw:
|
||||
# This check is disabled as it does not work (there is probably
|
||||
# some cookie missing) however, the login is "sufficient" for
|
||||
# the actual article downloads to work.
|
||||
raise ValueError('Failed to login to time.com, check'
|
||||
' your username and password')
|
||||
return br
|
||||
@ -70,6 +74,9 @@ class Time(BasicNewsRecipe):
|
||||
except:
|
||||
self.log.exception('Failed to fetch cover')
|
||||
|
||||
dates = ''.join(root.xpath('//time[@class="updated"]/text()'))
|
||||
if dates:
|
||||
self.timefmt = ' [%s]'%dates
|
||||
|
||||
feeds = []
|
||||
parent = root.xpath('//div[@class="content-main-aside"]')[0]
|
||||
@ -97,6 +104,7 @@ class Time(BasicNewsRecipe):
|
||||
method='text').strip()
|
||||
if not title: continue
|
||||
url = a[0].get('href')
|
||||
url = re.sub('/magazine/article/0,9171','/subscriber/printout/0,8816', url)
|
||||
if url.startswith('/'):
|
||||
url = 'http://www.time.com'+url
|
||||
desc = ''
|
||||
@ -111,9 +119,3 @@ class Time(BasicNewsRecipe):
|
||||
'date' : '',
|
||||
'description' : desc
|
||||
}
|
||||
|
||||
def postprocess_html(self,soup,first):
|
||||
for tag in soup.findAll(attrs ={'class':['artPag','pagination']}):
|
||||
tag.extract()
|
||||
return soup
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2009-2010, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2009-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
www.thetimes.co.uk
|
||||
'''
|
||||
@ -21,6 +21,7 @@ class TimesOnline(BasicNewsRecipe):
|
||||
encoding = 'utf-8'
|
||||
delay = 1
|
||||
needs_subscription = True
|
||||
auto_cleanup = False
|
||||
publication_type = 'newspaper'
|
||||
masthead_url = 'http://www.thetimes.co.uk/tto/public/img/the_times_460.gif'
|
||||
INDEX = 'http://www.thetimes.co.uk'
|
||||
@ -41,13 +42,14 @@ class TimesOnline(BasicNewsRecipe):
|
||||
|
||||
def get_browser(self):
|
||||
br = BasicNewsRecipe.get_browser()
|
||||
br.open('http://www.timesplus.co.uk/tto/news/?login=false&url=http://www.thetimes.co.uk/tto/news/?lightbox=false')
|
||||
br.open('http://www.thetimes.co.uk/tto/news/')
|
||||
if self.username is not None and self.password is not None:
|
||||
data = urllib.urlencode({ 'userName':self.username
|
||||
data = urllib.urlencode({
|
||||
'gotoUrl' :self.INDEX
|
||||
,'username':self.username
|
||||
,'password':self.password
|
||||
,'keepMeLoggedIn':'false'
|
||||
})
|
||||
br.open('https://www.timesplus.co.uk/iam/app/authenticate',data)
|
||||
br.open('https://acs.thetimes.co.uk/user/login',data)
|
||||
return br
|
||||
|
||||
remove_tags = [
|
||||
@ -58,6 +60,7 @@ class TimesOnline(BasicNewsRecipe):
|
||||
keep_only_tags = [
|
||||
dict(attrs={'class':'heading' })
|
||||
,dict(attrs={'class':'f-author'})
|
||||
,dict(attrs={'class':['media','byline-timestamp']})
|
||||
,dict(attrs={'id':'bodycopy'})
|
||||
]
|
||||
|
||||
@ -79,11 +82,6 @@ class TimesOnline(BasicNewsRecipe):
|
||||
,(u'Arts' , PREFIX + u'arts/?view=list' )
|
||||
]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll(style=True):
|
||||
del item['style']
|
||||
return self.adeify_images(soup)
|
||||
|
||||
def parse_index(self):
|
||||
totalfeeds = []
|
||||
lfeeds = self.get_feeds()
|
||||
|
@ -36,12 +36,14 @@ class TimesNewRoman(BasicNewsRecipe):
|
||||
|
||||
remove_tags = [
|
||||
dict(name='p', attrs={'class':['articleinfo']})
|
||||
, dict(name='div',attrs={'class':['vergefacebooklike']})
|
||||
, dict(name='div', attrs={'class':'cleared'})
|
||||
, dict(name='div', attrs={'class':['shareTools']})
|
||||
, dict(name='div', attrs={'class':'fb_iframe_widget'})
|
||||
, dict(name='div', attrs={'id':'jc'})
|
||||
]
|
||||
|
||||
remove_tags_after = [
|
||||
dict(name='div', attrs={'class':'cleared'})
|
||||
dict(name='div', attrs={'class':'fb_iframe_widget'}),
|
||||
dict(name='div', attrs={'id':'jc'})
|
||||
]
|
||||
|
||||
feeds = [
|
||||
|
@ -1,5 +1,5 @@
|
||||
__license__ = 'GPL v3'
|
||||
__copyright__ = '2009-2011, Darko Miletic <darko.miletic at gmail.com>'
|
||||
__copyright__ = '2009-2012, Darko Miletic <darko.miletic at gmail.com>'
|
||||
'''
|
||||
twitchfilm.net/news/
|
||||
'''
|
||||
@ -15,7 +15,6 @@ class Twitchfilm(BasicNewsRecipe):
|
||||
use_embedded_content = False
|
||||
encoding = 'utf-8'
|
||||
publisher = 'Twitch'
|
||||
masthead_url = 'http://twitchfilm.com/img/logo.png'
|
||||
category = 'twitch, twitchfilm, movie news, movie reviews, cult cinema, independent cinema, anime, foreign cinema, geek talk'
|
||||
language = 'en'
|
||||
|
||||
@ -26,8 +25,8 @@ class Twitchfilm(BasicNewsRecipe):
|
||||
, 'language' : language
|
||||
}
|
||||
|
||||
keep_only_tags=[dict(attrs={'class':'asset-header'})]
|
||||
remove_tags_after=dict(attrs={'class':'asset-body'})
|
||||
keep_only_tags=[dict(attrs={'class':'entry'})]
|
||||
remove_tags_after=dict(attrs={'class':'text'})
|
||||
remove_tags = [ dict(name='div', attrs={'class':['social','categories']})
|
||||
, dict(attrs={'id':'main-asset'})
|
||||
, dict(name=['meta','link','iframe','embed','object'])
|
||||
|
@ -19,7 +19,13 @@ class Variety(BasicNewsRecipe):
|
||||
category = 'Entertainment Industry News, Daily Variety, Movie Reviews, TV, Awards, Oscars, Cannes, Box Office, Hollywood'
|
||||
language = 'en'
|
||||
masthead_url = 'http://images1.variety.com/graphics/variety/Variety_logo_green_tm.gif'
|
||||
extra_css = ' body{font-family: Georgia,"Times New Roman",Times,Courier,serif } img{margin-bottom: 1em} '
|
||||
extra_css = """
|
||||
body{font-family: Arial,Helvetica,sans-serif; font-size: 1.275em}
|
||||
.date{font-size: small; border: 1px dotted rgb(204, 204, 204); font-style: italic; color: rgb(102, 102, 102); margin: 5px 0px; padding: 0.5em;}
|
||||
.author{margin: 5px 0px 5px 20px; padding: 0.5em; background: none repeat scroll 0% 0% rgb(247, 247, 247);}
|
||||
.art h2{color: rgb(153, 0, 0); font-size: 1.275em; font-weight: bold;}
|
||||
img{margin-bottom: 1em}
|
||||
"""
|
||||
|
||||
conversion_options = {
|
||||
'comments' : description
|
||||
@ -29,7 +35,7 @@ class Variety(BasicNewsRecipe):
|
||||
}
|
||||
|
||||
remove_tags = [dict(name=['object','link','map'])]
|
||||
|
||||
remove_attributes=['lang','vspace','hspace','xmlns:ms','xmlns:dt']
|
||||
keep_only_tags = [dict(name='div', attrs={'class':'art control'})]
|
||||
|
||||
feeds = [(u'News & Articles', u'http://feeds.feedburner.com/variety/headlines' )]
|
||||
@ -37,3 +43,29 @@ class Variety(BasicNewsRecipe):
|
||||
def print_version(self, url):
|
||||
rpt = url.rpartition('.html')[0]
|
||||
return rpt + '?printerfriendly=true'
|
||||
|
||||
def preprocess_raw_html(self, raw, url):
|
||||
return '<html><head>'+raw[raw.find('</head>'):]
|
||||
|
||||
def get_article_url(self, article):
|
||||
url = BasicNewsRecipe.get_article_url(self, article)
|
||||
return url.rpartition('?')[0]
|
||||
|
||||
def preprocess_html(self, soup):
|
||||
for item in soup.findAll('a'):
|
||||
limg = item.find('img')
|
||||
if item.string is not None:
|
||||
str = item.string
|
||||
item.replaceWith(str)
|
||||
else:
|
||||
if limg:
|
||||
item.name = 'div'
|
||||
item.attrs = []
|
||||
else:
|
||||
str = self.tag_to_string(item)
|
||||
item.replaceWith(str)
|
||||
for item in soup.findAll('img'):
|
||||
if not item.has_key('alt'):
|
||||
item['alt'] = 'image'
|
||||
return soup
|
||||
|
@ -73,14 +73,20 @@ class AdvancedUserRecipe1249039563(BasicNewsRecipe):
|
||||
Change Log:
|
||||
Date: 10/15/2010
|
||||
Feeds updated by Martin Tarenskeen
|
||||
Date: 09/09/2012
|
||||
Feeds updated by Eric Lammerts
|
||||
'''
|
||||
|
||||
feeds = [
|
||||
(u'Laatste Nieuws', u'http://www.volkskrant.nl/rss/laatstenieuws.rss'),
|
||||
(u'Binnenland', u'http://www.volkskrant.nl/rss/nederland.rss'),
|
||||
(u'Buitenland', u'http://www.volkskrant.nl/rss/internationaal.rss'),
|
||||
(u'Economie', u'http://www.volkskrant.nl/rss/economie.rss'),
|
||||
(u'Sport', u'http://www.volkskrant.nl/rss/sport.rss'),
|
||||
(u'Cultuur', u'http://www.volkskrant.nl/rss/kunst.rss'),
|
||||
(u'Gezondheid & Wetenschap', u'http://www.volkskrant.nl/rss/wetenschap.rss'),
|
||||
(u'Internet & Media', u'http://www.volkskrant.nl/rss/media.rss') ]
|
||||
(u'Nieuws', u'http://www.volkskrant.nl/nieuws/rss.xml'),
|
||||
(u'Binnenland', u'http://www.volkskrant.nl/nieuws/binnenland/rss.xml'),
|
||||
(u'Buitenland', u'http://www.volkskrant.nl/buitenland/rss.xml'),
|
||||
(u'Economie', u'http://www.volkskrant.nl/nieuws/economie/rss.xml'),
|
||||
(u'Politiek', u'http://www.volkskrant.nl/politiek/rss.xml'),
|
||||
(u'Sport', u'http://www.volkskrant.nl/sport/rss.xml'),
|
||||
(u'Cultuur', u'http://www.volkskrant.nl/nieuws/cultuur/rss.xml'),
|
||||
(u'Gezondheid & wetenschap', u'http://www.volkskrant.nl/nieuws/gezondheid--wetenschap/rss.xml'),
|
||||
(u'Tech & Media', u'http://www.volkskrant.nl/tech-media/rss.xml'),
|
||||
(u'Reizen', u'http://www.volkskrant.nl/nieuws/reizen/rss.xml'),
|
||||
(u'Opinie', u'http://www.volkskrant.nl/opinie/rss.xml'),
|
||||
(u'Opmerkelijk', u'http://www.volkskrant.nl/nieuws/opmerkelijk/rss.xml') ]
|
||||
|
@ -64,8 +64,10 @@ class TheWashingtonPost(BasicNewsRecipe):
|
||||
|
||||
def get_article_url(self, article):
|
||||
link = BasicNewsRecipe.get_article_url(self,article)
|
||||
if article.id.startswith('http'):
|
||||
link = article.id
|
||||
if not 'washingtonpost.com' in link:
|
||||
self.log('Skipping adds:', link)
|
||||
self.log('Skipping ads:', link)
|
||||
return None
|
||||
for it in ['_video.html','_gallery.html','_links.html']:
|
||||
if it in link:
|
||||
|
@ -8,6 +8,12 @@ import copy
|
||||
|
||||
# http://online.wsj.com/page/us_in_todays_paper.html
|
||||
|
||||
def filter_classes(x):
|
||||
if not x: return False
|
||||
bad_classes = {'sTools', 'printSummary', 'mostPopular', 'relatedCollection'}
|
||||
classes = frozenset(x.split())
|
||||
return len(bad_classes.intersection(classes)) > 0
|
||||
|
||||
class WallStreetJournal(BasicNewsRecipe):
|
||||
|
||||
title = 'The Wall Street Journal'
|
||||
@ -35,10 +41,17 @@ class WallStreetJournal(BasicNewsRecipe):
|
||||
|
||||
remove_tags_before = dict(name='h1')
|
||||
remove_tags = [
|
||||
dict(id=["articleTabs_tab_article", "articleTabs_tab_comments", "articleTabs_tab_interactive","articleTabs_tab_video","articleTabs_tab_map","articleTabs_tab_slideshow","articleTabs_tab_quotes","articleTabs_tab_document"]),
|
||||
dict(id=["articleTabs_tab_article",
|
||||
"articleTabs_tab_comments",
|
||||
'articleTabs_panel_comments', 'footer',
|
||||
"articleTabs_tab_interactive", "articleTabs_tab_video",
|
||||
"articleTabs_tab_map", "articleTabs_tab_slideshow",
|
||||
"articleTabs_tab_quotes", "articleTabs_tab_document",
|
||||
"printModeAd", "aFbLikeAuth", "videoModule",
|
||||
"mostRecommendations", "topDiscussions"]),
|
||||
{'class':['footer_columns','network','insetCol3wide','interactive','video','slideshow','map','insettip','insetClose','more_in', "insetContent", 'articleTools_bottom', 'aTools', "tooltip", "adSummary", "nav-inline"]},
|
||||
dict(rel='shortcut icon'),
|
||||
{'class':lambda x: x and 'sTools' in x},
|
||||
{'class':filter_classes},
|
||||
]
|
||||
remove_tags_after = [dict(id="article_story_body"), {'class':"article story"},]
|
||||
|
||||
@ -52,7 +65,7 @@ class WallStreetJournal(BasicNewsRecipe):
|
||||
br['password'] = self.password
|
||||
res = br.submit()
|
||||
raw = res.read()
|
||||
if 'Welcome,' not in raw and '>Logout<' not in raw:
|
||||
if 'Welcome,' not in raw and '>Logout<' not in raw and '>Log Out<' not in raw:
|
||||
raise ValueError('Failed to log in to wsj.com, check your '
|
||||
'username and password')
|
||||
return br
|
||||
|
@ -2,6 +2,8 @@ __license__ = 'GPL v3'
|
||||
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||
'''
|
||||
Changelog:
|
||||
2012-04-06
|
||||
Fixed empty articles, added masthead img (NiLuJe)
|
||||
2011-09-24
|
||||
Changed cover (drMerry)
|
||||
'''
|
||||
@ -13,7 +15,8 @@ import time, re
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class XkcdCom(BasicNewsRecipe):
|
||||
cover_url = 'http://imgs.xkcd.com/s/9be30a7.png'
|
||||
cover_url = 'http://imgs.xkcd.com/static/terrible_small_logo.png'
|
||||
masthead_url = 'http://imgs.xkcd.com/static/terrible_small_logo.png'
|
||||
title = 'xkcd'
|
||||
description = 'A webcomic of romance and math humor.'
|
||||
__author__ = 'Martin Pitt updated by DrMerry.'
|
||||
@ -21,13 +24,14 @@ class XkcdCom(BasicNewsRecipe):
|
||||
|
||||
use_embedded_content = False
|
||||
oldest_article = 60
|
||||
keep_only_tags = [dict(id='middleContainer')]
|
||||
remove_tags = [dict(name='ul'), dict(name='h3'), dict(name='br')]
|
||||
#keep_only_tags = [dict(id='middleContainer')]
|
||||
#remove_tags = [dict(name='ul'), dict(name='h3'), dict(name='br')]
|
||||
keep_only_tags = [dict(id='comic')]
|
||||
no_stylesheets = True
|
||||
# turn image bubblehelp into a paragraph
|
||||
# turn image bubblehelp into a paragraph, and put alt in a heading
|
||||
preprocess_regexps = [
|
||||
(re.compile(r'(<img.*title=")([^"]+)(".*>)'),
|
||||
lambda m: '%s%s<p>%s</p>' % (m.group(1), m.group(3), m.group(2)))
|
||||
(re.compile(r'(<img.*title=")([^"]+)(".alt=")([^"]+)(".*>)'),
|
||||
lambda m: '<h1>%s</h1>%s%s%s<p>%s</p>' % (m.group(4), m.group(1), m.group(3), m.group(5), m.group(2)))
|
||||
]
|
||||
|
||||
def parse_index(self):
|
||||
|
33
recipes/xpatloop.recipe
Normal file
@ -0,0 +1,33 @@
|
||||
from calibre.web.feeds.news import BasicNewsRecipe
|
||||
|
||||
class AdvancedUserRecipe1347997197(BasicNewsRecipe):
|
||||
title = u'XpatLoop.com'
|
||||
__author__ = 'laca'
|
||||
oldest_article = 7
|
||||
language = 'en_HUN'
|
||||
auto_cleanup = True
|
||||
masthead_url = 'http://www.xpatloop.com/images/cms/xs_logo.gif'
|
||||
use_embedded_content = False
|
||||
|
||||
author = 'laca'
|
||||
simultaneous_downloads= 1
|
||||
max_articles_per_feed = 50
|
||||
|
||||
no_stylesheets = True
|
||||
|
||||
feeds = [(u'Current Affairs', u'http://www.xpatloop.com/current_affairs.rss'),
|
||||
(u'Community & Culture', u'http://www.xpatloop.com/community.rss'),
|
||||
(u'Business & Finance', u'http://www.xpatloop.com/business.rss'),
|
||||
(u'Entertainment', u'http://www.xpatloop.com/entertainment.rss'),
|
||||
(u'Dining Guide', u'http://www.xpatloop.com/dining_guide.rss'),
|
||||
(u'Getting Around', u'http://www.xpatloop.com/getting_around.rss'),
|
||||
(u'Movies', u'http://www.xpatloop.com/movies.rss'),
|
||||
(u'Shopping', u'http://www.xpatloop.com/shopping_channel.rss'),
|
||||
(u'Travel', u'http://www.xpatloop.com/travel.rss'),
|
||||
(u'Sport and Fitness', u'http://www.xpatloop.com/sport_and_fitness.rss'),
|
||||
(u'Health and Wellness', u'http://www.xpatloop.com/health_and_wellness.rss'),
|
||||
(u'Infotech & Telco', u'http://www.xpatloop.com/infotech_telco.rss'),
|
||||
(u'Real Estate', u'http://www.xpatloop.com/property_real_estate.rss'),
|
||||
(u'Specials', u'http://www.xpatloop.com/specials.rss'),
|
||||
(u'Video Channel', u'http://www.xpatloop.com/video.rss'),
|
||||
(u'Events', u'http://www.xpatloop.com/events.rss')]
|
@ -118,13 +118,13 @@ class ZeitEPUBAbo(BasicNewsRecipe):
|
||||
|
||||
def build_index(self):
|
||||
domain = "https://premium.zeit.de"
|
||||
url = domain + "/abo/zeit_digital"
|
||||
url = domain + "/abo/digitalpaket"
|
||||
browser = self.get_browser()
|
||||
|
||||
# new login process
|
||||
response = browser.open(url)
|
||||
# Get rid of nested form
|
||||
response.set_data(response.get_data().replace('<div><form action="/abo/zeit_digital?destination=node%2F94" accept-charset="UTF-8" method="post" id="user-login-form" class="zol_inlinelabel">', ''))
|
||||
response.set_data(response.get_data().replace('<div><form action="/abo/digitalpaket?destination=node%2F94" accept-charset="UTF-8" method="post" id="user-login-form" class="zol_inlinelabel">', ''))
|
||||
browser.set_response(response)
|
||||
browser.select_form(nr=2)
|
||||
browser.form['name']=self.username
|
||||
@ -177,13 +177,13 @@ class ZeitEPUBAbo(BasicNewsRecipe):
|
||||
try:
|
||||
self.log.warning('Trying PDF-based cover')
|
||||
domain = "https://premium.zeit.de"
|
||||
url = domain + "/abo/zeit_digital"
|
||||
url = domain + "/abo/digitalpaket"
|
||||
browser = self.get_browser()
|
||||
|
||||
# new login process
|
||||
response=browser.open(url)
|
||||
# Get rid of nested form
|
||||
response.set_data(response.get_data().replace('<div><form action="/abo/zeit_digital?destination=node%2F94" accept-charset="UTF-8" method="post" id="user-login-form" class="zol_inlinelabel">', ''))
|
||||
response.set_data(response.get_data().replace('<div><form action="/abo/digitalpaket?destination=node%2F94" accept-charset="UTF-8" method="post" id="user-login-form" class="zol_inlinelabel">', ''))
|
||||
browser.set_response(response)
|
||||
|
||||
browser.select_form(nr=2)
|
||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 101 KiB |
BIN
resources/images/devices/tablet.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
resources/images/mimetypes/azw2.png
Normal file
After Width: | Height: | Size: 8.1 KiB |
BIN
resources/images/mimetypes/azw3.png
Normal file
After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 7.8 KiB |
BIN
resources/images/mimetypes/tpz.png
Normal file
After Width: | Height: | Size: 8.2 KiB |
@ -1370,8 +1370,11 @@ application/x-sony-bbeb lrf lrx
|
||||
application/adobe-page-template+xml xpgt
|
||||
application/x-font-opentype otf
|
||||
application/x-font-truetype ttf
|
||||
application/x-mobipocket-ebook mobi prc
|
||||
application/vnd.amazon.ebook azw3 azw azw2 azw4
|
||||
application/x-mobipocket-ebook mobi prc azw
|
||||
application/x-topaz-ebook tpz azw1
|
||||
application/x-mobipocket-subscription pobi
|
||||
application/x-kindle-application azw2
|
||||
application/x-mobi8-ebook azw3
|
||||
application/x-cbz cbz
|
||||
application/x-cbr cbr
|
||||
application/x-cb7 cb7
|
||||
|
@ -53,9 +53,11 @@
|
||||
|
||||
ul {margin-left: 0}
|
||||
|
||||
.epigraph{width:50%; margin-left : 35%;}
|
||||
.epigraph{width:75%; margin-left : 25%; font-style: italic;}
|
||||
|
||||
div.paragraph { text-indent: 2em; }
|
||||
|
||||
.subtitle { text-align: center; }
|
||||
</style>
|
||||
<link rel="stylesheet" type="text/css" href="inline-styles.css" />
|
||||
</head>
|
||||
@ -99,7 +101,7 @@
|
||||
</xsl:template>
|
||||
<!-- secuence template -->
|
||||
<xsl:template name="sequence">
|
||||
<LI/>
|
||||
<li/>
|
||||
<xsl:value-of select="@name"/>
|
||||
<xsl:if test="@number">
|
||||
<xsl:text disable-output-escaping="no">, #</xsl:text>
|
||||
@ -213,7 +215,7 @@
|
||||
<xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute>
|
||||
</xsl:element>
|
||||
</xsl:if>
|
||||
<h5>
|
||||
<h5 class="subtitle">
|
||||
<xsl:apply-templates/>
|
||||
</h5>
|
||||
</xsl:template>
|
||||
@ -234,11 +236,11 @@
|
||||
</xsl:template>
|
||||
<!-- strong -->
|
||||
<xsl:template match="fb:strong">
|
||||
<b><xsl:apply-templates/></b>
|
||||
<strong><xsl:apply-templates/></strong>
|
||||
</xsl:template>
|
||||
<!-- emphasis -->
|
||||
<xsl:template match="fb:emphasis">
|
||||
<i> <xsl:apply-templates/></i>
|
||||
<em> <xsl:apply-templates/></em>
|
||||
</xsl:template>
|
||||
<!-- style -->
|
||||
<xsl:template match="fb:style">
|
||||
@ -294,16 +296,30 @@
|
||||
</table>
|
||||
</xsl:template>
|
||||
<xsl:template match="fb:tr">
|
||||
<tr><xsl:apply-templates/></tr>
|
||||
</xsl:template>
|
||||
<xsl:template match="fb:td">
|
||||
<xsl:element name="td">
|
||||
<xsl:element name="tr">
|
||||
<xsl:if test="@align">
|
||||
<xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
<xsl:template match="fb:td|fb:th">
|
||||
<xsl:element name="{local-name()}">
|
||||
<xsl:if test="@align">
|
||||
<xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="@style">
|
||||
<xsl:attribute name="style"><xsl:value-of select="@style"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="@colspan">
|
||||
<xsl:attribute name="colspan"><xsl:value-of select="@colspan"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="@rowspan">
|
||||
<xsl:attribute name="rowspan"><xsl:value-of select="@rowspan"/></xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:apply-templates/>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
<!-- epigraph -->
|
||||
<xsl:template match="fb:epigraph">
|
||||
<blockquote class="epigraph">
|
||||
@ -410,5 +426,13 @@
|
||||
</xsl:if>
|
||||
</xsl:element>
|
||||
</xsl:template>
|
||||
<!-- code -->
|
||||
<xsl:template match="fb:code">
|
||||
<code><xsl:apply-templates/></code>
|
||||
</xsl:template>
|
||||
<!-- Strikethrough text -->
|
||||
<xsl:template match="fb:strikethrough">
|
||||
<del><xsl:apply-templates/></del>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
@ -402,7 +402,3 @@ img, object, svg|svg {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/* These are needed because ADE renders anchors the same as links */
|
||||
|
||||
a { text-decoration: inherit; color: inherit; cursor: inherit }
|
||||
a[href] { text-decoration: underline; color: blue; cursor: pointer }
|
||||
|
@ -187,7 +187,7 @@ MathJax.Hub.Register.StartupHook("SVG Jax Ready",function () {
|
||||
// fill it with the proper elements,
|
||||
// and clean up the bbox
|
||||
//
|
||||
line = BBOX();
|
||||
var line = BBOX();
|
||||
state.first = broken; state.last = true;
|
||||
this.SVGmoveLine(start,end,line,state,values);
|
||||
line.Clean();
|
||||
|