rename project to konfluks for legibility, add docs

This commit is contained in:
rra 2022-06-02 09:23:58 +02:00
parent b0f77831bd
commit 00f795f16d
12 changed files with 96 additions and 15 deletions

View File

@ -1,6 +1,56 @@
# lumbunglib ![Konfluks logo is a stylized and schematic representation of a drainage basin](docs/Konfluks.svg)
# Konfluks
A drainage basin is a geographical feature that collects all precipitation in an area, first in to smaller streams and finally together in to the large river. Similarly, Konfluks can bring together small and dispersed streams of web content from different applications and websites together in a single large stream.
Specifically, Konfluks turns Peertube videos, iCal calendar events, other websites through their RSS and OPDS feeds and Mastodon posts under a hashtag in to Hugo page bundles. This allows one to publish from diverse sources to a single stream.
Konfluks was first made by Roel Roscam Abbing as part of <lumbung.space>, together with ruangrupa and Autonomic.
## Philosophy
Konfluks tries to act as a mirror representation of the input sources. That means that whenever something remote is deleted, changed or becomes unavailable, it is also changed or deleted by Konfluks.
Konfluks tries to preserve intention. That means the above, but also by requiring explicit ways of publishing.
Konfluks works by periodically polling the remote sources, taking care not to duplicate work. It caches files, asks for last-modified headers, and skips things it has already. This makes every poll as fast and as light as possible.
Konfluks is written for clarity, not brevity nor cleverness.
Konfluks is extendable, a work in progress and a messy undertaking.
## High-level overview
Konfluks consists of different Python scripts which each poll a particular service, say, a Peertube server, to download information and convert it in to [Hugo Page Bundles](https://gohugo.io/content-management/page-bundles/)
Each script part of Konfluks will essentially to the following:
* Parse a source and request posts/updates/videos/a feed
* Taking care of publish ques
* Create a Hugo post for each item returned, by:
* Making a folder per post in the `output` directory
* Formatting post metadata as [Hugo Post Frontmatter](https://gohugo.io/content-management/front-matter/) in a file called `index.md`
* Grabbing local copies of media and saving them in the post folder
* Adding the post content to `index.md`
* According to jinja2 templates (see `Konfluks/templates/`)
The page bundles created, where possible, are given human friendly names.
Here is a typical output structure:
`user@server: ~/Konfluks/output: tree tv/
tv/
├── forum-27an-mother-earth-353f93f3-5fee-49d6-b71d-8aef753f7041
│   ├── 86ccae63-3df9-443c-91f3-edce146055db.jpg
│   └── index.md
├── keroncong-tugu-cafrinho-live-at-ruru-gallery-ruangrupa-jakarta-19-august-2014-e6d5bb2a-d77f-4a00-a449-992a579c8c0d
│   ├── 32291aa2-a391-4219-a413-87521ff373ba.jpg
│   └── index.md
├── lecture-series-1-camp-notes-on-education-8d54d3c9-0322-42af-ab6e-e954d251e076
│   ├── 0f3c835b-42c2-48a3-a2a3-a75ddac8688a.jpg
│   └── index.md
`
> Python lib which powers `lumbung.space` automation
## hacking ## hacking

31
docs/konfluks.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -1,9 +1,9 @@
[tool.poetry] [tool.poetry]
name = "lumbunglib" name = "konfluks"
version = "0.1.0" version = "0.1.0"
description = "Python lib which powers lumbung[dot]space automation" description = "Python lib which powers lumbung[dot]space automation"
authors = ["rra", "decentral1se"] authors = ["rra", "decentral1se"]
license = "GPLv3+" license = "AGPLv3+"
[tool.poetry.dependencies] [tool.poetry.dependencies]
python = "^3.9" python = "^3.9"
@ -25,7 +25,7 @@ requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts] [tool.poetry.scripts]
lumbunglib-cal = "lumbunglib.cloudcal:main" konfluks-cal = "konfluks.cloudcal:main"
lumbunglib-vid = "lumbunglib.video:main" konfluks-vid = "konfluks.video:main"
lumbunglib-feed = "lumbunglib.feed:main" konfluks-feed = "konfluks.feed:main"
lumbunglib-hash = "lumbunglib.hashtag:main" konfluks-hash = "konfluks.hashtag:main"

View File

@ -2,10 +2,10 @@
from setuptools import setup from setuptools import setup
packages = \ packages = \
['lumbunglib'] ['konfluks']
package_data = \ package_data = \
{'': ['*'], 'lumbunglib': ['templates/*']} {'': ['*'], 'konfluks': ['templates/*']}
install_requires = \ install_requires = \
['Jinja2>=3.0.3,<4.0.0', ['Jinja2>=3.0.3,<4.0.0',
@ -20,13 +20,13 @@ install_requires = \
'requests>=2.26.0,<3.0.0'] 'requests>=2.26.0,<3.0.0']
entry_points = \ entry_points = \
{'console_scripts': ['lumbunglib-cal = lumbunglib.cloudcal:main', {'console_scripts': ['konfluks-cal = konfluks.cloudcal:main',
'lumbunglib-feed = lumbunglib.feed:main', 'konfluks-feed = konfluks.feed:main',
'lumbunglib-hash = lumbunglib.hashtag:main', 'konfluks-hash = konfluks.hashtag:main',
'lumbunglib-vid = lumbunglib.video:main']} 'konfluks-vid = konfluks.video:main']}
setup_kwargs = { setup_kwargs = {
'name': 'lumbunglib', 'name': 'konfluks',
'version': '0.1.0', 'version': '0.1.0',
'description': 'Python lib which powers lumbung[dot]space automation', 'description': 'Python lib which powers lumbung[dot]space automation',
'long_description': None, 'long_description': None,