A launcher for tilde.town commands both official and community-supported
This repository has been archived on 2020-06-12. You can view files and clone it, but cannot push or open issues/pull-requests.
Go to file
vilmibm b8e66a1924 this seems fine 2021-01-21 23:47:10 +00:00
.gitignore Initial commit 2020-06-08 16:02:27 +00:00
LICENSE Initial commit 2020-06-08 16:02:27 +00:00
README.md mark off a todo 2020-06-12 21:44:32 +00:00
go.mod add stuff 2020-06-08 16:04:41 +00:00
go.sum add stuff 2020-06-08 16:04:41 +00:00
main.go this seems fine 2021-01-21 23:47:10 +00:00

README.md

This is an implementation of an idea we discussed a while ago; a launcher for town-specific commands.

The idea is to put town commands in one of three places:

  • /town/launcher/core
  • /town/launcher/contrib
  • /town/launcher/admin

and pair each command with a corresponding .yml file.

For example, the aup command is a simple wrapper around elinks that opens our code of conduct. I put the executable aup in /town/launcher/core and matched it with /town/launcher/aup.yml. The purpose of the yaml file is to provide documentation for your executable, so aup.yml looks like:

shortDesc: View the town's Acceptable Use Policy
longDesc: |
  This command will open our code of conduct, a type of document that evokes the Acceptable Use
  Policies that governed servers like this in the past. It will open the elinks browser to a
  page on the wiki.  
examples: |
  $ town aup           # open the aup
  $ town aup --rainbow # open the aup with rainbow colors  
maintainer: vilmibm

and using the launcher is like:

 $ town aup
 $ town aup --rainbow
 $ town writo
 $ town admin ban vilmibm

You can see all the commands with town help as well as their descriptions; town help aup would show you the docs from aup.yml.

I'd love feedback on this approach while I wrap up this implementation. I can put it up on git.tilde.town if anyone desires to collaborate (and let me know if you want a git.tilde.town account).

Remaining TODOs:

  • make tab completion available for common shells
  • document / script submitting a tool for inclusion in contrib
  • make little wrappers for things like mail and chat
  • fix arg passing
  • test with a command that makes use of stdin/stdout
  • add all existing commands to the buckets
  • add to users' paths