summaryrefslogtreecommitdiff
path: root/internal/queue/queue.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-11-19 10:56:44 +0200
committerPaul Buetow <paul@buetow.org>2024-11-19 10:56:44 +0200
commit744c3b70fa590345f6c1de715e2a572f184091c4 (patch)
treed198cf86b5afe2fbc7af42fdb0b1262c2f5bc30c /internal/queue/queue.go
parentf2318c4946db3ffd60a2b955e47660c2f77007df (diff)
initial inline to file path extraction
Diffstat (limited to 'internal/queue/queue.go')
-rw-r--r--internal/queue/queue.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/internal/queue/queue.go b/internal/queue/queue.go
index de238f0..40cc084 100644
--- a/internal/queue/queue.go
+++ b/internal/queue/queue.go
@@ -35,12 +35,11 @@ func queueEntries(args config.Args) error {
}
for filePath := range ch {
- en, err := entry.New(filePath)
- if err != nil {
+ if filePath, err = extractInlineTags(filePath); err != nil {
return err
}
- // Extract any inline tags, if any!
- if err := en.ExtractInlineTags(); err != nil {
+ en, err := entry.New(filePath)
+ if err != nil {
return err
}
if en.HasTag("ask") {
@@ -48,6 +47,7 @@ func queueEntries(args config.Args) error {
return err
}
}
+
destPath := fmt.Sprintf("%s/db/%s.%s.queued", args.GosDir, filepath.Base(en.Path), timestamp.Now())
if args.DryRun {
colour.Infoln("Not queueing entry", en.Path, "to", destPath, "as dry-run mode enabled")