Merge branch 'master' of ssh://git.xpub.nl:2501/XPUB/special-issue-11-wiki2html into imglink

master
Castro0o 5 years ago
commit 903bc06a2f

@ -1,6 +1,7 @@
import os, json, sys
from mwclient import Site
from jinja2 import Template
from shutil import copy
import html5lib
from functions import Colors
import argparse
@ -29,6 +30,16 @@ print(args)
site = Site(host=args.host, path=args.path)
wd = os.path.dirname(os.path.abspath(__file__)) # working directory
wd_name = os.path.split(wd)[-1] # name of dir running script
# copy static/ to ../archive/static
repo_static_path = './static'
archive_static_path = os.path.join(args.output, repo_static_path)
os.makedirs(archive_static_path, exist_ok=True) # create static/ dir in archive
for static_file in os.listdir(path='./static'):
copy(src=os.path.join(repo_static_path, static_file),
dst=os.path.join(archive_static_path, static_file))
with open('login.txt', 'r') as login: # read login user & pwd
loginlines = login.read()
user, pwd = loginlines.split('\n')
@ -130,8 +141,7 @@ def dumppage(p, template, rewrite_images=True):
htmlsrc = rewritelinks(htmlsrc)
if rewrite_images:
htmlsrc = rewriteimgs(htmlsrc)
# TODO: ANdre structure of archive: from ./archive/0 to: ./archive ./0
html = template.render(page=p, body=htmlsrc, staticpath=f'../{wd_name}')
html = template.render(page=p, body=htmlsrc, staticpath='.')
with open(os.path.join(args.output, filenameforpage(p)), 'w') as f:
f.write(html)
# print(html, file=f)

@ -1,26 +1,33 @@
body {
background-color: #F4EBE8;
font-family: Roboto Mono;
}
.projtextcont{
display: block;
/*align-items: center;
justify-content: center*/
color:#371F10;
margin-left:200px;
font-family: Roboto Mono;
}
.projtext{
width: 50%;
height: 50%;
width: 85%;
display: block;
}
h1{
display: block;
width:50%;
}
h2{
display: block;
width:70%;
text-align: justify;
}
.pagelink{
@ -59,4 +66,8 @@ h1{
font-size: 13px;
background-color: white;
visibility: hidden;
}s
}
.pagelink:hover .pagename{
visibility: visible;
}

@ -1,6 +1,59 @@
body {
background-color: #aaa4a0;
font-family: Arial, Helvetica, sans-serif;
color: #371F10;
font-family: Roboto Mono, monospace;
}
.pagelink{
position: fixed;
display: inline;
left:0px;
/* width:20px;
height:20px;*/
padding: 0px 5px 0px 5px;
background-color: white;
z-index: 10;
font-size: 30px;
text-align: center;
border-top-style: solid;
border-right-style: solid;
border-bottom-style: solid;
/*border-style: solid;*/
border-width: 1px;
border-color: #371F10;
}
.pagelink:hover{
background-color: #0BEFEB;
}
.pagelink a{
text-decoration: none;
}
.pagelink .pagename{
display: inline;
position: absolute;
width: auto;
padding: 5px;
margin-left: 25px;
font-size: 13px;
background-color: white;
visibility: hidden;
}
.pagelink:hover .pagename{
visibility: visible;
}
h1 {
position: fixed;
right:0%;
top:5%;
text-align: right;
background-color: rgba(11,239,235,0.7);
padding: 3px 35px 3px 10px;
z-index: 10;
font-size: 28px;
}
a, a:visited{

@ -1,151 +1,115 @@
#top {
padding-top: 20px;
padding-left: 50px;
}
body {
background-color: #F4EBE8;
font-family: Roboto Mono;
font-size:11.5px;
font-size:14px;
}
/* Page title */
h1 {
position: fixed;
right:0%;
top:3%;
top:5%;
text-align: right;
background-color: #0BEFEB;
padding: 15px 85px 15px 30px;
z-index: 10;
color: #371F10;
font-size: 28px;
opacity: 0.7;
}
/*
h1 {
position: fixed;
right:0%;
top:3%;
text-align: right;
background-color: transparent;
padding: 10px 30px 30px 20px;
padding: 3px 35px 3px 10px;
z-index: 10;
color: black;
font-size: 28px;
border: 1px solid blue;
border-right: none;
opacity: 0.7;
color: #371F10;
}
*/
/* Organizations list */
.collapsible{
padding-left: 70px;
line-height: 0%;
line-height: 1;
color: #371F10;
}
.active, .collapsible:hover {
color: red;
color: blue;
cursor: pointer;
}
.active, .collapsible:after {
padding-top: 10px;
color: #054646;
padding-left: 85px;
color: #371F10;
font-weight: bold;
}
/* Droped-down publication links */
.content {
max-height: 0;
overflow: hidden;
transition: max-height 0.2s ease-out;
padding-left: 50px;
background-color: #86a2a2;
background-color: #371F10;
position: relative;
line-height: 30px;
margin-left: 85px;
color: white;
font-size: 14px;
}
.up {
position: fixed;
font-weight: bolder;
bottom: 0%;
right: 15.1%;
background-color: blue;
z-index: 10;
padding: 10px;
border: none;
}
.down {
position: fixed;
font-weight: bolder;
bottom: 0%;
right: 12.8%;
background-color: blue;
z-index: 10;
padding: 10px;
border: none;
}
.top {
position: fixed;
font-weight: bolder;
bottom: 0%;
right: 17.3%;
background-color: blue;
z-index: 10;
padding: 10px;
border: none;
.content a {
color:white;
text-decoration: none;
}
.bottom {
position: fixed;
font-weight: bolder;
bottom: 0%;
right: 10%;
background-color: blue;
z-index: 10;
padding: 10px;
border: none;
.content a:hover {
color: blue;
cursor: pointer;
}
.indexlink {
/* Scroll column */
.scrollcolumn {
position: fixed;
text-decoration: none;
font-size: 40px;
bottom: 0%;
display: inline;
top:35%;
right:0%;
background-color: transparent;
border: none;
border-right-color: transparent;
width: 60px;
outline: none;
z-index: 10;
padding: 0px 20px 10px 10px;
border: none;
text-align: center;
}
.timeline {
position: fixed;
font-size: 20px;
bottom: 0%;
right: 3%;
background-color: transparent;
border: none;
border-right-color: transparent;
z-index: 10;
padding: 0px 30px 20px 10px;
/* Scroll buttons */
.scrl {
background-color: white;
cursor: pointer;
border:none;
font-size: 15px;
margin-top: 10px;
height: 60px;
width: 60px;
}
.timeline a {
text-decoration: none;
}
.indexlink a {
text-decoration: none;
.scrl:hover {
background-color: #0BEFEB;
}
#top {
padding-top: 42px;
/* Scroll button title */
.scbt {
visibility: hidden;
width: 120px;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
font-size: 15px;
right: 50px;
z-index: 10;
position: absolute;
}
.up:hover, .down:hover, .top:hover, .bottom:hover {
cursor: pointer;
color: white;
.scrl:hover > .scbt {
visibility: visible;
}

@ -1,4 +1,11 @@
body{ width: max-content;}
body{
width: max-content;
background-color: #F4EBE8;
}
h1 {
font-family: Roboto Mono;
}
div#body{ width: max-content;}
@ -13,16 +20,21 @@ div#body{ width: max-content;}
display: inline-block;
}
.content {
border-style: solid 1px black;
background-color: red;
color: #444;
cursor: pointer;
padding: 5px;
.indexlink {
position: fixed;
font-size: 15px;
z-index: +1;
font-family: Times New Roman;
font-size: 20px;
bottom: 0%;
right: 3%;
background-color: transparent;
border: none;
border-right-color: transparent;
z-index: 10;
padding: 0px 30px 20px 10px
border: none;
}
.indexlink a {
text-decoration: none;
}
.horizontal-scroll-wrapper {
@ -36,58 +48,35 @@ display: inline-block;
.event {
text-align-last: auto;
font-family: Arial;
font-family: Roboto Mono;
font-size: 10px;
/* padding-top: 5vw; */
padding-left: 5vw;
display: inline-block;
width:400px;
width:200px;
vertical-align: top;
}
.pubpageinfo {
padding-top: 10px;
font-size: 10px;
}
.pubpageinfo:hover {
background-color: #0BEFEB;
padding: 10px;
font-size: 15px;
}
.thumbborder {
/* display: none;*/
box-shadow: 8px 8px 8px #C4BCB9;
width: 30%;
height: auto;
}
.thumbborder:hover {
box-shadow: 8px 8px 8px #0BEFEB;
width:100%;
transition:0.5s;
height: auto;
}
.bar-chart {
display: table;
margin-top: 20px;
}
.row {
display: table-row;
}
.row div {
display: table-cell;
width: 60px;
height: 44px;
border-right: 2px solid rgb(255, 255, 255);
}
.row .axis-y {
width: 96px;
border-right: 1px solid #000;
vertical-align: top;
}
.axis-x div {
border-top: 1px solid #000;
}
.axis-x .axis-y {
border: none;
}
.axis-x div, .axis-y {
text-align: center;
font-weight: bold;
}

@ -2,6 +2,7 @@ body {
background-color: #F4EBE8;
font-family: Roboto Mono;
}
.grid-container {
display: grid;
grid-template-columns: repeat(4, 1fr);
@ -26,7 +27,6 @@ body {
position: relative;
max-width: 100%;
max-height: 100%;
}
@ -53,12 +53,13 @@ h1 {
right:0%;
top:5%;
text-align: right;
background-color: #0BEFEB;
background-color: rgba(11,239,235,0.7);
padding: 3px 35px 3px 10px;
z-index: 10;
color: black;
font-size: 28px;
opacity: 0.7;
font-size: 27px;
color: #371F10;
max-width: 90%;
}
h2{
@ -66,12 +67,12 @@ h2{
right: 0%;
top: 15%;
text-align: left;
background-color: #0BEFEB;
/*color: black;*/
background-color: rgba(11,239,235,0.7);
padding: 3px 35px 3px 10px;
z-index: 10;
font-size: 20px;
opacity: 0.7;
color: #371F10;
}
.viewnav {
@ -86,7 +87,7 @@ h2{
.collapsible2 {
background-color: transparent;
color: black;
color: red;
cursor: pointer;
padding: 0px;
width: 100%;
@ -221,23 +222,10 @@ a.content:link {
color:white;
}
/*.metadata_links {
display: inline-block;
width: 100%;
position: absolute;
right: 0%;
padding: 10px;
text-align: left;
background-color: blue;
font-size: 18px;
}*/
.metadata_organization {
font-size: 14px;
}
.fbtn {
font-style: italic;
}
@ -245,7 +233,7 @@ a.content:link {
.smw-template-furtherresults {
display: none;
}
/*
.orglink {
position: fixed;
top: 30%;
@ -266,7 +254,7 @@ a.content:link {
padding: 5px 0;
font-size: 15px;
/* Position the tooltip */
position: absolute;
left: 50px;
z-index: 10;
@ -296,7 +284,7 @@ a.content:link {
padding: 5px 0;
font-size: 15px;
/* Position the tooltip */
position: absolute;
left: 50px;
z-index: 10;
@ -326,7 +314,7 @@ a.content:link {
padding: 5px 0;
font-size: 15px;
/* Position the tooltip */
position: absolute;
left: 50px;
z-index: 10;
@ -336,3 +324,4 @@ a.content:link {
visibility: visible;
}
*/

@ -5,7 +5,6 @@ body {
padding-right: 120px;
}
.grid-container {
display: inline-grid;
grid-template-columns: repeat(8, 1fr);
@ -28,7 +27,6 @@ body {
z-index: 5;
}
.img {
display: inline-block;
border-style: hidden hidden solid hidden;
@ -38,7 +36,6 @@ body {
.title {
display:block;
font-family: Roboto Mono, monospace;
font-size: large;
font-weight: 700;
}
@ -48,7 +45,6 @@ body {
font-weight: normal;
}
.metatext {
display: inline-block;
width: 300px;
@ -56,45 +52,22 @@ body {
border-style: hidden;
}
.thumbborder {
position: relative;
max-width: 100%;
max-height: 100%;
}
/*links*/
a:link {
text-decoration: none;
color: black;
}
a:visited {
text-decoration: none;
color: black;
}
/*
.metatext:hover a {
color: white;
}
*/
a:hover {
background-color: #0BEFEB;
opacity: 0.7;
color: white;
}
/*
.metatext:hover {
background-color: #0BEFEB;
color: white;
}
*/
h1 {
position: fixed;
right:0%;
@ -104,7 +77,6 @@ h1 {
opacity: 0.5;
padding: 3px 30px 3px 10px;
z-index: 10;
color: white;
font-size: 32px;
}

@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="{{ staticpath }}/static/archive.css" />
<link rel="stylesheet" href="{{ staticpath }}/static/about.css" />
<script type="text/javascript" src="{{ staticpath }}/static/archive.js"></script>
<link href='https://fonts.googleapis.com/css?family=Roboto+Mono' rel='stylesheet' type='text/css'>

@ -10,12 +10,14 @@
<title>{{ page.name }}</title>
</head>
<body>
<h1>&#9636; &nbsp; {{ page.name }}</h1>
<button onclick="scrollWin(0,5000)" class="down" title="Down">&#8991;</button>
<button onclick="scrollWin(0,-5000)" class="up" title="Up">&#8988;</button>
<button onclick="scrollToTop()" class="top" title="Top">&#9140;</button>
<button onclick="scrollToBottom()" class="bottom" title="Bottom">&#9141;</button>
<h1>&#9636; {{ page.name }}</h1>
<div class="scrollcolumn">
<button onclick="scrollWin(0,-5000)" class="up scrl">&#8988;<span class="scbt">Up</span></button>
<button onclick="scrollWin(0,5000)" class="down scrl">&#8991;<span class="scbt">Down</span></button>
<button onclick="scrollToTop()" class="top scrl">&#9140;<span class="scbt">Top</span></button>
<button onclick="scrollToBottom()" class="bottom scrl">&#9141;<span class="scbt">Bottom</span></button>
</div>
<div id="body">{{ body|safe }}</div>

@ -4,10 +4,11 @@
<meta charset="utf-8">
<link rel="stylesheet" href="{{ staticpath }}/static/archive.css" />
<link rel="stylesheet" href="{{ staticpath }}/static/timeline.css" />
<title>{{ page.name }}</title>
<link href='https://fonts.googleapis.com/css?family=Roboto+Mono' rel='stylesheet' type='text/css'>
<title>Timeline</title>
</head>
<body>
<h1>{{ page.name }}</h1>
<h1>Timeline</h1>
<div id="body">{{ body|safe }}</div>
</body>

@ -14,11 +14,11 @@
<h1>{{ page.name }} &#8629;</h1>
<div class="viewnav">
<div class="collapsible2 viewbtn">&#8632;</div>
<div class="collapsible2 viewbtn">&#10063;</div>
<div class="content2">
<!-- <div class="header" id="myHeader"> -->
<p><button class="btn" onclick="myFunction()">100%</button></p>
<p><button class="btn" onclick="myFunction2()">overview</button></p>
<p><button class="btn" onclick="myFunction()">&#9607;</button></p>
<p><button class="btn" onclick="myFunction2()">&#9619;</button></p>
</div>
</div>
<div>

Loading…
Cancel
Save