From 6020db4d15a881dfdd07b52f3298f1d072bd6b79 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Mon, 18 Jul 2022 12:16:52 +0200 Subject: [PATCH] additional gardening for konfluks rename --- README.md | 41 ++++++++++---------------- docs/konfluks.svg => konfluks.svg | 0 konfluks/{cloudcal.py => calendars.py} | 0 pyproject.toml | 6 ++-- setup.py | 2 +- 5 files changed, 19 insertions(+), 30 deletions(-) rename docs/konfluks.svg => konfluks.svg (100%) rename konfluks/{cloudcal.py => calendars.py} (100%) diff --git a/README.md b/README.md index 1af1154..acb2c2e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ -![Konfluks logo is a stylized and schematic representation of a drainage basin](https://git.autonomic.zone/r/konfluks/raw/branch/konfluks-renaming/docs/konfluks.svg) +![Konfluks logo is a stylized and schematic representation of a drainage basin](./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. +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. +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](https://lumbung.space), together with ruangrupa and Autonomic. +Konfluks was first made by [Roel Roscam Abbing](https://test.roelof.info/) as part of [lumbung.space](https://lumbung.space), together with [ruangrupa](https://ruangrupa.id) and [Autonomic](https://autonomic.zone). ## Philosophy @@ -22,24 +22,26 @@ 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/) +Konfluks consists of different Python scripts which each poll a particular service, say, a [Peertube](https://joinpeertube.org) 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/`) + * 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/ + user@server: ~/konfluks/output: tree tv/ tv/ ├── forum-27an-mother-earth-353f93f3-5fee-49d6-b71d-8aef753f7041 │   ├── 86ccae63-3df9-443c-91f3-edce146055db.jpg @@ -52,8 +54,6 @@ Here is a typical output structure: │   └── index.md ``` - - ## Hacking Install [poetry](https://python-poetry.org/docs/#osx--linux--bashonwindows-install-instructions): @@ -62,31 +62,20 @@ Install [poetry](https://python-poetry.org/docs/#osx--linux--bashonwindows-insta curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - ``` -We use Poetry because it locks the dependencies all the way down and makes it -easier to manage installation & maintenance in the long-term. Then install the -dependencies & have them managed by Poetry: +We use Poetry because it locks the dependencies all the way down and makes it easier to manage installation & maintenance in the long-term. Then install the dependencies & have them managed by Poetry: ``` poetry install ``` -Each script requires some environment variables to run, you can see the latest -deployment configuration over -[here](https://git.autonomic.zone/ruangrupa/lumbung.space/src/branch/main/compose.yml), -look for the values under the `environment: ...` stanza. +Each script requires some environment variables to run, you can see the latest deployment configuration over [here](https://git.autonomic.zone/ruangrupa/lumbung.space/src/branch/main/compose.yml), look for the values under the `environment: ...` stanza. -All scripts have an entrypoint described in the -[`pypoetry.toml`](https://git.autonomic.zone/ruangrupa/lumbunglib/src/commit/40bf9416b8792c08683ad8ac878093c7ef1b2f5d/pyproject.toml#L27-L31) -which you can run via `poetry run ...`. For example, if you want to run the -[`lumbunglib/video.py`](./lumbunglib/video.py) script, you'd do: +All scripts have an entrypoint described in the [`pypoetry.toml`](https://git.autonomic.zone/ruangrupa/konfluks/src/commit/40bf9416b8792c08683ad8ac878093c7ef1b2f5d/pyproject.toml#L27-L31) which you can run via `poetry run ...`. For example, if you want to run the [`konfluks/video.py`](./knofluks/video.py) script, you'd do: ``` mkdir -p testdir export OUTPUT_DIR=/testdir -poetry run lumbunglib-vid +poetry run konfluks-vid ``` -Run `poetry run poetry2setup > setup.py` if updating the poetry dependencies. -This allows us to run `pip install .` in the deployment and Pip will understand -that it is just a regular Python package. If adding a new cli command, extend -`pyproject.toml` with a new `[tool.poetry.scripts]` entry. +Run `poetry run poetry2setup > setup.py` if updating the poetry dependencies. This allows us to run `pip install .` in the deployment and Pip will understand that it is just a regular Python package. If adding a new cli command, extend `pyproject.toml` with a new `[tool.poetry.scripts]` entry. diff --git a/docs/konfluks.svg b/konfluks.svg similarity index 100% rename from docs/konfluks.svg rename to konfluks.svg diff --git a/konfluks/cloudcal.py b/konfluks/calendars.py similarity index 100% rename from konfluks/cloudcal.py rename to konfluks/calendars.py diff --git a/pyproject.toml b/pyproject.toml index 33b9ded..14e518a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [tool.poetry] name = "konfluks" version = "0.1.0" -description = "Python lib which powers lumbung[dot]space automation" -authors = ["rra", "decentral1se"] +description = "Brings together small and dispersed streams of web content from different applications and websites together in a single large stream." +authors = ["rra", "decentral1se", "knoflook"] license = "AGPLv3+" [tool.poetry.dependencies] @@ -25,7 +25,7 @@ requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" [tool.poetry.scripts] -konfluks-cal = "konfluks.cloudcal:main" +konfluks-cal = "konfluks.calendars:main" konfluks-vid = "konfluks.video:main" konfluks-feed = "konfluks.feed:main" konfluks-timeline = "konfluks.timeline:main" diff --git a/setup.py b/setup.py index b76bc40..2384fd2 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ install_requires = \ 'requests>=2.26.0,<3.0.0'] entry_points = \ -{'console_scripts': ['konfluks-cal = konfluks.cloudcal:main', +{'console_scripts': ['konfluks-cal = konfluks.calendars:main', 'konfluks-feed = konfluks.feed:main', 'konfluks-timeline = lumbunglib.timeline:main', 'konfluks-hash = konfluks.hashtag:main',