ayaports/user/scantopl/0001-change-prefix-to-scan.patch
build@apk-groulx f77e3588dc user/insaned: new aport
user/lua-aports: upgrade
user/paperless-ng: upgrade + openrc
user/paperless-ngx: new aport
user/py3-anyio: new aport
user/py3-dateparser: upgrade
user/py3-pdf2image: new aport
user/py3-pyaml: new aport
user/py3-pytz: new aport
user/py3-pyyaml: new aport
user/py3-tzdata: new aport
user/py3-tzlocal: new aport
user/rmfakecloud: upgrade
user/scanbd: new aport
user/scantopl: new aport
user/xinetd: new aport
2022-08-15 15:51:38 +00:00

34 lines
1.2 KiB
Diff

From e2e14ba3ee95315ec1fa8ffeea693349ae120deb Mon Sep 17 00:00:00 2001
From: "build@apk-groulx" <build@apk-groulx.praxis>
Date: Sun, 31 Jul 2022 16:43:19 +0000
Subject: [PATCH 1/1] change-prefix-to-scan
---
scantopl.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scantopl.go b/scantopl.go
index e19ac9f..20bc6c7 100644
--- a/scantopl.go
+++ b/scantopl.go
@@ -20,7 +20,7 @@ func FilenameWithoutExtension(fn string) string {
}
func TitleFromFileName(fn string) string {
- return strings.TrimPrefix(FilenameWithoutExtension(fn), "pl_")
+ return strings.TrimPrefix(FilenameWithoutExtension(fn), "scan_")
}
func createForm(form map[string]string) (string, io.Reader, error) {
@@ -101,7 +101,7 @@ func main() {
return
}
//log.Println("event:", event)
- if event.Op&fsnotify.Create == fsnotify.Create && strings.HasPrefix(path.Base(event.Name), "pl_") {
+ if event.Op&fsnotify.Create == fsnotify.Create && strings.HasPrefix(path.Base(event.Name), "scan_") {
//little pause to ensure the write operation is finished
time.Sleep(1 * time.Second)
log.Info("New file to upload:", event.Name)
--
2.36.2