first commit to the etherdump @ varia repo :)
This commit is contained in:
commit
c936a381c3
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
.etherdump
|
||||
publish/
|
||||
publish/*
|
||||
index.html
|
18
README.md
Normal file
18
README.md
Normal file
@ -0,0 +1,18 @@
|
||||
# etherdump @ Varia
|
||||
|
||||
Hosted at <https://etherdump.vvvvvvaria.org> and <https://etherdump.varia.zone>.
|
||||
|
||||
Welcome to the Varia Etherpad zone. This is a list of pads that have been deliberately published by its authors.
|
||||
The Etherpad is used as collaborative writing tool to document/coordinate projects, gatherings, meetings or public events that happen in and related to Varia.
|
||||
|
||||
This zone is made with [Etherdump](https://gitlab.constantvzw.org/aa/etherdump), a lovely piece of software produced and used through [Constant](http://constantvzw.org),
|
||||
that extends the multi writing and publishing functionalities of the Etherpad, but catches its content when it falls.
|
||||
This Etherdump installation (currently) converts pads into *html*, *txt* and *json* documents.
|
||||
|
||||
But this and other things might change. ;)
|
||||
|
||||
This installation of etherdump is running on the [publish-vs-nopublish branch](https://gitlab.constantvzw.org/decentral1se/etherdump).
|
||||
|
||||
It list only includes pads that are tagged with the magic word `__PUBLISH__` (which is an *opt-in* keyword).
|
||||
|
||||
|
10
cron.sh
Executable file
10
cron.sh
Executable file
@ -0,0 +1,10 @@
|
||||
# This will dump all the pads with a __PUBLISH__ tag into a folder "publish" as meta.json, txt, html and dhtml
|
||||
etherdump pull --all --meta --text --dhtml --publish __PUBLISH__ --publish-opt-in --pub /var/www/etherdump/publish --fix-names --no-raw-ext
|
||||
|
||||
# This will make an index for the dump
|
||||
etherdump index input \
|
||||
/var/www/etherdump/publish/*.meta.json \
|
||||
--order lastedited \
|
||||
--templatepath /var/www/etherdump/templates \
|
||||
--title "etherdump @ Varia" \
|
||||
--output index.html
|
25
styles.css
Normal file
25
styles.css
Normal file
@ -0,0 +1,25 @@
|
||||
body{
|
||||
background-color: #fdff99;
|
||||
margin:1em;
|
||||
line-height: 1.3;
|
||||
}
|
||||
#welcome{
|
||||
max-width: 600px;
|
||||
margin:1em 0;
|
||||
}
|
||||
table{
|
||||
min-width: 800px;
|
||||
}
|
||||
th, td{
|
||||
text-align: left;
|
||||
padding:0 1em 0 0;
|
||||
}
|
||||
hr{
|
||||
border:0;
|
||||
border-bottom:1px solid;
|
||||
margin:2em 0 1em;
|
||||
}
|
||||
#footer{
|
||||
max-width: 600px;
|
||||
font-size: smaller;
|
||||
}
|
17
templates/pad.html
Normal file
17
templates/pad.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<title>{{title}}</title>
|
||||
<link rel="edit" href="{{ editurl }}" />
|
||||
<link rel="source" href="{{ sourceurl }}" />
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css" />
|
||||
<script src ="../page.js"></script>
|
||||
<script>
|
||||
var padmeta = {{ metadata_json }};
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
{{body}}
|
||||
</body>
|
||||
</html>
|
17
templates/pad_colors.html
Normal file
17
templates/pad_colors.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{padid}}</title>
|
||||
<meta charset="utf-8">
|
||||
<meta revision="{{revision}}">
|
||||
<link rel="stylesheet" type="text/css" href="pad.css">
|
||||
{{ style }}
|
||||
</head>
|
||||
<body>
|
||||
{{ html }}
|
||||
|
||||
<div class="etherdump_version_links">
|
||||
Pad last edited {{lastedited}}; other versions: <a href="{{raw_url}}">text-only</a> <a href="{{meta_url}}">metadata</a>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
128
templates/pad_index.html
Normal file
128
templates/pad_index.html
Normal file
@ -0,0 +1,128 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
body {
|
||||
overflow: hidden;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
td {
|
||||
vertical-align: top;
|
||||
}
|
||||
table ul {
|
||||
margin: 0;
|
||||
padding-left: 0;
|
||||
list-style: none;
|
||||
}
|
||||
#content {
|
||||
position: absolute;
|
||||
left:0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
overflow: auto;
|
||||
background: gray;
|
||||
}
|
||||
iframe {
|
||||
position: absolute;
|
||||
left: 0; top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: white;
|
||||
}
|
||||
#overlay {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
right: 20px;
|
||||
top: 40px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
background: black;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
font-size: 10px;
|
||||
font-family: monospace;
|
||||
}
|
||||
#overlay a {
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
}
|
||||
#overlay a:hover {
|
||||
background: gray;
|
||||
color: black;
|
||||
}
|
||||
a.active {
|
||||
background: white !important;
|
||||
color: black !important;
|
||||
}
|
||||
td.key {
|
||||
font-style: italic;
|
||||
}
|
||||
#overlay.open {}
|
||||
#overlay .closedcontent { display: block; }
|
||||
#overlay.open .closedcontent { display: none; }
|
||||
#overlay .opencontent { display: none; }
|
||||
#overlay.open .opencontent { display: block; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
<iframe src="{{padid}}.html" id="frame" name="frame"></iframe>
|
||||
<div id="overlay">
|
||||
<div class="closedcontent">
|
||||
versions
|
||||
</div>
|
||||
<table class="opencontent">
|
||||
<tr><td class="key">padid</td><td>{{padid}}</td></tr>
|
||||
<tr><td class="key">lastedited</td><td>{{lastedited_iso}}</td></tr>
|
||||
<tr><td class="key">revisions</td><td>{{revisions}}</td></tr>
|
||||
<tr>
|
||||
<td class="key">versions</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li><a href="{{padurl}}" target="frame">Etherpad (editable)</a><li>
|
||||
<li><a href="{{padid}}.html" target="frame">HTML</a></li>
|
||||
<li><a href="{{padid}}.txt" target="frame">plain text</a></li>
|
||||
<li><a href="{{padid}}.diff.html" target="frame">HTML with authorship colors</a></li>
|
||||
<li><a href="{{padid}}.meta.json" target="frame">Meta data (JSON)</a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
var frame = document.getElementById("frame"),
|
||||
overlay = document.getElementById("overlay");
|
||||
frame.addEventListener("load", function () {
|
||||
var loaded_href = frame.contentDocument.location.href,
|
||||
links = document.querySelectorAll("#overlay a");
|
||||
// console.log("load", loaded_href);
|
||||
for (var i=0, len=links.length; i<len; i++) {
|
||||
var linkhref = links[i].href;
|
||||
// console.log("*", linkhref);
|
||||
if (linkhref == loaded_href) {
|
||||
links[i].classList.add("active");
|
||||
} else {
|
||||
links[i].classList.remove("active");
|
||||
}
|
||||
}
|
||||
});
|
||||
overlay.addEventListener("mouseenter", function () {
|
||||
overlay.classList.add("open");
|
||||
}, false);
|
||||
overlay.addEventListener("mouseleave", function () {
|
||||
overlay.classList.remove("open");
|
||||
}, false);
|
||||
|
||||
})()
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
33
templates/rss.xml
Normal file
33
templates/rss.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
|
||||
xmlns:content="http://purl.org/rss/1.0/modules/content/"
|
||||
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:atom="http://www.w3.org/2005/Atom"
|
||||
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
|
||||
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
|
||||
>
|
||||
|
||||
<channel>
|
||||
<title>{{title}}</title>
|
||||
<atom:link href="{{feedurl}}" rel="self" type="application/rss+xml" />
|
||||
<link>{{siteurl}}</link>
|
||||
<description>{{description}}</description>
|
||||
<lastBuildDate>{{utcnow}}</lastBuildDate>
|
||||
<language>{{language}}</language>
|
||||
<sy:updatePeriod>{{updatePeriod}}</sy:updatePeriod>
|
||||
<sy:updateFrequency>{{updateFrequency}}</sy:updateFrequency>
|
||||
<generator>{{generator}}</generator>
|
||||
|
||||
{% for p in pads %}
|
||||
<item>
|
||||
<title>{{p.pad}}</title>
|
||||
<link>{{p.link}}</link>
|
||||
<pubDate>{{p.lastedited_822}}</pubDate>
|
||||
<guid isPermaLink="false">{{p.link}}</guid>
|
||||
<description><![CDATA[{{p.text|excerpt(100)}}]]></description>
|
||||
{% if content %}<content:encoded><![CDATA[{{p.text}}]]></content:encoded>{% endif %}
|
||||
</item>
|
||||
{% endfor %}
|
||||
|
||||
</channel>
|
||||
</rss>
|
Loading…
Reference in New Issue
Block a user