Compare commits
136 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec4987e817 | ||
|
|
655d3b47c6 | ||
|
|
8b85c6e9dd | ||
|
|
ef35e4eda6 | ||
|
|
7bb1ca239b | ||
|
|
a7625b35f4 | ||
|
|
1d239aa9a6 | ||
|
|
3f1e5caaad | ||
|
|
bdbd6c8ba7 | ||
|
|
1a898ee589 | ||
|
|
9609adb575 | ||
|
|
34c10202b0 | ||
|
|
1457fad242 | ||
|
|
ce355499c7 | ||
|
|
2bb3d2f967 | ||
|
|
a301ab5e1c | ||
|
|
d74d29fa13 | ||
|
|
96c54d9d66 | ||
|
|
9a0700cac1 | ||
|
|
864890c168 | ||
|
|
a93873d1d4 | ||
|
|
b0a8fa2141 | ||
|
|
88799b3ebc | ||
|
|
4032aa563c | ||
|
|
2b9fd67dbd | ||
|
|
62056409de | ||
|
|
f45f4eb49f | ||
|
|
acd4d42561 | ||
|
|
8375c3a842 | ||
|
|
54138b7998 | ||
|
|
3816567543 | ||
|
|
c6954437ea | ||
|
|
f3725a4938 | ||
|
|
fc8f6b4a42 | ||
|
|
b6109e37ad | ||
|
|
b3b98e2b82 | ||
|
|
74f6a4b314 | ||
|
|
19a9ad3da0 | ||
|
|
2d99025024 | ||
|
|
63370f31d7 | ||
|
|
752daa81b5 | ||
|
|
429ead8c69 | ||
|
|
52f4aad356 | ||
|
|
4abd0a26cf | ||
|
|
c8173cac04 | ||
|
|
be4b141c43 | ||
|
|
f9d6258744 | ||
|
|
66234d7785 | ||
|
|
c67b4a7f12 | ||
|
|
4a94023be2 | ||
|
|
9535f45647 | ||
|
|
8f585bcd29 | ||
|
|
d95d7b0674 | ||
|
|
50fcd7eb0b | ||
|
|
e5b46fe1a4 | ||
|
|
28872646d0 | ||
|
|
d059e09104 | ||
|
|
545cd78805 | ||
|
|
1e7a7d2fa7 | ||
|
|
1b540fc294 | ||
|
|
493ddc233c | ||
|
|
07b3169c5b | ||
|
|
e73707a16f | ||
|
|
5323399bc8 | ||
|
|
13ac083542 | ||
|
|
3dee191328 | ||
|
|
e13524c1d3 | ||
|
|
dc82b7d64f | ||
|
|
d68163ee90 | ||
|
|
349ed2722c | ||
|
|
e01b39edf6 | ||
|
|
783325509a | ||
|
|
2db3736a70 | ||
|
|
22cf00c28f | ||
|
|
3fe2736ad4 | ||
|
|
03b38673f7 | ||
|
|
3590bb96dd | ||
|
|
5051b9602a | ||
|
|
af9da2be34 | ||
|
|
0c17454a0c | ||
|
|
d789bc40f0 | ||
|
|
3a97171320 | ||
|
|
110970f310 | ||
|
|
9986552ffb | ||
|
|
64277e26ed | ||
|
|
b35e867b55 | ||
|
|
67c6db4b03 | ||
|
|
eec5307bc3 | ||
|
|
6a3b9a9916 | ||
|
|
e6880ae469 | ||
|
|
40de3ea9a1 | ||
|
|
93d40b022f | ||
|
|
dec6acf354 | ||
|
|
062cd9b5b9 | ||
|
|
31574e3606 | ||
|
|
ca01d9d3d6 | ||
|
|
9c69322289 | ||
|
|
c13841e30a | ||
|
|
9ae1ff22c7 | ||
|
|
8db5a45dcd | ||
|
|
b3e2485cd0 | ||
|
|
6c135be248 | ||
|
|
b5a4af9656 | ||
|
|
b23f1d777b | ||
|
|
2f49adf605 | ||
|
|
76f9eb7945 | ||
|
|
0c2718ca8c | ||
|
|
7109c5be9c | ||
|
|
e9fad88a10 | ||
|
|
d94d571881 | ||
|
|
d663c2b61d | ||
|
|
a3cbd8db8b | ||
|
|
90e92c27b8 | ||
|
|
76b433c1da | ||
|
|
b116a0103e | ||
|
|
6a7a0dd24d | ||
|
|
c2366aa36f | ||
|
|
4da50ef125 | ||
|
|
2e0f293dcd | ||
|
|
d0095a36b5 | ||
|
|
1eae7852c4 | ||
|
|
da06278df8 | ||
|
|
bd8f914804 | ||
|
|
51b24309a7 | ||
|
|
60a4572087 | ||
|
|
248af821a7 | ||
|
|
c85e8b84b9 | ||
|
|
e4d159307b | ||
|
|
80a30a9102 | ||
|
|
299b94243d | ||
|
|
b7ab45a3a7 | ||
|
|
9d3deaff0f | ||
|
|
42a1e389a5 | ||
|
|
9883a064f3 | ||
|
|
52617b472d | ||
|
|
764c15e6c0 |
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.pl linguist-language=Perl
|
||||
1
.gitignore
vendored
@@ -8,3 +8,4 @@
|
||||
.DS_Store
|
||||
wiki.log
|
||||
.prove
|
||||
TAGS
|
||||
|
||||
@@ -156,8 +156,11 @@ WikiDataDir=$HOME/oddmuse perl server.pl daemon
|
||||
}}}
|
||||
|
||||
This makes the server available on {{{http://localhost:3000/wiki}}}.
|
||||
Make sure you create the directory before starting the server!
|
||||
If you don't, you'll get a strange error:
|
||||
`STDERR: : No such file or directory at ... perl5/Mojolicious/Plugin/CGI.pm`.
|
||||
|
||||
If it works for you, feel free to upgrade to Hypnotoad.
|
||||
If it works, feel free to upgrade to Hypnotoad.
|
||||
|
||||
{{{
|
||||
WikiDataDir=$HOME/oddmuse hypnotoad server.pl
|
||||
|
||||
93
contrib/emacswiki/bootstrap.js
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
// Public Domain
|
||||
// initial version by Alex Schroeder <alex@gnu.org>
|
||||
// with many improvements by Evgkeni Sampelnikof
|
||||
|
||||
$(function(){
|
||||
|
||||
// add fancy classes
|
||||
$('div.header' ).addClass('container');
|
||||
$('div.wrapper').addClass('container');
|
||||
$('div.footer' ).addClass('container');
|
||||
$('div.footer > .navbar' ).remove();
|
||||
$('.message > p' ).addClass('alert');
|
||||
$('img.portrait').addClass('img-polaroid');
|
||||
|
||||
$('input:text').addClass('input-medium search-query');
|
||||
$('textarea').addClass('span12');
|
||||
$('input:submit').addClass('btn');
|
||||
$('.download a').addClass('btn btn-success');
|
||||
|
||||
$('.footer .gotobar').remove();
|
||||
$('.footer br').first().remove();
|
||||
var $gotobar = $('.gotobar')
|
||||
.after($('<div>').attr('class','navbar')
|
||||
.append($('<div>').attr('class','navbar-inner')
|
||||
.append($('<ul>').attr('class', 'nav'))));
|
||||
var $id = $('h1 a').first().text();
|
||||
var $list = $('.nav')
|
||||
.append($('<li>')
|
||||
.append($('<a>').attr('class', 'brand').attr('href', 'http://www.emacswiki.org/')
|
||||
.append('Emacs Wiki')));
|
||||
$('.gotobar a').each(function() {
|
||||
var $item = $('<li>');
|
||||
$(this).appendTo($item);
|
||||
$item.appendTo($list);
|
||||
if ($(this).text() == $id) {
|
||||
$item.addClass('active');
|
||||
}
|
||||
});
|
||||
$gotobar.remove();
|
||||
|
||||
// search without labels, without button, without language field
|
||||
$('form.search input[type=submit]').remove();
|
||||
$('form.search label').remove();
|
||||
$('form.search input#searchlang').remove();
|
||||
$('form.search')
|
||||
.css({'float': 'right',
|
||||
'margin-top': '10px'});
|
||||
$('.navbar').append($('form.search'));
|
||||
|
||||
// add button style to some links
|
||||
$('.edit.bar a').addClass('btn');
|
||||
|
||||
// add color to Talk button for a non-existing page
|
||||
$('a.btn.comment.edit').addClass('btn-warning');
|
||||
|
||||
// move article link and talk link below title
|
||||
var $link = $('a.original').add('a.comment');
|
||||
if ($link) {
|
||||
$('.header h1').after($('<p>').append($link));
|
||||
}
|
||||
|
||||
// toc
|
||||
if ($('title').text() == "EmacsWiki: Wikified Emacs Lisp List") {
|
||||
$('.content').addClass('ell');
|
||||
}
|
||||
|
||||
// tables
|
||||
$('table').addClass('table');
|
||||
|
||||
// minor edit checkbox
|
||||
$('input[type=checkbox]').addClass('checkbox');
|
||||
$('input[type=checkbox]').parent().addClass('checkbox');
|
||||
|
||||
// clean up admin page
|
||||
$('li a.clear').parent().remove();
|
||||
$('li a.index').parent().remove();
|
||||
|
||||
$('a[href="http://creativecommons.org/licenses/GPL/2.0/"]')
|
||||
.parent()
|
||||
.css({'margin-right': '120px',
|
||||
'opacity': 0.3,
|
||||
'padding-top': '1em'});
|
||||
$('.footer .bar')
|
||||
.after('<hr />');
|
||||
var footer_wrapper = $('<div/>')
|
||||
.addClass('footer_wrapper');
|
||||
var footer = $('.footer.container');
|
||||
footer.after(footer_wrapper);
|
||||
footer_wrapper.append(footer);
|
||||
var logo_image = $('<img />')
|
||||
.attr('src', 'http://emacswiki.org/ew_logo.png');
|
||||
$('.header .navbar .brand').html(logo_image);
|
||||
});
|
||||
544
css/alex-2017.css
Normal file
@@ -0,0 +1,544 @@
|
||||
/* This file is in the public domain. */
|
||||
html{ text-align: center; }
|
||||
|
||||
body, rss {
|
||||
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
|
||||
font-style: normal;
|
||||
font-size: 14pt;
|
||||
padding: 1em 3em;
|
||||
max-width: 72ex;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@import url(file:///home/alex/alexschroeder.ch/css/alex-2017.css) print;
|
||||
|
||||
@media print {
|
||||
body {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
/* hide all the crap */
|
||||
div.diff, div.diff+hr, div.refer, div.near, div.definition, div.sister,
|
||||
div.cal, div.footer, span.specialdays, span.gotobar, a.edit, a.number span,
|
||||
div.rc form, form.tiny, p.comment, p#plus1, div.g-plusone, div.content a.feed {
|
||||
display:none;
|
||||
}
|
||||
div.content a.book,
|
||||
div.content a.movie {
|
||||
text-decoration: none;
|
||||
}
|
||||
a cite {
|
||||
font-style: italic;
|
||||
}
|
||||
img[alt="RSS"] { display: none }
|
||||
a.rss { font-size: 8pt }
|
||||
}
|
||||
|
||||
/* headings: we can use larger sizes if we use a lighter color.
|
||||
we cannot inherit the font-family because header and footer use a narrow font. */
|
||||
|
||||
h1, h2, h3, title {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1, channel title {
|
||||
font-size: 32pt;
|
||||
margin: 1em 0 0.5em 0;
|
||||
padding: 0.4em 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 18pt;
|
||||
margin: 2em 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
h3 {
|
||||
font-size: inherit;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
margin: 1em 0 0 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* headers in the journal are smaller */
|
||||
|
||||
div.journal h1, item title {
|
||||
font-size: inherit;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
div.journal h2 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
div.journal h3 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
font-style: italic;
|
||||
}
|
||||
div.journal hr {
|
||||
visibility: hidden;
|
||||
}
|
||||
p.more {
|
||||
margin-top: 3em;
|
||||
}
|
||||
/* Links in headings appear on journal pages. */
|
||||
|
||||
h1 a, h2 a, h3 a {
|
||||
color:inherit;
|
||||
text-decoration:none;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1 a:visited, h2 a:visited, h3 a:visited {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* for download buttons and the like */
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
font-size: 120%;
|
||||
cursor: pointer;
|
||||
padding: 0.4em 0.6em;
|
||||
text-shadow: 0px -1px 0px #ccc;
|
||||
background-color: #cfa;
|
||||
border: 1px solid #9d8;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 1px 3px white inset, 0px 1px 3px black;
|
||||
}
|
||||
|
||||
.button .icon {
|
||||
color: #363;
|
||||
text-shadow: 0px -1px 1px white, 0px 1px 3px #666;
|
||||
}
|
||||
|
||||
.button a {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* links */
|
||||
|
||||
a.pencil {
|
||||
padding-left: 1ex;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
visibility: hidden;
|
||||
transition: visibility 0s 1s, opacity 1s linear;
|
||||
opacity: 0;
|
||||
}
|
||||
*:hover > a.pencil {
|
||||
visibility: visible;
|
||||
transition: opacity .5s linear;
|
||||
opacity: 1;
|
||||
}
|
||||
@media print {
|
||||
a.pencil {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
a.number {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* stop floating content from flowing over the footer */
|
||||
|
||||
hr {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* the distance between links in the navigation bars */
|
||||
|
||||
span.bar a {
|
||||
margin-right: 1ex;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* search box in the top bar */
|
||||
|
||||
.header form, .header p {
|
||||
display: inline;
|
||||
white-space: nowrap;
|
||||
}
|
||||
label[for="searchlang"], #searchlang, .header input[type="submit"] {
|
||||
/* don't use display: none! http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form */
|
||||
visibility: hidden; position: absolute;
|
||||
}
|
||||
/* wrap on the iphone */
|
||||
@media only screen and (max-device-width: 480px) {
|
||||
}
|
||||
|
||||
.header input {
|
||||
width: 10ex;
|
||||
}
|
||||
|
||||
/* other form fields */
|
||||
|
||||
input[type="text"] {
|
||||
padding: 0;
|
||||
font-size: 80%;
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
/* code */
|
||||
|
||||
textarea, pre, code, tt {
|
||||
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace, "Symbola";
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow:hidden;
|
||||
white-space: pre-wrap; /* CSS 3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
/* styling for divs that will be invisible when printing
|
||||
when printing. */
|
||||
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
|
||||
font-size: 14pt;
|
||||
}
|
||||
@media print {
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
font-size: 8pt;
|
||||
}
|
||||
}
|
||||
|
||||
div.footer form.search {
|
||||
display: none;
|
||||
}
|
||||
div.rc li + li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
div.rc li strong, table.history strong, strong.description {
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
div.diff {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
color: #000;
|
||||
|
||||
}
|
||||
div.old {
|
||||
background-color: #ffffaf;
|
||||
}
|
||||
div.new {
|
||||
background-color: #cfffcf;
|
||||
}
|
||||
|
||||
div.refer {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
div.message {
|
||||
background-color:#fee;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
img.xml {
|
||||
border:none;
|
||||
padding:1px;
|
||||
}
|
||||
a.small img {
|
||||
max-width:300px;
|
||||
}
|
||||
a.large img {
|
||||
max-width:600px;
|
||||
}
|
||||
div.sister {
|
||||
margin-right:1ex;
|
||||
background-color:inherit;
|
||||
}
|
||||
div.sister p {
|
||||
margin-top:0;
|
||||
}
|
||||
div.sister hr {
|
||||
display:none;
|
||||
}
|
||||
div.sister img {
|
||||
border:none;
|
||||
}
|
||||
|
||||
div.near, div.definition {
|
||||
background-color:#efe;
|
||||
}
|
||||
|
||||
div.sidebar {
|
||||
float:right;
|
||||
border:1px dotted #000;
|
||||
padding:0 1em;
|
||||
}
|
||||
div.sidebar ul {
|
||||
padding-left:1em;
|
||||
}
|
||||
|
||||
/* replacements, features */
|
||||
|
||||
ins {
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
}
|
||||
acronym, abbr {
|
||||
letter-spacing:0.1em;
|
||||
font-variant:small-caps;
|
||||
}
|
||||
|
||||
/* Interlink prefix not shown */
|
||||
a .site, a .separator {
|
||||
display: none;
|
||||
}
|
||||
a cite { font:inherit; }
|
||||
/* browser borkage */
|
||||
textarea[name="text"] { width:97%; height:80%; }
|
||||
textarea[name="summary"] { width:97%; height:3em; }
|
||||
/* comments */
|
||||
textarea[name="aftertext"] { width:97%; height:10em; }
|
||||
div.commentshown {
|
||||
font-size: 12pt;
|
||||
padding: 2em 0;
|
||||
}
|
||||
div.commenthidden {
|
||||
display:none;
|
||||
}
|
||||
div.commentshown {
|
||||
display:block;
|
||||
}
|
||||
p.comment {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.comment {
|
||||
font-size: 14pt;
|
||||
}
|
||||
div.comment h2 {
|
||||
margin-top: 5em;
|
||||
}
|
||||
/* comment pages with username, homepage, and email subscription */
|
||||
.comment form span { display: block; }
|
||||
.comment form span label { display: inline-block; width: 10em; }
|
||||
/* IE sucks */
|
||||
.comment input#username,
|
||||
.comment input#homepage,
|
||||
.comment input#mail { width: 20em; }
|
||||
|
||||
/* cal */
|
||||
div.month { padding:0; margin:0 2ex; }
|
||||
body > div.month {
|
||||
float:right;
|
||||
background-color: inherit;
|
||||
border:solid thin;
|
||||
padding:0 1ex;
|
||||
}
|
||||
.year > .month {
|
||||
float:left;
|
||||
}
|
||||
.footer {
|
||||
clear:both;
|
||||
}
|
||||
.month .title a.local {
|
||||
background-color: inherit;
|
||||
}
|
||||
.month a.local {
|
||||
background-color: #ddf;
|
||||
}
|
||||
.month a.today {
|
||||
background-color: #fdd;
|
||||
}
|
||||
.month a {
|
||||
color:inherit;
|
||||
font-weight:inherit;
|
||||
text-decoration: none;
|
||||
background-color: #eee;
|
||||
}
|
||||
/* history tables and other tables */
|
||||
table.history {
|
||||
border: none;
|
||||
}
|
||||
td.history {
|
||||
border: none;
|
||||
}
|
||||
|
||||
table {
|
||||
border: none;
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 1em;
|
||||
margin: 1em 2em;
|
||||
}
|
||||
table tr td, table tr th {
|
||||
border: none;
|
||||
padding: 0.2em 0.5em;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.arab tr th {
|
||||
font-weight:normal;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
table.arab, table.arab tr th, table.arab tr td {
|
||||
border:none;
|
||||
}
|
||||
th.nobreak {
|
||||
white-space:nowrap;
|
||||
}
|
||||
table.full { width:99%; margin-left:1px; }
|
||||
table.j td, table.j th, table tr td.j, table tr th.j, .j { text-align:justify; }
|
||||
table.l td, table.l th, table tr td.l, table tr th.l, .l { text-align:left; }
|
||||
table.r td, table.r th, table tr td.r, table tr th.r, .r { text-align:right; }
|
||||
table.c td, table.c th, table tr td.c, table tr th.c, .c { text-align:center; }
|
||||
table.t td { vertical-align: top; }
|
||||
td.half { width:50%; }
|
||||
td.third { width:33%; }
|
||||
|
||||
form table td { padding:5px; }
|
||||
|
||||
/* lists */
|
||||
dd { padding-bottom:0.5ex; }
|
||||
dl.inside dt { float:left; }
|
||||
/* search */
|
||||
div.search span.result { font-size:larger; }
|
||||
div.search span.info { font-size:smaller; font-style:italic; }
|
||||
div.search p.result { display:none; }
|
||||
|
||||
img.logo {
|
||||
float: right;
|
||||
margin: 0 0 0 1ex;
|
||||
padding: 0;
|
||||
border: 1px solid #000;
|
||||
opacity: 0.3;
|
||||
background-color:#ffe;
|
||||
}
|
||||
|
||||
/* images */
|
||||
|
||||
div.content a.feed img, div.journal a.feed img,
|
||||
div.content a img.smiley, div.journal a img.smiley, img.smiley,
|
||||
div.content a.inline img, div.journal a.inline img,
|
||||
div.content li a.image img, div.journal li a.image img {
|
||||
margin: 0; padding: 0; border: none;
|
||||
}
|
||||
div.image a img {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.image span.caption {
|
||||
margin: 0 1em;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.left { float:left; margin-right: 1em; }
|
||||
.right { float:right; margin-left: 1em; }
|
||||
.half img { height: 50%; width: 50%; }
|
||||
.face img { width: 200px; }
|
||||
div.left .left, div.right .right {
|
||||
float:none;
|
||||
}
|
||||
.center { text-align:center; }
|
||||
table.aside {
|
||||
float:right;
|
||||
width:40%;
|
||||
margin-left: 1em;
|
||||
padding: 1ex;
|
||||
border: 1px dotted #666;
|
||||
}
|
||||
table.aside td {
|
||||
text-align:left;
|
||||
}
|
||||
div.sidebar {
|
||||
float:right; width: 250px;
|
||||
text-align: right;
|
||||
border: none;
|
||||
margin: 1ex;
|
||||
}
|
||||
|
||||
.bigsidebar {
|
||||
float:right;
|
||||
width: 500px;
|
||||
border: none;
|
||||
margin-left: 1ex;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
|
||||
dl.irc dt span.time { float:left; }
|
||||
dl.irc dd { margin-left:22ex; }
|
||||
|
||||
/* portrait */
|
||||
|
||||
div.footer, div.comment, hr { clear: both; }
|
||||
.portrait { float: left; font-size: small; margin-right: 1em; }
|
||||
.portrait a { color: #999; }
|
||||
|
||||
div.left { float:left; margin:1em; padding: 0.5em; }
|
||||
div.left p { display:table-cell; }
|
||||
div.left p + p { display:table-caption; caption-side:bottom; }
|
||||
|
||||
p.table a { float:left; width:20ex; }
|
||||
p.table + p { clear:both; }
|
||||
|
||||
/* mastodon */
|
||||
|
||||
div.mastodon { padding: 0 2em }
|
||||
div.mastodon .status {padding-top: 1ex; border-bottom: 1px solid grey;}
|
||||
div.mastodon .status:first-child {border-top: 1px solid grey;}
|
||||
|
||||
/* rss */
|
||||
|
||||
channel * { display: block; }
|
||||
|
||||
channel title {
|
||||
margin-top: 30pt;
|
||||
}
|
||||
copyright {
|
||||
font-size: 14pt;
|
||||
margin-top: 1em;
|
||||
}
|
||||
channel:before {
|
||||
font-size: 14pt;
|
||||
display: block;
|
||||
margin: 1em;
|
||||
padding: 0.5em;
|
||||
content: "This document is to be read in a feed reader. The item content is escaped HTML, which makes it hard to read for humans. Sorry!";
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
}
|
||||
license {
|
||||
font-size: 11pt;
|
||||
margin-bottom: 9pt;
|
||||
}
|
||||
contributor:before { content: "Last edited by "; }
|
||||
contributor:after { content: "."; }
|
||||
generator:before { content: "Feed generated by "; }
|
||||
generator:after { content: "."; }
|
||||
channel description {
|
||||
font-weight: bold;
|
||||
}
|
||||
item description {
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
link, managingEditor, webMaster, license, url,
|
||||
docs, language,
|
||||
pubDate, lastBuildDate, ttl, guid, category, comments,
|
||||
docs, image title, image link,
|
||||
status, version, diff, history, importance {
|
||||
display: none;
|
||||
}
|
||||
562
css/alex-2018.css
Normal file
@@ -0,0 +1,562 @@
|
||||
/* This file is in the public domain. */
|
||||
html{ text-align: center; }
|
||||
|
||||
body, rss {
|
||||
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
|
||||
font-style: normal;
|
||||
font-size: 14pt;
|
||||
padding: 1em 3em;
|
||||
max-width: 72ex;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@media only screen and (max-device-width: 480px) {
|
||||
body {
|
||||
padding: 1ex;
|
||||
}
|
||||
}
|
||||
|
||||
@import url(file:///home/alex/alexschroeder.ch/css/alex-2017.css) print;
|
||||
|
||||
@media print {
|
||||
body {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
/* hide all the crap */
|
||||
div.diff, div.diff+hr, div.refer, div.near, div.definition, div.sister,
|
||||
div.cal, div.footer, span.specialdays, span.gotobar, a.edit, a.number span,
|
||||
div.rc form, form.tiny, p.comment, p#plus1, div.g-plusone, div.content a.feed {
|
||||
display:none;
|
||||
}
|
||||
div.content a.book,
|
||||
div.content a.movie {
|
||||
text-decoration: none;
|
||||
}
|
||||
a cite {
|
||||
font-style: italic;
|
||||
}
|
||||
img[alt="RSS"] { display: none }
|
||||
a.rss { font-size: 8pt }
|
||||
}
|
||||
|
||||
/* headings: we can use larger sizes if we use a lighter color.
|
||||
we cannot inherit the font-family because header and footer use a narrow font. */
|
||||
|
||||
h1, h2, h3, title {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1, channel title {
|
||||
font-size: 32pt;
|
||||
margin: 1em 0 0.5em 0;
|
||||
padding: 0.4em 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 18pt;
|
||||
margin: 2em 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
h3 {
|
||||
font-size: inherit;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
margin: 1em 0 0 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* headers in the journal are smaller */
|
||||
|
||||
div.journal h1, item title {
|
||||
font-size: inherit;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
div.journal h2 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
div.journal h3 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
font-style: italic;
|
||||
}
|
||||
div.journal hr {
|
||||
visibility: hidden;
|
||||
}
|
||||
p.more {
|
||||
margin-top: 3em;
|
||||
}
|
||||
/* Links in headings appear on journal pages. */
|
||||
|
||||
h1 a, h2 a, h3 a {
|
||||
color:inherit;
|
||||
text-decoration:none;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1 a:visited, h2 a:visited, h3 a:visited {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* for download buttons and the like */
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
font-size: 120%;
|
||||
cursor: pointer;
|
||||
padding: 0.4em 0.6em;
|
||||
text-shadow: 0px -1px 0px #ccc;
|
||||
background-color: #cfa;
|
||||
border: 1px solid #9d8;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 1px 3px white inset, 0px 1px 3px black;
|
||||
}
|
||||
|
||||
.button .icon {
|
||||
color: #363;
|
||||
text-shadow: 0px -1px 1px white, 0px 1px 3px #666;
|
||||
}
|
||||
|
||||
.button a {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* links */
|
||||
|
||||
a.pencil {
|
||||
padding-left: 1ex;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
visibility: hidden;
|
||||
transition: visibility 0s 1s, opacity 1s linear;
|
||||
opacity: 0;
|
||||
}
|
||||
*:hover > a.pencil {
|
||||
visibility: visible;
|
||||
transition: opacity .5s linear;
|
||||
opacity: 1;
|
||||
}
|
||||
@media print {
|
||||
a.pencil {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
a.number {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* stop floating content from flowing over the footer */
|
||||
|
||||
hr {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* the distance between links in the navigation bars */
|
||||
|
||||
span.bar a {
|
||||
margin-right: 1ex;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* search box in the top bar */
|
||||
|
||||
.header form, .header p {
|
||||
display: inline;
|
||||
white-space: nowrap;
|
||||
}
|
||||
label[for="searchlang"], #searchlang, .header input[type="submit"] {
|
||||
/* don't use display: none! http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form */
|
||||
visibility: hidden; position: absolute;
|
||||
}
|
||||
|
||||
.header input {
|
||||
width: 10ex;
|
||||
}
|
||||
|
||||
/* other form fields */
|
||||
|
||||
input[type="text"] {
|
||||
padding: 0;
|
||||
font-size: 80%;
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
/* code */
|
||||
|
||||
textarea, pre, code, tt {
|
||||
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace, "Symbola";
|
||||
font-size: 75%; /* fits 80ex */
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow:hidden;
|
||||
white-space: pre-wrap; /* CSS 3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
/* styling for divs that will be invisible when printing
|
||||
when printing. */
|
||||
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
|
||||
font-size: 14pt;
|
||||
}
|
||||
@media print {
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
font-size: 8pt;
|
||||
}
|
||||
}
|
||||
|
||||
div.footer form.search {
|
||||
display: none;
|
||||
}
|
||||
div.rc {
|
||||
overflow: hidden;
|
||||
}
|
||||
div.rc li + li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
div.rc li strong, table.history strong, strong.description {
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
div.diff {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
color: #000;
|
||||
|
||||
}
|
||||
div.old {
|
||||
background-color: #ffffaf;
|
||||
}
|
||||
div.new {
|
||||
background-color: #cfffcf;
|
||||
}
|
||||
|
||||
div.refer {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
div.message {
|
||||
background-color:#fee;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
img.xml {
|
||||
border:none;
|
||||
padding:1px;
|
||||
}
|
||||
a.small img {
|
||||
max-width:300px;
|
||||
}
|
||||
a.large img {
|
||||
max-width:600px;
|
||||
}
|
||||
div.sister {
|
||||
margin-right:1ex;
|
||||
background-color:inherit;
|
||||
}
|
||||
div.sister p {
|
||||
margin-top:0;
|
||||
}
|
||||
div.sister hr {
|
||||
display:none;
|
||||
}
|
||||
div.sister img {
|
||||
border:none;
|
||||
}
|
||||
|
||||
div.near, div.definition {
|
||||
background-color:#efe;
|
||||
}
|
||||
|
||||
div.sidebar {
|
||||
float:right;
|
||||
border:1px dotted #000;
|
||||
padding:0 1em;
|
||||
}
|
||||
div.sidebar ul {
|
||||
padding-left:1em;
|
||||
}
|
||||
|
||||
/* replacements, features */
|
||||
|
||||
ins {
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
}
|
||||
acronym, abbr {
|
||||
letter-spacing:0.1em;
|
||||
font-variant:small-caps;
|
||||
}
|
||||
|
||||
/* Interlink prefix not shown */
|
||||
a .site, a .separator {
|
||||
display: none;
|
||||
}
|
||||
a cite { font:inherit; }
|
||||
/* browser borkage */
|
||||
textarea[name="text"] { width:97%; height:80%; }
|
||||
textarea[name="summary"] { width:97%; height:3em; }
|
||||
/* comments */
|
||||
textarea[name="aftertext"] { width:97%; height:10em; }
|
||||
div.commentshown {
|
||||
font-size: 12pt;
|
||||
padding: 2em 0;
|
||||
}
|
||||
div.commenthidden {
|
||||
display:none;
|
||||
}
|
||||
div.commentshown {
|
||||
display:block;
|
||||
}
|
||||
p.comment {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.comment {
|
||||
font-size: 14pt;
|
||||
}
|
||||
div.comment h2 {
|
||||
margin-top: 5em;
|
||||
}
|
||||
/* comment pages with username, homepage, and email subscription */
|
||||
.comment form span { display: block; }
|
||||
.comment form span label { display: inline-block; width: 10em; }
|
||||
/* IE sucks */
|
||||
.comment input#username,
|
||||
.comment input#homepage,
|
||||
.comment input#mail { width: 20em; }
|
||||
|
||||
/* cal */
|
||||
div.month { padding:0; margin:0 2ex; }
|
||||
body > div.month {
|
||||
float:right;
|
||||
background-color: inherit;
|
||||
border:solid thin;
|
||||
padding:0 1ex;
|
||||
}
|
||||
.year > .month {
|
||||
float:left;
|
||||
}
|
||||
.footer {
|
||||
clear:both;
|
||||
}
|
||||
.month .title a.local {
|
||||
background-color: inherit;
|
||||
}
|
||||
.month a.local {
|
||||
background-color: #ddf;
|
||||
}
|
||||
.month a.today {
|
||||
background-color: #fdd;
|
||||
}
|
||||
.month a {
|
||||
color:inherit;
|
||||
font-weight:inherit;
|
||||
text-decoration: none;
|
||||
background-color: #eee;
|
||||
}
|
||||
/* history tables and other tables */
|
||||
table.history {
|
||||
border: none;
|
||||
}
|
||||
td.history {
|
||||
border: none;
|
||||
}
|
||||
|
||||
table {
|
||||
border: none;
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 1em;
|
||||
margin: 1em 2em;
|
||||
}
|
||||
table tr td, table tr th {
|
||||
border: none;
|
||||
padding: 0.2em 0.5em;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.arab tr th {
|
||||
font-weight:normal;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
table.arab, table.arab tr th, table.arab tr td {
|
||||
border:none;
|
||||
}
|
||||
th.nobreak {
|
||||
white-space:nowrap;
|
||||
}
|
||||
table.full { width:99%; margin-left:1px; }
|
||||
table.j td, table.j th, table tr td.j, table tr th.j, .j { text-align:justify; }
|
||||
table.l td, table.l th, table tr td.l, table tr th.l, .l { text-align:left; }
|
||||
table.r td, table.r th, table tr td.r, table tr th.r, .r { text-align:right; }
|
||||
table.c td, table.c th, table tr td.c, table tr th.c, .c { text-align:center; }
|
||||
table.t td { vertical-align: top; }
|
||||
td.half { width:50%; }
|
||||
td.third { width:33%; }
|
||||
|
||||
form table td { padding:5px; }
|
||||
|
||||
/* lists */
|
||||
dd { padding-bottom:0.5ex; }
|
||||
dl.inside dt { float:left; }
|
||||
/* search */
|
||||
div.search span.result { font-size:larger; }
|
||||
div.search span.info { font-size:smaller; font-style:italic; }
|
||||
div.search p.result { display:none; }
|
||||
|
||||
img.logo {
|
||||
float: right;
|
||||
margin: 0 0 0 1ex;
|
||||
padding: 0;
|
||||
border: 1px solid #000;
|
||||
opacity: 0.3;
|
||||
background-color:#ffe;
|
||||
}
|
||||
|
||||
/* images */
|
||||
|
||||
div.content a.feed img, div.journal a.feed img,
|
||||
div.content a img.smiley, div.journal a img.smiley, img.smiley,
|
||||
div.content a.inline img, div.journal a.inline img,
|
||||
div.content li a.image img, div.journal li a.image img {
|
||||
margin: 0; padding: 0; border: none;
|
||||
}
|
||||
div.image a img {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.image span.caption {
|
||||
margin: 0 1em;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.left { float:left; margin-right: 1em; }
|
||||
.right { float:right; margin-left: 1em; }
|
||||
.half img { height: 50%; width: 50%; }
|
||||
.face img { width: 200px; }
|
||||
div.left .left, div.right .right {
|
||||
float:none;
|
||||
}
|
||||
.center { text-align:center; }
|
||||
table.aside {
|
||||
float:right;
|
||||
width:40%;
|
||||
margin-left: 1em;
|
||||
padding: 1ex;
|
||||
border: 1px dotted #666;
|
||||
}
|
||||
table.aside td {
|
||||
text-align:left;
|
||||
}
|
||||
div.sidebar {
|
||||
float:right; width: 250px;
|
||||
text-align: right;
|
||||
border: none;
|
||||
margin: 1ex;
|
||||
}
|
||||
|
||||
.bigsidebar {
|
||||
float:right;
|
||||
width: 500px;
|
||||
border: none;
|
||||
margin-left: 1ex;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
|
||||
dl.irc dt span.time { float:left; }
|
||||
dl.irc dd { margin-left:22ex; }
|
||||
|
||||
/* portrait */
|
||||
|
||||
div.footer, div.comment, hr { clear: both; }
|
||||
.portrait { float: left; font-size: small; margin-right: 1em; }
|
||||
.portrait a { color: #999; }
|
||||
|
||||
div.left { float:left; margin:1em; padding: 0.5em; }
|
||||
div.left p { display:table-cell; }
|
||||
div.left p + p { display:table-caption; caption-side:bottom; }
|
||||
|
||||
p.table a { float:left; width:20ex; }
|
||||
p.table + p { clear:both; }
|
||||
|
||||
/* mastodon */
|
||||
|
||||
div.mastodon { padding: 0 2em }
|
||||
div.mastodon .status {padding-top: 1ex; border-bottom: 1px solid grey;}
|
||||
div.mastodon .status:first-child {border-top: 1px solid grey;}
|
||||
|
||||
/* terminal "screenshots" */
|
||||
|
||||
.terminal {
|
||||
width: 80%;
|
||||
margin: 50px auto 100px auto;
|
||||
padding: 5px;
|
||||
font-size: 62%; /* fits 80ex */
|
||||
border: 1px solid #999;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 25px 50px #999;
|
||||
}
|
||||
|
||||
/* rss */
|
||||
|
||||
channel * { display: block; }
|
||||
|
||||
channel title {
|
||||
margin-top: 30pt;
|
||||
}
|
||||
copyright {
|
||||
font-size: 14pt;
|
||||
margin-top: 1em;
|
||||
}
|
||||
channel:before {
|
||||
font-size: 14pt;
|
||||
display: block;
|
||||
margin: 1em;
|
||||
padding: 0.5em;
|
||||
content: "This document is to be read in a feed reader. The item content is escaped HTML, which makes it hard to read for humans. Sorry!";
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
}
|
||||
license {
|
||||
font-size: 11pt;
|
||||
margin-bottom: 9pt;
|
||||
}
|
||||
contributor:before { content: "Last edited by "; }
|
||||
contributor:after { content: "."; }
|
||||
generator:before { content: "Feed generated by "; }
|
||||
generator:after { content: "."; }
|
||||
channel description {
|
||||
font-weight: bold;
|
||||
}
|
||||
item description {
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
link, managingEditor, webMaster, license, url,
|
||||
docs, language,
|
||||
pubDate, lastBuildDate, ttl, guid, category, comments,
|
||||
docs, image title, image link,
|
||||
status, version, diff, history, importance {
|
||||
display: none;
|
||||
}
|
||||
48
css/wiki.css
@@ -51,13 +51,13 @@ a.image:hover img {
|
||||
}
|
||||
|
||||
/* a.definition soll aussehen wie h2 */
|
||||
h2, p a.definition {
|
||||
h2, p > a.definition {
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Such Link im h1 soll nicht auffallen. */
|
||||
h1, h2, h3, h4, h1 a, h1 a:visited, p a.definition {
|
||||
h1, h2, h3, h4, h1 a, h1 a:visited, p > a.definition {
|
||||
color: #666;
|
||||
font-size: 30pt;
|
||||
font-weight: normal;
|
||||
@@ -172,6 +172,50 @@ span.bar a {
|
||||
padding: 1ex 0;
|
||||
}
|
||||
|
||||
.red {
|
||||
background: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.orange {
|
||||
background: orange;
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
background: yellow;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.green {
|
||||
background: green;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background: blue;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.indigo {
|
||||
background: indigo;
|
||||
color: indigo;
|
||||
}
|
||||
|
||||
.violet {
|
||||
background: violet;
|
||||
color: violet;
|
||||
}
|
||||
|
||||
.white {
|
||||
background: white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ip-code {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
color: black;
|
||||
|
||||
BIN
logo/falky/Neris/Neris-Black.otf
Normal file
BIN
logo/falky/Neris/Neris-BlackItalic.otf
Normal file
BIN
logo/falky/Neris/Neris-Light.otf
Normal file
BIN
logo/falky/Neris/Neris-LightItalic.otf
Normal file
BIN
logo/falky/Neris/Neris-SemiBold.otf
Normal file
BIN
logo/falky/Neris/Neris-SemiBoldItalic.otf
Normal file
BIN
logo/falky/Neris/Neris-Thin.otf
Normal file
BIN
logo/falky/Neris/Neris-ThinItalic.otf
Normal file
15
logo/falky/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
Falky schreibt:
|
||||
|
||||
Zum Thema Rechte am Logo möchte ich erstmal sagen, dass es mir primär
|
||||
darum ging den Auftritt von oddmuse.org aufzuhübschen. Also du/ihr
|
||||
sollt durch das Logo unterstützt werden, nicht eingeschränkt.
|
||||
|
||||
Welche Lizenz das ab besten leisten, da hab ich keinen Schimmer.
|
||||
|
||||
Schön wäre, wenn irgendwo ein verweis auf "Falky [falky.de]"
|
||||
auftaucht, der soll aber nicht bei jeder Verwendung auftauchen,
|
||||
sondern irgendwo 'auffindbar' an 'zentraler' Stelle - halt irgendwo
|
||||
auf der Homepage, dass ich darauf verweisen kann und dass niemand was
|
||||
anderes behaupten kann. Das wäre es schon. Und ja, falls jemand das
|
||||
logo für ein anderes Projekt verwenden möchte, kann man ja höflich
|
||||
nochmal fragen oder so.
|
||||
BIN
logo/falky/oddmuse.banner.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
25
logo/falky/oddmuse.banner.svg
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-61 -1 177 62">
|
||||
|
||||
<rect fill="#FFF" x="-60" y="0" width="175" height="60"/>
|
||||
|
||||
<text style="font:400 6px Neris Black" fill="#000" x="2" y="18">powered by</text>
|
||||
<text style="font:400 16px Neris Thin" fill="#000" x="2" y="34">Oddmuse<tspan style="font-family:Neris Black">.org</tspan></text>
|
||||
|
||||
<g id="new" transform="translate(-30,30) scale(.18,.18)" >
|
||||
<circle fill="#FFF" stroke="#000" stroke-width="3" cx="0" cy="0" r="160.5"/>
|
||||
<g id="new" transform="rotate(207.2)" >
|
||||
|
||||
<path fill="#000" d="m42 -77 q24 0 38 20 c14 -1 42 -18 52 -29 c-1 50 -26 68 -44 70 c0 90 -44 141 -88 141 c-44 0 -88 -51 -88 -141 c-18 -2 -43 -20 -44 -70 c10 11 38 28 52 29 q14 -20 38 -20z"/>
|
||||
<path fill="#000" transform="translate(0,60) rotate(-14)" d="m -22 46q1 50 22 50q21 0 22 -50z"/>
|
||||
|
||||
<path stroke="#FFF" stroke-width="4" fill="#000" d="m0 17 c 30 0 36 -2 46 -2 c 18 0 32 16 32 51 c 0 34 -12 50 -32 50 c-16 0 -26 -5 -46 -5 c-20 0 -30 5 -46 5 c-20 0 -33 -18 -32 -50 c0 -36 16 -52 32 -51 c10 0 16 2 46 2z"/>
|
||||
<circle fill="#FFF" cx="44" cy="49" r="12"/> <circle fill="#FFF" cx="-44" cy="49" r="12"/>
|
||||
|
||||
<circle fill="#FFF" cx="42" cy="-31" r="40"/> <circle fill="#000" cx="42" cy="-31" r="20.5"/>
|
||||
<circle fill="#FFF" cx="-42" cy="-31" r="40"/> <path fill="#000" transform="translate(-42,-31) rotate(55)" d="m-7 7 v20 q7 2 14 0 v-20 h20 q2 -7 0 -14 h-20 v-20 q -7 -2 -14 0 v20 h-20 q-2 7 0 14z"/>
|
||||
|
||||
</g></g>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
BIN
logo/falky/oddmuse.icon.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
19
logo/falky/oddmuse.icon.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-100 -100 200 200" >
|
||||
|
||||
<rect fill="#D88" x="-100" y="-100" width="200" height="200"/>
|
||||
|
||||
<g id="new" transform="rotate(180) translate(0,-19)" >
|
||||
|
||||
<path fill="#A00" d="m42 -77 q18 0 33 14 q 12 -6 23 -16 q-2 25 -10 43 c0 110 -44 155 -88 155 c-44 0 -88 -44 -88 -155 q-8 -18 -10 -43 q11 10 23 16 q15 -14 33 -14z"/>
|
||||
|
||||
<path stroke="#FFF" stroke-width="6" fill="#A00" d="m0 16 c30 0 38 -2 48 -2 c17 0 33 16 33 52 c0 34 -12 52 -31 52 c-15 0 -30 -7 -50 -7 c-20 0 -35 7 -50 7 c-19 0 -31 -18 -31 -52 c0 -36 16 -52 33 -52 c10 0 18 2 48 2z"/>
|
||||
<circle fill="#FFF" cx="45" cy="49" r="12"/> <circle fill="#FFF" cx="-45" cy="49" r="12"/>
|
||||
|
||||
<circle fill="#FFF" cx="42" cy="-31" r="40"/> <circle fill="#000" cx="42" cy="-31" r="20.5"/>
|
||||
<circle fill="#FFF" cx="-42" cy="-31" r="40"/> <path fill="#666" transform="translate(-42,-31) rotate(55)" d="m-7 7 v20 q7 2 14 0 v-20 h20 q2 -7 0 -14 h-20 v-20 q -7 -2 -14 0 v20 h-20 q-2 7 0 14z"/>
|
||||
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
logo/falky/oddmuse.logo.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
22
logo/falky/oddmuse.logo.svg
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-162 -162 324 324">
|
||||
|
||||
<circle fill="#FEE" stroke="#000" stroke-width="3" cx="0" cy="0" r="160.5"/>
|
||||
|
||||
<g id="new" transform="rotate(210)" >
|
||||
|
||||
<path fill="#A00" d="m42 -77 q24 0 38 20 c14 -1 42 -18 52 -29 c-1 50 -26 68 -44 70 c0 90 -44 141 -88 141 c-44 0 -88 -51 -88 -141 c-18 -2 -43 -20 -44 -70 c10 11 38 28 52 29 q14 -20 38 -20z"/>
|
||||
<path fill="#A00" transform="translate(0,60) rotate(-14)" d="m -22 46q1 50 22 50q21 0 22 -50z"/>
|
||||
|
||||
<path stroke="#FFF" stroke-width="4" fill="#D88" d="m0 17 c 30 0 36 -2 46 -2 c 18 0 32 16 32 51 c 0 34 -12 50 -32 50 c-16 0 -26 -5 -46 -5 c-20 0 -30 5 -46 5 c-20 0 -33 -18 -32 -50 c0 -36 16 -52 32 -51 c10 0 16 2 46 2z"/>
|
||||
<circle fill="#FFF" cx="44" cy="49" r="12"/> <circle fill="#FFF" cx="-44" cy="49" r="12"/>
|
||||
|
||||
<circle fill="#FFF" cx="42" cy="-31" r="40"/> <circle fill="#000" cx="42" cy="-31" r="20.5"/>
|
||||
<circle fill="#FFF" cx="-42" cy="-31" r="40"/> <path fill="#666" transform="translate(-42,-31) rotate(55)" d="m-7 7 v20 q7 2 14 0 v-20 h20 q2 -7 0 -14 h-20 v-20 q -7 -2 -14 0 v20 h-20 q-2 7 0 14z"/>
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
24
logo/falky/oddmuse.siegel.svg
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-162 -162 324 324">
|
||||
|
||||
<circle fill="#FFF" stroke="#000" stroke-width="3" cx="0" cy="0" r="160.5"/>
|
||||
|
||||
<text style="font:400 27px Neris Black" fill="#000" text-anchor="middle" x="-5" y="137">Oddmuse</text>
|
||||
|
||||
<g id="new" transform="rotate(210)" >
|
||||
|
||||
<path fill="#000" d="m42 -77 q24 0 38 20 c14 -1 42 -18 52 -29 c-1 50 -26 68 -44 70 c0 90 -44 141 -88 141 c-44 0 -88 -51 -88 -141 c-18 -2 -43 -20 -44 -70 c10 11 38 28 52 29 q14 -20 38 -20z"/>
|
||||
<path fill="#000" transform="translate(0,60) rotate(-14)" d="m -22 46q1 50 22 50q21 0 22 -50z"/>
|
||||
|
||||
<path stroke="#FFF" stroke-width="4" fill="#000" d="m0 17 c 30 0 36 -2 46 -2 c 18 0 32 16 32 51 c 0 34 -12 50 -32 50 c-16 0 -26 -5 -46 -5 c-20 0 -30 5 -46 5 c-20 0 -33 -18 -32 -50 c0 -36 16 -52 32 -51 c10 0 16 2 46 2z"/>
|
||||
<circle fill="#FFF" cx="44" cy="49" r="12"/> <circle fill="#FFF" cx="-44" cy="49" r="12"/>
|
||||
|
||||
<circle fill="#FFF" cx="42" cy="-31" r="40"/> <circle fill="#000" cx="42" cy="-31" r="20.5"/>
|
||||
<circle fill="#FFF" cx="-42" cy="-31" r="40"/> <path fill="#000" transform="translate(-42,-31) rotate(55)" d="m-7 7 v20 q7 2 14 0 v-20 h20 q2 -7 0 -14 h-20 v-20 q -7 -2 -14 0 v20 h-20 q-2 7 0 14z"/>
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
BIN
logo/falky/preview/oddmuse-preview.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
logo/falky/preview/oddmuse.icon-preview.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
logo/falky/preview/oddmuse.org-preview.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
logo/falky/testmonial.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
4
logo/murray/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
The logo is licensed under the [GNU Free Documentation
|
||||
License](http://www.emacswiki.org/FDL) as well as the [CC BY
|
||||
2.0](http://creativecommons.org/licenses/by/2.0/) license. The author
|
||||
is [Murray Altheim](http://www.altheim.com/murray/).
|
||||
BIN
logo/murray/oddmuse-logo.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
100
logo/murray/oddmuse-logo.svg
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
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://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="0.41"
|
||||
sodipodi:docname="oddmuse-logo.svg"
|
||||
sodipodi:docbase="/Users/alex/Pictures/Oddmuse"
|
||||
height="1000pt"
|
||||
width="1000pt"
|
||||
sodipodi:version="0.32"
|
||||
id="svg1">
|
||||
<metadata
|
||||
id="metadata32">
|
||||
<rdf:RDF
|
||||
id="RDF34">
|
||||
<cc:Work
|
||||
id="Work36"
|
||||
rdf:about="">
|
||||
<dc:format
|
||||
id="format38">image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
|
||||
id="type40" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3" />
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="svg1"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="535"
|
||||
inkscape:window-width="640"
|
||||
inkscape:cy="625.00000"
|
||||
inkscape:cx="625.00000"
|
||||
inkscape:zoom="0.28960000"
|
||||
id="base" />
|
||||
<g
|
||||
transform="translate(-155.7935,22.13440)"
|
||||
id="g176">
|
||||
<path
|
||||
transform="matrix(1.021740,0.000000,0.000000,1.021740,-299.4160,85.75640)"
|
||||
sodipodi:ry="148.93437"
|
||||
sodipodi:rx="142.30524"
|
||||
sodipodi:cy="475.27606"
|
||||
sodipodi:cx="1066.8474"
|
||||
d="M 1209.1526 475.27606 A 142.30524 148.93437 0 1 1 924.54218,475.27606 A 142.30524 148.93437 0 1 1 1209.1526 475.27606 z"
|
||||
id="path166"
|
||||
style="fill:#ffde00;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:22.021299;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
transform="matrix(0.591973,0.000000,0.000000,0.523224,159.0800,309.0390)"
|
||||
sodipodi:ry="148.93437"
|
||||
sodipodi:rx="142.30524"
|
||||
sodipodi:cy="475.27606"
|
||||
sodipodi:cx="1066.8474"
|
||||
d="M 1209.1526 475.27606 A 142.30524 148.93437 0 1 1 924.54218,475.27606 A 142.30524 148.93437 0 1 1 1209.1526 475.27606 z"
|
||||
id="path168"
|
||||
style="fill:#ffde00;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:38.609402;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
sodipodi:type="arc" />
|
||||
<rect
|
||||
transform="translate(-1.416020,0.000000)"
|
||||
y="561.16870"
|
||||
x="694.39026"
|
||||
height="88.691116"
|
||||
width="195.30150"
|
||||
id="rect170"
|
||||
style="font-size:12.000000;fill:#ffde00;fill-opacity:1.0000000;fill-rule:evenodd;stroke-width:1.0000000pt" />
|
||||
<g
|
||||
id="g173">
|
||||
<path
|
||||
transform="translate(185.0000,-158.7500)"
|
||||
sodipodi:ry="31.250000"
|
||||
sodipodi:rx="25.000000"
|
||||
sodipodi:cy="783.75000"
|
||||
sodipodi:cx="565.00000"
|
||||
d="M 590.00000 783.75000 A 25.000000 31.250000 0 1 1 540.00000,783.75000 A 25.000000 31.250000 0 1 1 590.00000 783.75000 z"
|
||||
id="path171"
|
||||
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
transform="translate(266.2500,-158.7500)"
|
||||
sodipodi:ry="31.250000"
|
||||
sodipodi:rx="25.000000"
|
||||
sodipodi:cy="783.75000"
|
||||
sodipodi:cx="565.00000"
|
||||
d="M 590.00000 783.75000 A 25.000000 31.250000 0 1 1 540.00000,783.75000 A 25.000000 31.250000 0 1 1 590.00000 783.75000 z"
|
||||
id="path172"
|
||||
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
sodipodi:type="arc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -19,7 +19,7 @@ AddModuleDescription('bbcode.pl', 'bbCode Extension');
|
||||
|
||||
our ($q, @HtmlStack, @MyRules, %RuleOrder, $UrlProtocols, $FullUrlPattern);
|
||||
push(@MyRules, \&bbCodeRule);
|
||||
$RuleOrder{\&bbCodeRule} = 100; # must come after PortraitSupportRule
|
||||
$RuleOrder{\&bbCodeRule} = 300; # must come after PortraitSupportRule, MarkdownRule
|
||||
|
||||
our ($bbBlock);
|
||||
my %bbTitle = qw(h1 1 h2 1 h3 1 h4 1 h5 1 h6 1);
|
||||
|
||||
@@ -405,8 +405,7 @@ sub CreoleRule {
|
||||
if ($is_left_justified and
|
||||
$is_right_justified) { $attributes .= 'align="center"' }
|
||||
elsif ($is_right_justified) { $attributes .= 'align="right"' }
|
||||
# this is the default:
|
||||
# elsif ($is_left_justified) { $attributes .= 'align="left"' }
|
||||
elsif ($is_left_justified) { $attributes .= 'align="left"' }
|
||||
|
||||
return
|
||||
(InElement('td') || InElement('th') ? CloseHtmlEnvironmentUntil('tr') : '')
|
||||
|
||||
49
modules/ditaa.pl
Normal file
@@ -0,0 +1,49 @@
|
||||
#! /usr/bin/perl
|
||||
# Copyright (C) 2015–2017 Alex Schroeder <alex@gnu.org>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation, either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
AddModuleDescription('ditaa.pl', 'Ditaa for Diagrams');
|
||||
|
||||
our ($q, $bol, @MyRules, @KnownLocks, $TempDir);
|
||||
|
||||
push (@MyRules, \&DitaaRule);
|
||||
push(@KnownLocks, 'diagram');
|
||||
|
||||
sub DitaaRule {
|
||||
if ($bol && m/\G<diagram(\s+style=".*")?>\n((.*\n)+)<\/diagram>/cg) {
|
||||
return "MIME::Base64 not installed" unless eval { require MIME::Base64; };
|
||||
my $style = $1;
|
||||
my $map = UnquoteHtml($2);
|
||||
RequestLockDir('diagram', undef, undef, 1);
|
||||
WriteStringToFile("$TempDir/diagram.txt", $map);
|
||||
$ENV{LANG}='en_US.UTF-8'; # Java needs Locale to match as well!
|
||||
my $output = `ditaa "$TempDir/diagram.txt" "$TempDir/diagram.png"`;
|
||||
my $image = '';
|
||||
# not UTF-8 layer!
|
||||
if (open(IN, '<', "$TempDir/diagram.png")) {
|
||||
local $/ = undef; # Read complete files
|
||||
$image = <IN>;
|
||||
close IN;
|
||||
}
|
||||
ReleaseLockDir('diagram');
|
||||
my $data = MIME::Base64::encode_base64($image);
|
||||
my $url = "data:image/png;base64,$data";
|
||||
return CloseHtmlEnvironments()
|
||||
. "<div$style>" . $q->img({-src=>$url, -alt=>$map}) . "</div>";
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
@@ -198,8 +198,7 @@ sub MakeLaTeX {
|
||||
}
|
||||
|
||||
if (not $error and IsFile('srender1.png') and not ZeroSize('srender1.png')) {
|
||||
my $png = ReadFileOrDie("srender1.png");
|
||||
WriteStringToFile ("$LatexDir/$hash.png", $png);
|
||||
Rename("srender1.png", "$LatexDir/$hash.png");
|
||||
} else {
|
||||
$error = "[Error retrieving image for $latex]";
|
||||
}
|
||||
|
||||
@@ -48,12 +48,6 @@ sub MarkdownRule {
|
||||
return CloseHtmlEnvironments()
|
||||
. AddHtmlEnvironment("p");
|
||||
}
|
||||
# setext headers
|
||||
elsif ($bol and m/\G((\s*\n)*(.+?)[ \t]*\n(-+|=+)[ \t]*\n)/cg) {
|
||||
return CloseHtmlEnvironments()
|
||||
. (substr($4,0,1) eq '=' ? $q->h2($3) : $q->h3($3))
|
||||
. AddHtmlEnvironment('p');
|
||||
}
|
||||
# > blockquote
|
||||
# with continuation
|
||||
elsif ($bol and m/\G>/cg) {
|
||||
@@ -65,8 +59,8 @@ sub MarkdownRule {
|
||||
return CloseHtmlEnvironments() . $q->pre($1)
|
||||
. AddHtmlEnvironment("p");
|
||||
}
|
||||
# ` = code
|
||||
elsif (m/\G`([^`].*?)`/cg) {
|
||||
# ` = code may not start with a newline
|
||||
elsif (m/\G`([^\n`][^`]*)`/cg) {
|
||||
return $q->code($1);
|
||||
}
|
||||
# ***bold and italic***
|
||||
@@ -80,20 +74,20 @@ sub MarkdownRule {
|
||||
elsif (m/\G\*\*/cg) {
|
||||
return AddOrCloseHtmlEnvironment('strong');
|
||||
}
|
||||
# *italic*
|
||||
elsif ($bol and m/\G\*/cg or m/\G(?<=\P{Word})\*/cg) {
|
||||
return AddHtmlEnvironment('em');
|
||||
}
|
||||
# *italic* (closing before adding environment!)
|
||||
elsif (InElement('em') and m/\G\*/cg) {
|
||||
return CloseHtmlEnvironment('em');
|
||||
}
|
||||
elsif ($bol and m/\G\*/cg or m/\G(?<=\P{Word})\*/cg) {
|
||||
return AddHtmlEnvironment('em');
|
||||
}
|
||||
# ~~strikethrough~~ (deleted)
|
||||
elsif (m/\G~~/cg) {
|
||||
return AddOrCloseHtmlEnvironment('del');
|
||||
}
|
||||
# indented lists = nested lists
|
||||
elsif ($bol and m/\G(\s*\n)*()([*-]|\d+\.)[ \t]*/cg
|
||||
or InElement('li') && m/\G(\s*\n)+( *)([*-]|\d+\.)[ \t]*/cg) {
|
||||
elsif ($bol and m/\G(\s*\n)*()([*-]|\d+\.)[ \t]+/cg
|
||||
or InElement('li') && m/\G(\s*\n)+( *)([*-]|\d+\.)[ \t]+/cg) {
|
||||
my $nesting_goal = int(length($2)/4) + 1;
|
||||
my $tag = ($3 eq '*' or $3 eq '-') ? 'ul' : 'ol';
|
||||
my $nesting_current = 0;
|
||||
@@ -176,6 +170,12 @@ sub MarkdownRule {
|
||||
$params{-title} = $title if $title;
|
||||
return $q->a(\%params, $text);
|
||||
}
|
||||
# setext headers (must come after block quotes)
|
||||
elsif ($bol and m/\G((\s*\n)*(.+?)[ \t]*\n(-+|=+)[ \t]*\n)/cg) {
|
||||
return CloseHtmlEnvironments()
|
||||
. (substr($4,0,1) eq '=' ? $q->h2($3) : $q->h3($3))
|
||||
. AddHtmlEnvironment('p');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -186,23 +186,23 @@ sub MarkdownExtraRule {
|
||||
if (m/\G__/cg) {
|
||||
return AddOrCloseHtmlEnvironment('em', 'style="font-style: normal; text-decoration: underline"');
|
||||
}
|
||||
# _underline_
|
||||
elsif ($bol and m/\G_/cg or m/\G(?<=\P{Word})_/cg) {
|
||||
return AddHtmlEnvironment('em', 'style="font-style: normal; text-decoration: underline"');
|
||||
}
|
||||
# _underline_ (closing before adding environment!)
|
||||
elsif (InElement('em', 'style="font-style: normal; text-decoration: underline"') and m/\G_/cg) {
|
||||
return CloseHtmlEnvironment('em');
|
||||
}
|
||||
elsif ($bol and m/\G_/cg or m/\G(?<=\P{Word})_(?=\S)/cg) {
|
||||
return AddHtmlEnvironment('em', 'style="font-style: normal; text-decoration: underline"');
|
||||
}
|
||||
# //italic//
|
||||
elsif (m/\G\/\//cg) {
|
||||
return AddOrCloseHtmlEnvironment('em');
|
||||
}
|
||||
# /italic/
|
||||
elsif ($bol and m/\G\//cg or m/\G(?<=\P{Word})\//cg) {
|
||||
return AddHtmlEnvironment('em');
|
||||
}
|
||||
# /italic/ (closing before adding environment!)
|
||||
elsif (InElement('em') and m/\G\//cg) {
|
||||
return CloseHtmlEnvironment('em');
|
||||
}
|
||||
elsif ($bol and m/\G\//cg or m/\G(?<=[|[:space:]])\/(?=\S)/cg) {
|
||||
return AddHtmlEnvironment('em');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
73
modules/mermaid.pl
Normal file
@@ -0,0 +1,73 @@
|
||||
#! /usr/bin/perl
|
||||
# Copyright (C) 2017 Alex Schroeder <alex@gnu.org>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation, either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
AddModuleDescription('mermaid.pl', 'Mermaid for Diagrams');
|
||||
|
||||
our ($bol, @MyRules, $MermaidCss, $MermaidJs, $HtmlHeaders, %Page);
|
||||
|
||||
$MermaidCss = '/mermaid/mermaid.css';
|
||||
$MermaidJs = '/mermaid/mermaid.min.js';
|
||||
|
||||
# When browsing a page containing mermaid markup, load the mermaid Javascript and CSS
|
||||
|
||||
*MermaidOldBrowsePage = *BrowsePage;
|
||||
*BrowsePage = *MermaidNewBrowsePage;
|
||||
|
||||
sub MermaidNewBrowsePage {
|
||||
my ($id) = @_;
|
||||
OpenPage($id);
|
||||
# Uses <mermaid> to render graphs
|
||||
if ($Page{text} =~ /<mermaid>/
|
||||
and $HtmlHeaders !~ /mermaid/) {
|
||||
$HtmlHeaders .= qq{
|
||||
<link type="text/css" rel="stylesheet" href="$MermaidCss" />
|
||||
<script type="text/javascript" src="$MermaidJs"></script>
|
||||
};
|
||||
}
|
||||
return MermaidOldBrowsePage(@_);
|
||||
}
|
||||
|
||||
# When previewing an edit containing mermaid markup, load the mermaid Javascript
|
||||
# and CSS
|
||||
|
||||
*MermaidOldDoEdit = *DoEdit;
|
||||
*DoEdit = *MermaidNewDoEdit;
|
||||
|
||||
sub MermaidNewDoEdit {
|
||||
# Uses <mermaid> to render graphs
|
||||
if (GetParam('text') =~ /<mermaid>/
|
||||
and $HtmlHeaders !~ /mermaid/) {
|
||||
$HtmlHeaders = q{
|
||||
<link rel="stylesheet" href="/mermaid/mermaid.css" />
|
||||
<script type="text/javascript" src="/mermaid/mermaid.min.js"></script>
|
||||
};
|
||||
}
|
||||
return MermaidOldDoEdit(@_);
|
||||
}
|
||||
|
||||
# And a formatting rule, of course.
|
||||
|
||||
push(@MyRules, \&MermaidRule);
|
||||
|
||||
sub MermaidRule {
|
||||
if ($bol && m/\G\<mermaid\>\n(.+?)\n\<\/mermaid\>/cgs) {
|
||||
return CloseHtmlEnvironments()
|
||||
. '<div class="mermaid">' . UrlDecode($1) . '</div>';
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
@@ -405,7 +405,7 @@ $Action{namespaces} = \&DoNamespacesList;
|
||||
sub DoNamespacesList {
|
||||
if (GetParam('raw', 0)) {
|
||||
print GetHttpHeader('text/plain');
|
||||
print join("\n", keys %Namespaces), "\n";
|
||||
print join("\n", sort keys %Namespaces), "\n";
|
||||
} else {
|
||||
print GetHeader('', T('Namespaces')),
|
||||
$q->start_div({-class=>'content namespaces'}),
|
||||
@@ -413,7 +413,7 @@ sub DoNamespacesList {
|
||||
GetHiddenValue('id', $HomePage);
|
||||
my $new = $q->textfield('ns') . ' ' . $q->submit('donamespace', T('Go!'));
|
||||
print $q->ul($q->li([map { $q->a({-href => $Namespaces{$_} . $HomePage},
|
||||
$_); } keys %Namespaces]), $q->li($new));
|
||||
$_); } sort keys %Namespaces]), $q->li($new));
|
||||
print $q->end_form() . $q->end_div();
|
||||
PrintFooter();
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ sub PermanentAnchorsRule {
|
||||
} else {
|
||||
print $q->span({-class=>'permanentanchor'}, $2);
|
||||
}
|
||||
return '';
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -206,10 +206,12 @@ sub send_mail {
|
||||
|
||||
sub main {
|
||||
my $rss = get_rss();
|
||||
return unless @{$rss->{items}};
|
||||
my $subscribers = get_subscribers();
|
||||
return unless %{$subscribers};
|
||||
send_files($rss, $subscribers);
|
||||
if (@{$rss->{items}}) {
|
||||
my $subscribers = get_subscribers();
|
||||
if (%{$subscribers}) {
|
||||
send_files($rss, $subscribers);
|
||||
}
|
||||
}
|
||||
update_timestamp();
|
||||
}
|
||||
|
||||
|
||||
87
scripts/strip-host.pl
Executable file
@@ -0,0 +1,87 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Copyright (C) 2018 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
sub ParseData {
|
||||
my $data = shift;
|
||||
my %result;
|
||||
while ($data =~ /(\S+?): (.*?)(?=\n[^ \t]|\Z)/sg) {
|
||||
my ($key, $value) = ($1, $2);
|
||||
$value =~ s/\n\t/\n/g;
|
||||
$result{$key} = $value;
|
||||
}
|
||||
return %result;
|
||||
}
|
||||
|
||||
sub EncodePage {
|
||||
my @data = @_;
|
||||
my $result = '';
|
||||
$result .= (shift @data) . ': ' . EscapeNewlines(shift @data) . "\n" while (@data);
|
||||
return $result;
|
||||
}
|
||||
|
||||
sub EscapeNewlines {
|
||||
$_[0] =~ s/\n/\n\t/g; # modify original instead of copying
|
||||
return $_[0];
|
||||
}
|
||||
|
||||
sub main {
|
||||
die "There is no temp directory, here.\n"
|
||||
. "Perhaps this isn't an Oddmuse data directory?\n"
|
||||
unless -d 'temp';
|
||||
die "The main lock already exists in the temp directory.\n"
|
||||
if -d "temp/lockmain";
|
||||
mkdir "temp/lockmain" or die "Cannot create main lock in temp: $!\n";
|
||||
local $/ = undef; # Read complete files
|
||||
foreach my $dir (qw/keep page/) {
|
||||
warn "Did not find the $dir directory.\n" unless -d $dir;
|
||||
}
|
||||
# include dotfiles!
|
||||
my $t = 0;
|
||||
my $n = 0;
|
||||
foreach my $file (glob("page/*.pg page/.*.pg"),
|
||||
glob("keep/*/*.kp keep/.*.kp")) {
|
||||
$t++;
|
||||
open(my $fh, '<', $file) or die "Cannot read $file file: $!\n";
|
||||
my $data = <$fh>;
|
||||
close($fh);
|
||||
next unless $data;
|
||||
my %result = ParseData($data);
|
||||
if (exists($result{host}) or exists($result{ip})) {
|
||||
delete($result{host});
|
||||
delete($result{ip});
|
||||
open($fh,'>', "$file~") or die "Cannot $file~: $!\n";
|
||||
print $fh EncodePage(%result);
|
||||
close($fh);
|
||||
rename("$file~", $file) or die "Cannot rename $file~ to $file: $!\n";
|
||||
$n++;
|
||||
}
|
||||
}
|
||||
rmdir "temp/lockmain" or die "Cannot remove main lock: $!\n";
|
||||
print "I looked at $t files and found $n host or ip keys which I removed.\n";
|
||||
}
|
||||
|
||||
if (@ARGV) {
|
||||
print qq{
|
||||
Usage: $0 [--page DIR]
|
||||
|
||||
Goes through the wiki and removes the hostname or IP number from page and
|
||||
keep files. Make a backup before running this script! Run this script in
|
||||
your data directory.
|
||||
}
|
||||
} else {
|
||||
main ();
|
||||
}
|
||||
@@ -33,7 +33,7 @@ plugin CGI => {
|
||||
# WikiDataDir and falls back to the following
|
||||
# $OddMuse::DataDir = '/tmp/oddmuse';
|
||||
use warnings;
|
||||
require 'wiki.pl' unless defined &OddMuse::DoWikiRequest;
|
||||
require './wiki.pl' unless defined &OddMuse::DoWikiRequest;
|
||||
},
|
||||
env => {},
|
||||
# path to where STDERR from cgi script goes
|
||||
|
||||
882
stuff/gopher-server.pl
Executable file
@@ -0,0 +1,882 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (C) 2017–2018 Alex Schroeder <alex@gnu.org>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation, either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package OddMuse;
|
||||
use strict;
|
||||
use 5.10.0;
|
||||
use base qw(Net::Server::Fork); # any personality will do
|
||||
use MIME::Base64;
|
||||
use Text::Wrap;
|
||||
use List::Util qw(first);
|
||||
|
||||
our($RunCGI, $DataDir, %IndexHash, @IndexList, $IndexFile, $TagFile, $q,
|
||||
%Page, $OpenPageName, $MaxPost, $ShowEdits, %Locks, $CommentsPattern,
|
||||
$CommentsPrefix, $EditAllowed, $NoEditFile, $SiteName, $ScriptName);
|
||||
|
||||
my $external_image_path = '/home/alex/alexschroeder.ch/pics/';
|
||||
|
||||
# Sadly, we need this information before doing anything else
|
||||
my %args = (proto => 'ssl');
|
||||
for (grep(/--wiki_(key|cert)_file=/, @ARGV)) {
|
||||
$args{SSL_cert_file} = $1 if /--wiki_cert_file=(.*)/;
|
||||
$args{SSL_key_file} = $1 if /--wiki_key_file=(.*)/;
|
||||
}
|
||||
if ($args{SSL_cert_file} and not $args{SSL_key_file}
|
||||
or not $args{SSL_cert_file} and $args{SSL_key_file}) {
|
||||
die "I must have both --wiki_key_file and --wiki_cert_file\n";
|
||||
} elsif ($args{SSL_cert_file} and $args{SSL_key_file}) {
|
||||
OddMuse->run(%args);
|
||||
} else {
|
||||
OddMuse->run;
|
||||
}
|
||||
|
||||
sub options {
|
||||
my $self = shift;
|
||||
my $prop = $self->{'server'};
|
||||
my $template = shift;
|
||||
|
||||
# setup options in the parent classes
|
||||
$self->SUPER::options($template);
|
||||
|
||||
# add a single value option
|
||||
$prop->{wiki} ||= undef;
|
||||
$template->{wiki} = \$prop->{wiki};
|
||||
|
||||
$prop->{wiki_dir} ||= undef;
|
||||
$template->{wiki_dir} = \$prop->{wiki_dir};
|
||||
|
||||
$prop->{wiki_pages} ||= [];
|
||||
$template->{wiki_pages} = $prop->{wiki_pages};
|
||||
|
||||
$prop->{menu} ||= [];
|
||||
$template->{menu} = $prop->{menu};
|
||||
|
||||
$prop->{menu_file} ||= [];
|
||||
$template->{menu_file} = $prop->{menu_file};
|
||||
|
||||
# $prop->{wiki_pem_file} ||= undef;
|
||||
# $template->{wiki_pem_file} = $prop->{wiki_pem_file};
|
||||
}
|
||||
|
||||
sub post_configure_hook {
|
||||
my $self = shift;
|
||||
$self->write_help if $ARGV[0] eq '--help';
|
||||
|
||||
$DataDir = $self->{server}->{wiki_dir} || $ENV{WikiDataDir} || '/tmp/oddmuse';
|
||||
|
||||
$self->log(3, "PID $$");
|
||||
$self->log(3, "Host " . ("@{$self->{server}->{host}}" || "*"));
|
||||
$self->log(3, "Port @{$self->{server}->{port}}");
|
||||
$self->log(3, "Wiki data dir is $DataDir\n");
|
||||
|
||||
$RunCGI = 0;
|
||||
my $wiki = $self->{server}->{wiki} || "./wiki.pl";
|
||||
$self->log(1, "Running $wiki\n");
|
||||
unless (my $return = do $wiki) {
|
||||
$self->log(1, "couldn't parse wiki library $wiki: $@") if $@;
|
||||
$self->log(1, "couldn't do wiki library $wiki: $!") unless defined $return;
|
||||
$self->log(1, "couldn't run wiki library $wiki") unless $return;
|
||||
}
|
||||
|
||||
# make sure search is sorted newest first because NewTagFiltered resorts
|
||||
*OldGopherFiltered = \&Filtered;
|
||||
*Filtered = \&NewGopherFiltered;
|
||||
}
|
||||
|
||||
my $usage = << 'EOT';
|
||||
This server serves a wiki as a gopher site.
|
||||
|
||||
It implements Net::Server and thus all the options available to
|
||||
Net::Server are also available here. Additional options are available:
|
||||
|
||||
wiki - this is the path to the Oddmuse script
|
||||
wiki_dir - this is the path to the Oddmuse data directory
|
||||
wiki_pages - this is a page to show on the entry menu
|
||||
menu - this is the description of a gopher menu to prepend
|
||||
menu_file - this is the filename of the gopher menu to prepend
|
||||
wiki_cert_file - the filename containing a certificate in PEM format
|
||||
wiki_key_file - the filename containing a private key in PEM format
|
||||
|
||||
For many of the options, more information can be had in the Net::Server
|
||||
documentation. This is important if you want to daemonize the server. You'll
|
||||
need to use --pid_file so that you can stop it using a script, --setsid to
|
||||
daemonize it, --log_file to write keep logs, and you'll net to set the user or
|
||||
group using --user or --group such that the server has write access to the data
|
||||
directory.
|
||||
|
||||
For testing purposes, you can start with the following:
|
||||
|
||||
--port=7070
|
||||
The port to listen to, defaults to a random port.
|
||||
--log_level=4
|
||||
The log level to use, defaults to 2.
|
||||
--wiki_dir=/var/oddmuse
|
||||
The wiki directory, defaults to the value of the "WikiDataDir" environment
|
||||
variable or "/tmp/oddmuse".
|
||||
--wiki_lib=/home/alex/src/oddmuse/wiki.pl
|
||||
The Oddmuse main script, defaults to "./wiki.pl".
|
||||
--wiki_pages=SiteMap
|
||||
This adds a page to the main index. Can be used multiple times.
|
||||
--help
|
||||
Prints this message.
|
||||
|
||||
Example invocation:
|
||||
|
||||
/home/alex/src/oddmuse/stuff/gopher-server.pl \
|
||||
--port=7070 \
|
||||
--wiki=/home/alex/src/oddmuse/wiki.pl \
|
||||
--pid_file=/tmp/oddmuse/gopher.pid \
|
||||
--wiki_dir=/tmp/oddmuse \
|
||||
--wiki_pages=Homepage \
|
||||
--wiki_pages=Gopher
|
||||
|
||||
Run the script and test it:
|
||||
|
||||
echo | nc localhost 7070
|
||||
lynx gopher://localhost:7070
|
||||
|
||||
If you want to use SSL, you need to provide PEM files containing certificate and
|
||||
private key. To create self-signed files, for example:
|
||||
|
||||
openssl req -new -x509 -days 365 -nodes -out \
|
||||
gopher-server-cert.pem -keyout gopher-server-key.pem
|
||||
|
||||
Make sure the common name you provide matches your domain name!
|
||||
|
||||
Note that parameters should not contain spaces. Thus:
|
||||
|
||||
/home/alex/src/oddmuse/stuff/gopher-server.pl \
|
||||
--port=7070 \
|
||||
--log_level=3 \
|
||||
--wiki=/home/alex/src/oddmuse/wiki.pl \
|
||||
--wiki_dir=/home/alex/alexschroeder \
|
||||
--menu=Moku_Pona_Updates \
|
||||
--menu_file=~/.moku-pona/updates.txt \
|
||||
--menu=Moku_Pona_Sites \
|
||||
--menu_file=~/.moku-pona/sites.txt
|
||||
|
||||
EOT
|
||||
|
||||
run();
|
||||
|
||||
sub NewGopherFiltered {
|
||||
my @pages = OldGopherFiltered(@_);
|
||||
@pages = sort newest_first @pages;
|
||||
return @pages;
|
||||
}
|
||||
|
||||
sub normal_to_free {
|
||||
my $title = shift;
|
||||
$title =~ s/_/ /g;
|
||||
return $title;
|
||||
}
|
||||
|
||||
sub print_text {
|
||||
my $self = shift;
|
||||
my $text = shift;
|
||||
print($text); # bytes
|
||||
}
|
||||
|
||||
sub print_menu {
|
||||
my $self = shift;
|
||||
my $display = shift;
|
||||
my $selector = shift;
|
||||
my $host = shift
|
||||
|| $self->{server}->{host}->[0]
|
||||
|| $self->{server}->{sockaddr};
|
||||
my $port = shift
|
||||
|| $self->{server}->{port}->[0]
|
||||
|| $self->{server}->{sockport};
|
||||
my $encoded = shift;
|
||||
|
||||
$selector = join('/', map { UrlEncode($_) } split(/\//, $selector)) unless $encoded;
|
||||
$self->print_text(join("\t", $display, $selector, $host, $port)
|
||||
. "\r\n");
|
||||
}
|
||||
|
||||
sub print_info {
|
||||
my $self = shift;
|
||||
my $info = shift;
|
||||
$self->print_menu("i$info", "");
|
||||
}
|
||||
|
||||
sub print_error {
|
||||
my $self = shift;
|
||||
my $error = shift;
|
||||
$self->print_menu("3$error", "");
|
||||
}
|
||||
|
||||
sub serve_main_menu {
|
||||
my $self = shift;
|
||||
my $more = shift;
|
||||
$self->log(3, "Serving main menu");
|
||||
$self->print_info("Welcome to the Gopher version of this wiki.");
|
||||
$self->print_info("");
|
||||
|
||||
$self->print_info("Phlog:");
|
||||
my @pages = sort { $b cmp $a } grep(/^\d\d\d\d-\d\d-\d\d/, @IndexList);
|
||||
for my $id (@pages[0..9]) {
|
||||
$self->print_menu("1" . normal_to_free($id), "$id/menu");
|
||||
}
|
||||
$self->print_menu("1" . "More...", "do/more");
|
||||
$self->print_info("");
|
||||
|
||||
for my $id (@{$self->{server}->{wiki_pages}}) {
|
||||
$self->print_menu("1" . normal_to_free($id), "$id/menu");
|
||||
}
|
||||
|
||||
for my $id (@{$self->{server}->{menu}}) {
|
||||
$self->print_menu("1" . normal_to_free($id), "map/$id");
|
||||
}
|
||||
|
||||
$self->print_menu("1" . "Recent Changes", "do/rc");
|
||||
$self->print_menu("0" . "Gopher RSS", "do/rss");
|
||||
$self->print_menu("7" . "Find matching page titles", "do/match");
|
||||
$self->print_menu("7" . "Full text search", "do/search");
|
||||
$self->print_menu("1" . "Index of all pages", "do/index");
|
||||
|
||||
if ($TagFile) {
|
||||
$self->print_menu("1" . "Index of all tags", "do/tags");
|
||||
}
|
||||
|
||||
if ($EditAllowed and not IsFile($NoEditFile)) {
|
||||
$self->print_menu("w" . "New page", "do/new");
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_phlog_archive {
|
||||
my $self = shift;
|
||||
$self->log(3, "Serving phlog archive");
|
||||
my @pages = sort { $b cmp $a } grep(/^\d\d\d\d-\d\d-\d\d/, @IndexList);
|
||||
for my $id (@pages) {
|
||||
$self->print_menu("1" . normal_to_free($id), "$id/menu");
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_index {
|
||||
my $self = shift;
|
||||
$self->log(3, "Serving index of all pages");
|
||||
for my $id (sort newest_first @IndexList) {
|
||||
$self->print_menu("1" . normal_to_free($id), "$id/menu");
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_match {
|
||||
my $self = shift;
|
||||
my $match = shift;
|
||||
$self->log(3, "Serving pages matching " . UrlEncode($match));
|
||||
$self->print_info("Use a regular expression to match page titles.");
|
||||
$self->print_info("Spaces in page titles are underlines, '_'.");
|
||||
for my $id (sort newest_first grep(/$match/i, @IndexList)) {
|
||||
$self->print_menu( "1" . normal_to_free($id), "$id/menu");
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_search {
|
||||
my $self = shift;
|
||||
my $str = shift;
|
||||
$self->log(3, "Serving search result for " . UrlEncode($str));
|
||||
$self->print_info("Use regular expressions separated by spaces.");
|
||||
SearchTitleAndBody($str, sub {
|
||||
my $id = shift;
|
||||
$self->print_menu("1" . normal_to_free($id), "$id/menu");
|
||||
});
|
||||
}
|
||||
|
||||
sub serve_tags {
|
||||
my $self = shift;
|
||||
$self->log(3, "Serving tag cloud");
|
||||
# open the DB file
|
||||
my %h = TagReadHash();
|
||||
my %count = ();
|
||||
foreach my $tag (grep !/^_/, keys %h) {
|
||||
$count{$tag} = @{$h{$tag}};
|
||||
}
|
||||
foreach my $id (sort { $count{$b} <=> $count{$a} } keys %count) {
|
||||
$self->print_menu("1" . normal_to_free($id), "$id/tag");
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_rc {
|
||||
my $self = shift;
|
||||
my $showedit = $ShowEdits = shift;
|
||||
$self->log(3, "Serving recent changes"
|
||||
. ($showedit ? " including minor changes" : ""));
|
||||
|
||||
$self->print_info("Recent Changes");
|
||||
if ($showedit) {
|
||||
$self->print_menu("1" . "Skip minor edits", "do/rc");
|
||||
} else {
|
||||
$self->print_menu("1" . "Show minor edits", "do/rc/showedits");
|
||||
}
|
||||
|
||||
ProcessRcLines(
|
||||
sub {
|
||||
my $date = shift;
|
||||
$self->print_info("");
|
||||
$self->print_info("$date");
|
||||
$self->print_info("");
|
||||
},
|
||||
sub {
|
||||
my($id, $ts, $author_host, $username, $summary, $minor, $revision,
|
||||
$languages, $cluster, $last) = @_;
|
||||
$self->print_menu("1" . normal_to_free($id), "$id/menu");
|
||||
for my $line (split(/\n/, wrap(' ', ' ', $summary))) {
|
||||
$self->print_info($line);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
sub serve_rss {
|
||||
my $self = shift;
|
||||
$self->log(3, "Serving Gopher RSS");
|
||||
my $host = shift
|
||||
|| $self->{server}->{host}->[0]
|
||||
|| $self->{server}->{sockaddr};
|
||||
my $port = shift
|
||||
|| $self->{server}->{port}->[0]
|
||||
|| $self->{server}->{sockport};
|
||||
my $gopher = "gopher://$host:$port/"; # use gophers for TLS?
|
||||
local $ScriptName = $gopher;
|
||||
my $rss = GetRcRss();
|
||||
$rss =~ s!$ScriptName\?action=rss!${gopher}1do/rss!g;
|
||||
$rss =~ s!$ScriptName\?action=history;id=([^[:space:]<]*)!${gopher}1$1/history!g;
|
||||
$rss =~ s!$ScriptName/([^[:space:]<]*)!${gopher}0$1!g;
|
||||
$rss =~ s!<wiki:diff>.*</wiki:diff>\n!!g;
|
||||
print $rss;
|
||||
}
|
||||
|
||||
sub serve_map {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
$self->log(3, "Serving map " . UrlEncode($id));
|
||||
my @menu = @{$self->{server}->{menu}};
|
||||
my $i = first { $id eq $menu[$_] } 0..$#menu;
|
||||
my $file = $self->{server}->{menu_file}->[$i];
|
||||
if (-f $file and open(my $fh, '<:encoding(UTF-8)', $file)) {
|
||||
local $/ = undef;
|
||||
my $text = <$fh>;
|
||||
$self->log(4, "Map has " . length($text) . " characters");
|
||||
$self->print_text($text);
|
||||
} else {
|
||||
$self->log(1, "Error reading $file");
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_page_comment_link {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $revision = shift;
|
||||
if (not $revision and $CommentsPattern) {
|
||||
if ($id =~ /$CommentsPattern/) {
|
||||
my $original = $1;
|
||||
# sometimes we are on a comment page and cannot derive the original
|
||||
$self->print_menu("1" . "Back to the original page",
|
||||
"$original/menu") if $original;
|
||||
$self->print_menu("w" . "Add a comment", "$id/append/text");
|
||||
} else {
|
||||
my $comments = $CommentsPrefix . $id;
|
||||
$self->print_menu("1" . "Comments on this page", "$comments/menu");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_page_history_link {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $revision = shift;
|
||||
if (not $revision) {
|
||||
$self->print_menu("1" . "Page History", "$id/history");
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_file_page_menu {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $type = shift;
|
||||
my $revision = shift;
|
||||
my $code = substr($type, 0, 6) eq 'image/' ? 'I' : '9';
|
||||
$self->log(3, "Serving file page menu for " . UrlEncode($id));
|
||||
$self->print_menu($code . normal_to_free($id)
|
||||
. ($revision ? "/$revision" : ""), $id);
|
||||
$self->serve_page_comment_link($id, $revision);
|
||||
$self->serve_page_history_link($id, $revision);
|
||||
}
|
||||
|
||||
sub serve_text_page_menu {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $page = shift;
|
||||
my $revision = shift;
|
||||
$self->log(3, "Serving text page menu for " . UrlEncode($id)
|
||||
. ($revision ? "/$revision" : ""));
|
||||
|
||||
$self->print_info("The text of this page:");
|
||||
$self->print_menu("0" . normal_to_free($id),
|
||||
$id . ($revision ? "/$revision" : ""));
|
||||
$self->print_menu("h" . normal_to_free($id),
|
||||
$id . ($revision ? "/$revision" : "") . "/html");
|
||||
$self->print_menu("w" . "Replace " . normal_to_free($id),
|
||||
$id . "/write/text");
|
||||
|
||||
$self->serve_page_comment_link($id, $revision);
|
||||
$self->serve_page_history_link($id, $revision);
|
||||
|
||||
my $first = 1;
|
||||
while ($page->{text} =~ /\[\[([^\]|]*)(?:\|([^\]]*))?\]\]|\[(https?:\/\/\S+)\s+([^\]]*)\]|\[gopher:\/\/([^:\/]*)(?::(\d+))?(?:\/(\d)(\S+))?\s+([^\]]+)\]/g) {
|
||||
my ($title, $text, $url, $hostname, $port, $type, $selector)
|
||||
= ($1, $2||$4||$9, $3, $5, $6||70, $7||1, $8);
|
||||
if ($first) {
|
||||
$self->print_info("");
|
||||
$self->print_info("Links leaving " . normal_to_free($id) . ":");
|
||||
$first = 0;
|
||||
}
|
||||
if ($hostname) {
|
||||
$self->print_text(join("\t", $type . $text, $selector, $hostname, $port) . "\r\n");
|
||||
} elsif ($url) {
|
||||
$self->print_menu("h$text", "URL:" . $url, undef, undef, 1);
|
||||
} elsif ($title and substr($title, 0, 4) eq 'tag:') {
|
||||
$self->print_menu("1" . ($text||substr($title, 4)),
|
||||
substr($title, 4) . "/tag");
|
||||
} elsif ($title =~ s!^image[/a-z]* external:!pics/!) {
|
||||
$self->print_menu("I" . $text||$title, $title);
|
||||
} elsif ($title) {
|
||||
$title =~ s!^image[/a-z]*:!!i;
|
||||
$self->print_menu("1" . ($text||$title), $title . "/menu");
|
||||
}
|
||||
}
|
||||
|
||||
$first = 1;
|
||||
while ($page->{text} =~ /\[https?:\/\/gopher\.floodgap\.com\/gopher\/gw\?a=gopher%3a%2f%2f(.*?)(?:%3a(\d+))?%2f(.)(\S+)\s+([^\]]+)\]/gi) {
|
||||
my ($hostname, $port, $type, $selector, $text) = ($1, $2||"70", $3, $4, $5);
|
||||
if ($first) {
|
||||
$self->print_info("");
|
||||
$self->print_info("Gopher links (via Floodgap):");
|
||||
$first = 0;
|
||||
}
|
||||
$selector =~ s/%([0-9a-f][0-9a-f])/chr(hex($1))/eig; # url unescape
|
||||
$self->print_text(join("\t", $type . $text, $selector, $hostname, $port)
|
||||
. "\r\n");
|
||||
}
|
||||
|
||||
if ($page->{text} =~ m/<journal search tag:(\S+)>\s*/) {
|
||||
my $tag = $1;
|
||||
$self->print_info("");
|
||||
$self->serve_tag_list($tag);
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_page_history {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
$self->log(3, "Serving history of " . UrlEncode($id));
|
||||
OpenPage($id);
|
||||
|
||||
$self->print_menu("1" . normal_to_free($id) . " (current)", "$id/menu");
|
||||
$self->print_info(CalcTime($Page{ts})
|
||||
. " by " . GetAuthor($Page{username})
|
||||
. ($Page{summary} ? ": $Page{summary}" : "")
|
||||
. ($Page{minor} ? " (minor)" : ""));
|
||||
|
||||
foreach my $revision (GetKeepRevisions($OpenPageName)) {
|
||||
my $keep = GetKeptRevision($revision);
|
||||
$self->print_menu("1" . normal_to_free($id) . " ($keep->{revision})",
|
||||
"$id/$keep->{revision}/menu");
|
||||
$self->print_info(CalcTime($keep->{ts})
|
||||
. " by " . GetAuthor($keep->{username})
|
||||
. ($keep->{summary} ? ": $keep->{summary}" : "")
|
||||
. ($keep->{minor} ? " (minor)" : ""));
|
||||
}
|
||||
}
|
||||
|
||||
sub get_page {
|
||||
my $id = shift;
|
||||
my $revision = shift;
|
||||
my $page;
|
||||
|
||||
if ($revision) {
|
||||
$OpenPageName = $id;
|
||||
$page = GetKeptRevision($revision);
|
||||
} else {
|
||||
OpenPage($id);
|
||||
$page = \%Page;
|
||||
}
|
||||
|
||||
return $page;
|
||||
}
|
||||
|
||||
sub serve_page_menu {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $revision = shift;
|
||||
my $page = get_page($id, $revision);
|
||||
|
||||
if (my ($type) = TextIsFile($page->{text})) {
|
||||
$self->serve_file_page_menu($id, $type, $revision);
|
||||
} else {
|
||||
$self->serve_text_page_menu($id, $page, $revision);
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_file_page {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $page = shift;
|
||||
$self->log(3, "Serving " . UrlEncode($id) . " as file");
|
||||
my ($encoded) = $page->{text} =~ /^[^\n]*\n(.*)/s;
|
||||
$self->log(4, UrlEncode($id) . " has " . length($encoded)
|
||||
. " bytes of MIME encoded data");
|
||||
my $data = decode_base64($encoded);
|
||||
$self->log(4, UrlEncode($id) . " has " . length($data)
|
||||
. " bytes of binary data");
|
||||
binmode(STDOUT, ":raw");
|
||||
print($data);
|
||||
}
|
||||
|
||||
sub serve_text_page {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $page = shift;
|
||||
my $text = $page->{text};
|
||||
$self->log(3, "Serving " . UrlEncode($id) . " as " . length($text)
|
||||
. " bytes of text");
|
||||
$text =~ s/^\./../mg;
|
||||
$self->print_text($text);
|
||||
}
|
||||
|
||||
sub serve_page {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $revision = shift;
|
||||
my $page = get_page($id, $revision);
|
||||
if (my ($type) = TextIsFile($page->{text})) {
|
||||
$self->serve_file_page($id, $page);
|
||||
} else {
|
||||
$self->serve_text_page($id, $page);
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_page_html {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $revision = shift;
|
||||
my $page = get_page($id, $revision);
|
||||
|
||||
$self->log(3, "Serving " . UrlEncode($id) . " as HTML");
|
||||
|
||||
my $title = normal_to_free($id);
|
||||
print GetHtmlHeader(Ts('%s:', $SiteName) . ' ' . UnWiki($title), $id);
|
||||
print GetHeaderDiv($id, $title);
|
||||
print $q->start_div({-class=>'wrapper'});
|
||||
|
||||
if ($revision) {
|
||||
# no locking of the file, no updating of the cache
|
||||
PrintWikiToHTML($page->{text});
|
||||
} else {
|
||||
PrintPageHtml();
|
||||
}
|
||||
PrintFooter($id, $revision);
|
||||
}
|
||||
|
||||
sub serve_redirect {
|
||||
my $self = shift;
|
||||
my $url = shift;
|
||||
print qq{<!DOCTYPE HTML>
|
||||
<html lang="en-US">
|
||||
<head>
|
||||
<meta http-equiv="refresh" content="0; url=$url">
|
||||
<title>Redirection</title>
|
||||
</head>
|
||||
<body>
|
||||
If you are not redirected automatically, follow this <a href='$url'>link</a>.
|
||||
</body>
|
||||
</html>
|
||||
};
|
||||
}
|
||||
|
||||
sub serve_image {
|
||||
my $self = shift;
|
||||
my $pic = shift;
|
||||
my $file = $external_image_path . $pic;
|
||||
# no tricks
|
||||
if ($file !~ /\.\./ and $file !~ /\/\//
|
||||
and -f $file and open(my $fh, "<", $file)) {
|
||||
local $/ = undef;
|
||||
my $data = <$fh>;
|
||||
$self->log(4, $pic . " has " . length($data)
|
||||
. " bytes of binary data");
|
||||
binmode(STDOUT, ":raw");
|
||||
print($data);
|
||||
} else {
|
||||
$self->log(1, "Error reading $file: $!");
|
||||
}
|
||||
}
|
||||
|
||||
sub newest_first {
|
||||
my ($A, $B) = ($a, $b);
|
||||
if ($A =~ /^\d\d\d\d-\d\d-\d\d/ and $B =~ /^\d\d\d\d-\d\d-\d\d/) {
|
||||
return $B cmp $A;
|
||||
}
|
||||
$A cmp $B;
|
||||
}
|
||||
|
||||
sub serve_tag_list {
|
||||
my $self = shift;
|
||||
my $tag = shift;
|
||||
$self->print_info("Search result for tag $tag:");
|
||||
for my $id (sort newest_first TagFind($tag)) {
|
||||
$self->print_menu("1" . normal_to_free($id), "$id/menu");
|
||||
}
|
||||
}
|
||||
|
||||
sub serve_tag {
|
||||
my $self = shift;
|
||||
my $tag = shift;
|
||||
$self->log(3, "Serving tag " . UrlEncode($tag));
|
||||
if ($IndexHash{$tag}) {
|
||||
$self->print_info("This page is about the tag $tag.");
|
||||
$self->print_menu("1" . normal_to_free($tag), "$tag/menu");
|
||||
$self->print_info("");
|
||||
}
|
||||
$self->serve_tag_list($tag);
|
||||
}
|
||||
|
||||
sub serve_error {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $error = shift;
|
||||
$self->log(3, "Error ('" . UrlEncode($id) . "'): $error");
|
||||
$self->print_error("Error ('" . UrlEncode($id) . "'): $error");
|
||||
}
|
||||
|
||||
sub write_help {
|
||||
my $self = shift;
|
||||
my @lines = split(/\n/, <<"EOF");
|
||||
This is how your document should start:
|
||||
```
|
||||
username: Alex Schroeder
|
||||
summary: typo fixed
|
||||
```
|
||||
This is the text of your document.
|
||||
Just write whatever.
|
||||
|
||||
Note the space after the colon for metadata fields.
|
||||
More metadata fields are allowed:
|
||||
`minor` is 1 if this is a minor edit. The default is 0.
|
||||
EOF
|
||||
for my $line (@lines) {
|
||||
$self->print_info($line);
|
||||
}
|
||||
}
|
||||
|
||||
sub write_page_ok {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
$self->print_info("Page was saved.");
|
||||
$self->print_menu("1" . normal_to_free($id), "$id/menu");
|
||||
}
|
||||
|
||||
sub write_page_error {
|
||||
my $self = shift;
|
||||
my $error = shift;
|
||||
$self->log(4, "Not saved: $error");
|
||||
$self->print_error("Page was not saved: $error");
|
||||
map { ReleaseLockDir($_); } keys %Locks;
|
||||
}
|
||||
|
||||
sub write_data {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $data = shift;
|
||||
my $param = shift||'text';
|
||||
SetParam($param, $data);
|
||||
my $error;
|
||||
eval {
|
||||
local *ReBrowsePage = sub {};
|
||||
local *ReportError = sub { $error = shift };
|
||||
DoPost($id);
|
||||
};
|
||||
if ($error) {
|
||||
$self->write_page_error($error);
|
||||
} else {
|
||||
$self->write_page_ok($id);
|
||||
}
|
||||
}
|
||||
|
||||
sub write_file_page {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $data = shift;
|
||||
my $type = shift || 'application/octet-stream';
|
||||
$self->write_page_error("page title is missing") unless $id;
|
||||
$self->log(3, "Posting " . length($data) . " bytes of $type to page "
|
||||
. UrlEncode($id));
|
||||
# no metadata
|
||||
$self->write_data($id, "#FILE $type\n" . encode_base64($data));
|
||||
}
|
||||
|
||||
sub write_text {
|
||||
my $self = shift;
|
||||
my $id = shift;
|
||||
my $data = shift;
|
||||
my $param = shift;
|
||||
|
||||
utf8::decode($data);
|
||||
|
||||
my ($lead, $meta, $text) = split(/^```\s*(?:meta)?\n/m, $data, 3);
|
||||
|
||||
if (not $lead and $meta) {
|
||||
while ($meta =~ /^([a-z-]+): (.*)/mg) {
|
||||
if ($1 eq 'minor' and $2) {
|
||||
SetParam('recent_edit', 'on'); # legacy UseMod parameter name
|
||||
} else {
|
||||
SetParam($1, $2);
|
||||
if ($1 eq "title") {
|
||||
$id = $2;
|
||||
}
|
||||
}
|
||||
}
|
||||
$self->log(3, ($param eq 'text' ? "Posting" : "Appending")
|
||||
. " " . length($text) . " characters (with metadata) to page $id");
|
||||
$self->write_data($id, $text, $param);
|
||||
} else {
|
||||
# no meta data
|
||||
$self->log(3, ($param eq 'text' ? "Posting" : "Appending")
|
||||
. " " . length($data) . " characters to page $id") if $id;
|
||||
$self->write_data($id, $data, $param);
|
||||
}
|
||||
}
|
||||
|
||||
sub write_text_page {
|
||||
my $self = shift;
|
||||
$self->write_text(@_, 'text');
|
||||
}
|
||||
|
||||
sub append_text_page {
|
||||
my $self = shift;
|
||||
$self->write_text(@_, 'aftertext');
|
||||
}
|
||||
|
||||
sub read_file {
|
||||
my $self = shift;
|
||||
my $length = shift;
|
||||
$length = $MaxPost if $length > $MaxPost;
|
||||
local $/ = \$length;
|
||||
my $buf .= <STDIN>;
|
||||
$self->log(4, "Received " . length($buf) . " bytes (max is $MaxPost)");
|
||||
return $buf;
|
||||
}
|
||||
|
||||
sub read_text {
|
||||
my $self = shift;
|
||||
my $buf;
|
||||
while (1) {
|
||||
my $line = <STDIN>;
|
||||
if (length($line) == 0) {
|
||||
sleep(1); # wait for input
|
||||
next;
|
||||
}
|
||||
last if $line =~ /^.\r?\n/m;
|
||||
$buf .= $line;
|
||||
if (length($buf) > $MaxPost) {
|
||||
$buf = substr($buf, 0, $MaxPost);
|
||||
last;
|
||||
}
|
||||
}
|
||||
$self->log(4, "Received " . length($buf) . " bytes (max is $MaxPost)");
|
||||
utf8::decode($buf);
|
||||
$self->log(4, "Received " . length($buf) . " characters");
|
||||
return $buf;
|
||||
}
|
||||
|
||||
sub process_request {
|
||||
my $self = shift;
|
||||
|
||||
# clear cookie and all that
|
||||
$q = undef;
|
||||
Init();
|
||||
|
||||
# refresh list of pages
|
||||
if (IsFile($IndexFile) and ReadIndex()) {
|
||||
# we're good
|
||||
} else {
|
||||
RefreshIndex();
|
||||
}
|
||||
|
||||
eval {
|
||||
local $SIG{'ALRM'} = sub {
|
||||
$self->log(1, "Timeout!");
|
||||
die "Timed Out!\n";
|
||||
};
|
||||
alarm(10); # timeout
|
||||
my $selector = <STDIN>; # no loop
|
||||
$selector = UrlDecode($selector); # assuming URL-encoded UTF-8
|
||||
$selector =~ s/\s+$//g; # no trailing whitespace
|
||||
|
||||
if (not $selector or $selector eq "/") {
|
||||
$self->serve_main_menu();
|
||||
} elsif ($selector eq "do/more") {
|
||||
$self->serve_phlog_archive();
|
||||
} elsif ($selector eq "do/index") {
|
||||
$self->serve_index();
|
||||
} elsif (substr($selector, 0, 9) eq "do/match\t") {
|
||||
$self->serve_match(substr($selector, 9));
|
||||
} elsif (substr($selector, 0, 10) eq "do/search\t") {
|
||||
$self->serve_search(substr($selector, 10));
|
||||
} elsif ($selector eq "do/tags") {
|
||||
$self->serve_tags();
|
||||
} elsif ($selector eq "do/rc") {
|
||||
$self->serve_rc(0);
|
||||
} elsif ($selector eq "do/rss") {
|
||||
$self->serve_rss(0);
|
||||
} elsif ($selector eq "do/rc/showedits") {
|
||||
$self->serve_rc(1);
|
||||
} elsif ($selector eq "do/new") {
|
||||
my $data = $self->read_text();
|
||||
$self->write_text_page(undef, $data);
|
||||
} elsif ($selector =~ m!^([^/]*)/(\d+)/menu$!) {
|
||||
$self->serve_page_menu($1, $2);
|
||||
} elsif ($selector =~ m!^map/(.*)!) {
|
||||
$self->serve_map($1);
|
||||
} elsif (substr($selector, -5) eq '/menu') {
|
||||
$self->serve_page_menu(substr($selector, 0, -5));
|
||||
} elsif ($selector =~ m!^([^/]*)/tag$!) {
|
||||
$self->serve_tag($1);
|
||||
} elsif ($selector =~ m!^([^/]*)(?:/(\d+))?/html!) {
|
||||
$self->serve_page_html($1, $2);
|
||||
} elsif ($selector =~ m!^([^/]*)/history$!) {
|
||||
$self->serve_page_history($1);
|
||||
} elsif ($selector =~ m!^([^/]*)/write/text$!) {
|
||||
my $data = $self->read_text();
|
||||
$self->write_text_page($1, $data);
|
||||
} elsif ($selector =~ m!^([^/]*)/append/text$!) {
|
||||
my $data = $self->read_text();
|
||||
$self->append_text_page($1, $data);
|
||||
} elsif ($selector =~ m!^([^/]*)(?:/([a-z]+/[-a-z]+))?/write/file(?:\t(\d+))?$!) {
|
||||
my $data = $self->read_file($3);
|
||||
$self->write_file_page($1, $data, $2);
|
||||
} elsif ($selector =~ m!^([^/]*)(?:/(\d+))?(?:/text)?$!) {
|
||||
$self->serve_page($1, $2);
|
||||
} elsif ($selector =~ m!^URL:(.*)!i) {
|
||||
$self->serve_redirect(UrlDecode($1));
|
||||
} elsif ($selector =~ m!^pics/(.*)!i) {
|
||||
$self->serve_image(UrlDecode($1));
|
||||
} else {
|
||||
$self->serve_error($selector, ValidId($selector)||'Cause unknown');
|
||||
}
|
||||
|
||||
$self->log(4, "Done");
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ while ($arg =~ /^-l/) {
|
||||
die $help unless -f $file;
|
||||
my %backup = %Translate;
|
||||
header_info_extract($file); # keep the header information of the translation files
|
||||
do $file or die "Cannot do $file";
|
||||
do "./$file" or die "Cannot do $file";
|
||||
foreach my $key (keys %Translate) {
|
||||
$backup{$key} = $Translate{$key};
|
||||
}
|
||||
|
||||
@@ -33,30 +33,33 @@ EOT
|
||||
|
||||
my $min = version->parse(shift || "2.3.0");
|
||||
|
||||
my @tags = grep { /\d+\.\d+\.\d+/ and version->parse($_) > $min }
|
||||
my @tags = grep { /\d+\.\d+\.\d+/ and version->parse($_) >= $min }
|
||||
split(/\n/, qx{git tag --list});
|
||||
|
||||
unless (@tags) {
|
||||
die "git tag --list produced no list of tags\n";
|
||||
die "git tag --list produced no list of tags >= $min\n";
|
||||
}
|
||||
|
||||
for my $tag (@tags) {
|
||||
my $fname = "$dir/oddmuse-$tag.tar.gz";
|
||||
unless (-f $fname) {
|
||||
|
||||
system("git", "checkout", $tag) == 0
|
||||
or die "Failed to git checkout $tag\n";
|
||||
system("make", "prepare") == 0
|
||||
or die "Failed to run make prepare for tag $tag\n";
|
||||
system("mv", "build", "oddmuse-$tag") == 0
|
||||
or die "Failed to rename the build directory to oddmuse-$tag\n";
|
||||
system("tar", "czf", "oddmuse-$tag.tar.gz", "oddmuse-$tag") == 0
|
||||
or die "Failed to build tarball oddmuse-$tag.tar.gz\n";
|
||||
system("mv", "oddmuse-$tag.tar.gz", $fname) == 0
|
||||
or die "Failed to move the tarball oddmuse-$tag.tar.gz\n";
|
||||
system("rm", "-rf", "oddmuse-$tag") == 0
|
||||
or die "Failed to remove the directory oddmuse-$tag\n";
|
||||
if (-f $fname) {
|
||||
warn "Skipping $tag as $fname already exists\n";
|
||||
next;
|
||||
}
|
||||
print "Preparing $tag\n";
|
||||
|
||||
system("git", "checkout", $tag) == 0
|
||||
or die "Failed to git checkout $tag\n";
|
||||
system("make", "prepare") == 0
|
||||
or die "Failed to run make prepare for tag $tag\n";
|
||||
system("mv", "build", "oddmuse-$tag") == 0
|
||||
or die "Failed to rename the build directory to oddmuse-$tag\n";
|
||||
system("tar", "czf", "oddmuse-$tag.tar.gz", "oddmuse-$tag") == 0
|
||||
or die "Failed to build tarball oddmuse-$tag.tar.gz\n";
|
||||
system("mv", "oddmuse-$tag.tar.gz", $fname) == 0
|
||||
or die "Failed to move the tarball oddmuse-$tag.tar.gz\n";
|
||||
system("rm", "-rf", "oddmuse-$tag") == 0
|
||||
or die "Failed to remove the directory oddmuse-$tag\n";
|
||||
}
|
||||
|
||||
system("git", "checkout", "master") == 0
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
my $wiki = $ARGV[0] || 'wiki.pl';
|
||||
my $wiki = $ARGV[0] || './wiki.pl';
|
||||
my $port = $ARGV[1] || 8080;
|
||||
my $dir = $ARGV[2];
|
||||
$ENV{WikiDataDir} = $dir if $dir;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 24;
|
||||
|
||||
|
||||
2
t/all.t
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 13;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 40;
|
||||
use utf8; # tests contain UTF-8 characters and it matters
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 11;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 2;
|
||||
|
||||
|
||||
2
t/atom.t
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
|
||||
use Test::More tests => 44;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 4;
|
||||
|
||||
|
||||
2
t/ban.t
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 23;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 13;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 39;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 28;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 8;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 12;
|
||||
|
||||
|
||||
40
t/checkbox.t
Normal file
@@ -0,0 +1,40 @@
|
||||
# Copyright (C) 2018 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 5;
|
||||
|
||||
add_module('checkbox.pl');
|
||||
|
||||
my $text = q{
|
||||
There's some stuff I want to work on:
|
||||
|
||||
[[ :something to do]]
|
||||
[[x:something done]]
|
||||
[[save:update the list]]
|
||||
|
||||
Let's do this!
|
||||
};
|
||||
|
||||
$page = update_page('TODO', $text, 'saving it');
|
||||
|
||||
xpath_test(
|
||||
$page,
|
||||
'//p[text()="There\'s some stuff I want to work on:"]',
|
||||
'//form[@class="checkboxes"]/p/label/input[@type="checkbox"][@name="something_to_do"]/following-sibling::text()[string()="something to do"]',
|
||||
'//form[@class="checkboxes"]/p/label/input[@type="checkbox"][@name="something_done"][@checked="checked"]/following-sibling::text()[string()="something done"]',
|
||||
'//form[@class="checkboxes"]/p/input[@type="submit"][@name="update the list"]',
|
||||
'//p[text()="Let\'s do this!"]',);
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 33;
|
||||
|
||||
|
||||
13
t/comments.t
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2006–2015 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2006–2017 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -12,9 +12,9 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 43;
|
||||
use Test::More tests => 44;
|
||||
|
||||
AppendStringToFile($ConfigFile, "\$CommentsPrefix = 'Comments on ';\n");
|
||||
|
||||
@@ -34,6 +34,13 @@ xpath_test($page,
|
||||
'//a[@class="edit"][@href="http://localhost/wiki.pl?action=edit;id=Comments_on_Test"][text()="Edit this page"]',
|
||||
'//textarea[@name="aftertext"]');
|
||||
|
||||
# There used to be a bug where we returned status 200 for a non-existing comment
|
||||
# page if the corresponding page existed. The bug meant that we browsed a page
|
||||
# with no title.
|
||||
update_page('Yes', 'test');
|
||||
test_page(get_page('Comments_on_Yes'),
|
||||
'There are no comments, yet. Be the first to leave a comment!');
|
||||
|
||||
AppendStringToFile($ConfigFile, "\$EditAllowed = 0;\n");
|
||||
|
||||
$page = update_page('Test', 'Cannot edit page with edit allowed eq 0');
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 1;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 26;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 3;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 18;
|
||||
use utf8;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 4;
|
||||
|
||||
|
||||
10
t/creole.t
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env perl
|
||||
# Copyright (C) 2006-2014 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2006-2017 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -14,9 +14,9 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 111;
|
||||
use Test::More tests => 112;
|
||||
|
||||
add_module('creole.pl');
|
||||
|
||||
@@ -144,6 +144,8 @@ foo <hr />
|
||||
<table class="user"><tr><td>a</td><td>b</td><td>c</td></tr><tr><td>d</td><td>e</td><td>f</td></tr></table>
|
||||
|=a|=b|=c|\n|d|e|f|
|
||||
<table class="user"><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>d</td><td>e</td><td>f</td></tr></table>
|
||||
|= a|= b |=c |\n| d| e |f |
|
||||
<table class="user"><tr><th align="right">a</th><th align="center">b </th><th align="left">c </th></tr><tr><td align="right">d</td><td align="center">e </td><td align="left">f </td></tr></table>
|
||||
|=a|b|c|\n|=d|e|f|
|
||||
<table class="user"><tr><th>a</th><td>b</td><td>c</td></tr><tr><th>d</th><td>e</td><td>f</td></tr></table>
|
||||
| a| b| c\n| d | e | f |
|
||||
@@ -161,7 +163,7 @@ CamelCaseLink
|
||||
foo ~bar
|
||||
foo bar
|
||||
| 1|foo |
|
||||
<table class="user"><tr><td align="right">1</td><td>foo </td></tr></table>
|
||||
<table class="user"><tr><td align="right">1</td><td align="left">foo </td></tr></table>
|
||||
EOT
|
||||
|
||||
xpath_run_tests(split('\n',<<'EOT'));
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
# $Id: creoleaddition.t,v 1.15 2009/02/27 09:56:05 as Exp $
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 29;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# ====================[ crossbar.t ]====================
|
||||
|
||||
# ....................{ INITIALIZATION }....................
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 22;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 1;
|
||||
|
||||
|
||||
2
t/css.t
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 16;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 63;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 60;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 13;
|
||||
|
||||
|
||||
2
t/diff.t
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 25;
|
||||
use utf8;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 4;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 13;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 26;
|
||||
use utf8;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 9;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 11;
|
||||
use utf8; # tests contain UTF-8 characters and it matters
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 56;
|
||||
use utf8;
|
||||
|
||||
2
t/edit.t
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 4;
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
# $Id: emailquote.t,v 1.7 2008/07/12 13:43:48 as Exp $
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 4;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 11;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 41;
|
||||
use utf8; # tests contain UTF-8 characters and it matters
|
||||
|
||||
80
t/exclamation-mark.t
Executable file
@@ -0,0 +1,80 @@
|
||||
# Copyright (C) 2017 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation, either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 19;
|
||||
use utf8; # tests contain UTF-8 characters and it matters
|
||||
|
||||
xpath_test(update_page('Start', '[[Help!]]'),
|
||||
'//a[@class="edit"][@title="Click to edit this page"][@href="http://localhost/wiki.pl?action=edit;id=Help!"][text()="?"]');
|
||||
xpath_test(get_page('action=rc'),
|
||||
'//strong[text()="Help!"]');
|
||||
|
||||
xpath_test(update_page('Help!', 'Test', 'Testing is great!'),
|
||||
'//h1/a[text()="Help!"]',
|
||||
'//div[@class="content browse"]/p[text()="Test"]');
|
||||
xpath_test(get_page('Start'),
|
||||
'//a[@class="local"][@href="http://localhost/wiki.pl/Help!"][text()="Help!"]');
|
||||
xpath_test(get_page('action=rc'),
|
||||
'//strong[text()="Testing is great!"]');
|
||||
|
||||
xpath_test(update_page('Start', '[[image:Help!]]'),
|
||||
'//img[@class="upload"][@alt="Help!"][@src="http://localhost/wiki.pl/download/Help!"]');
|
||||
|
||||
xpath_run_tests(split('\n',<<'EOT'));
|
||||
[http://example.org/ example!]
|
||||
//a[@class="url http outside"][@href="http://example.org/"][text()="example!"]
|
||||
EOT
|
||||
|
||||
# Test von RSS 3.0
|
||||
test_page(get_page('action=rc raw=1'), 'title: Help!');
|
||||
|
||||
add_module('creole.pl');
|
||||
|
||||
# same test as before
|
||||
xpath_test(get_page('Start'),
|
||||
'//img[@class="upload"][@alt="Help!"][@src="http://localhost/wiki.pl/download/Help!"]');
|
||||
# revert and run the previous test as well
|
||||
xpath_test(update_page('Start', '[[Help!]]'),
|
||||
'//a[@class="local"][@href="http://localhost/wiki.pl/Help!"][text()="Help!"]');
|
||||
|
||||
# Journal test
|
||||
update_page('2011-11-20 No Testing Today!', 'This is the page itself.');
|
||||
test_page(update_page('Journal', '<journal>'),
|
||||
'2011-11-20 No Testing Today!');
|
||||
|
||||
# the following was copied from creole.pl
|
||||
|
||||
update_page('InterMap', " Ohana http://www.wikiohana.org/\n", 0, 0, 1);
|
||||
update_page('link!', 'test');
|
||||
update_page('pic!', 'test');
|
||||
ReInit();
|
||||
|
||||
xpath_run_tests(split('\n',<<'EOT'));
|
||||
[[link!]]
|
||||
//a[text()="link!"]
|
||||
[[link!|Go to my page]]
|
||||
//a[@class="local"][@href="http://localhost/test.pl/link!"][text()="Go to my page"]
|
||||
{{pic!}}
|
||||
//a[@class="image"][@href="http://localhost/test.pl/pic!"][img[@class="upload"][@src="http://localhost/test.pl/download/pic!"][@alt="pic!"]]
|
||||
[[link!|{{pic!}}]]
|
||||
//a[@class="image"][@href="http://localhost/test.pl/link!"][img[@class="upload"][@src="http://localhost/test.pl/download/pic!"][@alt="link!"]]
|
||||
[[link!|{{http://example.com/q?a=1&b=2}}]]
|
||||
//a[@class="image"][@href="http://localhost/test.pl/link!"][img[@class="url outside"][@src="http://example.com/q?a=1&b=2"][@alt="link!"]]
|
||||
[[http://example.com/q?a=1&b=2|{{pic!}}]]
|
||||
//a[@class="image outside"][@href="http://example.com/q?a=1&b=2"][img[@class="upload"][@src="http://localhost/test.pl/download/pic!"][@alt="http://example.com/q?a=1&b=2"]]
|
||||
[[link!|{{pic!|text!}}]]
|
||||
//a[@class="image"][@href="http://localhost/test.pl/link!"][img[@class="upload"][@src="http://localhost/test.pl/download/pic!"][@alt="text!"]]
|
||||
EOT
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
# $Id: fieldlist.t,v 1.1 2008/02/23 17:12:12 weakish Exp $
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 9;
|
||||
|
||||
|
||||
2
t/find.t
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 18;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 22;
|
||||
use utf8; # tests contain UTF-8 characters and it matters
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 3;
|
||||
|
||||
|
||||
2
t/git.t
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 16;
|
||||
use utf8; # test data is UTF-8 and it matters
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 3;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use utf8;
|
||||
use Test::More tests => 2;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 9;
|
||||
|
||||
|
||||
309
t/gopher-server.t
Normal file
@@ -0,0 +1,309 @@
|
||||
# Copyright (C) 2017–2018 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package OddMuse;
|
||||
use strict;
|
||||
use 5.10.0;
|
||||
use Test::More;
|
||||
use IO::Socket::IP;
|
||||
use utf8; # tests contain UTF-8 characters and it matters
|
||||
|
||||
require './t/test.pl';
|
||||
|
||||
add_module('tags.pl');
|
||||
|
||||
# enable uploads
|
||||
our($ConfigFile);
|
||||
AppendStringToFile($ConfigFile, "\$UploadAllowed = 1;\n");
|
||||
|
||||
my $port = random_port();
|
||||
my $pid = fork();
|
||||
|
||||
END {
|
||||
# kill server
|
||||
if ($pid) {
|
||||
kill 'KILL', $pid or warn "Could not kill server $pid";
|
||||
}
|
||||
}
|
||||
|
||||
our ($DataDir);
|
||||
if (!defined $pid) {
|
||||
die "Cannot fork: $!";
|
||||
} elsif ($pid == 0) {
|
||||
use Config;
|
||||
my $secure_perl_path = $Config{perlpath};
|
||||
exec($secure_perl_path,
|
||||
"stuff/gopher-server.pl",
|
||||
"--port=$port",
|
||||
"--log_level=0", # set to 4 for verbose logging
|
||||
"--wiki=./wiki.pl",
|
||||
"--wiki_dir=$DataDir",
|
||||
"--wiki_pages=Alex",
|
||||
"--wiki_pages=Berta",
|
||||
"--wiki_pages=Chris")
|
||||
or die "Cannot exec: $!";
|
||||
}
|
||||
|
||||
update_page('Alex', "My best friend is [[Berta]].\n\nTags: [[tag:Friends]]\n");
|
||||
update_page('Berta', "This is me.\n\nTags: [[tag:Friends]]\n");
|
||||
update_page('Chris', "I'm Chris.\n\nTags: [[tag:Friends]]\n");
|
||||
update_page('Friends', "Some friends.\n");
|
||||
update_page('2017-12-25', 'It was a Monday.\n\nTags: [[tag:Day]]');
|
||||
update_page('2017-12-26', 'It was a Tuesday.\n\nTags: [[tag:Day]]');
|
||||
update_page('2017-12-27', 'It was a Wednesday.\n\nTags: [[tag:Day]]');
|
||||
update_page('Friends', "News about friends.\n", 'rewrite', 1); # minor change
|
||||
update_page('Friends', "News about friends:\n\n<journal search tag:friends>\n",
|
||||
'add journal tag', 1); # minor change
|
||||
|
||||
# file created using convert NULL: test.png && base64 test.png
|
||||
update_page('Picture',
|
||||
"#FILE image/png\niVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQAAAAA3bv"
|
||||
. "kkAAAACklEQVQI12NoAAAAggCB3UNq9AAAAABJRU5ErkJggg==");
|
||||
|
||||
sub query_gopher {
|
||||
my $query = shift;
|
||||
my $text = shift;
|
||||
|
||||
# create client
|
||||
my $socket = IO::Socket::IP->new(
|
||||
PeerHost => "localhost",
|
||||
PeerPort => $port,
|
||||
Type => SOCK_STREAM, )
|
||||
or die "Cannot construct client socket: $@";
|
||||
|
||||
$socket->print("$query\r\n");
|
||||
$socket->print($text);
|
||||
|
||||
undef $/; # slurp
|
||||
return <$socket>;
|
||||
}
|
||||
|
||||
# main menu
|
||||
my $page = query_gopher("");
|
||||
for my $item(qw(Alex Berta Chris 2017-12-25 2017-12-26 2017-12-27)) {
|
||||
like($page, qr/^1$item\t$item\/menu\t/m, "main menu contains $item");
|
||||
}
|
||||
|
||||
# page menu
|
||||
$page = query_gopher("Alex/menu");
|
||||
like($page, qr/^0Alex\tAlex\t/m,
|
||||
"Alex menu links to plain text");
|
||||
like($page, qr/^hAlex\tAlex\/html\t/m,
|
||||
"Alex menu links to HTML");
|
||||
like($page, qr/^1Page History\tAlex\/history\t/m,
|
||||
"Alex menu links to page history");
|
||||
like($page, qr/^1Berta\tBerta\/menu\t/m,
|
||||
"Alex menu links to Berta menu");
|
||||
like($page, qr/^1Friends\tFriends\/tag\t/m,
|
||||
"Alex menu links to Friends tag");
|
||||
|
||||
# plain text
|
||||
$page = query_gopher("Alex");
|
||||
like($page, qr/^My best friend is \[\[Berta\]\]/, "Alex plain text");
|
||||
|
||||
# HTML
|
||||
$page = query_gopher("Alex/html");
|
||||
like($page, qr/<p>My best friend is <a.*?>Berta<\/a>/, "Alex HTML");
|
||||
|
||||
# tags
|
||||
$page = query_gopher("Friends/tag");
|
||||
like($page, qr/iThis page is about the tag Friends/, "tag menu intro");
|
||||
for my $item(qw(Friends Alex Berta Chris)) {
|
||||
like($page, qr/^1$item\t$item\/menu\t/m, "tag menu contains $item");
|
||||
}
|
||||
|
||||
# tags
|
||||
$page = query_gopher("Day/tag");
|
||||
like($page, qr/2017-12-27.*2017-12-26.*2017-12-25/s,
|
||||
"tag menu sorted newest first");
|
||||
|
||||
# match
|
||||
$page = query_gopher("do/match\t2017");
|
||||
for my $item(qw(2017-12-25 2017-12-26 2017-12-27)) {
|
||||
like($page, qr/^1$item\t$item\/menu\t/m, "match menu contains $item");
|
||||
}
|
||||
like($page, qr/2017-12-27.*2017-12-26.*2017-12-25/s,
|
||||
"match menu sorted newest first");
|
||||
|
||||
# search
|
||||
$page = query_gopher("do/search\ttag:day");
|
||||
for my $item(qw(2017-12-25 2017-12-26 2017-12-27)) {
|
||||
like($page, qr/^1$item\t$item\/menu\t/m, "serch menu contains $item");
|
||||
}
|
||||
like($page, qr/2017-12-27.*2017-12-26.*2017-12-25/s,
|
||||
"search menu sorted newest first");
|
||||
|
||||
# rc
|
||||
$page = query_gopher("do/rc");
|
||||
my $re = join(".*", "Picture", "2017-12-27", "2017-12-26", "2017-12-25",
|
||||
"Friends", "Chris", "Berta", "Alex");
|
||||
like($page, qr/$re/s, "rc in the right order");
|
||||
|
||||
$page = query_gopher("do/rc/showedits");
|
||||
|
||||
$re = join(".*", "Friends", "2017-12-27", "2017-12-26", "2017-12-25");
|
||||
like($page, qr/$re/s, "rc in the right order");
|
||||
|
||||
# history
|
||||
$page = query_gopher("Friends/history");
|
||||
like($page, qr/^1Friends \(1\)\tFriends\/1\/menu\t/m,
|
||||
"Friends (1)");
|
||||
like($page, qr/^1Friends \(2\)\tFriends\/2\/menu\t/m,
|
||||
"Friends (2)");
|
||||
like($page, qr/^1Friends \(current\)\tFriends\/menu\t/m,
|
||||
"Friends (current)");
|
||||
like($page, qr/Friends\/menu.*Friends\/2\/menu.*Friends\/1\/menu/s,
|
||||
"history in the right order");
|
||||
|
||||
# revision menu
|
||||
$page = query_gopher("Friends/1/menu");
|
||||
like($page, qr/^0Friends\tFriends\/1\t/m,
|
||||
"Friends/1 menu links to plain text");
|
||||
like($page, qr/^hFriends\tFriends\/1\/html\t/m,
|
||||
"Friends/1 menu links to HTML");
|
||||
unlike($page, qr/Search result for tag/,
|
||||
"Friends/1 has no journal and thus no tag search");
|
||||
|
||||
# revision plain text
|
||||
$page = query_gopher("Friends/1");
|
||||
like($page, qr/^Some friends/m, "Friends/1 plain text");
|
||||
|
||||
# revision html
|
||||
$page = query_gopher("Friends/1/html");
|
||||
like($page, qr/<p>Some friends/m, "Friends/1 html");
|
||||
|
||||
# upload text
|
||||
my $haiku = <<EOT;
|
||||
Quiet disk ratling
|
||||
Keyboard clicking, then it stops.
|
||||
Rain falls and I think
|
||||
.
|
||||
EOT
|
||||
|
||||
$page = query_gopher("Haiku/write/text", "$haiku");
|
||||
like($page, qr/^iPage was saved./m, "Write Haiku");
|
||||
like($page, qr/^1Haiku\tHaiku\/menu/m, "Link back to Haiku");
|
||||
|
||||
my $haiku_re = quotemeta(substr($haiku, 0, -2)); # strip period and \n
|
||||
$page = query_gopher("Haiku");
|
||||
like($page, qr/^$haiku_re/, "Haiku saved");
|
||||
|
||||
$haiku = <<"EOT";
|
||||
```
|
||||
username: Alex
|
||||
minor: 1
|
||||
summary: typos
|
||||
```
|
||||
Quiet disk rattling
|
||||
Keyboard clicking, then it stops.
|
||||
Rain falls and I think.
|
||||
.
|
||||
EOT
|
||||
|
||||
$page = query_gopher("Haiku/write/text", "$haiku");
|
||||
like($page, qr/^iPage was saved./m, "Write haiku");
|
||||
|
||||
$haiku_re = quotemeta(<<"EOT");
|
||||
Quiet disk rattling
|
||||
Keyboard clicking, then it stops.
|
||||
Rain falls and I think.
|
||||
EOT
|
||||
|
||||
$page = query_gopher("Haiku");
|
||||
like($page, qr/^$haiku_re/, "Haiku updated");
|
||||
|
||||
$page = query_gopher("Haiku/history");
|
||||
like($page, qr/^1Haiku \(current\)\tHaiku\/menu\t/m, "Haiku (current)");
|
||||
like($page, qr/^i\d\d:\d\d UTC by Alex: typos \(minor\)/m,
|
||||
"Metadata recorded");
|
||||
like($page, qr/^1Haiku \(1\)\tHaiku\/1\/menu\t/m, "Haiku (1)");
|
||||
|
||||
# new page
|
||||
$page = query_gopher("do/new", <<"EOT");
|
||||
```
|
||||
username: Alex
|
||||
summary: copy
|
||||
title: Haiku_Copy
|
||||
```
|
||||
Quiet disk rattling
|
||||
Keyboard clicking, then it stops.
|
||||
Rain falls and I think.
|
||||
.
|
||||
EOT
|
||||
like($page, qr/^iPage was saved./m, "Write copy of haiku");
|
||||
$page = query_gopher("Haiku_Copy");
|
||||
like($page, qr/^$haiku_re/, "New copy of haiku created");
|
||||
|
||||
# append
|
||||
$page = query_gopher("Haiku_Copy/append/text", "This is a comment by me!\n.\n");
|
||||
like($page, qr/^iPage was saved./m, "Append to copy of haiku");
|
||||
$page = query_gopher("Haiku_Copy");
|
||||
like($page, qr/^$haiku_re/, "Copy of haiku still there");
|
||||
like($page, qr/\n\n----\n\nThis is a comment by me!\n\n-- Anonymous/,
|
||||
"Comment is also there");
|
||||
|
||||
# Image download
|
||||
my $image = query_gopher("Picture");
|
||||
like($image, qr/\211PNG\r\n/, "Image download");
|
||||
|
||||
# Image upload
|
||||
$page = query_gopher("PictureCopy/write/file\t" . length($image), "$image");
|
||||
like($page, qr/Files of type application\/octet-stream are not allowed/m,
|
||||
"MIME type check");
|
||||
|
||||
$page = query_gopher("PictureCopy/image/png/write/file\t" . length($image), "$image");
|
||||
like($page, qr/^iPage was saved./m, "Image upload");
|
||||
unlike($page, qr/^3Page was not saved/, "Messages are correct");
|
||||
|
||||
my $copy = query_gopher("PictureCopy");
|
||||
like($copy, qr/\211PNG\r\n/, "Image copy download");
|
||||
|
||||
is($copy, $image, "Image and copy are identical");
|
||||
|
||||
# image:link
|
||||
$page = query_gopher("Test/write/text", "[[image:Picture]]\n.\n");
|
||||
like($page, qr/^iPage was saved./m, "Saved test page containing image link");
|
||||
$page = query_gopher("Test/menu");
|
||||
like($page, qr/^1Picture\tPicture\/menu/m, "Link to image page looks good");
|
||||
$page = query_gopher("Picture/menu");
|
||||
like($page, qr/^IPicture\tPicture/, "Link to image file looks good");
|
||||
|
||||
# Test upload of large page (but note $MaxPost: 1024 * 210 > (10 * 8 + 1) * 2600)
|
||||
my $garbage = (("0123456789" x 8) . "\n") x 2600 . "Last Line\n";
|
||||
$page = query_gopher("Large/write/text", "$garbage.\n");
|
||||
like($page, qr/^iPage was saved./m, "Write page with "
|
||||
. length($garbage) . " bytes");
|
||||
$page = query_gopher("Large");
|
||||
like(substr($page, -20), qr/Last Line/, "All of large page was saved");
|
||||
|
||||
# Test of Umlauts in the selector
|
||||
test_page(update_page('Zürich♥', '[[Üetliberg♥]]'), 'Zürich♥', 'Üetliberg♥');
|
||||
$page = query_gopher("Z%c3%bcrich%e2%99%a5");
|
||||
utf8::decode($page);
|
||||
like($page, qr/Üetliberg♥/, "UTF-8 encoded page names");
|
||||
|
||||
$page = query_gopher("Z%c3%bcrich%e2%99%a5/menu");
|
||||
utf8::decode($page);
|
||||
like($page, qr/^0Zürich♥\tZ%c3%bcrich%e2%99%a5\t/m, "UTF-8 encoded text link");
|
||||
like($page, qr/^1Üetliberg♥\t%c3%9cetliberg%e2%99%a5\/menu\t/m,
|
||||
"UTF-8 encoded links");
|
||||
|
||||
# gopher links
|
||||
update_page('Gopher', '[http://gopher.floodgap.com/gopher/gw?a=gopher%3A%2F%2Fsdf.org%3A70%2F0%2Fusers%2Fsolderpunk%2Fphlog%2Fintroducing-vf1.txt VF-1], [gopher://sdf.org:70/1/phlogs/ Phlogs]');
|
||||
$page = query_gopher("Gopher/menu");
|
||||
like($page, qr/^1Phlogs\t\/phlogs\/\tsdf\.org\t70/m, "Direct Gopher link");
|
||||
like($page, qr/^0VF-1\t\/users\/solderpunk\/phlog\/introducing-vf1.txt\tsdf\.org\t70/m, "Floodgap proxy link");
|
||||
|
||||
done_testing();
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 7;
|
||||
use utf8;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 16;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 13;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 't/test.pl';
|
||||
require './t/test.pl';
|
||||
package OddMuse;
|
||||
use Test::More tests => 37;
|
||||
|
||||
|
||||