From 45a4b2fb99a09692aca7cbd1500f194c12a7564e Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Tue, 11 Nov 2014 17:38:38 +0000 Subject: [PATCH] Tidied up documentation; added GNU GPL header to many files. --- resources/public/content/Introduction.md | 11 ++++++----- resources/public/css/standard.css | 23 ++++++++++++++++++++++- resources/public/img/gnu.small.png | Bin 0 -> 5434 bytes resources/templates/base.html | 1 + src/smeagol/handler.clj | 17 +++++++++++++++++ src/smeagol/layout.clj | 17 +++++++++++++++++ src/smeagol/middleware.clj | 17 +++++++++++++++++ src/smeagol/repl.clj | 17 +++++++++++++++++ src/smeagol/routes/wiki.clj | 17 +++++++++++++++++ src/smeagol/session_manager.clj | 17 +++++++++++++++++ src/smeagol/util.clj | 17 +++++++++++++++++ 11 files changed, 148 insertions(+), 6 deletions(-) create mode 100644 resources/public/img/gnu.small.png diff --git a/resources/public/content/Introduction.md b/resources/public/content/Introduction.md index ac6c762..ac3ea75 100644 --- a/resources/public/content/Introduction.md +++ b/resources/public/content/Introduction.md @@ -18,11 +18,12 @@ that is to say, the username is a keyword and the corresponding password is a st ## Todo -* Git integration! Smeagol doesn't have any inbuilt versioning or backup mechanism; it's intended that Git will be used as that mechanism. But it isn't implemented yet. -* Image (and other media) upload. -* Improved security. -* Mechanism to add users through the user interface. -* Mechanism to change passwords through the user interface. +* Git integration! Smeagol doesn't have any inbuilt versioning or backup mechanism; it's intended that Git will be used as that mechanism. But it isn't implemented yet; +* 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 havenven't (yet) had time to integrate them! +* Improved security. Having the passwords in plain text rather than encrypted is just basically poor; having the passwd file in *public* space is also poor (although I believe it cannot be accessed via HTTP). Essentially, authentication mechanisms should be pluggable, and at present they aren't; +* Mechanism to add users through the user interface; +* Mechanism to change passwords through the user interface; ## Editing the framing content diff --git a/resources/public/css/standard.css b/resources/public/css/standard.css index 6f7a0ea..5de427e 100644 --- a/resources/public/css/standard.css +++ b/resources/public/css/standard.css @@ -1,3 +1,23 @@ +/* + * Smeagol: a very simple Wiki engine + * Copyright (C) 2014 Simon Brooke + + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. + */ + body { margin: 0; padding: 0; @@ -84,9 +104,10 @@ li.nav-item a:active { background: gray; color: white; } padding: 0 2em; text-align: center; color:white; - background:rgba(196,196,196,0.95); + background:rgba(128,128,128,0.95); width: 100%; margin: 0; + padding: 0.1em 10%; bottom:0; position:fixed; z-index:150; diff --git a/resources/public/img/gnu.small.png b/resources/public/img/gnu.small.png new file mode 100644 index 0000000000000000000000000000000000000000..04177f65fbcf18865bc16930d07e7f2b9a832401 GIT binary patch literal 5434 zcmV-A6~*d_P)6w66OK~#9! z?VM*|RaMr8pOb_h1VTx-_<4+jOih=7H$j3R=Lb;R!2XB-s^3OYKDSWrPl z9nldP6$eEWr74IAqO>3)Ac6GU=lhYvLT1*l8et_a$0zBE84}U<1kQ1;A{+ zpgldQ0Zip#8gU1E?=qP2zQBI;qdWD>l&|4i<}#nn9K(4#I?6n|c%rL}x|RNEDb+AvWuNm=icMZk~p5qp^$j`mWgB@d@I^S^?8#QXw9IvsH^W1KZl(e~c z=}hk6BmgdDIdxgaB2p+uim1==bmVc0Ih9P_CXI)w$1SX+4aqEH0H<&Fx=pw9=Q%wl z^A6|HpTF@8Ijp57t@)lLnvhL0J-C8~`;mjT2&FQwchc8;FUgiz1HrKlx<|Ze5vR&QZ zgUzs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HcmV?d00001 diff --git a/resources/templates/base.html b/resources/templates/base.html index 1d356c7..77b26e0 100644 --- a/resources/templates/base.html +++ b/resources/templates/base.html @@ -50,6 +50,7 @@ Smeagol wiki engine || Built with LuminusWeb || Powered by Clojure || Find me/fork me on Github || + Licensed under the GNU General Public License version 2.0 diff --git a/src/smeagol/handler.clj b/src/smeagol/handler.clj index 1c223d3..cb59676 100644 --- a/src/smeagol/handler.clj +++ b/src/smeagol/handler.clj @@ -1,3 +1,20 @@ +;; Smeagol: a very simple Wiki engine +;; Copyright (C) 2014 Simon Brooke + +;; 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 2 +;; 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, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + (ns smeagol.handler (:require [compojure.core :refer [defroutes]] [smeagol.routes.wiki :refer [wiki-routes]] diff --git a/src/smeagol/layout.clj b/src/smeagol/layout.clj index d8f1612..908a475 100644 --- a/src/smeagol/layout.clj +++ b/src/smeagol/layout.clj @@ -1,3 +1,20 @@ +;; Smeagol: a very simple Wiki engine +;; Copyright (C) 2014 Simon Brooke + +;; 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 2 +;; 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, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + (ns smeagol.layout (:require [selmer.parser :as parser] [clojure.string :as s] diff --git a/src/smeagol/middleware.clj b/src/smeagol/middleware.clj index 7836f2c..590d5ff 100644 --- a/src/smeagol/middleware.clj +++ b/src/smeagol/middleware.clj @@ -1,3 +1,20 @@ +;; Smeagol: a very simple Wiki engine +;; Copyright (C) 2014 Simon Brooke + +;; 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 2 +;; 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, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + (ns smeagol.middleware (:require [taoensso.timbre :as timbre] [selmer.parser :as parser] diff --git a/src/smeagol/repl.clj b/src/smeagol/repl.clj index e72969b..a61e76e 100644 --- a/src/smeagol/repl.clj +++ b/src/smeagol/repl.clj @@ -1,3 +1,20 @@ +;; Smeagol: a very simple Wiki engine +;; Copyright (C) 2014 Simon Brooke + +;; 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 2 +;; 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, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + (ns smeagol.repl (:use smeagol.handler ring.server.standalone diff --git a/src/smeagol/routes/wiki.clj b/src/smeagol/routes/wiki.clj index 05a1c11..63080f3 100644 --- a/src/smeagol/routes/wiki.clj +++ b/src/smeagol/routes/wiki.clj @@ -1,3 +1,20 @@ +;; Smeagol: a very simple Wiki engine +;; Copyright (C) 2014 Simon Brooke + +;; 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 2 +;; 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, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + (ns smeagol.routes.wiki (:use clojure.walk) (:require [compojure.core :refer :all] diff --git a/src/smeagol/session_manager.clj b/src/smeagol/session_manager.clj index ea9ec33..fc31064 100644 --- a/src/smeagol/session_manager.clj +++ b/src/smeagol/session_manager.clj @@ -1,3 +1,20 @@ +;; Smeagol: a very simple Wiki engine +;; Copyright (C) 2014 Simon Brooke + +;; 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 2 +;; 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, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + (ns smeagol.session-manager (:require [noir.session :refer [clear-expired-sessions]] [cronj.core :refer [cronj]])) diff --git a/src/smeagol/util.clj b/src/smeagol/util.clj index c94236b..dc1c324 100644 --- a/src/smeagol/util.clj +++ b/src/smeagol/util.clj @@ -1,3 +1,20 @@ +;; Smeagol: a very simple Wiki engine +;; Copyright (C) 2014 Simon Brooke + +;; 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 2 +;; 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, write to the Free Software +;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + (ns smeagol.util (:require [noir.io :as io] [markdown.core :as md]))