all repos — honk @ 8a01b26d77b4022a9d339d5fd2ae74a43b196d69

my fork of honk

setconfig command
Ted Unangst tedu@tedunangst.com
Fri, 20 May 2022 18:48:40 -0400
commit

8a01b26d77b4022a9d339d5fd2ae74a43b196d69

parent

2bca25d49d2254186c6d55dd6ef01735350511de

2 files changed, 17 insertions(+), 1 deletions(-)

jump to
M docs/honk.8docs/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.gohonk.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":