edit

command module
v0.0.0-...-c533a9d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2015 License: BSD-2-Clause Imports: 25 Imported by: 0

README

Overview

  • A wiki
  • Minimalist
  • Requires cmark
  • Editing a page locks it
  • Users can only have one locked page at a time
  • Accounts can be added or removed easily and pages can be locked from future changes
  • Files can be uploaded and linked inline
  • Output is a static page
  • Requires Redis
  • ACE editor
  • A wiki

PreReqs

  • A reachable Redis Server
  1. wget http://download.redis.io/redis-stable.tar.gz
  2. tar xzf redis-stable.tar.gz
  3. cd redis-stable
  4. make
  5. sudo make install
  6. cd utils/
  7. sudo ./install_server.sh
  8. sudo /etc/init.d/redis_6379 start
  • A usable cmark installed (Note: cmake and cmark are different programs)
  1. sudo apt-get install cmake
  2. git clone https://github.com/jgm/cmark.git
  3. cd cmark
  4. make
  5. sudo make install

Running

  1. Download an OS+Architecture appropriate release
  2. Extract and run with the 'gen' flag to create a sample config file (in Linux you might run: ./edit -gen)
  3. Tweak the config.json file as needed
  4. Provide or generate a cert.pem and key.pem (see below)
  5. Run the edit binary (in Linux you might run: ./edit)

Using

  1. Open a URL
  2. Login using a valid account. The default is 'admin'/'password' - you can not do anything (other than change the password) without changing this password (see below)
  3. Press Ctrl-e
  4. Enter CommonMark
  5. Press Ctrl-s
  6. Click on the Lock icon to let someone else edit the page, or wait for the lock to timeout

Extra

  • Change your password by clicking on the menu button in the upper-right corner
  • There is an admin page at /admin
  • There is a Table-of-Contents at /toc
  • URL Paths are only allowed to contain lowercase a-z or '/' or '_'
  • Ctrl-e will toggle the edit panel

Generating a cert.pem and key.pem

  1. Generate a new unencrypted rsa private key in PEM format:
  • openssl genrsa -out key.pem 1024
  1. Create a certificate signing request (CSR) using your rsa private key:
  • openssl req -new -key key.pem -out cert.csr
  1. Self-sign your CSR with your own private key:
  • openssl x509 -req -days 3650 -in cert.csr -signkey key.pem -out cert.pem

LICENSE

You can find the license in the LICENSE file.

Documentation

Overview

Copyright (c) 2014, Richard B. Lyman All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL