Browse Source

pushing the latest versions

master
mb 2 years ago
parent
commit
3a5a064dc7
  1. 28
      command-line/cover/Barcode.svg
  2. 39
      command-line/cover/OHP-logo-title.svg
  3. 76
      command-line/cover/multi-remix.svg
  4. 2
      command-line/css/baseline.css
  5. 253
      command-line/css/print.css
  6. 6007
      command-line/js/paged.polyfill.js
  7. 3
      command-line/templates/template.html
  8. 72
      command-line/update.py

28
command-line/cover/Barcode.svg

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 51 KiB

39
command-line/cover/OHP-logo-title.svg

@ -13,7 +13,10 @@
version="1.1" version="1.1"
id="svg73" id="svg73"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)" inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
sodipodi:docname="OHP-logo-title.svg"> sodipodi:docname="OHP-logo-title.svg"
inkscape:export-filename="/home/mb/Documents/clusters/projects/volumetric-regimes/volumetric-regimes-book/command-line/cover/OHP-logo-title.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<defs <defs
id="defs67" /> id="defs67" />
<sodipodi:namedview <sodipodi:namedview
@ -33,7 +36,7 @@
inkscape:window-width="1920" inkscape:window-width="1920"
inkscape:window-height="1016" inkscape:window-height="1016"
inkscape:window-x="0" inkscape:window-x="0"
inkscape:window-y="27" inkscape:window-y="0"
inkscape:window-maximized="1" /> inkscape:window-maximized="1" />
<metadata <metadata
id="metadata70"> id="metadata70">
@ -43,7 +46,7 @@
<dc:format>image/svg+xml</dc:format> <dc:format>image/svg+xml</dc:format>
<dc:type <dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title> <dc:title />
</cc:Work> </cc:Work>
</rdf:RDF> </rdf:RDF>
</metadata> </metadata>
@ -59,7 +62,9 @@
transform="translate(50.534457,-46.362182)" transform="translate(50.534457,-46.362182)"
style="fill:#ffffff"> style="fill:#ffffff">
<g <g
id="g160"> id="g845"
transform="translate(-1481.6219)"
style="fill:#ffffff">
<path <path
d="m 1650.14,3475.3 c -12.95,1.61 -24.37,4.49 -34.22,8.65 -16.13,6.79 -28.98,16.43 -38.54,28.94 -9.56,12.5 -16.31,27.57 -20.25,45.23 -3.94,17.66 -5.9,37.42 -5.9,59.3 0,21.71 1.96,41.33 5.9,58.83 3.94,17.49 10.69,32.38 20.25,44.64 9.56,12.27 22.41,21.68 38.54,28.25 9.85,4.01 21.27,6.78 34.22,8.34 v 19.24 c -18.98,-1.34 -36.46,-4.06 -52.22,-8.36 -22.88,-6.25 -42.1,-15.94 -57.66,-29.07 -15.57,-13.12 -27.42,-29.76 -35.58,-49.92 -8.16,-20.16 -12.23,-44.14 -12.23,-71.95 0,-27.81 4.22,-51.92 12.65,-72.31 8.44,-20.39 20.62,-37.23 36.57,-50.5 15.93,-13.28 35.24,-23.17 57.93,-29.65 15.42,-4.41 32.34,-7.2 50.54,-8.6 v 18.94" d="m 1650.14,3475.3 c -12.95,1.61 -24.37,4.49 -34.22,8.65 -16.13,6.79 -28.98,16.43 -38.54,28.94 -9.56,12.5 -16.31,27.57 -20.25,45.23 -3.94,17.66 -5.9,37.42 -5.9,59.3 0,21.71 1.96,41.33 5.9,58.83 3.94,17.49 10.69,32.38 20.25,44.64 9.56,12.27 22.41,21.68 38.54,28.25 9.85,4.01 21.27,6.78 34.22,8.34 v 19.24 c -18.98,-1.34 -36.46,-4.06 -52.22,-8.36 -22.88,-6.25 -42.1,-15.94 -57.66,-29.07 -15.57,-13.12 -27.42,-29.76 -35.58,-49.92 -8.16,-20.16 -12.23,-44.14 -12.23,-71.95 0,-27.81 4.22,-51.92 12.65,-72.31 8.44,-20.39 20.62,-37.23 36.57,-50.5 15.93,-13.28 35.24,-23.17 57.93,-29.65 15.42,-4.41 32.34,-7.2 50.54,-8.6 v 18.94"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
@ -68,19 +73,19 @@
d="m 1875.23,3689.37 c -8.44,20.16 -20.63,36.8 -36.56,49.92 -15.94,13.13 -35.3,22.82 -58.09,29.07 -15.39,4.22 -32.26,6.89 -50.39,8.27 v -19.19 c 12.83,-1.56 24.16,-4.32 33.95,-8.3 16.13,-6.57 29.02,-15.98 38.67,-28.25 9.65,-12.26 16.44,-27.15 20.39,-44.64 3.94,-17.5 5.9,-37.12 5.9,-58.83 0,-21.88 -1.96,-41.64 -5.9,-59.3 -3.95,-17.66 -10.74,-32.73 -20.39,-45.23 -9.65,-12.51 -22.54,-22.15 -38.67,-28.94 -9.79,-4.13 -21.12,-6.99 -33.95,-8.61 v -18.96 c 18.13,1.42 35,4.19 50.39,8.58 22.79,6.48 42.15,16.37 58.09,29.65 15.93,13.27 28.12,30.11 36.56,50.5 8.44,20.39 12.66,44.5 12.66,72.31 0,27.81 -4.22,51.79 -12.66,71.95" d="m 1875.23,3689.37 c -8.44,20.16 -20.63,36.8 -36.56,49.92 -15.94,13.13 -35.3,22.82 -58.09,29.07 -15.39,4.22 -32.26,6.89 -50.39,8.27 v -19.19 c 12.83,-1.56 24.16,-4.32 33.95,-8.3 16.13,-6.57 29.02,-15.98 38.67,-28.25 9.65,-12.26 16.44,-27.15 20.39,-44.64 3.94,-17.5 5.9,-37.12 5.9,-58.83 0,-21.88 -1.96,-41.64 -5.9,-59.3 -3.95,-17.66 -10.74,-32.73 -20.39,-45.23 -9.65,-12.51 -22.54,-22.15 -38.67,-28.94 -9.79,-4.13 -21.12,-6.99 -33.95,-8.61 v -18.96 c 18.13,1.42 35,4.19 50.39,8.58 22.79,6.48 42.15,16.37 58.09,29.65 15.93,13.27 28.12,30.11 36.56,50.5 8.44,20.39 12.66,44.5 12.66,72.31 0,27.81 -4.22,51.79 -12.66,71.95"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
id="path34" /> id="path34" />
<g </g>
id="g36" <g
transform="scale(10)" id="g36"
style="fill:#ffffff"> transform="scale(10)"
<text style="fill:#ffffff">
transform="matrix(1,0,0,-0.90909091,0,313.714)" <text
style="font-variant:normal;font-weight:normal;font-size:26.4px;font-family:'Liberation Serif';-inkscape-font-specification:LiberationSerif;writing-mode:lr-tb;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" transform="matrix(1,0,0,-0.90909091,0,313.714)"
id="text40"><tspan style="font-variant:normal;font-weight:normal;font-size:26.4px;font-family:'Liberation Serif';-inkscape-font-specification:LiberationSerif;writing-mode:lr-tb;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none"
x="0 19.725098 35.067898 51.853992 71.579102 78.838867 98.564468 118.28957 142.42337 162.14847 181.87407 191.32523 208.11131 217.56247 234.34859 249.69139 256.95114 272.29395 290.56256 307.34869 322.6915" id="text40"><tspan
y="0" x="0 19.725098 35.067898 51.853992 71.579102 78.838867 98.564468 118.28957 142.42337 162.14847 181.87407 191.32523 208.11131 217.56247 234.34859 249.69139 256.95114 272.29395 290.56256 307.34869 322.6915"
sodipodi:role="line" y="0"
id="tspan38">OPEN HUMANITIES PRESS</tspan></text> sodipodi:role="line"
</g> id="tspan38">OPEN HUMANITIES PRESS</tspan></text>
</g> </g>
</g> </g>
</g> </g>

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

76
command-line/cover/multi-remix.svg

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="600"
height="600"
viewBox="0 0 158.75 158.75"
version="1.1"
id="svg879"
inkscape:version="1.0.2 (e86c870879, 2021-01-15)"
sodipodi:docname="multi-remix.svg">
<defs
id="defs873" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.98994949"
inkscape:cx="317.75723"
inkscape:cy="242.04214"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1016"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1"
showguides="true" />
<metadata
id="metadata876">
<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
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<g
id="g899"
transform="translate(2.8661096,-4.9431513)">
<rect
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke-width:1;stroke-linecap:round;stroke-linejoin:round"
id="rect28"
width="26.485571"
height="4.225781"
x="30.137449"
y="46.457333" />
<path
style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 114.34754,50.330639 h 8.4005 v 7.37232 l -4.96538,7.96844 h -6.73909 l 3.136,-8.53983 z"
id="path30" />
<path
id="path32"
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke-width:1.08715;stroke-linecap:round;stroke-linejoin:round"
d="m 77.077113,93.197279 a 14.490818,14.490818 0 0 0 -14.450801,14.490581 14.490818,14.490818 0 0 0 14.491101,14.49111 14.490818,14.490818 0 0 0 14.49059,-14.49111 14.490818,14.490818 0 0 0 -14.49059,-14.490581 14.490818,14.490818 0 0 0 -0.0403,0 z m 0.14831,2.53524 a 11.992875,11.992875 0 0 1 11.99255,11.992551 11.992875,11.992875 0 0 1 -11.99255,11.99307 11.992875,11.992875 0 0 1 -11.993068,-11.99307 11.992875,11.992875 0 0 1 11.993068,-11.992551 z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

2
command-line/css/baseline.css

@ -15,5 +15,5 @@
background-size: cover; background-size: cover;
background-repeat: repeat-y; background-repeat: repeat-y;
/* start of the first baseline: half of the line-height: 18px / 2 = 9px */ /* start of the first baseline: half of the line-height: 18px / 2 = 9px */
background-position-y: 7px; background-position-y: 14px;
} }

253
command-line/css/print.css

@ -55,7 +55,7 @@
.column-break{ .column-break{
/* does not work from this stylesheet, rule gets removed by paged.js??? */ /* does not work from this stylesheet, rule gets removed by paged.js??? */
/* only worked once inserted directly into the HTML */ /* only worked once inserted directly into the HTML */
break-after: column; /*break-after: column; */
display: block; display: block;
} }
.column-break + p{ .column-break + p{
@ -96,8 +96,8 @@ body{
/*size: 164mm 237mm;*/ /* Size of the physical printed DB06 book */ /*size: 164mm 237mm;*/ /* Size of the physical printed DB06 book */
/*size: 576px 864px;*/ /*size: 576px 864px;*/
size: 152mm 229mm; size: 152mm 229mm;
bleed: 3mm; /*bleed: 3mm; */
/*marks: crop;*/ /*marks: crop;*/ /* needs to stay off for the final print files */
@bottom-center{ @bottom-center{
content: counter(page); content: counter(page);
@ -139,7 +139,6 @@ body{
margin-top: 5mm; margin-top: 5mm;
} }
} }
@page:first{ @page:first{
/* cover */ /* cover */
/*background: linear-gradient(180deg, #787cc0, #c0c1e7);*/ /*background: linear-gradient(180deg, #787cc0, #c0c1e7);*/
@ -164,7 +163,6 @@ body{
content: none; content: none;
} }
} }
@page section{ @page section{
/* section title pages -- color */ /* section title pages -- color */
/*background: linear-gradient(180deg, #3741ea, #c0c1e7);*/ /*background: linear-gradient(180deg, #3741ea, #c0c1e7);*/
@ -179,12 +177,6 @@ body{
color: white !important; color: white !important;
} }
} }
@page section:first{
@bottom-center{
content: none;
}
}
@page contribution:first{ @page contribution:first{
/* exception for running-header on the first page of a contribution */ /* exception for running-header on the first page of a contribution */
margin-top: 127px; margin-top: 127px;
@ -244,9 +236,10 @@ body{
/* sections -- page flows */ /* sections -- page flows */
div.section{ div.section{
page: section;
/* force an extra blank page before each section ... */ /* force an extra blank page before each section ... */
page-break-before: left; page-break-before: left;
/* and make sure it stays empty */
page: nomarks;
} }
div.section.intro{ div.section.intro{
/* exception for the intro section, as there is no title page for this section */ /* exception for the intro section, as there is no title page for this section */
@ -260,6 +253,7 @@ div.section{
div.section h1{ div.section h1{
/* ... and make sure that each section starts on the right */ /* ... and make sure that each section starts on the right */
page-break-before: right; page-break-before: right;
page: section;
} }
div.multi{ div.multi{
counter-reset: page 1; counter-reset: page 1;
@ -322,21 +316,24 @@ div.backcover{
div.cover, div.cover,
div.backcover{ div.backcover{
hyphens: none; hyphens: none;
margin: -7.5mm 0 0 20mm;
} }
div.cover, div.cover,
div.cover ul li, div.cover ul li,
div.backcover b{ div.backcover b{
font-size: 17pt; font-size: var(--h2-font-size);
font-family: "bitter_semi"; font-family: "bitter_semi";
line-height: 1.4; line-height: var(--h2-line-height);
letter-spacing: 0.025em; letter-spacing: 0.025em;
color: white; color: white;
font-weight: bold; font-weight: bold;
} }
div.cover{
max-width: 300px;
margin: -2.5mm 0 0 12mm; /* margin-top: 17mm, margin-left: 41mm */
}
div.cover ul{ div.cover ul{
padding: 0; padding: 0;
margin: 2em 0; margin: 1.5em 0 !important;
} }
div.cover ul li{ div.cover ul li{
margin-bottom: 0.1em !important; margin-bottom: 0.1em !important;
@ -347,6 +344,7 @@ div.backcover{
} }
div.backcover{ div.backcover{
color: white; color: white;
margin: -4mm 0 0 24mm; /* margin-top: 17mm, margin-left: 42mm */
} }
div.backcover b{ div.backcover b{
margin-left: 0; margin-left: 0;
@ -354,6 +352,21 @@ div.backcover{
div.backcover p{ div.backcover p{
margin-bottom: var(--line-height); margin-bottom: var(--line-height);
} }
div.backcover p:first-of-type{
margin-bottom: 9px !important;
}
div.backcover div.barcode img{
position: absolute;
width: 45mm;
right: -15mm; /* margin-right: 14mm */
bottom: -6mm; /* margin-bottom: 16mm */
}
div.backcover div.logo-ohp img{
position: absolute;
width: 50mm;
left: -7mm; /* margin-left: 12mm */
bottom: -5.5mm; /* margin-bottom: 19mm */
}
div.series{ div.series{
font-size: var(--small-font-size); font-size: var(--small-font-size);
@ -362,12 +375,21 @@ div.series{
} }
div.series.about{ div.series.about{
width: 50%; width: 50%;
}
div.series.colophon,
div.series.colophon div#second-column{
width: 48mm;
} }
div.series.colophon{ div.series.colophon{
columns: 2 auto; /*columns: 2 auto;*/
column-gap: 8mm; /*column-gap: 8mm;*/
column-fill: auto; /*column-fill: auto;*/
height: 207mm; /*height: 207mm;*/
}
div.series.colophon div#second-column{
position: absolute;
left: 56mm;
top: 0mm;
} }
div.series p{ div.series p{
margin-bottom: var(--small-line-height); margin-bottom: var(--small-line-height);
@ -667,11 +689,15 @@ ul > li {
div.contribution.ultrasonic-dreams li, div.contribution.ultrasonic-dreams li,
div.contribution.lidar li, div.contribution.lidar li,
div.contribution.clandestine li, div.contribution.signs-of-clandestine li,
div.contribution.information-for-users li{ div.contribution.information-for-users li{
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
div.contribution.signs-of-clandestine ul{
margin-top: 0 !important;
}
div.list-without-markers{ div.list-without-markers{
text-indent: -0.8em !important; text-indent: -0.8em !important;
} }
@ -830,7 +856,7 @@ img{
div.invasive-imagination div.thumb div.thumbcaption{ div.invasive-imagination div.thumb div.thumbcaption{
width: calc(100% - 7mm); width: calc(100% - 7mm);
} }
div.invasive-imagination a[href="#File:Figure06.png"] img{ div.invasive-imagination a[href="#File:Figure06.jpg"] img{
width: 365px !important; width: 365px !important;
} }
/* Exception for Maria Dada's images */ /* Exception for Maria Dada's images */
@ -842,7 +868,7 @@ img{
} }
div.contribution.beirut-82 div.thumb { div.contribution.beirut-82 div.thumb {
display: inline-block; display: inline-block;
margin: calc(var(--line-height) - 4px) 0 -0.5em 0 !important; margin: calc(var(--line-height) - 5px) 0 -0.5em 0 !important;
} }
/* Exception for So-called plants */ /* Exception for So-called plants */
div.contribution.so-called-plants img{ div.contribution.so-called-plants img{
@ -850,9 +876,9 @@ img{
margin-left: var(--second-indent) !important; margin-left: var(--second-indent) !important;
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
div.contribution.so-called-plants h4{ /*div.contribution.so-called-plants h4{*/
margin-top: 9px !important; /*margin-top: 9px !important;*/
} /*}*/
/*div.enlarged-image img{ /*div.enlarged-image img{
width: auto !important; width: auto !important;
@ -865,216 +891,247 @@ img{
div[data-page-number="13"] div.thumb{ div[data-page-number="13"] div.thumb{
margin-top: 17px; margin-top: 17px;
} }
div[data-page-number="35"] div.thumb{ div[data-page-number="33"] div.thumb{
margin-bottom: 14px; margin-bottom: 14px;
} }
div[data-page-number="36"] div.thumb{ div[data-page-number="34"] div.thumb{
margin-top: 24px; margin-top: 24px;
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="37"] div.thumb{ div[data-page-number="35"] div.thumb{
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="39"] div.thumb{ div[data-page-number="37"] div.thumb{
margin-bottom: 13px; margin-bottom: 13px;
} }
div[data-page-number="40"] div.thumb{ div[data-page-number="38"] div.thumb{
margin-top: 20px; margin-top: 20px;
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="42"] div.thumb{ div[data-page-number="40"] div.thumb{
margin-bottom: 26px; margin-bottom: 26px;
} }
div[data-page-number="43"] div.thumb{ div[data-page-number="41"] div.thumb{
margin-bottom: 22px; margin-bottom: 22px;
} }
div[data-page-number="44"] div.thumb{ div[data-page-number="42"] div.thumb{
margin-bottom: 23px; margin-bottom: 23px;
} }
div[data-page-number="46"] div.thumb{ div[data-page-number="44"] div.thumb{
margin-bottom: 17px; margin-bottom: 17px;
} }
div[data-page-number="47"] div.thumb{ div[data-page-number="45"] div.thumb{
margin-top: 23px; margin-top: 23px;
margin-bottom: 27px; margin-bottom: 27px;
} }
div[data-page-number="48"] div.thumb{ div[data-page-number="46"] div.thumb{
margin-top: 16px; margin-top: 16px;
margin-bottom: 15px; margin-bottom: 15px;
} }
div[data-page-number="51"] div.thumb{ div[data-page-number="49"] div.thumb{
margin-bottom: 16px; margin-bottom: 16px;
} }
div[data-page-number="53"] div.thumb{ div[data-page-number="51"] div.thumb{
margin-top: 14px; margin-top: 14px;
margin-bottom: 13px; margin-bottom: 13px;
} }
div[data-page-number="56"] div.thumb{ div[data-page-number="54"] div.thumb{
margin-bottom: 12px; margin-bottom: 12px;
} }
div[data-page-number="62"] pre{ div[data-page-number="60"] pre{
margin-top: calc(var(--line-height) - 2px); margin-top: calc(var(--line-height) - 2px);
margin-bottom: calc(var(--line-height) - 2px); margin-bottom: calc(var(--line-height) - 2px);
} }
div[data-page-number="63"] div.thumb{ div[data-page-number="61"] div.thumb{
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="66"] pre{ div[data-page-number="65"] div.thumb{
margin-top: calc(var(--line-height) - 2px);
margin-bottom: calc(var(--line-height) - 2px);
}
div[data-page-number="67"] div.thumb{
margin-bottom: 15px; margin-bottom: 15px;
} }
div[data-page-number="72"] div.thumb{ div[data-page-number="70"] div.thumb{
margin-bottom: 22px; margin-bottom: 22px;
} }
div[data-page-number="88"] img[src="./images/Figure02.png"] { div[data-page-number="73"] div.thumb img{
width: auto;
max-height: 423px !important;
}
div[data-page-number="86"] img[src="./images/Figure02.jpg"] {
margin-top: -8px; margin-top: -8px;
} }
div[data-page-number="101"] div.thumb{ div[data-page-number="88"] img[src="./images/Figure06.jpg"].thumbimage {
width: 365px !important; /* original size */
}
div[data-page-number="99"] div.thumb{
margin-bottom: 19px; margin-bottom: 19px;
} }
div[data-page-number="110"] img[src="./images/File_manager_overview.png"] { div[data-page-number="108"] img[src="./images/File_manager_overview.jpg"] {
margin-bottom: 11px; margin-bottom: 11px;
} }
div[data-page-number="114"] div.thumb{ div[data-page-number="112"] div.thumb{
margin-bottom: 13px; margin-bottom: 13px;
} }
div[data-page-number="118"] div.thumb{ div[data-page-number="116"] div.thumb{
margin-top: 22px; margin-top: 22px;
margin-bottom: 21px; margin-bottom: 21px;
} }
div[data-page-number="121"] div.thumb{ div[data-page-number="119"] div.thumb{
margin-top: -4px; margin-top: -4px;
margin-bottom: 14px; margin-bottom: 14px;
} }
div[data-page-number="127"] div.thumb{ div[data-page-number="125"] div.thumb{
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="128"] div.thumb{ div[data-page-number="126"] div.thumb{
margin-top: -1px; margin-top: -1px;
margin-bottom: 14px; margin-bottom: 14px;
} }
div[data-page-number="129"] div.thumb{ div[data-page-number="127"] div.thumb{
margin-top: 20px; margin-top: 20px;
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="131"] div.thumb{ div[data-page-number="129"] div.thumb{
margin-top: 21px; margin-top: 21px;
margin-bottom: 22px; margin-bottom: 22px;
} }
div[data-page-number="134"] div.thumb{ div[data-page-number="132"] div.thumb{
margin-top: 19px; margin-top: 19px;
margin-bottom: 21px; margin-bottom: 21px;
} }
div[data-page-number="171"] div.thumb{ /*div[data-page-number="140"] div.thumb{
margin-top: 21px;
}*/
div[data-page-number="169"] div.thumb{
margin-bottom: 16px; margin-bottom: 16px;
} }
div[data-page-number="178"] div.thumb{ div[data-page-number="176"] div.thumb{
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="179"] div.thumb{ div[data-page-number="177"] div.thumb{
margin-bottom: 27px; margin-bottom: 27px;
} }
div[data-page-number="180"] div.thumb{ div[data-page-number="178"] div.thumb{
margin-bottom: 26px; margin-bottom: 26px;
} }
div[data-page-number="181"] div.thumb{ div[data-page-number="179"] div.thumb{
margin-bottom: 19px; margin-bottom: 19px;
} }
div[data-page-number="182"] div.thumb{ div[data-page-number="180"] div.thumb{
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="183"] div.thumb{ div[data-page-number="181"] div.thumb{
margin-bottom: 26px; margin-bottom: 26px;
} }
div[data-page-number="195"] div.thumb{ div[data-page-number="193"] div.thumb{
margin-top: -5px; margin-top: -4px;
} }
div[data-page-number="203"] p.image{ div[data-page-number="201"] p.image{
margin-top: 21px; margin-top: 21px;
margin-bottom: 23px; margin-bottom: 23px;
} }
div[data-page-number="236"] div.thumb{ div[data-page-number="234"] div.thumb{
margin-bottom: 22px; margin-bottom: 22px;
} }
div[data-page-number="247"] div.floatnone{ div[data-page-number="245"] div.floatnone{
margin-top: -6px; margin-top: -6px;
} }
div[data-page-number="252"] div.floatnone{ div[data-page-number="250"] div.floatnone{
margin-top: 5px !important; margin-top: 5px !important;
} }
div[data-page-number="254"] div.floatnone{ div[data-page-number="252"] div.floatnone{
margin-top: -7px; margin-top: -7px;
} }
div[data-page-number="257"] div.floatnone{ div[data-page-number="255"] div.floatnone{
margin-top: -2px; margin-top: -2px;
} }
div[data-page-number="279"] div.thumb{ div[data-page-number="277"] div.thumb{
margin-top: 21px; margin-top: 21px;
} }
div[data-page-number="284"] p.image{ div[data-page-number="282"] p.image{
margin-top: -2px !important; margin-top: -2px !important;
} }
div[data-page-number="285"] p.image{ div[data-page-number="283"] p.image{
margin-bottom: 22px !important; margin-bottom: 21px !important;
} }
div[data-page-number="287"] p.image{ div[data-page-number="285"] p.image{
margin-bottom: 20px !important; margin-bottom: 21px !important;
} }
div[data-page-number="292"] p.image{ div[data-page-number="290"] p.image{
margin-bottom: 24px !important; margin-bottom: 24px !important;
} }
div[data-page-number="297"] div.thumb{ div[data-page-number="295"] div.thumb{
margin-top: -2px; margin-top: -2px;
margin-bottom: 16px; margin-bottom: 16px;
} }
div[data-page-number="298"] div.thumb{ div[data-page-number="296"] div.thumb{
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="300"] div.thumb{ div[data-page-number="298"] div.thumb{
margin-top: 21px; margin-top: 21px;
margin-bottom: 20px; margin-bottom: 20px;
} }
div[data-page-number="305"] div.thumb{ div[data-page-number="303"] div.thumb{
margin-bottom: 20px; margin-bottom: 19px;
} }
div[data-page-number="308"] div.thumb{ div[data-page-number="306"] div.thumb{
margin-top: 19px; margin-top: 19px;
margin-bottom: 20px; margin-bottom: 21px;
} }
.contribution.so-called-plants div.floatnone + p{ .contribution.so-called-plants div.floatnone + p{
margin-left: var(--second-indent) !important; margin-left: var(--second-indent) !important;
text-indent: unset !important; text-indent: unset !important;
} }
pre{ pre {
/* BITTER VERSION */ /* BITTER VERSION */
font-family: "bitter"; font-family: "bitter";
font-size: var(--font-size); font-size: var(--small-font-size);
line-height: var(--line-height); line-height: var(--small-line-height);
hyphens: none; hyphens: none;
white-space: pre-line; white-space: pre-line;
margin: calc(var(--line-height) - 1px) 0 calc(var(--line-height) - 1px) var(--second-indent); margin: 12px 0 12px var(--second-indent);
border: 1px solid rgb(220,220,220);
padding: calc(var(--line-height) / 2) var(--line-height);
page-break-inside: avoid; page-break-inside: avoid;
} }
/* BASELINE TWEAKING PRE's */
div[data-page-number="69"] pre {
margin-top: 16px !important;
margin-bottom: 17px !important;
}
div[data-page-number="243"] pre {
margin-top: 16px !important;
margin-bottom: 16px !important;
}
div[data-page-number="245"] pre {
margin-top: 14px !important;
margin-bottom: 15px !important;
}
div[data-page-number="251"] pre {
margin-top: 18px !important;
margin-bottom: 19px !important;
}
div[data-page-number="253"] pre {
margin-top: 19px !important;
margin-bottom: 21px !important;
}
div[data-page-number="256"] pre {
margin-top: 16px !important;
margin-bottom: 17px !important;
}
div.quote > pre{ div.quote > pre{
border: none; border: none;
padding: 0; padding: 0;
page-break-inside: unset; page-break-inside: unset;
font-size: var(--font-size) !important;
font-style: italic; font-style: italic;
white-space: pre-line; white-space: pre-line;
word-wrap: break-word; word-wrap: break-word;
line-height: var(--line-height); line-height: var(--line-height) !important;
margin-bottom: var(--line-height); margin-top: var(--line-height) !important;
margin-bottom: var(--line-height) !important;
} }
div.contribution.so-called-plants pre{ /*div.contribution.so-called-plants pre{
margin-top: 9px; margin-top: 9px;
margin-bottom: 15px; margin-bottom: 15px;
} }*/
blockquote{ blockquote{
margin: 0 0 0 var(--second-indent); margin: 0 0 0 var(--second-indent);
font-style: italic; font-style: italic;

6007
command-line/js/paged.polyfill.js

File diff suppressed because it is too large

3
command-line/templates/template.html

@ -5,7 +5,7 @@
<link href="./css/pagedjs.css" rel="stylesheet" type="text/css"> <link href="./css/pagedjs.css" rel="stylesheet" type="text/css">
<link href="./css/print.css" rel="stylesheet" type="text/css" media="print"> <link href="./css/print.css" rel="stylesheet" type="text/css" media="print">
<!-- BASELINE GRID --> <!-- BASELINE GRID -->
<!-- <link href="./css/baseline.css" rel="stylesheet" type="text/css" media="print"> --> <link href="./css/baseline.css" rel="stylesheet" type="text/css" media="print">
<!-- ------------- --> <!-- ------------- -->
<script> <script>
// Hyphenopoly is used for the hyphenation of the book. // Hyphenopoly is used for the hyphenation of the book.
@ -38,7 +38,6 @@
} }
</script> </script>
<script src="./js/hyphens/Hyphenopoly_Loader.js"></script> <script src="./js/hyphens/Hyphenopoly_Loader.js"></script>
<!-- <script src="./js/paged.js" type="text/javascript"></script> -->
<script src="./js/paged.polyfill.js"></script> <script src="./js/paged.polyfill.js"></script>
<script src="./js/runHyphens.js"></script> <script src="./js/runHyphens.js"></script>
</head> </head>

72
command-line/update.py

@ -63,31 +63,34 @@ def download_media(html, images, wiki):
# check if the image is already downloaded # check if the image is already downloaded
# if not, then download the file # if not, then download the file
if not os.path.isfile(f'{ STATIC_FOLDER_PATH }/images/{ filename }'): # !!!!!
# turned off for preparing final files (AUG 2022)
# first we search for the full filename of the image # !!!!!
url = f'{ wiki }/api.php?action=query&list=allimages&aifrom={ filename }&format=json' # if not os.path.isfile(f'{ STATIC_FOLDER_PATH }/images/{ filename }'):
response = urllib.request.urlopen(url).read()
data = json.loads(response) # # first we search for the full filename of the image
# url = f'{ wiki }/api.php?action=query&list=allimages&aifrom={ filename }&format=json'
# we select the first search result # response = urllib.request.urlopen(url).read()
# (assuming that this is the image we are looking for) # data = json.loads(response)
image = data['query']['allimages'][0]
# # we select the first search result
# then we download the image # # (assuming that this is the image we are looking for)
image_url = image['url'] # image = data['query']['allimages'][0]
image_filename = image['name']
print('Downloading:', image_filename) # # then we download the image
image_response = urllib.request.urlopen(image_url).read() # image_url = image['url']
# image_filename = image['name']
# and we save it as a file # print('Downloading:', image_filename)
image_path = f'{ STATIC_FOLDER_PATH }/images/{ image_filename }' # image_response = urllib.request.urlopen(image_url).read()
out = open(image_path, 'wb')
out.write(image_response) # # and we save it as a file
out.close() # image_path = f'{ STATIC_FOLDER_PATH }/images/{ image_filename }'
# out = open(image_path, 'wb')
import time # out.write(image_response)
time.sleep(3) # do not overload the server # out.close()
# import time
# time.sleep(3) # do not overload the server
# replace src image link (from wiki folder structure to local folder) # replace src image link (from wiki folder structure to local folder)
image_path = f'{ PUBLIC_STATIC_FOLDER_PATH }/images/{ filename }' # here the images need to link to the / of the domain, for flask :/// confusing! this breaks the whole idea to still be able to make a local copy of the file image_path = f'{ PUBLIC_STATIC_FOLDER_PATH }/images/{ filename }' # here the images need to link to the / of the domain, for flask :/// confusing! this breaks the whole idea to still be able to make a local copy of the file
@ -171,7 +174,7 @@ def tweaking(html):
html = html.replace('<h2><span class="mw-headline" id="Volumetric_Regimes:_Material_cultures_of_quantified_presence">Volumetric Regimes: Material cultures of quantified presence</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>', '<h2><span class="mw-headline" id="Volumetric_Regimes:_Material_cultures_of_quantified_presence">Volumetric Regimes:<br>Material cultures of<br>quantified presence</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>') html = html.replace('<h2><span class="mw-headline" id="Volumetric_Regimes:_Material_cultures_of_quantified_presence">Volumetric Regimes: Material cultures of quantified presence</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>', '<h2><span class="mw-headline" id="Volumetric_Regimes:_Material_cultures_of_quantified_presence">Volumetric Regimes:<br>Material cultures of<br>quantified presence</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>')
html = html.replace('<h2><span id="Somatopologies_(materials_for_a_movie_in_the_making)"></span><span class="mw-headline" id="Somatopologies_.28materials_for_a_movie_in_the_making.29">Somatopologies (materials for a movie in the making)</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>', '<h2><span id="Somatopologies_(materials_for_a_movie_in_the_making)"></span><span class="mw-headline" id="Somatopologies_.28materials_for_a_movie_in_the_making.29">Somatopologies (materials<br> for a movie in the making)</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>') html = html.replace('<h2><span id="Somatopologies_(materials_for_a_movie_in_the_making)"></span><span class="mw-headline" id="Somatopologies_.28materials_for_a_movie_in_the_making.29">Somatopologies (materials for a movie in the making)</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>', '<h2><span id="Somatopologies_(materials_for_a_movie_in_the_making)"></span><span class="mw-headline" id="Somatopologies_.28materials_for_a_movie_in_the_making.29">Somatopologies (materials<br> for a movie in the making)</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>')
html = html.replace('<h1><span class="mw-headline" id="Signs_of_clandestine_disorder:_The_continuous_aftermath_of_3D-computationalism"><a href="#Clandestine_disorder" title="Clandestine disorder">Signs of clandestine disorder: The continuous aftermath of 3D-computationalism</a></span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h1>', '<h1><span class="mw-headline" id="Signs_of_clandestine_disorder:_The_continuous_aftermath_of_3D-computationalism"><a href="#Clandestine_disorder" title="Clandestine disorder">Signs of clandestine disorder:<br>The continuous<br>aftermath of 3D-<br>computationalism</a></span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h1>') html = html.replace('<h1><span class="mw-headline" id="Signs_of_clandestine_disorder:_The_continuous_aftermath_of_3D-computationalism"><a href="#Clandestine_disorder" title="Clandestine disorder">Signs of clandestine disorder: The continuous aftermath of 3D-computationalism</a></span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h1>', '<h1><span class="mw-headline" id="Signs_of_clandestine_disorder:_The_continuous_aftermath_of_3D-computationalism"><a href="#Clandestine_disorder" title="Clandestine disorder">Signs of clandestine disorder:<br>The continuous<br>aftermath of 3D-<br>computationalism</a></span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h1>')
html = html.replace('<h2><span class="mw-headline" id="The_Industrial_Continuum_of_3D">The Industrial Continuum of 3D</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>', '<h2><span class="mw-headline" id="The_Industrial_Continuum_of_3D">The Industrial Continuum<br>of 3D</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>') html = html.replace('<h2><span class="mw-headline" id="The_Industrial_Continuum_of_3D">The Industrial Continuum of 3D</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>', '<h2><span class="mw-headline" id="The_Industrial_Continuum_of_3D">The Industrial Continuum <br>of 3D</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>')
html = html.replace('<h1><span class="mw-headline" id="Depths_and_Densities:_Accidented_and_dissonant_spacetimes"><a href="#Depths_and_densities" title="Depths and densities">Depths and Densities: Accidented and dissonant spacetimes</a></span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h1>', '<h1><span class="mw-headline" id="Depths_and_Densities:_Accidented_and_dissonant_spacetimes"><a href="#Depths_and_densities" title="Depths and densities">Depths and Densities:<br>Accidented<br>and dissonant<br>spacetimes</a></span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h1>') html = html.replace('<h1><span class="mw-headline" id="Depths_and_Densities:_Accidented_and_dissonant_spacetimes"><a href="#Depths_and_densities" title="Depths and densities">Depths and Densities: Accidented and dissonant spacetimes</a></span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h1>', '<h1><span class="mw-headline" id="Depths_and_Densities:_Accidented_and_dissonant_spacetimes"><a href="#Depths_and_densities" title="Depths and densities">Depths and Densities:<br>Accidented<br>and dissonant<br>spacetimes</a></span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h1>')
html = html.replace('<h2><span class="mw-headline" id="Open_Boundary_Conditions:_a_grid_for_intensive_study">Open Boundary Conditions: a grid for intensive study</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>', '<h2><span class="mw-headline" id="Open_Boundary_Conditions:_a_grid_for_intensive_study">Open Boundary Conditions:<br>a grid for intensive study</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>') html = html.replace('<h2><span class="mw-headline" id="Open_Boundary_Conditions:_a_grid_for_intensive_study">Open Boundary Conditions: a grid for intensive study</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>', '<h2><span class="mw-headline" id="Open_Boundary_Conditions:_a_grid_for_intensive_study">Open Boundary Conditions:<br>a grid for intensive study</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>')
html = html.replace('T*fRP', 'T✶fRP') html = html.replace('T*fRP', 'T✶fRP')
@ -185,7 +188,20 @@ def tweaking(html):
html = html.replace('I find gestationality useful and very exciting.', 'I find gestationality useful and very<br>exciting.') # force line break html = html.replace('I find gestationality useful and very exciting.', 'I find gestationality useful and very<br>exciting.') # force line break
html = html.replace('world.html https://docs.blender.org/manual/en/dev/rende', 'world.html<br>https://docs.blender.org/manual/en/dev/rende') # force line break html = html.replace('world.html https://docs.blender.org/manual/en/dev/rende', 'world.html<br>https://docs.blender.org/manual/en/dev/rende') # force line break
html = html.replace('Nerea Calvillo, Eric Snodgrass', 'Nerea Calvillo, Eric <br>Snodgrass') # force line break html = html.replace('Nerea Calvillo, Eric Snodgrass', 'Nerea Calvillo, Eric <br>Snodgrass') # force line break
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
# Missing sentences hack zone........
html = html.replace('from on-line hosting, designing, peer-reviewing', 'from on-line hosting, designing, </p><div class="page-break"></div><div class="no-text-indent"><p>peer-reviewing')
html = html.replace('''revolving of all matters.
</p>''', '''revolving of all matters.</p></div>
''')
html = html.replace('in an efficient manner, combining positivist science', 'in an efficient manner,<br />combining positivist science')
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
html = html.replace('src="./images/Barcode.png"', 'src="./cover/Barcode.svg"') # This image is not on the wiki
html = html.replace('src="./images/OHP-logo-title.png"', 'src="./cover/OHP-logo-title.svg"') # This image is not on the wiki
pattern1 = r'''<h2><span class="mw-headline" id=".*">.*</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2> pattern1 = r'''<h2><span class="mw-headline" id=".*">.*</span><span class="mw-editsection"><span class="mw-editsection-bracket"></span></span></h2>
<p><b>.*?</b> <p><b>.*?</b>
</p>''' # title + author </p>''' # title + author
@ -254,7 +270,7 @@ def parse_page(pagename, wiki):
if 'parse' in data: if 'parse' in data:
html = data['parse']['text']['*'] html = data['parse']['text']['*']
images = data['parse']['images'] images = data['parse']['images']
html = download_media(html, images, wiki) html = download_media(html, images, wiki)
html = clean_up(html) html = clean_up(html)
html = add_item_inventory_links(html) html = add_item_inventory_links(html)
html = tweaking(html) html = tweaking(html)

Loading…
Cancel
Save