104 lines
4.5 KiB
Markdown
104 lines
4.5 KiB
Markdown
# Modpol
|
|
|
|

|
|
|
|
Modpol, short for "modular politics," enables diverse governance processes on multi-user platforms. It offers a library with which users can choose, modify, and create modules that add specific governance functionalities.
|
|
|
|
**Learn more at [modpol.net](https://modpol.net).**
|
|
|
|
## Modpol for Minetest
|
|
|
|
This implementation is a mod for [Minetest](https://minetest.net), a free/open-source voxel game. To use in Minetest, simply install the full codebase in your `mods/` or `worldmods/` folder. Minetest will load `init.lua`.
|
|
|
|
In the game, open the Modpol dashboard with the command `/mp`.
|
|
|
|
For testing purposes, players with the `privs` privilege (generally admins) can use the `/mptest` command, which resets all the orgs and opens a dashboard.
|
|
|
|
## Mastodon Govbot
|
|
|
|
Modpol can operate a governance-supporting bot for communities on [Mastodon](https://joinmastodon.org), an open social network.
|
|
|
|
This version utilizes and requires the installation of [lupa](https://github.com/scoder/lupa), which integrates Lua into Python, and [Mastodon.py](https://pypi.org/project/Mastodon.py/), a Python library for interacting with the Mastodon API.
|
|
|
|
*To do: explain how to set up the bot on the server.*
|
|
|
|
* Install Python on your system and the two required libraries:
|
|
- `pip install lupa`
|
|
- `pip install Mastodon.py`
|
|
* Set up files `clientcred.secret` and `usercred.secret` in the `modpol_mastodon/creds/` directory, using the account settings in Mastodon
|
|
|
|
Once it is configured, to initialize the bot, run from Modpol's base directory:
|
|
|
|
```
|
|
python govbot.py
|
|
```
|
|
|
|
This in turn calls login-mastodon.py, which initializes Modpol and the bot.
|
|
|
|
## Command Line
|
|
|
|
Modpol can also be used as a command-line tool. Currently command-line use of modpol requires a Unix-style system, but it is intended to become more fully platform independent.
|
|
|
|
The command-line version is in the `modpol` subdirectory. To run the program on Unix systems in CLI mode, install lua or luajit and execute the following in this directory:
|
|
|
|
```
|
|
$ lua[jit] login.lua
|
|
```
|
|
|
|
Alternatively, to test arbitrary functions in the interpreter outside of the interactive dashboards, load Modpol's library with:
|
|
|
|
```
|
|
$ lua[jit]
|
|
> dofile("modpol_core/modpol.lua")
|
|
```
|
|
|
|
In the interpreter, for a list of global functions and tables, use `modpol.menu()`.
|
|
|
|
## Storage
|
|
|
|
The persistent storage method may be chosen in `modpol.lua`.
|
|
|
|
By default, data will be stored in a data directory at `modpol_core/data/`. This will contain a log file and serialized program data files.
|
|
|
|
For Minetest: If available, Modpol uses Minetest's built-in StorageRef system for Minetest 5.*.
|
|
|
|
|
|
## Documentation
|
|
|
|
Various guides are available at the [GitLab wiki](https://gitlab.com/medlabboulder/modpol/-/wikis/home).
|
|
|
|
Read documentation of functions and modules at `docs/doc/index.html`. Documentation was generated using [LDoc](https://stevedonovan.github.io/ldoc/). To generate basic documentation for every page, download `ldoc` and use the following command:
|
|
|
|
```
|
|
$ cd docs/
|
|
$ ldoc ..
|
|
```
|
|
|
|
This will not generate the same index page and sidebar as the documentation provided; the appropriate structure needs to be added manually.
|
|
|
|
## Credits
|
|
|
|
This project is led by [Nathan Schneider](https://nathanschneider.info) of the [Media Enterprise Design Lab](https://colorado.edu/lab/medlab) at the University of Colorado Boulder, as part of the [Metagovernance Project](https://metagov.org).
|
|
|
|
Contributors include:
|
|
|
|
* [Luke Miller](https://gitlab.com/lukvmil) (co-leadership, main control flow, object orientation, module spec)
|
|
* [MisterE](https://gitlab.com/gbrrudmin) (early project refactoring, core feature development)
|
|
* Robert Kiraly [[OldCoder](https://github.com/oldcoder/)] (ocutils.lua, storage-local.lua, project refactoring)
|
|
* Skylar Hew (documentation)
|
|
|
|
We are grateful for initial support for this project from a residency with [The Bentway Conservancy](https://www.thebentway.ca/). Read about us in _[The Field Guide to Digital and/as Public Space](https://www.thebentway.ca/stories/field-guide/)_.
|
|
|
|
|
|
## Contributing
|
|
|
|
We'd love to welcome more contributors. Please join the conversation in the [Issues](https://gitlab.com/medlabboulder/modpol/-/issues), the \#modpol channel at the [Metagovernance Project](https://metagov.org) Slack, and the [Minetest.net forum](https://forum.minetest.net/viewtopic.php?f=47&t=26037).
|
|
|
|
Learn more about the project and how to develop your own modules in [the wiki](https://gitlab.com/medlabboulder/modpol/-/wikis/home).
|
|
|
|
|
|
## Licenses
|
|
|
|
* [Project](LICENSE.mt): MIT
|
|
* [Lua Serpent Serializer](serpent/LICENSE.txt): MIT
|