setconfig command
Ted Unangst tedu@tedunangst.com
Fri, 20 May 2022 18:48:40 -0400
2 files changed,
17 insertions(+),
1 deletions(-)
M
docs/honk.8
→
docs/honk.8
@@ -197,9 +197,15 @@ After unzipping the data archive, navigate to the tweet_media directory
and unzip any zip files contained within. .Dl ./honk import username twitter source-directory .Ss Advanced Options +Advanced configuration values may be set by running the +.Ic setconfig Ar key value +command. +For example, to increase the fast timeout value from 5 seconds to 10: +.Dl ./honk setconfig fasttimeout 10 +.Pp To support separate mentions without a subdomain, e.g. @user@example.com and https://honk.example.com/u/user, -add a ('masqname', 'example.com') row to the config table of the database. +set config key 'masqname' to 'example.com'. Route .Pa /.well-known/webfinger from the top domain to honk.
M
honk.go
→
honk.go
@@ -344,6 +344,16 @@ setconfig("devel", 0)
default: elog.Fatal("argument must be on or off") } + case "setconfig": + if len(args) != 3 { + elog.Fatal("need an argument: setconfig key val") + } + var val interface{} + var err error + if val, err = strconv.Atoi(args[2]); err != nil { + val = args[2] + } + setconfig(args[1], val) case "adduser": adduser() case "deluser":