From 585e6c399b2aaae49e5bbf9eeaed309b6a77f568 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 9 Mar 2022 11:16:19 +0300 Subject: [PATCH] More correct spelling --- cmd/warc-extract/main.go | 4 ++-- doc/index.texi | 2 +- doc/warcs.texi | 2 +- fifos/warcs.go | 2 +- rounds/redirectHTML.go | 2 +- warc/uris.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/warc-extract/main.go b/cmd/warc-extract/main.go index 560aefa..9ebc641 100644 --- a/cmd/warc-extract/main.go +++ b/cmd/warc-extract/main.go @@ -34,7 +34,7 @@ import ( func main() { uri := flag.String("uri", "", "URI to extract, if specified") hdr := flag.Bool("hdr", false, "Also extract WARC's header") - idx := flag.Bool("idx", false, "Save WARC indexes") + idx := flag.Bool("idx", false, "Save WARC indices") recompress := flag.Bool("for-enzstd", false, "Output for enzstd utility") flag.Parse() log.SetFlags(log.Lshortfile) @@ -89,7 +89,7 @@ func main() { } log.Println("added", p, len(warc.WARCs[p]), "URIs") if *idx { - if err := warc.SaveIndexes(); err != nil { + if err := warc.SaveIndices(); err != nil { log.Fatalln(err) } } diff --git a/doc/index.texi b/doc/index.texi index ae61d9f..6ffbfea 100644 --- a/doc/index.texi +++ b/doc/index.texi @@ -14,7 +14,7 @@ Copyright @copyright{} 2021-2022 @email{stargrave@@stargrave.org, Sergey Matveev flexible HTTP/HTTPS proxy server, TLS terminator, X.509 TOFU manager, @url{https://en.wikipedia.org/wiki/Web_ARChive, WARC} and @url{https://en.wikipedia.org/wiki/Gemini_(protocol), geminispace} -browser, written on @url{https://golang.org/, Go} with following +browser, written on @url{https://go.dev/, Go} with following capabilities: @itemize diff --git a/doc/warcs.texi b/doc/warcs.texi index b86e3f3..a3bfbce 100644 --- a/doc/warcs.texi +++ b/doc/warcs.texi @@ -81,7 +81,7 @@ without expensive WARC parsing. @code{redo warc-extract.cmd} utility uses exactly the same code for parsing WARCs. It can be used to check if WARCs can be successfully loaded, to list all URIs after, to extract some specified URI and to -pre-generate @file{.idx.gob} indexes. +pre-generate @file{.idx.gob} indices. @example $ warc-extract.cmd -idx \ diff --git a/fifos/warcs.go b/fifos/warcs.go index 46b6fda..7e10c93 100644 --- a/fifos/warcs.go +++ b/fifos/warcs.go @@ -48,7 +48,7 @@ func addWARC(p string) { for { for _, warcPath := range readLinesFromFIFO(p) { if warcPath == "SAVE" { - if err := warc.SaveIndexes(); err != nil { + if err := warc.SaveIndices(); err != nil { log.Printf("%s: can not save index %s: %+v\n", p, warcPath, err) } continue diff --git a/rounds/redirectHTML.go b/rounds/redirectHTML.go index 2e286d3..e20f7b2 100644 --- a/rounds/redirectHTML.go +++ b/rounds/redirectHTML.go @@ -48,7 +48,7 @@ func isFeeder(req *http.Request) bool { if strings.Contains(req.Header.Get("User-Agent"), "newsboat/") { return true } - if strings.Contains(req.Header.Get("User-Agent"), "go.stargrave.org-feeder/") { + if strings.Contains(req.Header.Get("User-Agent"), "stargrave.org-feeder/") { return true } return false diff --git a/warc/uris.go b/warc/uris.go index d5f5139..03f5678 100644 --- a/warc/uris.go +++ b/warc/uris.go @@ -123,7 +123,7 @@ func Add(warcPath string) error { return nil } -func SaveIndexes() error { +func SaveIndices() error { WARCsM.RLock() defer WARCsM.RUnlock() for warcPath, uris := range WARCs { -- 2.44.0