main
funix 3 years ago
parent 65da6e5e7e
commit 4a519db2f7

@ -0,0 +1,14 @@
November 2021, ZineCamp, Worm
Welcome to
## # Not-completely-fully automated {{luxury}} layouting # ##
Thanks to be here!
Useful links:
https://pigment.shapefactory.co/
https://www.pagedjs.org/

BIN
collective/.DS_Store vendored

Binary file not shown.

@ -1,3 +1,12 @@
Thanks OSP!
http://osp.kitchen/tools/ether2html/
>>>
Content of the pad markdown boilerplate, for copy/paste or reference Content of the pad markdown boilerplate, for copy/paste or reference
---- ----
@ -56,13 +65,13 @@ Content of the pad CSS boilerplate, for copy/paste or reference
body { body {
font-size: 12pt; font-size: 12pt;
line-height: 1.2em; line-height: 1.2em;
font-family: 'alfphabet-iii', sans-serif; font-family: arial, sans-serif;
} }
h1 { h1 {
font-size: 30pt; font-size: 30pt;
page-break-before: always; page-break-before: always;
font-family: 'alfphabet-iv'; font-family: monaco;
font-weight: normal; font-weight: normal;
} }
@ -92,7 +101,7 @@ a:after {
} }
code { code {
font-family: 'notcourier'; font-family: 'courier';
} }
@page { @page {
@ -101,13 +110,13 @@ code {
} }
@page :left { @page :left {
margin: 50mm 50mm; margin: 25mm 25mm;
@left-middle{ @left-middle{
content: "A title"; content: "spinach";
transform: rotate(-90deg); transform: rotate(-90deg);
} }
@top-center { @top-center {
content: "Another title"; content: "magic";
} }
@top-left-corner { @top-left-corner {
content: counter(page); content: counter(page);
@ -117,13 +126,13 @@ code {
} }
@page :right { @page :right {
margin: 50mm 50mm; margin: 25mm 25mm;
@right-middle{ @right-middle{
content: "Special Issue XI"; content: "(A)";
transform: rotate(90deg); transform: rotate(90deg);
} }
@top-center { @top-center {
content: "Again a title"; content: "chaos";
} }
@top-right-corner { @top-right-corner {
transform: rotate(90deg); transform: rotate(90deg);
@ -148,21 +157,34 @@ code {
} }
} }
/* Even if brutal, fonts could be embedded directly from remote source */
/* As Ether2html is a way to do publications, not website */
@font-face {
font-family: "notcourier";
src: url("http://osp.kitchen/api/osp.foundry.notcouriersans/9fff7fd811e6982a46b88f7772fa9768b03c6003/blob-data/NotCourierSans.ttf");
}
@font-face {
font-family: "alfphabet-iv";
src: url("http://osp.kitchen/api/osp.foundry.alfphabet/53301035a44a724592c06018a5d5cfb59eee6fd8/blob-data/Alfphabet-IV.otf");
}
@font-face {
font-family: "alfphabet-iii";
src: url("
http://osp.kitchen/api/osp.foundry.alfphabet/78cab074aa56a4e3f7c7d0b10aaf6cd14dca9fad/blob-data/Alfphabet-III.otf");
}

@ -1,11 +1,13 @@
<!-- neo ex -->
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>ether2html</title> <title>📡 💻📘</title>
<script src="../script/showdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.9.0/showdown.min.js"></script> <script src="../script/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
function run() { function run() {
var text = document.getElementById('pad-content').innerHTML, var text = document.getElementById('pad-content').innerHTML,
@ -14,31 +16,40 @@
html = converter.makeHtml(text); html = converter.makeHtml(text);
target.innerHTML = html; target.innerHTML = html;
} }
$(document).ready(function(){ $(document).ready(function() {
$("#pad-content").load($("#pad-content").attr("data-md"), function(){ $("#pad-content").load($("#pad-content").attr("data-md"), function() {
run(); run();
window.setTimeout(function(){ window.setTimeout(function() {
$.getScript("paged.polyfill.js", function(data, textStatus, jqxhr) {}) $.getScript("../script/paged.polyfill.js", function(data, textStatus, jqxhr) {})
}); });
}); });
}); });
</script> </script>
<!-- This is the default interface of paged.js --> <!-- set the interface of paged.js -->
<style type="text/css" media="screen">:root{--color-background:whitesmoke;--color-pageBox:#666;--color-paper:white;--color-marginBox:transparent}@media screen{body{background-color:var(--color-background)}.pagedjs_pages{display:flex;width:calc(var(--pagedjs-width) * 2);flex:0;flex-wrap:wrap;margin:0 auto}.pagedjs_page{background-color:var(--color-paper);box-shadow:0 0 0 1px var(--color-pageBox);margin:0;flex-shrink:0;flex-grow:0;margin-top:10mm}.pagedjs_first_page{margin-left:var(--pagedjs-width)}.pagedjs_page:last-of-type{margin-bottom:10mm}.pagedjs_margin-bottom,.pagedjs_margin-bottom-center,.pagedjs_margin-bottom-left,.pagedjs_margin-bottom-left-corner-holder,.pagedjs_margin-bottom-right,.pagedjs_margin-bottom-right-corner-holder,.pagedjs_margin-left,.pagedjs_margin-left-bottom,.pagedjs_margin-left-middle,.pagedjs_margin-left-top,.pagedjs_margin-right,.pagedjs_margin-right-bottom,.pagedjs_margin-right-middle,.pagedjs_margin-right-top,.pagedjs_margin-top,.pagedjs_margin-top-center,.pagedjs_margin-top-left,.pagedjs_margin-top-left-corner-holder,.pagedjs_margin-top-right,.pagedjs_margin-top-right-corner-holder{box-shadow:0 0 0 1px inset var(--color-marginBox)}}</style> <link rel="stylesheet" href="../script/interface.css">
<!-- As the markdown pad is loaded then converted to html, the following line hide the markdown version --> <!-- As the markdown pad is loaded then converted to html, the following line hide the markdown version -->
<style type="text/css" media="all">#pad-content{display: none;}</style> <style type="text/css" media="all">
#pad-content {
display: none;
}
</style>
<link href="https://pad.xpub.nl/p/poni_css/export/txt" rel="stylesheet" text="text/css"> <!-- Collective css file, on a pad -->
<link href="https://pad.xpub.nl/p/css/export/txt" rel="stylesheet" text="text/css">
</head> </head>
<body> <body>
<!-- CHANGE THE URL OF YOUR MARKDOWN CONTENT PAD BELOW --> <!-- Collective writings, on a pad -->
<div data-md="https://pad.xpub.nl/p/poni_grad/export/txt" id="pad-content"></div> <div data-md="https://pad.xpub.nl/p/Eco_swaraj%E2%80%93Ashish_Kothari/export/txt" id="pad-content"></div>
<div id="document"></div> <div id="document"></div>
</body> </body>
</html>
</html>

File diff suppressed because one or more lines are too long

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div>
<h1><a href="https://canadiandimension.com/images/made/images/reviews/_resized/Fully_Automated_Luxury_Communism_cover_300_440_80.jpg" target="_blank">## # Not-completely-fully automated {{luxury}} layouting # ##<a></h1>
<h2>Welcome %%%%%%%%%%</h2>
<a href="https://www.pagedjs.org/" target="_blank">Introducing paged.js</a><br>
<hr>
<a href="scrape.php" target="_blank">The Sacred Pizza and the Abominable Platforms</a><br>
<hr>
<a href="collective/" target="_blank">A collective chaos</a><br>
<a href="non-linear-layouting/grammar/" target="_blank">Play with grammar</a><br>
<a href="non-linear-layouting/telegramChat/" target="_blank">Booklet from a telegram group chat</a><br>
<a href="https://hub.xpub.nl/sandbot/~poni/__lab__/lab/tree/OCR/OCR.ipynb" target="_blank">OCR! Optical Character Recognition => image to text</a><br>
<hr>
<a href="non-linear-layouting/image_scraping/" target="_blank">Scrape images from duckduckgo [beta]</a>
<a href="https://hub.xpub.nl/sandbot/~poni/scrapeMeansProd/" target="_blank">Other examples</a>
</div>
<script>
function openPdf(){
$.ajax({url:"scrape.php", success:function(result){}})}
</script>
</body>
</html>

Binary file not shown.

@ -0,0 +1,28 @@
# November 2021, copyleft || Funix || Zine Camp, Worm, Rotterdam
import cv2
import pytesseract as pt
import os
from PIL import Image, ImageEnhance
def read_img(img):
img = cv2.imread(img)
return pt.image_to_string(img)
name = "silenzionubi"
im = Image.open(f'OCR/scans/{name}.jpg')
enhancer = ImageEnhance.Contrast(im)
factor = 1.5
im_output = enhancer.enhance(factor)
!mkdir OCR/scansN/
im_output.save(f'OCR/scansN/{name}.png')
txt = read_img(f'OCR/scansN/{name}.png')
!mkdir OCR/txt
got = open(f'OCR/txt/{name}.txt','w')
got.write(txt)
got.close()

@ -0,0 +1,423 @@
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../../script/interface.css">
<script src="../../script/paged.polyfill.js"></script>
<link rel="stylesheet" href="./style.css">
<title>📡 💻📘</title>
</head>
<body>
<div class="firstP">
<h1 style="position: absolute; top: 0; left:0; color: black;">Title!</h1>
<p style="position: absolute; bottom: 0; right:0;">Authors!</p>
</div>
<div class="contents">
<span class='NNP'> Manifesto </span>
<span class='IN'> of </span>
<span class='DT'> the </span>
<span class='NNP'> Bored </span>
<span class='NNP'> Party </span>
<span class='NNP'> A </span>
<span class='NN'> spectre </span>
<span class='VBZ'> is </span>
<span class='VBG'> haunting </span>
<span class='NNP'> Europe </span>
<span class='VBZ'> </span>
<span class='DT'> the </span>
<span class='NN'> spectre </span>
<span class='IN'> of </span>
<span class='NN'> boredom </span>
<span class='dot'>.</span><br>
<span class='PDT'> All </span>
<span class='DT'> the </span>
<span class='NNS'> powers </span>
<span class='IN'> of </span>
<span class='JJ'> old </span>
<span class='NNP'> Europe </span>
<span class='VBP'> have </span>
<span class='VBN'> entered </span>
<span class='IN'> into </span>
<span class='DT'> a </span>
<span class='JJ'> holy </span>
<span class='NN'> alliance </span>
<span class='TO'> to </span>
<span class='VB'> exorcise </span>
<span class='DT'> this </span>
<span class='NN'> spectre </span>
<span class=':'> : </span>
<span class='NN'> Pope </span>
<span class='CC'> and </span>
<span class='NNP'> Tsar </span>
<span class=','> , </span>
<span class='NNP'> Metternich </span>
<span class='CC'> and </span>
<span class='NNP'> Guizot </span>
<span class=','> , </span>
<span class='JJ'> French </span>
<span class='NNP'> Radicals </span>
<span class='CC'> and </span>
<span class='JJ'> German </span>
<span class='NNS'> police-spies </span>
<span class='dot'>.</span><br>
<span class='WRB'> Where </span>
<span class='VBZ'> is </span>
<span class='DT'> the </span>
<span class='NN'> party </span>
<span class='IN'> in </span>
<span class='NN'> opposition </span>
<span class='WDT'> that </span>
<span class='VBZ'> has </span>
<span class='RB'> not </span>
<span class='VBN'> been </span>
<span class='VBN'> decried </span>
<span class='IN'> as </span>
<span class='JJ'> communistic </span>
<span class='IN'> by </span>
<span class='PRP$'> its </span>
<span class='NNS'> opponents </span>
<span class='IN'> in </span>
<span class='NN'> power </span>
<span class='.'> ? </span>
<span class='WRB'> Where </span>
<span class='VBZ'> is </span>
<span class='DT'> the </span>
<span class='NN'> opposition </span>
<span class='WDT'> that </span>
<span class='VBZ'> has </span>
<span class='RB'> not </span>
<span class='VBN'> hurled </span>
<span class='RP'> back </span>
<span class='DT'> the </span>
<span class='NN'> branding </span>
<span class='NN'> reproach </span>
<span class='IN'> of </span>
<span class='NN'> boredom </span>
<span class=','> , </span>
<span class='IN'> against </span>
<span class='DT'> the </span>
<span class='RBR'> more </span>
<span class='JJ'> advanced </span>
<span class='NN'> opposition </span>
<span class='NNS'> parties </span>
<span class=','> , </span>
<span class='RB'> as </span>
<span class='RB'> well </span>
<span class='IN'> as </span>
<span class='IN'> against </span>
<span class='PRP$'> its </span>
<span class='JJ'> reactionary </span>
<span class='NNS'> adversaries </span>
<span class='.'> ? </span>
<span class='CD'> Two </span>
<span class='NNS'> things </span>
<span class='VBP'> result </span>
<span class='IN'> from </span>
<span class='DT'> this </span>
<span class='NN'> fact </span>
<span class=':'> : </span>
<span class='NN'> I. </span>
<span class='NNP'> Boredom </span>
<span class='VBZ'> is </span>
<span class='RB'> already </span>
<span class='VBN'> acknowledged </span>
<span class='IN'> by </span>
<span class='DT'> all </span>
<span class='JJ'> European </span>
<span class='NNS'> powers </span>
<span class='TO'> to </span>
<span class='VB'> be </span>
<span class='PRP'> itself </span>
<span class='DT'> a </span>
<span class='NN'> power </span>
<span class='dot'>.</span><br>
<span class='NNP'> II </span>
<span class='dot'>.</span><br>
<span class='PRP'> It </span>
<span class='VBZ'> is </span>
<span class='JJ'> high </span>
<span class='NN'> time </span>
<span class='IN'> that </span>
<span class='NNP'> Boreds </span>
<span class='MD'> should </span>
<span class='RB'> openly </span>
<span class=','> , </span>
<span class='IN'> in </span>
<span class='DT'> the </span>
<span class='NN'> face </span>
<span class='IN'> of </span>
<span class='DT'> the </span>
<span class='JJ'> whole </span>
<span class='NN'> world </span>
<span class=','> , </span>
<span class='VB'> publish </span>
<span class='PRP$'> their </span>
<span class='NNS'> views </span>
<span class=','> , </span>
<span class='PRP$'> their </span>
<span class='NNS'> aims </span>
<span class=','> , </span>
<span class='PRP$'> their </span>
<span class='NNS'> tendencies </span>
<span class=','> , </span>
<span class='CC'> and </span>
<span class='VB'> meet </span>
<span class='DT'> this </span>
<span class='JJ'> nursery </span>
<span class='NN'> tale </span>
<span class='IN'> of </span>
<span class='DT'> the </span>
<span class='NNP'> Spectre </span>
<span class='IN'> of </span>
<span class='NNP'> Boredom </span>
<span class='IN'> with </span>
<span class='DT'> a </span>
<span class='NN'> manifesto </span>
<span class='IN'> of </span>
<span class='DT'> the </span>
<span class='NN'> party </span>
<span class='PRP'> itself </span>
<span class='dot'>.</span><br>
<span class='TO'> To </span>
<span class='DT'> this </span>
<span class='NN'> end </span>
<span class=','> , </span>
<span class='NNP'> Boreds </span>
<span class='IN'> of </span>
<span class='JJ'> various </span>
<span class='NNS'> nationalities </span>
<span class='VBP'> have </span>
<span class='VBN'> assembled </span>
<span class='IN'> in </span>
<span class='NNP'> London </span>
<span class='CC'> and </span>
<span class='VBD'> sketched </span>
<span class='DT'> the </span>
<span class='JJ'> following </span>
<span class='NN'> manifesto </span>
<span class=','> , </span>
<span class='TO'> to </span>
<span class='VB'> be </span>
<span class='VBN'> published </span>
<span class='IN'> in </span>
<span class='DT'> the </span>
<span class='NNP'> English </span>
<span class=','> , </span>
<span class='NNP'> French </span>
<span class=','> , </span>
<span class='NNP'> German </span>
<span class=','> , </span>
<span class='NNP'> Italian </span>
<span class=','> , </span>
<span class='NNP'> Flemish </span>
<span class='CC'> and </span>
<span class='NNP'> Danish </span>
<span class='NNS'> languages </span>
<span class='dot'>.</span><br>
<span class='NNP'> Manifesto </span>
<span class='IN'> of </span>
<span class='DT'> the </span>
<span class='NNP'> Bored </span>
<span class='NNP'> Party </span>
<span class='NNP'> A </span>
<span class='NN'> spectre </span>
<span class='VBZ'> is </span>
<span class='VBG'> haunting </span>
<span class='NNP'> Europe </span>
<span class='VBZ'> </span>
<span class='DT'> the </span>
<span class='NN'> spectre </span>
<span class='IN'> of </span>
<span class='NN'> boredom </span>
<span class='dot'>.</span><br>
<span class='PDT'> All </span>
<span class='DT'> the </span>
<span class='NNS'> powers </span>
<span class='IN'> of </span>
<span class='JJ'> old </span>
<span class='NNP'> Europe </span>
<span class='VBP'> have </span>
<span class='VBN'> entered </span>
<span class='IN'> into </span>
<span class='DT'> a </span>
<span class='JJ'> holy </span>
<span class='NN'> alliance </span>
<span class='TO'> to </span>
<span class='VB'> exorcise </span>
<span class='DT'> this </span>
<span class='NN'> spectre </span>
<span class=':'> : </span>
<span class='NN'> Pope </span>
<span class='CC'> and </span>
<span class='NNP'> Tsar </span>
<span class=','> , </span>
<span class='NNP'> Metternich </span>
<span class='CC'> and </span>
<span class='NNP'> Guizot </span>
<span class=','> , </span>
<span class='JJ'> French </span>
<span class='NNP'> Radicals </span>
<span class='CC'> and </span>
<span class='JJ'> German </span>
<span class='NNS'> police-spies </span>
<span class='dot'>.</span><br>
<span class='WRB'> Where </span>
<span class='VBZ'> is </span>
<span class='DT'> the </span>
<span class='NN'> party </span>
<span class='IN'> in </span>
<span class='NN'> opposition </span>
<span class='WDT'> that </span>
<span class='VBZ'> has </span>
<span class='RB'> not </span>
<span class='VBN'> been </span>
<span class='VBN'> decried </span>
<span class='IN'> as </span>
<span class='JJ'> communistic </span>
<span class='IN'> by </span>
<span class='PRP$'> its </span>
<span class='NNS'> opponents </span>
<span class='IN'> in </span>
<span class='NN'> power </span>
<span class='.'> ? </span>
<span class='WRB'> Where </span>
<span class='VBZ'> is </span>
<span class='DT'> the </span>
<span class='NN'> opposition </span>
<span class='WDT'> that </span>
<span class='VBZ'> has </span>
<span class='RB'> not </span>
<span class='VBN'> hurled </span>
<span class='RP'> back </span>
<span class='DT'> the </span>
<span class='NN'> branding </span>
<span class='NN'> reproach </span>
<span class='IN'> of </span>
<span class='NN'> boredom </span>
<span class=','> , </span>
<span class='IN'> against </span>
<span class='DT'> the </span>
<span class='RBR'> more </span>
<span class='JJ'> advanced </span>
<span class='NN'> opposition </span>
<span class='NNS'> parties </span>
<span class=','> , </span>
<span class='RB'> as </span>
<span class='RB'> well </span>
<span class='IN'> as </span>
<span class='IN'> against </span>
<span class='PRP$'> its </span>
<span class='JJ'> reactionary </span>
<span class='NNS'> adversaries </span>
<span class='.'> ? </span>
<span class='CD'> Two </span>
<span class='NNS'> things </span>
<span class='VBP'> result </span>
<span class='IN'> from </span>
<span class='DT'> this </span>
<span class='NN'> fact </span>
<span class=':'> : </span>
<span class='NN'> I. </span>
<span class='NNP'> Boredom </span>
<span class='VBZ'> is </span>
<span class='RB'> already </span>
<span class='VBN'> acknowledged </span>
<span class='IN'> by </span>
<span class='DT'> all </span>
<span class='JJ'> European </span>
<span class='NNS'> powers </span>
<span class='TO'> to </span>
<span class='VB'> be </span>
<span class='PRP'> itself </span>
<span class='DT'> a </span>
<span class='NN'> power </span>
<span class='dot'>.</span><br>
<span class='NNP'> II </span>
<span class='dot'>.</span><br>
<span class='PRP'> It </span>
<span class='VBZ'> is </span>
<span class='JJ'> high </span>
<span class='NN'> time </span>
<span class='IN'> that </span>
<span class='NNP'> Boreds </span>
<span class='MD'> should </span>
<span class='RB'> openly </span>
<span class=','> , </span>
<span class='IN'> in </span>
<span class='DT'> the </span>
<span class='NN'> face </span>
<span class='IN'> of </span>
<span class='DT'> the </span>
<span class='JJ'> whole </span>
<span class='NN'> world </span>
<span class=','> , </span>
<span class='VB'> publish </span>
<span class='PRP$'> their </span>
<span class='NNS'> views </span>
<span class=','> , </span>
<span class='PRP$'> their </span>
<span class='NNS'> aims </span>
<span class=','> , </span>
<span class='PRP$'> their </span>
<span class='NNS'> tendencies </span>
<span class=','> , </span>
<span class='CC'> and </span>
<span class='VB'> meet </span>
<span class='DT'> this </span>
<span class='JJ'> nursery </span>
<span class='NN'> tale </span>
<span class='IN'> of </span>
<span class='DT'> the </span>
<span class='NNP'> Spectre </span>
<span class='IN'> of </span>
<span class='NNP'> Boredom </span>
<span class='IN'> with </span>
<span class='DT'> a </span>
<span class='NN'> manifesto </span>
<span class='IN'> of </span>
<span class='DT'> the </span>
<span class='NN'> party </span>
<span class='PRP'> itself </span>
<span class='dot'>.</span><br>
<span class='TO'> To </span>
<span class='DT'> this </span>
<span class='NN'> end </span>
<span class=','> , </span>
<span class='NNP'> Boreds </span>
<span class='IN'> of </span>
<span class='JJ'> various </span>
<span class='NNS'> nationalities </span>
<span class='VBP'> have </span>
<span class='VBN'> assembled </span>
<span class='IN'> in </span>
<span class='NNP'> London </span>
<span class='CC'> and </span>
<span class='VBD'> sketched </span>
<span class='DT'> the </span>
<span class='JJ'> following </span>
<span class='NN'> manifesto </span>
<span class=','> , </span>
<span class='TO'> to </span>
<span class='VB'> be </span>
<span class='VBN'> published </span>
<span class='IN'> in </span>
<span class='DT'> the </span>
<span class='NNP'> English </span>
<span class=','> , </span>
<span class='NNP'> French </span>
<span class=','> , </span>
<span class='NNP'> German </span>
<span class=','> , </span>
<span class='NNP'> Italian </span>
<span class=','> , </span>
<span class='NNP'> Flemish </span>
<span class='CC'> and </span>
<span class='NNP'> Danish </span>
<span class='NNS'> languages </span>
<span class='dot'>.</span><br>
</div>
</body>
</html>

@ -17,7 +17,7 @@
import nltk # to use NLTK import nltk # to use NLTK
from urllib.request import urlopen # to request urls usage from urllib.request import urlopen # to request urls usage
url = 'https://pad.xpub.nl/p/poni_grad/export/txt' url = 'https://pad.xpub.nl/p/grammar/export/txt'
response = urlopen(url) response = urlopen(url)
text = response.read().decode('UTF-8') text = response.read().decode('UTF-8')
@ -48,36 +48,13 @@ pos = nltk.pos_tag(tokens)
html = '' html = ''
html1 = ''' html = '''
<!DOCTYPE html> <!DOCTYPE html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="../../script/interface.css">
<link rel="stylesheet" href="./pagedjs_files/interface.css"> <script src="../../script/paged.polyfill.js"></script>
<script src="./pagedjs_files/paged.polyfill.js"></script> <link rel="stylesheet" href="./style.css">
<link rel="stylesheet" href="./styles/1.css">
<title>📡 💻📘</title>
</head>
<body>
<div class="firstP">
<h1 style="position: absolute; top: 0; left:0; color: black;">Title!</h1>
<p style="position: absolute; bottom: 0; right:0;">Authors!</p>
</div>
<div class="contents">
'''
html2 = '''
<!DOCTYPE html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./pagedjs_files/interface.css">
<script src="./pagedjs_files/paged.polyfill.js"></script>
<link rel="stylesheet" href="./styles/style.css">
<title>📡 💻📘</title> <title>📡 💻📘</title>
</head> </head>
<body> <body>
@ -113,7 +90,6 @@ html = html.replace(' .', '.').replace(" '", "'")
# Save the <html> files! # Save the <html> files!
with open('./index.html', 'w', encoding='utf-8') as index: with open('./index.html', 'w', encoding='utf-8') as index:
index.write(html2)
index.write(html) index.write(html)
index.close() index.close()

@ -0,0 +1,71 @@
@media print {
/* Define the size of the pages and layout settings */
@page {
size: 148mm 210mm;
margin: 15mm;
}
/* Custom font */
@font-face {
font-family: "";
src: url("");
}
/* Custom variables */
:root {
--first: #19b7b9;
--second: #0b1136;
--third: #2e4473;
}
/* Rules for everything */
body {
font-family: "";
font-size: 20px;
line-height: 35px;
}
/* Rules for the rest */
.contents {
break-before: left
}
div {
box-sizing: border-box;
}
span {
color: white;
}
/* Rules for dots */
.dot {
color: var(--third);
}
/* Rules for Part Of Speech (POS), defined in classes in <span> */
/* This case, conjunctions + verbs ) */
span.NN {
background-color: salmon;
color: rgba(0, 0, 0, 0);
}
span.CC {
color: var(--first);
}
span.VB {
font-size: 3vw;
color: var(--second);
}
span.VBD {
font-size: 3vw;
color: var(--second);
}
span.VBG {
font-size: 3vw;
color: var(--second);
}
span.VBN {
font-size: 3vw;
color: var(--second);
}
span.VBP {
font-size: 3vw;
color: var(--second);
}
span.VBZ {
font-size: 3vw;
color: var(--second);
}
}

@ -0,0 +1,117 @@
# November 2021, copyleft || Funix || Zine Camp, Worm, Rotterdam
# Scrape and download images in local from DuckDuckGo
# with DuckDuckGoImages!
import DuckDuckGoImages as ddg # import the library for scrape
import os # to manipulate the file system
import shutil # same but powerfull >:D
import time # to create delays :: for having a few seconds to check the console
import random # to get random numbers
from urllib.request import urlopen # to request urls usage
# start the layouting :: html + css + paged.js >>
# declare the first part of the text of the html, we will fill it
# in the process with loops
html = '''
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../../script/interface.css">
<script src="../../script/paged.polyfill.js"></script>
<link rel="stylesheet" href="./style.css">
<title>📡 💻📘</title>
</head>
<body>
<div class="firstP">
<h1 style="position: absolute; top: 0; left:0; color: black;">Title!</h1>
<p style="position: absolute; bottom: 0; right:0;">Authors!</p>
</div>
<div class="contents"><p>
'''
# Prepare the local folder :: where the images will be saved >>
if os.path.isdir('./images/'): # check if the folder "images" exists
shutil.rmtree('./images/') # if yes, delete it
os.mkdir('./images/') # and then create a fresh new one
url = 'https://pad.xpub.nl/p/ddg/export/txt'
response = urlopen(url)
qq = response.read().split()
print(qq) # print the array!
time.sleep(2) # check qq in the console!
# Elaborate each word :: process every element of the array qq
for q in qq:
q = q.decode()
print(q) # print the q!
os.mkdir(f'./images/{q}/') # create the folder
# Scrape images with ddg.download()! :: we imported DuckDuckGoImages *as* ddg,
# it's just compacted the name
# q is, indeed, the query for DuckDuckGo
# folder=(../path/to/download)
# max_urls=(how many results attempt to scrape
# thumbnails=(True/False, to download thumbnails or bigger images)
ddg.download(q, folder= f"./images/{q}/", max_urls=5, thumbnails=True)
picc = os.listdir(f"./images/{q}/") # get the contents of the folder
# each downloaded image will have a randomic UUIDv4 name so next step is
# to change its name with the name of the current q
if len(picc) == 0: # if the the list is empty..
html += f'{q}' # ..add now the <html> for just the text, since there are no images downloaded..
html += "\n"
os.rmdir(f'./images/{q}/') # ..and delete the folder created, since is useless..
continue # ..from now on this q can't do anything more, let's go to the next iteration
# Layout q and its pic!
pic = picc[0] # let's take a random picture from the array
os.rename(f'./images/{q}/{pic}', f'./images/{q}/{q}.jpg') # This is to rename the pic with qBinded + the .jpg extension
os.replace(f'./images/{q}/{q}.jpg', f'./images/{q}.jpg') # This is to move the pic to the main folder
shutil.rmtree(f'./images/{q}/') # and it's time to delete the folder of this q
html += f""" {q}""" # Now let's fill the html with text and the pic
html += "\n"
html += f""" <span><img src="./images/{q}.jpg"></span>"""
html += "\n"
# Close the html text
html += ''' </p><div>
</body>
</html>'''
with open('index.html','w') as index: # Save the <html> file!
index.write(html)

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

@ -0,0 +1,66 @@
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../../script/interface.css">
<script src="../../script/paged.polyfill.js"></script>
<link rel="stylesheet" href="./style.css">
<title>📡 💻📘</title>
</head>
<body>
<div class="firstP">
<h1 style="position: absolute; top: 0; left:0; color: black;">Title!</h1>
<p style="position: absolute; bottom: 0; right:0;">Authors!</p>
</div>
<div class="contents"><p>
It
<span><img src="./images/It.jpg"></span>
lasts
<span><img src="./images/lasts.jpg"></span>
a
<span><img src="./images/a.jpg"></span>
fraction
<span><img src="./images/fraction.jpg"></span>
of
<span><img src="./images/of.jpg"></span>
life
<span><img src="./images/life.jpg"></span>
like
<span><img src="./images/like.jpg"></span>
the
<span><img src="./images/the.jpg"></span>
truth
<span><img src="./images/truth.jpg"></span>
of
<span><img src="./images/of.jpg"></span>
making
<span><img src="./images/making.jpg"></span>
sense
<span><img src="./images/sense.jpg"></span>
that
<span><img src="./images/that.jpg"></span>
you
<span><img src="./images/you.jpg"></span>
can
<span><img src="./images/can.jpg"></span>
find
<span><img src="./images/find.jpg"></span>
around
<span><img src="./images/around.jpg"></span>
It
<span><img src="./images/It.jpg"></span>
won't
<span><img src="./images/won't.jpg"></span>
end
<span><img src="./images/end.jpg"></span>
not
<span><img src="./images/not.jpg"></span>
so
<span><img src="./images/so.jpg"></span>
soon
</p><div>
</body>
</html>

@ -0,0 +1,35 @@
@media print {
/* Define the size of the pages and layout settings */
@page {
size: 148mm 210mm;
margin: 15mm;
}
/* Custom fonts */
@font-face {
font-family: "";
src: url("");
}
/* Custom variables */
:root {}
/* Rules for everything */
body {
font-family: "courier";
font-size: 40px;
line-height: 36px;
}
/* Rules for the rest */
.contents {
break-before: right;
}
div {
box-sizing: border-box;
}
img {
margin: 0 1ch;
height: 45px;
vertical-align: middle;
}
span {
break-after: none;
}
}

@ -1,85 +0,0 @@
@media print {
/* Define the size of the pages and layout settings */
@page {
size: 148mm 210mm;
marks: crop cross;
margin: 15mm;
}
/* Custom font */
@font-face {
font-family: "neuzeit";
src: url("./fonts/NeuzeitOffice-Regular.ttf");
}
@font-face {
font-family: "fivo";
src: url("./fonts/fivo-sans.medium.otf");
}
/* Custom variables */
:root {
--first: #19b7b9;
--second: #0b1136;
--third: #2e4473;
}
/* Rules for everything */
body {
font-family: "neuzeit";
font-size: 20px;
line-height: 35px;
}
/* Rules for the rest */
.contents{
break-before: left
}
div {
box-sizing: border-box;
}
span {
color: white;
}
/* Rules for dots */
.dot {
color: var(--third);
}
/* Rules for Part Of Speech (POS), defined in classes in <span> */
/* This case, conjunctions + verbs ) */
span.CC {
font-size: 3vw;
color: var(--first);
}
span.VB {
color: var(--second);
}
span.VBD {
color: var(--second);
}
span.VBG {
color: var(--second);
}
span.VBN {
color: var(--second);
}
span.VBP {
color: var(--second);
}
span.VBZ {
color: var(--second);
}
}

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 325 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 460 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 319 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 392 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save