summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-05-17 17:16:05 +0300
committerPaul Buetow <paul@buetow.org>2025-05-17 17:16:05 +0300
commitdca352a42795b5e4b7da11d47d099de92e08bd89 (patch)
treeb1b2e823ed61358ce9c10dd8e6dc318bed5f8144
parent070bde0567b24c67ab4f8556d8ea2f04c055d2d9 (diff)
add noop
-rw-r--r--internal/main.go2
-rw-r--r--internal/platforms/platform.go5
2 files changed, 6 insertions, 1 deletions
diff --git a/internal/main.go b/internal/main.go
index c1b72d6..de90179 100644
--- a/internal/main.go
+++ b/internal/main.go
@@ -22,7 +22,7 @@ func Main(composeModeDefault bool) {
browser := flag.String("browser", "firefox", "OAuth2 browser")
configPath := filepath.Join(os.Getenv("HOME"), ".config/gos/gos.json")
configPath = *flag.String("configPath", configPath, "Gos' config file path")
- platforms := flag.String("platforms", "Mastodon:500,LinkedIn:1000", "Platforms enabled plus their post size limits")
+ platforms := flag.String("platforms", "Mastodon:500,LinkedIn:1000,Noop:2000", "Platforms enabled plus their post size limits")
target := flag.Int("target", 2, "How many posts per week are the target?")
minQueued := flag.Int("minQueued", 4, "Minimum of queued items until printing a warn message!")
maxDaysQueued := flag.Int("maxDaysQueued", 1000, "Maximum days worth of queued posts until target++ and pauseDays--")
diff --git a/internal/platforms/platform.go b/internal/platforms/platform.go
index 874c35d..99169f1 100644
--- a/internal/platforms/platform.go
+++ b/internal/platforms/platform.go
@@ -10,6 +10,7 @@ import (
"codeberg.org/snonux/gos/internal/entry"
"codeberg.org/snonux/gos/internal/platforms/linkedin"
"codeberg.org/snonux/gos/internal/platforms/mastodon"
+ "codeberg.org/snonux/gos/internal/platforms/noop"
)
type Platform string
@@ -19,6 +20,8 @@ var aliases = map[string]string{
"li": "linkedin",
"mastodon": "mastodon",
"ma": "mastodon",
+ "no": "noop",
+ "noop": "noop",
"xcom": "xcom",
"x": "xcom",
"twitter": "xcom",
@@ -45,6 +48,8 @@ func (p Platform) Post(ctx context.Context, args config.Args, sizeLimit int, en
err = mastodon.Post(ctx, args, sizeLimit, en)
case "linkedin":
err = linkedin.Post(ctx, args, sizeLimit, en)
+ case "noop":
+ err = noop.Post(ctx, args, sizeLimit, en)
default:
err = fmt.Errorf("Platform '%s' (not yet) implemented", p)
}