Upversioned to 0.5.1-SNAPSHOT; diff2html now works; many packages

(but not timbre) updated; documentation improved.
This commit is contained in:
simon 2016-08-20 22:03:20 +01:00
parent b31b50b976
commit baaa153bcc
16 changed files with 400 additions and 261 deletions

View file

@ -1,66 +1,21 @@
# Welcome to Smeagol!
# Welcome to the Levellers Wiki
Smeagol is a simple Wiki engine inspired by [Gollum](https://github.com/gollum/gollum/wiki). Gollum is a Wiki engine written in Ruby, which uses a number of simple text formats including [Markdown](http://daringfireball.net/projects/markdown/), and which uses [Git](http://git-scm.com/) to provide versioning and backup. I needed a new Wiki for a project and thought Gollum would be ideal - but unfortunately it doesn't provide user authentication, which I needed, and it was simpler for me to reimplement the bits I did need in Clojure than to modify Gollum.
This is a sort of loose online thinktank for the radical left in rural Scotland.
So at this stage Smeagol is a Wiki engine written in Clojure which uses Markdown as its text format, which does have user authentication, and which uses Git as its versioning and backup system.
## Latest additions
## Status
* [[Birnam workshop]]
* [[Holding size]]
* [[Local Government: key policy issues]]
Smeagol is now a fully working small Wiki engine, and meets my own immediate needs. There are some obvious
things which could be improved - see **TODO** list below - but it works now and doesn't seem to have any major problems.
## Everything is new
## Markup syntax
And in fact there's not much here yet. The software is also new and may break; if it does, please contact [[Simon]].
Smeagol uses the Markdown format as provided by [markdown-clj](https://github.com/yogthos/markdown-clj), with the addition that anything enclosed in double square brackets, \[\[like this\]\], will be treated as a link into the wiki itself.
## Come and join in
## Security and authentication
This isn't an 'anybody can edit it' wiki; it's a bunch of people all of whom more or less know each other, trying to get a consistent policy platform together. But we aren't seeking to be exclusive. If you'd like to join the editing group, please contact [[Simon]].
Security is now greatly improved. There is a file called *passwd* in the *resources* directory, which contains a clojure map which maps usernames to maps with plain-text passwords and emails thus:
## Please feel free to use our ideas
{:admin {:password "admin" :email "admin@localhost"}
:adam {:password "secret" :email "adam@localhost"}}
that is to say, the username is a keyword and the corresponding password is a string. However, since version 0.5.0, users can now change their own passwords, and when the user changes their password their new password is encrypted using the [scrypt](http://www.tarsnap.com/scrypt.html) one-way encryption scheme. The password file is now no longer either in the *resources/public* directory so cannot be downloaded through the browser, nor in the git archive to which the Wiki content is stored, so that even if that git archive is remotely clonable an attacker cannot get the password file that way.
There's still no mechanism to add a new user to the system through the user interface; you do sill have to do that by editing the password file in an editor.
## Todo
* Image (and other media) upload;
* Improved editor. The editor is at present very primitive - right back from the beginnings of the Web. It would be nice to have a rich embedded editor like [Hallo](https://github.com/bergie/hallo) or [Aloha](http://aloha-editor.org/Content.Node/index.html) but I haven't (yet) had time to integrate them!
* Transform diff output to HTML to show changes in a more user friendly format;
* Mechanism to add users through the user interface;
## License
Copyright © 2014-2015 Simon Brooke. Licensed under the GNU General Public License,
version 2.0 or (at your option) any later version. If you wish to incorporate
parts of Smeagol into another open source project which uses a less restrictive
license, please contact me; I'm open to dual licensing it.
## Prerequisites
You will need [Leiningen][1] 2.0 or above installed.
[1]: https://github.com/technomancy/leiningen
## Running
To start a web server for the application, run:
lein ring server
or more probably
nohup lein ring server > smeagol.log &
Alternatively, if you want to deploy to a servlet container (which I would strongly recommend), the simplest thing is to run:
lein ring uberwar
(a command which I'm sure Smeagol would entirely appreciate) and deploy the resulting war file.
## Editing the framing content
You can edit the [[\_left-bar]], the [[\_edit-left-bar]], and the [[\_header]].
This is not a party political wiki, although some of us may be members of the Greens, the SNP, or other parties. We'd be very pleased if any party adopted policy we develop.

View file

@ -10,4 +10,4 @@
+ \*\***bold**\*\*
+ \__italic_\_
More documentation [here](http://daringfireball.net/projects/markdown/syntax)
More documentation [here](http://daringfireball.net/projects/markdown/syntax)

View file

@ -1 +1 @@
This is the header. There isn't yet much in it. You could [edit](edit?page=_header) it to provide internal navigation or branding.
**Levellers** | A wiki for collaboratively developing left-wing policy for rural Scotland.

View file

@ -1 +1,18 @@
This is the left bar. There's nothing in it yet. You could [edit](edit?page=_left-bar) it to provide internal navigation or branding.
## Topic areas
* [[Agriculture]]
* [[Broadband]]
* [[Employment and Industry]]
* [[Energy and Fuel]]
* [[Housing]]
* [[Land Ownership]]
* [[Land Reform]]
* [[Land Taxation]]
* [[Local Government]]
* [[Transport]]
## About
* [[Authors]]
* [[Editing Guidelines]]

View file

@ -57,6 +57,7 @@ body {
#nav-menu {
margin: 0;
padding: 0;
}
#nav ul li {
@ -165,17 +166,21 @@ li.nav-item a:active { background: gray; color: white; }
(document.documentElement.clientHeight-this.offsetHeight)));
}
.error {
background-color: red;
color: white;
.change {
background-color: rgb( 223, 223, 223);
border: thin solid silver;
}
.widget {
background-color: silver;
border: thin solid white;
margin-top: 0;
margin-bottom: 0;
.error {
width: 100%;
background-color: red;
color: white;
}
.message {
border: thin solid red;
}
.minor-controls {
@ -186,27 +191,36 @@ li.nav-item a:active { background: gray; color: white; }
background:rgba(40,40,40,0.8);
font-size: 66%;
}
.minor-controls a {
float: right;
color: white;
}
.message {
border: thin solid red;
.warn {
color: maroon;
}
.widget {
background-color: silver;
border: thin solid white;
margin-top: 0;
margin-bottom: 0;
width: 100%;
}
.wiki {
margin: 0;
}
div.error {
width: 100%;
}
form {
border: thin solid silver;
}
del {
color: red;
}
div.content, form, p, pre, h1, h2, h3, h4, h5 {
padding: 0.25em 5%;
}
@ -233,6 +247,10 @@ input.required:after {
color: red;
}
ins {
color: green;
}
label {
width: 20%;
min-width: 20em;