Coder Social home page Coder Social logo

lchen198 / wypyplus Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 1.0 4.19 MB

WyPyPlus is a minimal wiki in 42 lines of Python code.

License: MIT License

Python 26.95% CSS 3.59% Shell 0.77% HTML 0.06% JavaScript 68.63%
python wiki cgi single-file server minimalistic markdown notes html gtd getthingsdone static-site-generator forth forth-like

wypyplus's Introduction

🍦WyPyPlus: A personal wiki in 42 lines of code

🍦WyPyPlus (pronounced "whippy plus") is a minimalist wiki server in 42 lines of code based on wypy wiki written by Sean B. Palmer in 2004 during a ShortestWikiContest.

WyPyPlus is a journey to discover the essence of personal wiki and get rid of everything else. It tries to keep the minimal set of useful features and pack them in the tiniest space possible. At the end of the day, don't you want a Wiki that just works?

Some Use Cases

A Personal Wiki

  • WyPyPlus supports auto-link on WikiWords and common markdown syntaxes. It also creates a reverse index for every page and supports full-text search.

An Outliner Focusing on Content Creation

  • You can break down a big topic to small pages and focus on one thing at a time. Using the INCLUDE(WikiName) syntax, you can move content around easily and merge everything together automatically. This is inspired by the hot-list feature in GrandView, which I considered as one of the best outliner of all time.

A GetThingsDone System

  • WyPyPlus comes with a calendar and detailed instructions on setting up a complete GTD system. It also supports page templates, contextual tags and a global menu.

A Static Site Generator:

  • When you run WyPyPlus in read-only mode, you can dump the entire site using wget. Visit the (Demo) site to see for yourself.

A Presentation Tool:

  • You can use WyPyPlus to create presentations. It even produces PDFs!

A Simple Spreadsheet and a Forth language interpreter:

  • WyPyPlus has a built-in Forth interpreter that suports
    • Basic math operations: +, -, *, and /
    • Stack operations: dup, over, swap, drop, and rot
    • Other functions: ^, log, sqrt, abs, sin, cos, and tan
    • Flow control commands: jmp, jnz, jz, gt, lt, eq
  • The tiny Forth language in WyPyPlus in turing complete. Its usage is beyound computing numbers in the spreadsheet. You can inline Forth code in a page to generate dyanmic content.
  • You can define new functions using RPN(: <name> <content> ;)
    RPN(: squire dup * ;)
    RPN(: pythagoras squire swap squire + sqrt ;)
    RPN(3 4 pythagoras) -> output 5

In addition, you can use RPN in a table and reference rows and columes! Read the Demo Page source code for details.

Some Screenshots

Core Features

  • Takes less than a minute to set up.
  • Only 42 lines of code with no external dependency except Python.
  • Runs on Mac, Linux and Windows.
  • Supports basic wiki syntax. DemoPage
  • Stores wiki pages as plain text files.
  • Works perfectly offline.
  • No config files.
  • No database.

Design Tradeoffs

  • To keep things minimal, WyPyPlus only supports a subset of markdown syntaxes.
  • To avoid depending on an external parser, WyPyPlus uses regular expressions to match tags. It is not perfect, but fairly usable.
  • WyPyPlus has no config file. You can't mis-configure it. If you really need something, just edit the source code.

Install and Run in 2 Minutes.

  • You need Python 2 to run this application. For Windows users, please install Python 2.7.

  • Put WyPyPlus to a folder (E.g wypy_wiki).

cd wypy_wiki

# For Python 2
python -m CGIHTTPServer 8000 

# For Python 3
python3 -m http.server --cgi 8000 --bind 127.0.0.1

Open either URL in your browser:

http://127.0.0.1:8000/
Or 
http://127.0.0.1:8000/cgi-bin/wypyplus.py

Note that Python2 exposes your page to your local network. You can add a password with this launcher

wypyplus's People

Contributors

lchen198 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.