Initical Commit

This commit is contained in:
Steve White 2025-01-27 22:26:11 -06:00
parent 7fd890828e
commit 175a4f57c6
4 changed files with 10 additions and 5 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*.md
*.json
papers

2
go.mod
View File

@ -7,5 +7,5 @@ toolchain go1.23.5
require (
gitea.r8z.us/stwhite/arxiva v0.1.0
gitea.r8z.us/stwhite/paperformatter v0.1.3
gitea.r8z.us/stwhite/paperprocessor v0.1.5
gitea.r8z.us/stwhite/paperprocessor v0.1.8
)

4
go.sum
View File

@ -2,5 +2,5 @@ gitea.r8z.us/stwhite/arxiva v0.1.0 h1:v4rRQazWDQN6A4jqUjvJoTuGVlxHH9ee1SU/vculBN
gitea.r8z.us/stwhite/arxiva v0.1.0/go.mod h1:V+xRJF205br/E1NM15S0htyfPnG8FERaluMTs97DcGM=
gitea.r8z.us/stwhite/paperformatter v0.1.3 h1:Z8yIdfCmQ+c5A5To+Y3XPHNOdK5B/q5VqBPZkmYqKPc=
gitea.r8z.us/stwhite/paperformatter v0.1.3/go.mod h1:As2zIT0NSsMirYqdvIfIXXxIHOcdsHANhnh0VNcAluQ=
gitea.r8z.us/stwhite/paperprocessor v0.1.5 h1:c9HYWblP0D7mz0/mfcg4j98j1cisrcUPuQFSWuGpsIQ=
gitea.r8z.us/stwhite/paperprocessor v0.1.5/go.mod h1:0wHe7XjtQICFrPKbO53SVrUiVw9yi8GOGo9J7znpo+E=
gitea.r8z.us/stwhite/paperprocessor v0.1.8 h1:pV810JZQFhuKcle4ix7stUz12LZNIgFCVWxSC/RYWpE=
gitea.r8z.us/stwhite/paperprocessor v0.1.8/go.mod h1:0wHe7XjtQICFrPKbO53SVrUiVw9yi8GOGo9J7znpo+E=

View File

@ -14,9 +14,11 @@ import (
"gitea.r8z.us/stwhite/paperprocessor"
)
// sanitizeFilename replaces invalid filename characters
// sanitizeFilename replaces invalid filename characters to match arxiva's sanitization
func sanitizeFilename(s string) string {
return strings.ReplaceAll(s, ":", "_")
s = strings.ReplaceAll(s, ":", "_")
s = strings.ReplaceAll(s, " ", "_")
return s
}
// isValidDate checks if the date string is in YYYYMMDD format