From 84545dd9f192cac2ece9209292b3701959d09d02 Mon Sep 17 00:00:00 2001 From: bouncepaw Date: Sat, 23 Jan 2021 21:37:29 +0500 Subject: [PATCH] Rename -user-tree to -user-hypha --- README.md | 2 +- flag.go | 6 +++--- history/history.go | 2 +- history/information.go | 2 +- templates/common.qtpl | 2 +- templates/common.qtpl.go | 2 +- templates/http_stuff.qtpl | 2 +- util/util.go | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index cc79e78..d672a18 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Options: Port to serve the wiki at (default "1737") -url string URL at which your wiki can be found. Used to generate feeds (default "http://0.0.0.0:$port") - -user-tree string + -user-hypha string Hypha which is a superhypha of all user pages (default "u") ``` diff --git a/flag.go b/flag.go index e7ef67d..f3add19 100644 --- a/flag.go +++ b/flag.go @@ -15,7 +15,7 @@ func init() { flag.StringVar(&util.HomePage, "home", "home", "The home page name") flag.StringVar(&util.SiteNavIcon, "icon", "🍄", "What to show in the navititle in the beginning, before the colon") flag.StringVar(&util.SiteName, "name", "wiki", "What is the name of your wiki") - flag.StringVar(&util.UserTree, "user-tree", "u", "Hypha which is a superhypha of all user pages") + flag.StringVar(&util.UserHypha, "user-hypha", "u", "Hypha which is a superhypha of all user pages") flag.StringVar(&util.AuthMethod, "auth-method", "none", "What auth method to use. Variants: \"none\", \"fixed\"") flag.StringVar(&util.FixedCredentialsPath, "fixed-credentials-path", "mycocredentials.json", "Used when -auth-method=fixed. Path to file with user credentials.") } @@ -44,8 +44,8 @@ func parseCliArgs() { log.Fatal("Error: you must use a proper name for the homepage") } - if !isCanonicalName(util.UserTree) { - log.Fatal("Error: you must use a proper name for user tree") + if !isCanonicalName(util.UserHypha) { + log.Fatal("Error: you must use a proper name for user hypha") } switch util.AuthMethod { diff --git a/history/history.go b/history/history.go index dcd6268..f3d117d 100644 --- a/history/history.go +++ b/history/history.go @@ -118,7 +118,7 @@ func (rev Revision) RecentChangesEntry() (html string) {
  • %[2]s
  • %[5]s
  • %[6]s
  • -`, rev.TimeString(), rev.Hash, util.UserTree, rev.Username, rev.HyphaeLinks(), rev.Message) +`, rev.TimeString(), rev.Hash, util.UserHypha, rev.Username, rev.HyphaeLinks(), rev.Message) } return fmt.Sprintf(`
  • diff --git a/history/information.go b/history/information.go index ef60b32..f2c0aad 100644 --- a/history/information.go +++ b/history/information.go @@ -142,7 +142,7 @@ func (rev *Revision) asHistoryEntry(hyphaName string) (html string) { author := "" if rev.Username != "anon" { author = fmt.Sprintf(` - by
  • Login {% else %} - {%s u.Name %} + {%s u.Name %} {% endif %}
  • {% endif %} diff --git a/templates/common.qtpl.go b/templates/common.qtpl.go index a30040d..5895b1e 100644 --- a/templates/common.qtpl.go +++ b/templates/common.qtpl.go @@ -166,7 +166,7 @@ func streamuserMenuHTML(qw422016 *qt422016.Writer, u *user.User) { qw422016.N().S(` 0 -%} {%- endif -%} - {%s username %}{%- endfor -%} + {%s username %}{%- endfor -%} {%- else -%}
  • This wiki does not use authorization
  • {%- endif -%} diff --git a/util/util.go b/util/util.go index 5bbf9d7..6fc2ca0 100644 --- a/util/util.go +++ b/util/util.go @@ -14,7 +14,7 @@ var ( SiteNavIcon string SiteName string WikiDir string - UserTree string + UserHypha string AuthMethod string FixedCredentialsPath string )