[Library] Python Admin Port Interface

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Xaroth
Engineer
Engineer
Posts: 103
Joined: 01 May 2006 09:09

[Library] Python Admin Port Interface

Post by Xaroth »

Right, I've been working on this for a while, but seeing most of it should be working, time to show it to the greater public.


LibOTTDAdmin

The interface is fairly straightforward, it's a wrapper around python's socket, providing a neat simple interface to send and receive packets as used in the OpenTTD Admin Port.

Most of the code should guide itself, the AdminConnection consists of some functionality to easily build your own code on top of it, for stuff like website interfaces, irc bots and whatnot.

Make sure to read up on the documentation as provided in the openttd repository.

Questions, ideas, gimme a prod on irc

Patches, suggested changes... prod me on irc.


Code, downloads and revision log: https://bitbucket.org/Xaroth/libottdadmin/overview

enjoy
Lead Manager of OpenDUNE
dihedral
Tycoon
Tycoon
Posts: 1053
Joined: 14 Feb 2007 17:48

Re: [Library] Python Admin Port Interface

Post by dihedral »

congratulations :-)
i already loved what you showed to me a few weeks ago.
Xaroth
Engineer
Engineer
Posts: 103
Joined: 01 May 2006 09:09

Re: [Library] Python Admin Port Interface

Post by Xaroth »

And after years of idling planetmaker decided to ping me... so I managed to get off of my lazy ass and rebuild it

The code is now on Github: https://github.com/Xaroth/libottdadmin2
Lead Manager of OpenDUNE
Xaroth
Engineer
Engineer
Posts: 103
Joined: 01 May 2006 09:09

Re: [Library] Python Admin Port Interface

Post by Xaroth »

I added a new tool to the library, openttd-admin.py ..

In the basics it's a curses-like interface (so text-only) around libottdadmin2, so you can connect to servers and interact with them as if you were on the console of that server.

Chat functions both ways, you will be able to see all chat, and chat globally or directed to a player or team
Rcon is obviously available, and I plan on adding some helper features to the program.

Furthermore, there are commands for showing all clients, all companies, and a run-down of economy, vehicle and station stats for all companies.

openttd-admin.py can technically work from the source dir, however, it's advised to install the library fully. it also requires urwid (which can be installed through pip as well)

[edit] openttd-admin.py in action:

Image
Lead Manager of OpenDUNE
kaspaa
Engineer
Engineer
Posts: 8
Joined: 19 Apr 2013 14:25

Re: [Library] Python Admin Port Interface

Post by kaspaa »

Xaroth wrote:And after years of idling planetmaker decided to ping me... so I managed to get off of my lazy ass and rebuild it

Champion.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests