SkillAgentSearch skills...

MiniWiki

A tiny Python wiki engine.

Install / Use

/learn @Oxygem/MiniWiki
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

MiniWiki

MiniWiki is a tiny wiki engine written in Python designed for small(er) wikis (such as Stack Setup). Features:

  • Markdown content
  • Inter-page linking ([[Page Title|/Another/Page]] or [[/Another/Page]])
  • Index generation based on a path prefix ([index:/Another])
  • Page history log (WIP)
  • Pluggable authentication backend
  • Custom template support

Quickstart

  1. First, install MiniWiki:

     pip install miniwiki
    
  2. Create a Python config file (see config options):

     # config.py
     name = 'My MiniWiki'
     database = 'sqlite:///my-miniwiki.db'
    
  3. Initialize the database

    miniwiki config.py --initdb
    
  4. Run it!

     miniwiki config.py
    

Configuration

Database

The database variable can be any valid SQLAlchemy database URI.

Authentication

By default MiniWiki instances allow public editing. The authentication backend can be set via config variable auth_backend. MiniWiki comes with two builtin backends:

AnonymousAuthBackend

Allows anyone to edit the wiki, usage:

auth_backend = 'miniwiki.auth.AnonymousAuthBackend'

SimpleAuthBackend

Allows a hard-coded list of users to edit the wiki, usage:

auth_backend = 'miniwiki.auth.SimpleAuthBackend'
auth_backend_settings = {
    'users': {
        'USERNAME': 'HASHED_PASSWORD',
    },
}

You will need to hash the passwords like so:

from bcrypt import hashpw, gensalt
hashed_password = hashpw(b'PASSWORD', gensalt(N_BCRYPT_ROUNDS))

Related Skills

View on GitHub
GitHub Stars10
CategoryDevelopment
Updated1y ago
Forks3

Languages

Python

Security Score

75/100

Audited on Oct 28, 2024

No findings