summaryrefslogtreecommitdiff
path: root/PLAN.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-02-17 22:03:10 +0200
committerPaul Buetow <paul@buetow.org>2026-02-17 22:03:10 +0200
commit5f53f241189af3fceb26395af383809cd4fa3bf0 (patch)
tree4ffabc358ec85ed1da425f72e1357e80f340b2c1 /PLAN.md
parenta8cb28d2257cff652fc4f8a9768b66b9d69fd68a (diff)
fix: improve LinkedIn API posting and authenticationv1.2.4
- Add token validation before using cached credentials to prevent stale token issues - Add proper error handling for image upload initialization with helpful 426 messages - Skip data URI images instead of attempting to download them - Update default LinkedIn API version to 202601 (January 2026) - latest active version - Fix re-authentication flow for expired tokens Amp-Thread-ID: https://ampcode.com/threads/T-019c6d28-4526-7738-b593-9bd584baa478 Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'PLAN.md')
-rw-r--r--PLAN.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/PLAN.md b/PLAN.md
new file mode 100644
index 0000000..26caa90
--- /dev/null
+++ b/PLAN.md
@@ -0,0 +1,26 @@
+# Plan
+
+- Add a new flag `--stats` which would only print out the stats for all social networks, but do nothing else.
+
+## Implementation Outline for `--stats` flag: (ALL DONE)
+
+1. **Modify `internal/main.go`**: (DONE)
+ * **Define the `--stats` flag**: Add `statsOnly := flag.Bool("stats", false, "Print statistics for all social networks and exit")` near other flag definitions.
+ * **Populate `config.Args`**: Assign `*statsOnly` to `args.StatsOnly` after `flag.Parse()`.
+ * **Conditional logic**: After `flag.Parse()` and before calling `run(ctx, args)`, add a check:
+ ```go
+ if args.StatsOnly {
+ // Call the new function to print all stats
+ schedule.PrintAllStats(args)
+ return // Exit after printing stats
+ }
+ ```
+
+2. **Modify `internal/config/args.go`**: (DONE)
+ * Add `StatsOnly bool` to the `Args` struct.
+
+3. **Modify `internal/schedule/stats.go`**: (DONE)
+ * **Create a new public function `PrintAllStats(args config.Args)`**:
+ * This function will iterate through `args.Platforms`.
+ * For each platform, it will call `newStats` to gather the statistics.
+ * Then, it will call `stats.RenderTable` to display the statistics for that platform. \ No newline at end of file