ContentDB CLI Client

Post Reply
User avatar
ronoaldo
Member
Posts: 107
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

ContentDB CLI Client

by ronoaldo » Post

Just wanted to share a small tool I'm working on, since it is now useful already.

For those who manage headless servers, like in VPS without Gui or Cloud VMs, or if you want/need a way to rebuild a game/world/server mods from scratch, this tool my be handy to script and automate!

Latest release at Github: https://github.com/ronoaldo/minetools

Feedback/feature requests are welcome!
Servers: Mercurio | Tools: ContentDB CLI

User avatar
ronoaldo
Member
Posts: 107
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

Re: ContentDB CLI Client

by ronoaldo » Post

Release 0.1.4 available on Github

Added support for the update command, so it will update all mods in the current ./mods folder from both Content DB and a Git remote (via git pull if a .git folder is found)

https://github.com/ronoaldo/minetools/r ... tag/v0.1.4
Servers: Mercurio | Tools: ContentDB CLI

User avatar
Miniontoby
Member
Posts: 532
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: ContentDB CLI Client

by Miniontoby » Post

You might need to check this forum topic:
viewtopic.php?f=14&t=24914 it is kind of the same...
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
Blockhead
Member
Posts: 132
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
In-game: Blockhead
Location: Land Down Under

Re: ContentDB CLI Client

by Blockhead » Post

Miniontoby wrote:
Sun Sep 26, 2021 17:10
You might need to check this forum topic:
viewtopic.php?f=14&t=24914 it is kind of the same...
I call it healthy competition. One is written in Go, for which the compiler on Debian is perpetually out of date. The other is written in Python, which means it will be slow. Good stuff :)
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
rubenwardy
Moderator
Posts: 6515
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: ContentDB CLI Client

by rubenwardy » Post

Blockhead wrote:
Thu Sep 30, 2021 00:39
The other is written in Python, which means it will be slow
Most of the work will be networking and extracting zips. Networking isn't CPU bound, and I'd hazard a guess that zip extraction is done using a C library

Also, the ContentDB server is written in Python
Renewed Tab (my browser add-on) | Donate | My Twitter | Mods | Minetest Modding Book

Hello profile reader

User avatar
Blockhead
Member
Posts: 132
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
In-game: Blockhead
Location: Land Down Under

Re: ContentDB CLI Client

by Blockhead » Post

rubenwardy wrote:
Thu Sep 30, 2021 00:44
Blockhead wrote:
Thu Sep 30, 2021 00:39
The other is written in Python, which means it will be slow
Most of the work will be networking and extracting zips. Networking isn't CPU bound, and I'd hazard a guess that zip extraction is done using a C library

Also, the ContentDB server is written in Python
Yes you're quite right, most code in most small Python applications was written in C/C++ so is quite fast. And of course python can be quick to knock something together in, saving dev time. Much as I'd like to argue about the particular app in question as well, the repository link is dead so I can't. I take it you don't use Debian much, since you latched onto the Python part of my cynical comment instead of the Debian part :)
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My mod: Foodblocks

User avatar
rubenwardy
Moderator
Posts: 6515
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: ContentDB CLI Client

by rubenwardy » Post

I use Debian for my server, I just don't use go
Renewed Tab (my browser add-on) | Donate | My Twitter | Mods | Minetest Modding Book

Hello profile reader

User avatar
ronoaldo
Member
Posts: 107
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

Re: ContentDB CLI Client

by ronoaldo » Post

Blockhead wrote:
Thu Sep 30, 2021 00:39
Miniontoby wrote:
Sun Sep 26, 2021 17:10
You might need to check this forum topic:
viewtopic.php?f=14&t=24914 it is kind of the same...
I call it healthy competition. One is written in Go, for which the compiler on Debian is perpetually out of date. The other is written in Python, which means it will be slow. Good stuff :)
Debian stable is, well, stable, so most of the time out of date with everything. You can always go burr and use the bleeding edge with Debian testing. I often keep track of testing when close to release (~6 months) as it is already more stable than most distros and quite updated (like, for gaming). All in all, most recent releases of the Go compiler are just fine. Also, You usually update go with go itself so I don't really see a problem. I usually have multiple versions of Go as well.

I don''t think it's a competition, I just failed to find the previous version when I started mine. I don't know why, not sure if forums were offline. I'm better trying to contribute than reinvent the wheel.
Servers: Mercurio | Tools: ContentDB CLI

User avatar
Miniontoby
Member
Posts: 532
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: ContentDB CLI Client

by Miniontoby » Post

But yeah I got OpenBSD as standard Operating System on my minetest server hosting VPS, so yeah I cannot use this then, unless there are builds for OpenBSD, because installing/using GO is not really working on OpenBSD.
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
ronoaldo
Member
Posts: 107
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

Re: ContentDB CLI Client

by ronoaldo » Post

Release v0.2.0

Added support for specific release installs. This allows for reproducible builds and to pin specific mod versions, i.e., when using Docker to build your server.

Code: Select all

contentdb install mod rubenwardy/sfinv@52
https://github.com/ronoaldo/minetools/r ... tag/v0.2.0
Servers: Mercurio | Tools: ContentDB CLI

User avatar
ronoaldo
Member
Posts: 107
Joined: Mon Dec 07, 2020 01:04
GitHub: ronoaldo
IRC: ronoaldo
In-game: RonoaldoKakashi
Location: São Paulo, Brasil
Contact:

Re: ContentDB CLI Client

by ronoaldo » Post

Miniontoby wrote:
Fri Oct 01, 2021 12:34
But yeah I got OpenBSD as standard Operating System on my minetest server hosting VPS, so yeah I cannot use this then, unless there are builds for OpenBSD, because installing/using GO is not really working on OpenBSD.
Go is a very fun language to code with, I suggest you give it a try. Python is now the #1 language, ahead of Java this month according to Tiobe index [1]; it is a very fun language to play with as well.

For Go and OpenBSD I'm not sure but there is a BSD port for FreeBSD, perhaps that one works? https://golang.org/dl/ I can try helping you build it if you have specific errors.

I also find your shell based tool very convenient, Shell scripts are quite easy to write and maintain once you master the basics from the Posix shell, or a specific shell like Bash.

[1] https://twitter.com/RonoaldoPereira/sta ... 0089183238
Servers: Mercurio | Tools: ContentDB CLI

User avatar
Miniontoby
Member
Posts: 532
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: ContentDB CLI Client

by Miniontoby » Post

ronoaldo wrote:
Wed Oct 13, 2021 23:52
Go is a very fun language to code with, I suggest you give it a try. Python is now the #1 language, ahead of Java this month according to Tiobe index; it is a very fun language to play with as well.

For Go and OpenBSD I'm not sure but there is a BSD port for FreeBSD, perhaps that one works? https://golang.org/dl/ I can try helping you build it if you have specific errors.
I can maybe build it on my test vps and then move it to my minetest vps, becuase yeah I don't have too much space on my minetest vps... but yeah idk I might give it a try.
ronoaldo wrote:
Wed Oct 13, 2021 23:52
I also find your shell based tool very convenient, Shell scripts are quite easy to write and maintain once you master the basics from the Posix shell, or a specific shell like Bash.
I have been sitting with an open mouth for like 10 minutes when I read this. This is just nice of you. This is the first thing I have heared about mtctl so far.

I have made a lot of other scripts and programs, but no-one liked/used it EVER (maybe once but then no-more).
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
rubenwardy
Moderator
Posts: 6515
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: ContentDB CLI Client

by rubenwardy » Post

I've split out the unrelated discussion to viewtopic.php?f=3&t=27390
Renewed Tab (my browser add-on) | Donate | My Twitter | Mods | Minetest Modding Book

Hello profile reader

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests