diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1f9473d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.md +*.json +papers diff --git a/go.mod b/go.mod index 38be507..dd957f2 100644 --- a/go.mod +++ b/go.mod @@ -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 ) diff --git a/go.sum b/go.sum index 021fbe3..b882b57 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/papers.go b/papers.go index 2589392..ca4cf7a 100644 --- a/papers.go +++ b/papers.go @@ -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