diff options
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | internal/queue/queue.go | 4 | ||||
| -rw-r--r-- | internal/tags/share.go | 4 |
3 files changed, 9 insertions, 3 deletions
@@ -15,9 +15,11 @@ I used Buffer.com to schedule and post my social media messages for a long time. * OAuth2 authentication for LinkedIn. * Image previews for LinkedIn posts. +Besides Mastodon and LinkedIn, there is also a pseudo-platform called "Noop," which exists solely to keep track of things (e.g., for later Gemini summaries) without actually posting anything to a real social media platform. + ## Installation -## Prequisites +## Prerequisites The prerequisites are: diff --git a/internal/queue/queue.go b/internal/queue/queue.go index 397c438..4a1b266 100644 --- a/internal/queue/queue.go +++ b/internal/queue/queue.go @@ -23,7 +23,7 @@ func Run(args config.Args) error { if err := queueEntries(args); err != nil { return err } - if err := queuePlatforms(args); err != nil { + if err := queueEntriesToPlatforms(args); err != nil { return err } return nil @@ -73,7 +73,7 @@ func queueEntries(args config.Args) error { // Queue all ./db/queued/*.txt.STAMP.queued into ./db/platforms/PLATFORM/*.txt.STAMP.queued // for each PLATFORM -func queuePlatforms(args config.Args) error { +func queueEntriesToPlatforms(args config.Args) error { dbDir := filepath.Join(args.GosDir, "db") ch, err := oi.ReadDirCh(dbDir, find(dbDir, ".queued")) if err != nil { diff --git a/internal/tags/share.go b/internal/tags/share.go index e58661a..a3d48e5 100644 --- a/internal/tags/share.go +++ b/internal/tags/share.go @@ -29,11 +29,15 @@ func NewShare(args config.Args, tags map[string]struct{}) (Share, error) { } } + // If there is no share tag, by default include all platforms but "Noop" if len(s.Includes) == 0 { for platformStr := range args.Platforms { if slices.Contains(s.Excludes, strings.ToLower(platformStr)) { continue } + if platformStr == "Noop" { + continue + } s.Includes = append(s.Includes, strings.ToLower(platformStr)) } } |
