Skip to content

Commit d371863

Browse files
committed
Add tomhow to list of public moderators
1 parent 656cd1e commit d371863

File tree

6 files changed

+59
-35
lines changed

6 files changed

+59
-35
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
_WIP_
66

7-
- Bump Go to 1.23
7+
- Added a moderator indicator to `tomhow`
8+
- Bump Go to 1.24
89

910
## 3.7
1011

app/app.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ package app
22

33
const (
44
Name = "circumflex"
5-
Version = "3.8-dev"
5+
Version = "3.8"
66
MinimumLessVersion = 633
77
)

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/charmbracelet/glamour v0.9.1
1313
github.com/charmbracelet/lipgloss v1.1.0
1414
github.com/go-resty/resty/v2 v2.16.5
15-
github.com/go-shiori/go-readability v0.0.0-20241012063810-92284fa8a71f
15+
github.com/go-shiori/go-readability v0.0.0-20250217085726-9f5bf5ca7612
1616
github.com/jedib0t/go-pretty/v6 v6.6.7
1717
github.com/logrusorgru/aurora/v3 v3.0.0
1818
github.com/muesli/reflow v0.3.0
@@ -24,14 +24,14 @@ require (
2424
)
2525

2626
require (
27-
github.com/alecthomas/chroma/v2 v2.15.0 // indirect
27+
github.com/alecthomas/chroma/v2 v2.16.0 // indirect
2828
github.com/andybalholm/cascadia v1.3.3 // indirect
2929
github.com/araddon/dateparse v0.0.0-20210429162001-6b43995a97de // indirect
3030
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
3131
github.com/aymerick/douceur v0.2.0 // indirect
32-
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect
32+
github.com/charmbracelet/colorprofile v0.3.0 // indirect
3333
github.com/charmbracelet/x/ansi v0.8.0 // indirect
34-
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd // indirect
34+
github.com/charmbracelet/x/cellbuf v0.0.13 // indirect
3535
github.com/charmbracelet/x/term v0.2.1 // indirect
3636
github.com/davecgh/go-spew v1.1.1 // indirect
3737
github.com/dlclark/regexp2 v1.11.5 // indirect
@@ -54,7 +54,7 @@ require (
5454
github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
5555
github.com/yuin/goldmark v1.7.8 // indirect
5656
github.com/yuin/goldmark-emoji v1.0.5 // indirect
57-
golang.org/x/net v0.36.0 // indirect
57+
golang.org/x/net v0.38.0 // indirect
5858
golang.org/x/sync v0.12.0 // indirect
5959
golang.org/x/sys v0.31.0 // indirect
6060
golang.org/x/term v0.30.0 // indirect

go.sum

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ github.com/alecthomas/assert/v2 v2.11.0 h1:2Q9r3ki8+JYXvGsDyBXwH3LcJ+WK5D0gc5E8v
99
github.com/alecthomas/assert/v2 v2.11.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
1010
github.com/alecthomas/chroma/v2 v2.15.0 h1:LxXTQHFoYrstG2nnV9y2X5O94sOBzf0CIUpSTbpxvMc=
1111
github.com/alecthomas/chroma/v2 v2.15.0/go.mod h1:gUhVLrPDXPtp/f+L1jo9xepo9gL4eLwRuGAunSZMkio=
12+
github.com/alecthomas/chroma/v2 v2.16.0 h1:QC5ZMizk67+HzxFDjQ4ASjni5kWBTGiigRG1u23IGvA=
13+
github.com/alecthomas/chroma/v2 v2.16.0/go.mod h1:RVX6AvYm4VfYe/zsk7mjHueLDZor3aWCNE14TFlepBk=
1214
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
1315
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
1416
github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU=
@@ -30,6 +32,8 @@ github.com/charmbracelet/bubbletea v1.3.4 h1:kCg7B+jSCFPLYRA52SDZjr51kG/fMUEoPoZ
3032
github.com/charmbracelet/bubbletea v1.3.4/go.mod h1:dtcUCyCGEX3g9tosuYiut3MXgY/Jsv9nKVdibKKRRXo=
3133
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc h1:4pZI35227imm7yK2bGPcfpFEmuY1gc2YSTShr4iJBfs=
3234
github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc/go.mod h1:X4/0JoqgTIPSFcRA/P6INZzIuyqdFY5rm8tb41s9okk=
35+
github.com/charmbracelet/colorprofile v0.3.0 h1:KtLh9uuu1RCt+Hml4s6Hz+kB1PfV3wi++1h5ia65yKQ=
36+
github.com/charmbracelet/colorprofile v0.3.0/go.mod h1:oHJ340RS2nmG1zRGPmhJKJ/jf4FPNNk0P39/wBPA1G0=
3337
github.com/charmbracelet/glamour v0.9.1 h1:11dEfiGP8q1BEqvGoIjivuc2rBk+5qEXdPtaQ2WoiCM=
3438
github.com/charmbracelet/glamour v0.9.1/go.mod h1:+SHvIS8qnwhgTpVMiXwn7OfGomSqff1cHBCI8jLOetk=
3539
github.com/charmbracelet/lipgloss v1.1.0 h1:vYXsiLHVkK7fp74RkV7b2kq9+zDLoEU4MZoFqR/noCY=
@@ -38,6 +42,8 @@ github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2ll
3842
github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q=
3943
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd h1:vy0GVL4jeHEwG5YOXDmi86oYw2yuYUGqz6a8sLwg0X8=
4044
github.com/charmbracelet/x/cellbuf v0.0.13-0.20250311204145-2c3ea96c31dd/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
45+
github.com/charmbracelet/x/cellbuf v0.0.13 h1:/KBBKHuVRbq1lYx5BzEHBAFBP8VcQzJejZ/IA3iR28k=
46+
github.com/charmbracelet/x/cellbuf v0.0.13/go.mod h1:xe0nKWGd3eJgtqZRaN9RjMtK7xUYchjzPr7q6kcvCCs=
4147
github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b h1:MnAMdlwSltxJyULnrYbkZpp4k58Co7Tah3ciKhSNo0Q=
4248
github.com/charmbracelet/x/exp/golden v0.0.0-20240815200342-61de596daa2b/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U=
4349
github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=
@@ -56,6 +62,8 @@ github.com/go-shiori/dom v0.0.0-20230515143342-73569d674e1c h1:wpkoddUomPfHiOziH
5662
github.com/go-shiori/dom v0.0.0-20230515143342-73569d674e1c/go.mod h1:oVDCh3qjJMLVUSILBRwrm+Bc6RNXGZYtoh9xdvf1ffM=
5763
github.com/go-shiori/go-readability v0.0.0-20241012063810-92284fa8a71f h1:cypj7SJh+47G9J3VCPdMzT3uWcXWAWDJA54ErTfOigI=
5864
github.com/go-shiori/go-readability v0.0.0-20241012063810-92284fa8a71f/go.mod h1:YWa00ashoPZMAOElrSn4E1cJErhDVU6PWAll4Hxzn+w=
65+
github.com/go-shiori/go-readability v0.0.0-20250217085726-9f5bf5ca7612 h1:BYLNYdZaepitbZreRIa9xeCQZocWmy/wj4cGIH0qyw0=
66+
github.com/go-shiori/go-readability v0.0.0-20250217085726-9f5bf5ca7612/go.mod h1:wgqthQa8SAYs0yyljVeCOQlZ027VW5CmLsbi9jWC08c=
5967
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f h1:3BSP1Tbs2djlpprl7wCLuiqMaUh5SJkkzI2gDs+FgLs=
6068
github.com/gogs/chardet v0.0.0-20211120154057-b7413eaefb8f/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14=
6169
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
@@ -162,6 +170,8 @@ golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
162170
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
163171
golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
164172
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
173+
golang.org/x/net v0.38.0 h1:vRMAPTMaeGqVhG5QyLJHqNDwecKTomGeqbnfZyKlBI8=
174+
golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8=
165175
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
166176
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
167177
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

share/man/clx.1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
.\" Title: clx
33
.\" Author: [see the "AUTHOR(S)" section]
44
.\" Generator: Asciidoctor 2.0.23
5-
.\" Date: 2024-07-28
5+
.\" Date: 2025-04-05
66
.\" Manual: circumflex
7-
.\" Source: circumflex 3.7
7+
.\" Source: circumflex 3.8
88
.\" Language: English
99
.\"
10-
.TH "CLX" "1" "2024-07-28" "circumflex 3.7" "circumflex"
10+
.TH "CLX" "1" "2025-04-05" "circumflex 3.8" "circumflex"
1111
.ie \n(.g .ds Aq \(aq
1212
.el .ds Aq '
1313
.ss \n[.ss] 0

tree/tree.go

Lines changed: 38 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -255,36 +255,49 @@ func incrementNewCommentsCount(comments *item.Item, newCommentsSoFar *int, lastV
255255
return *newCommentsSoFar
256256
}
257257

258-
func getAuthorLabel(author, originalPoster, parentPoster string, enableNerdFonts bool) string {
259-
if enableNerdFonts {
260-
authorLabel := nerdfonts.Author + " "
261-
262-
switch author {
263-
case "dang":
264-
return Green(authorLabel).String()
265-
266-
case originalPoster:
267-
return Red(authorLabel).String()
258+
var mods = []string{"dang", "tomhow"}
268259

269-
case parentPoster:
270-
return Magenta(authorLabel).String()
271-
272-
default:
273-
return ""
274-
}
260+
func getAuthorLabel(author, originalPoster, parentPoster string, enableNerdFonts bool) string {
261+
label := computeLabel(author, originalPoster, parentPoster, enableNerdFonts)
262+
if label == "" {
263+
return ""
275264
}
265+
return colorizeLabel(author, originalPoster, parentPoster, label)
266+
}
276267

277-
switch author {
278-
case "dang":
279-
return Green("mod ").String()
280-
281-
case originalPoster:
282-
return Red("OP ").String()
283-
284-
case parentPoster:
285-
return Magenta("PP ").String()
268+
func computeLabel(author, originalPoster, parentPoster string, nerdFonts bool) string {
269+
switch {
270+
case nerdFonts:
271+
return nerdfonts.Author + " "
272+
case isMod(author):
273+
return "mod "
274+
case author == originalPoster:
275+
return "OP "
276+
case author == parentPoster:
277+
return "PP "
278+
default:
279+
return ""
280+
}
281+
}
286282

283+
func colorizeLabel(author, originalPoster, parentPoster, label string) string {
284+
switch {
285+
case isMod(author):
286+
return Green(label).String()
287+
case author == originalPoster:
288+
return Red(label).String()
289+
case author == parentPoster:
290+
return Magenta(label).String()
287291
default:
288292
return ""
289293
}
290294
}
295+
296+
func isMod(author string) bool {
297+
for _, mod := range mods {
298+
if author == mod {
299+
return true
300+
}
301+
}
302+
return false
303+
}

0 commit comments

Comments
 (0)