Configuring Kallithea via CLI (in-database settings)

Branko Majic branko at majic.rs
Sun Feb 21 20:50:36 UTC 2021


Hello all,

Long time ago I wrote a small Python package that I deployed locally on
my servers for the purpose of making in-database configuration changes
to Kallithea.

The primary driver for this for me was to be able to fully set-up and
configure Kallithea in three different environments
(test/staging/production), and to be able to fully reproduce and
test-out the changes on a whim - without the hassle of doing it
manually via admin GUI. Especially because my test environment is
constantly getting recreated (it's more like a dev environment in
those regards - staging/production are persistent).

Since I have finally got my big behind to start working on an upgrade
of Kallithea, I found myself suddenly lacking CLI commands for
configuring in-database Kallithea settings, and it took me some time to
realise that this was my own implementation that gets rolled-out
locally to my servers.

To avoid future problems for myself, and hopefully help others as well,
I have decided (after quick chat with patrickdepingui on IRC) to try and
upstream the changes this time around.

Before I start submitting any meaningful patches for latest Kallithea, I
figured I might as well post what I currently have - for Kallithea
_0.3.7_ though. The plan is to adopt the code to work on up-to-date
version of Kallithea. However, I figured it might be useful to get at
least some feedback on the general approach employed.

To make things easier for me, I'm attaching the working code I have for
0.3.7 for now.

Please feel free to comment on it, and whether you have any additional
input on it. Keep in mind that existing code is probably a bit brutish
since it does not perform a whole lot of consistency checks, but it
worked fine for me.

Code is licensed as GPLv3 (well, same like Kallithea, I do not have any
particular preferences myself).

Best regards,
Branko Majic

P.S.
Sorry for sending this as a binary attachment, but it will take me some
more effort to start off with Mercurial, and I wanted to get the ball
rolling finally.

-- 
Branko Majic
XMPP: branko at majic.rs
Please use only Free formats when sending attachments to me.

Бранко Мајић
XMPP: branko at majic.rs
Молим вас да додатке шаљете искључиво у слободним форматима.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kallitheacli.tar.bz2
Type: application/x-bzip
Size: 12656 bytes
Desc: not available
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20210221/4a69ab73/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.sfconservancy.org/pipermail/kallithea-general/attachments/20210221/4a69ab73/attachment.sig>


More information about the kallithea-general mailing list