summaryrefslogtreecommitdiff
path: root/gemfeed
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-03-04 21:23:07 +0200
committerPaul Buetow <paul@buetow.org>2025-03-04 21:23:07 +0200
commita873115451e1f82b4818ed27a27f584353c545d3 (patch)
tree486ba85973e58438b5076a15af215b9038397184 /gemfeed
parent771aa626a554f1df99760c57918b2160c675be1f (diff)
Update content for gemtext
Diffstat (limited to 'gemfeed')
-rw-r--r--gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi337
-rw-r--r--gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi.tpl313
-rw-r--r--gemfeed/atom.xml523
-rw-r--r--gemfeed/index.gmi1
-rw-r--r--gemfeed/sharing-on-social-media-with-gos/gos-screenshot.pngbin0 -> 137561 bytes
-rw-r--r--gemfeed/sharing-on-social-media-with-gos/gos.pngbin0 -> 3861 bytes
6 files changed, 1039 insertions, 135 deletions
diff --git a/gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi b/gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi
new file mode 100644
index 00000000..0637ea46
--- /dev/null
+++ b/gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi
@@ -0,0 +1,337 @@
+# Sharing on Social Media with Gos v1.0.0
+
+> Published at 2025-03-04T21:22:07+02:00
+
+As you may have noticed, I like to share on Mastodon and LinkedIn all the technical things I find interesting, and this blog post is technically all about that.
+
+=> ./sharing-on-social-media-with-gos/gos.png Gos logo
+
+## Table of Contents
+
+* ⇢ Sharing on Social Media with Gos v1.0.0
+* ⇢ ⇢ Introduction
+* ⇢ ⇢ Gos features
+* ⇢ ⇢ Installation
+* ⇢ ⇢ ⇢ Prequisites
+* ⇢ ⇢ ⇢ Build and install
+* ⇢ ⇢ Configuration
+* ⇢ ⇢ ⇢ Configuration fields
+* ⇢ ⇢ ⇢ Automatically managed fields
+* ⇢ ⇢ Invoking Gos
+* ⇢ ⇢ ⇢ Common flags
+* ⇢ ⇢ ⇢ Examples
+* ⇢ ⇢ Composing messages to be posted
+* ⇢ ⇢ ⇢ Basic structure of a message file
+* ⇢ ⇢ ⇢ Adding share tags in the filename
+* ⇢ ⇢ ⇢ Using the `prio` tag
+* ⇢ ⇢ ⇢ More tags
+* ⇢ ⇢ ⇢ The `gosc` binary
+* ⇢ ⇢ How queueing works in gos
+* ⇢ ⇢ ⇢ Step-by-step queueing process
+* ⇢ ⇢ ⇢ How message selection works in gos
+* ⇢ ⇢ Post summary as gemini gemtext
+* ⇢ ⇢ Conclusion
+
+## Introduction
+
+Gos is a Go-based replacement (which I wrote) for Buffer.com, providing the ability to schedule and manage social media posts from the command line. It can be run, for example, every time you open a new shell or only once every N hours when you open a new shell.
+
+I used Buffer.com to schedule and post my social media messages for a long time. However, over time, there were more problems with that service, including a slow and unintuitive UI, and the free version only allows scheduling up to 10 messages. At one point, they started to integrate an AI assistant (which would seemingly randomly pop up in separate JavaScript-powered input boxes), and then I had enough and decided I had to build my own social sharing tool—and Gos was born.
+
+=> https://buffer.com
+=> https://codeberg.org/snonux/gos
+
+## Gos features
+
+* Mastodon and LinkedIn support.
+* Dry run mode for testing posts without actually publishing.
+* Configurable via flags and environment variables.
+* Easy to integrate into automated workflows.
+* OAuth2 authentication for LinkedIn.
+* Image previews for LinkedIn posts.
+
+## Installation
+
+### Prequisites
+
+The prerequisites are:
+
+* Go (version 1.24 or later)
+* Supported browsers like Firefox, Chrome, etc for oauth2.
+
+### Build and install
+
+Clone the repository:
+
+```bash
+git clone https://codeberg.org/snonux/gos.git
+cd gos
+```
+
+Build the binaries:
+
+```bash
+go build -o gos ./cmd/gos
+go build -o gosc ./cmd/gosc
+sudo mv gos ~/go/bin
+sudo mv gosc ~/go/bin
+```
+
+Or, if you want to use the `Taskfile`:
+
+```bash
+go-task install
+```
+
+## Configuration
+
+Gos requires a configuration file to store API secrets and OAuth2 credentials for each supported social media platform. The configuration is managed using a Secrets structure, which is stored as a JSON file in `~/.config/gos/gos.json`.
+
+Example Configuration File (`~/.config/gos/gos.json`):
+
+```json
+{
+ "MastodonURL": "https://mastodon.example.com",
+ "MastodonAccessToken": "your-mastodon-access-token",
+ "LinkedInClientID": "your-linkedin-client-id",
+ "LinkedInSecret": "your-linkedin-client-secret",
+ "LinkedInRedirectURL": "http://localhost:8080/callback",
+}
+```
+
+### Configuration fields
+
+* `MastodonURL`: The base URL of the Mastodon instance you are using (e.g., https://mastodon.social).
+* `MastodonAccessToken`: Your access token for the Mastodon API, which is used to authenticate your posts.
+* `LinkedInClientID`: The client ID for your LinkedIn app, which is needed for OAuth2 authentication.
+* `LinkedInSecret`: The client secret for your LinkedIn app.
+* `LinkedInRedirectURL`: The redirect URL configured for handling OAuth2 responses.
+* `LinkedInAccessToken`: Gos will automatically update this after successful OAuth2 authentication with LinkedIn.
+* `LinkedInPersonID`: Gos will automatically update this after successful OAuth2 authentication with LinkedIn.
+
+### Automatically managed fields
+
+Once you finish the OAuth2 setup (after the initial run of `gos`), some fields—like `LinkedInAccessToken` and `LinkedInPersonID` will get filled in automatically. To check if everything's working without actually posting anything, you can run the app in dry run mode with the `--dry` option. After OAuth2 is successful, the file will be updated with `LinkedInClientID` and `LinkedInAccessToken`. If the access token expires, it will go through the OAuth2 process again.
+
+## Invoking Gos
+
+Gos is a command-line tool for posting updates to multiple social media platforms. You can run it with various flags to customize its behaviour, such as posting in dry run mode, limiting posts by size, or targeting specific platforms.
+
+Flags control the tool's behavior. Below are several common ways to invoke Gos and descriptions of the available flags.
+
+### Common flags
+
+* `-dry`: Run the application in dry run mode, simulating operations without making any changes.
+* `-version`: Display the current version of the application.
+* `-compose`: Compose a new entry. Default is set by `composeEntryDefault`.
+* `-gosDir`: Specify the directory for Gos' queue and database files. The default is `~/.gosdir`.
+* `—cacheDir`: Specify the directory for Gos' cache. The default is based on the `gosDir` path.
+* `-browser`: Choose the browser for OAuth2 processes. The default is "firefox".
+* `-configPath`: Path to the configuration file. Default is `~/.config/gos/gos.json`.
+* `—platforms`: The enabled platforms and their post size limits. The default is "Mastodon:500,LinkedIn:1000."
+* `-target`: Target number of posts per week. The default is 2.
+* `-minQueued`: Minimum number of queued items before a warning message is printed. The default is 4.
+* `-maxDaysQueued`: Maximum number of days' worth of queued posts before the target increases and pauseDays decreases. The default is 365.
+* `-pauseDays`: Number of days until the next post can be submitted. The default is 3.
+* `-runInterval`: Number of hours until the next post run. The default is 12.
+* `—lookback`: The number of days to look back in time to review posting history. The default is 30.
+* `-geminiSummaryFor`: Generate a Gemini Gemtext format summary specifying months as a comma-separated string.
+* `-geminiCapsules`: Comma-separated list of Gemini capsules. Used to detect Gemtext links.
+* `-gemtexterEnable`: Add special tags for Gemtexter, the static site generator, to the Gemini Gemtext summary.
+* `-dev`: For internal development purposes only.
+
+### Examples
+
+*Dry run mode*
+
+Dry run mode lets you simulate the entire posting process without actually sending the posts. This is useful for testing configurations or seeing what would happen before making real posts.
+
+```bash
+./gos --dry
+```
+
+*Normal run*
+
+Sharing to all platforms is as simple as the following (assuming it is configured correctly):
+
+```bash
+./gos
+```
+
+:-)
+
+=> ./sharing-on-social-media-with-gos/gos-screenshot.png Gos Screenshot
+
+However, you will notice that no messages are queued to be posted yet (not like on the screenshot yet!). Relax and read on...
+
+## Composing messages to be posted
+
+To post messages using Gos, you need to create text files containing the posts' content. These files are placed inside the directory specified by the `--gosDir` flag (the default directory is `~/.gosdir`). Each text file represents a single post and must have the .txt extension. You can also simply run `gos --compose` to compose a new entry. It will open simply a new text file in `gosDir`.
+
+### Basic structure of a message file
+
+Each text file should contain the message you want to post on the specified platforms. That's it. Example of a Basic Post File `~/.gosdir/samplepost.txt`:
+
+```
+This is a sample message to be posted on social media platforms.
+
+Maybe add a link here: https://foo.zone
+
+#foo #cool #gos #golang
+```
+
+The message is just arbitrary text, and, besides inline share tags (see later in this document) at the beginning, Gos does not parse any of the content other than ensuring the overall allowed size for the social media platform isn't exceeded. If it exceeds the limit, Gos will prompt you to edit the post using your standard text editor (as specified by the `EDITOR` environment variable). When posting, all the hyperlinks, hashtags, etc., are interpreted by the social platforms themselves (e.g., Mastodon, LinkedIn).
+
+### Adding share tags in the filename
+
+You can control which platforms a post is shared to, and manage other behaviors using tags embedded in the filename. Add tags in the format `share:platform1.-platform2` to target specific platforms within the filename. This instructs Gos to share the message only to `platform1` (e.g., Mastodon) and explicitly exclude `platform2` (e.g., LinkedIn). You can include multiple platforms by listing them after `share:`, separated by a `.`. Use the `-` symbol to exclude a platform.
+
+Currently, only `linkedin` and `mastodon` are supported, and the shortcuts `li` and `ma` also work.
+
+**Examples:**
+
+* To share only on Mastodon: `~/.gosdir/foopost.share:mastodon.txt`
+* To exclude sharing on LinkedIn: `~/.gosdir/foopost.share:-linkedin.txt`
+* To explicitly share on both LinkedIn and Mastodon: `~/.gosdir/foopost.share:linkedin:mastodon.txt`
+* To explicitly share only on LinkedIn and exclude Mastodon: `~/.gosdir/foopost.share:linkedin:-mastodon.txt`
+
+Besides encoding share tags in the filename, they can also be embedded within the `.txt` file content to be queued. For example, a file named `~/.gosdir/foopost.txt` with the following content:
+
+```
+share:mastodon The content of the post here
+```
+
+or
+
+```
+share:mastodon
+
+The content of the post is here https://some.foo/link
+
+#some #hashtags
+```
+
+Gos will parse this content, extract the tags, and queue it as `~/.gosdir/db/platforms/mastodon/foopost.share:mastodon.extracted.txt....` (see how post queueing works later in this document).
+
+### Using the `prio` tag
+
+Gos randomly picks any queued message without any specific order or priority. However, you can assign a higher priority to a message. The priority determines the order in which posts are processed, with messages without a priority tag being posted last and those with priority tags being posted first. If multiple messages have the priority tag, then a random message will be selected from them.
+
+*Examples using the Priority tag:*
+
+* To share only on Mastodon: `~/.gosdir/foopost.prio.share:mastodon.txt`
+* To not share on LinkedIn: `~/.gosdir/foopost.prio.share:-linkedin.txt`
+* To explicitly share on both: `~/.gosdir/foopost.prio.share:linkedin:mastodon.txt`
+* To explicitly share on only linkedin: `~/.gosdir/foopost.prio.share:linkedin:-mastodon.txt`
+
+There is more: you can also use the `soon` tag. It is almost the same as the `prio` tag, just with one lower priority.
+
+### More tags
+
+* A `.ask.` in the filename will prompt you to choose whether to queue, edit, or delete a file before queuing it.
+* A `.now.` in the filename will schedule a post immediately, regardless of the target status.
+
+So you could also have filenames like those:
+
+* `~/.gosdir/foopost.ask.txt`
+* `~/.gosdir/foopost.now.txt`
+* `~/.gosdir/foopost.ask.share:mastodon.txt`
+* `~/.gosdir/foopost.ask.prio.share:mastodon.txt`
+* `~/.gosdir/foopost.ask.now.share:-mastodon.txt`
+* `~/.gosdir/foopost.now.share:-linkedin.txt`
+
+etc...
+
+All of the above also works with embedded tags. E.g.:
+
+```
+share:mastodon,ask,prio Hello wold :-)
+```
+
+or
+
+```
+share:mastodon,ask,prio
+
+Hello World :-)
+```
+
+### The `gosc` binary
+
+`gosc` stands for Gos Composer and will simply launch your `$EDITOR` on a new text file in the `gosDir`. It's the same as running `gos --compose`, really. It is a quick way of composing new posts. Once composed, it will ask for your confirmation on whether the message should be queued or not.
+
+## How queueing works in gos
+
+When you place a message file in the `gosDir`, Gos processes it by moving the message through a queueing system before posting it to the target social media platforms. A message's lifecycle includes several key stages, from creation to posting, all managed through the `./db/platforms/PLATFORM` directories.
+
+### Step-by-step queueing process
+
+1. Inserting a Message into `gosDir`: You start by creating a text file that represents your post (e.g., `foo.txt`) and placing it in the `gosDir`. When Gos runs, this file is processed. The easiest way is to use `gosc` here.
+
+2. Moving to the Queue: Upon running Gos, the tool identifies the message in the `gosDir` and places it into the queue for the specified platform. The message is moved into the appropriate directory for each platform in `./db/platforms/PLATFORM`. During this stage, the message file is renamed to include a timestamp indicating when it was queued and given a `.queued` extension.
+
+*Example: If a message is queued for LinkedIn, the filename might look like this:*
+
+```
+~/.gosdir/db/platforms/linkedin/foo.share:-mastodon.txt.20241022-102343.queued
+```
+
+3. Posting the Message: Once a message is placed in the queue, Gos posts it to the specified social media platforms.
+
+4. Renaming to `.posted`: After a message is successfully posted to a platform, the corresponding `.queued` file is renamed to have a `.posted` extension, and the filename timestamp is also updated. This signals that the post has been processed and published.
+
+*Example - After a successful post to LinkedIn, the message file might look like this:*
+
+```
+./db/platforms/linkedin/foo.share:-mastodon.txt.20241112-121323.posted
+```
+
+### How message selection works in gos
+
+Gos decides which messages to post using a combination of priority, platform-specific tags, and timing rules. The message selection process ensures that messages are posted according to your configured cadence and targets while respecting pauses between posts and previously met goals.
+
+The key factors in message selection are:
+
+* Target Number of Posts Per Week: The `-target` flag defines how many posts per week should be made to a specific platform. This target helps Gos manage the posting rate, ensuring that the right number of posts are made without exceeding the desired frequency.
+* Post History Lookback: The `-lookback` flag tells Gos how many days back to look in the post history to calculate whether the weekly post target has already been met. It ensures that previously posted content is considered before deciding to queue up another message.
+* Message Priority: Messages with no priority value are processed after those with priority. If two messages have the same priority, one is selected randomly.
+* Pause Between Posts: The `-pauseDays` flag allows you to specify a minimum number of days to wait between posts for the same platform. This prevents oversaturation of content and ensures that posts are spread out over time.
+
+## Post summary as gemini gemtext
+
+For my blog, I want to post a summary of all the social messages posted over the last couple of months. For an example, have a look here:
+
+=> https://foo.zone/gemfeed/2025-01-01-posts-from-october-to-december-2024.html
+
+To accomplish this, run:
+
+```sh
+gos --geminiSummaryFor 202410,202411,202412
+```
+
+This outputs the summary for the three specified months, as shown in the example. The summary includes posts from all social media networks but removes duplicates.
+
+Also, add the `--gemtexterEnable` flag, if you are using Gemtexter:
+
+
+```sh
+gos --gemtexterEnable --geminiSummaryFor 202410,202411,202412
+```
+
+=> https://codeberg.org/snonux/gemtexter Gemtexter
+
+In case there are HTTP links that translate directly to the Geminispace for certain capsules, specify the Gemini capsules as a comma-separated list as follows:
+
+```sh
+gos --gemtexterEnable --geminiSummaryFor 202410,202411,202412 --geminiCapsules "foo.zone,paul.buetow.org"
+```
+
+It will then also generate Gemini Gemtext links in the summary page and flag them with `(Gemini)`.
+
+## Conclusion
+
+Overall, this was a fun little Go project with practical use for me personally. I hope you also had fun reading this, and maybe you will use it as well.
+
+E-Mail your comments to `paul@nospam.buetow.org` :-)
+
+=> ../ Back to the main site
diff --git a/gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi.tpl b/gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi.tpl
new file mode 100644
index 00000000..1dde9b20
--- /dev/null
+++ b/gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi.tpl
@@ -0,0 +1,313 @@
+# Sharing on Social Media with Gos v1.0.0
+
+> Published at 2025-03-04T21:22:07+02:00
+
+As you may have noticed, I like to share on Mastodon and LinkedIn all the technical things I find interesting, and this blog post is technically all about that.
+
+=> ./sharing-on-social-media-with-gos/gos.png Gos logo
+
+<< template::inline::toc
+
+## Introduction
+
+Gos is a Go-based replacement (which I wrote) for Buffer.com, providing the ability to schedule and manage social media posts from the command line. It can be run, for example, every time you open a new shell or only once every N hours when you open a new shell.
+
+I used Buffer.com to schedule and post my social media messages for a long time. However, over time, there were more problems with that service, including a slow and unintuitive UI, and the free version only allows scheduling up to 10 messages. At one point, they started to integrate an AI assistant (which would seemingly randomly pop up in separate JavaScript-powered input boxes), and then I had enough and decided I had to build my own social sharing tool—and Gos was born.
+
+=> https://buffer.com
+=> https://codeberg.org/snonux/gos
+
+## Gos features
+
+* Mastodon and LinkedIn support.
+* Dry run mode for testing posts without actually publishing.
+* Configurable via flags and environment variables.
+* Easy to integrate into automated workflows.
+* OAuth2 authentication for LinkedIn.
+* Image previews for LinkedIn posts.
+
+## Installation
+
+### Prequisites
+
+The prerequisites are:
+
+* Go (version 1.24 or later)
+* Supported browsers like Firefox, Chrome, etc for oauth2.
+
+### Build and install
+
+Clone the repository:
+
+```bash
+git clone https://codeberg.org/snonux/gos.git
+cd gos
+```
+
+Build the binaries:
+
+```bash
+go build -o gos ./cmd/gos
+go build -o gosc ./cmd/gosc
+sudo mv gos ~/go/bin
+sudo mv gosc ~/go/bin
+```
+
+Or, if you want to use the `Taskfile`:
+
+```bash
+go-task install
+```
+
+## Configuration
+
+Gos requires a configuration file to store API secrets and OAuth2 credentials for each supported social media platform. The configuration is managed using a Secrets structure, which is stored as a JSON file in `~/.config/gos/gos.json`.
+
+Example Configuration File (`~/.config/gos/gos.json`):
+
+```json
+{
+ "MastodonURL": "https://mastodon.example.com",
+ "MastodonAccessToken": "your-mastodon-access-token",
+ "LinkedInClientID": "your-linkedin-client-id",
+ "LinkedInSecret": "your-linkedin-client-secret",
+ "LinkedInRedirectURL": "http://localhost:8080/callback",
+}
+```
+
+### Configuration fields
+
+* `MastodonURL`: The base URL of the Mastodon instance you are using (e.g., https://mastodon.social).
+* `MastodonAccessToken`: Your access token for the Mastodon API, which is used to authenticate your posts.
+* `LinkedInClientID`: The client ID for your LinkedIn app, which is needed for OAuth2 authentication.
+* `LinkedInSecret`: The client secret for your LinkedIn app.
+* `LinkedInRedirectURL`: The redirect URL configured for handling OAuth2 responses.
+* `LinkedInAccessToken`: Gos will automatically update this after successful OAuth2 authentication with LinkedIn.
+* `LinkedInPersonID`: Gos will automatically update this after successful OAuth2 authentication with LinkedIn.
+
+### Automatically managed fields
+
+Once you finish the OAuth2 setup (after the initial run of `gos`), some fields—like `LinkedInAccessToken` and `LinkedInPersonID` will get filled in automatically. To check if everything's working without actually posting anything, you can run the app in dry run mode with the `--dry` option. After OAuth2 is successful, the file will be updated with `LinkedInClientID` and `LinkedInAccessToken`. If the access token expires, it will go through the OAuth2 process again.
+
+## Invoking Gos
+
+Gos is a command-line tool for posting updates to multiple social media platforms. You can run it with various flags to customize its behaviour, such as posting in dry run mode, limiting posts by size, or targeting specific platforms.
+
+Flags control the tool's behavior. Below are several common ways to invoke Gos and descriptions of the available flags.
+
+### Common flags
+
+* `-dry`: Run the application in dry run mode, simulating operations without making any changes.
+* `-version`: Display the current version of the application.
+* `-compose`: Compose a new entry. Default is set by `composeEntryDefault`.
+* `-gosDir`: Specify the directory for Gos' queue and database files. The default is `~/.gosdir`.
+* `—cacheDir`: Specify the directory for Gos' cache. The default is based on the `gosDir` path.
+* `-browser`: Choose the browser for OAuth2 processes. The default is "firefox".
+* `-configPath`: Path to the configuration file. Default is `~/.config/gos/gos.json`.
+* `—platforms`: The enabled platforms and their post size limits. The default is "Mastodon:500,LinkedIn:1000."
+* `-target`: Target number of posts per week. The default is 2.
+* `-minQueued`: Minimum number of queued items before a warning message is printed. The default is 4.
+* `-maxDaysQueued`: Maximum number of days' worth of queued posts before the target increases and pauseDays decreases. The default is 365.
+* `-pauseDays`: Number of days until the next post can be submitted. The default is 3.
+* `-runInterval`: Number of hours until the next post run. The default is 12.
+* `—lookback`: The number of days to look back in time to review posting history. The default is 30.
+* `-geminiSummaryFor`: Generate a Gemini Gemtext format summary specifying months as a comma-separated string.
+* `-geminiCapsules`: Comma-separated list of Gemini capsules. Used to detect Gemtext links.
+* `-gemtexterEnable`: Add special tags for Gemtexter, the static site generator, to the Gemini Gemtext summary.
+* `-dev`: For internal development purposes only.
+
+### Examples
+
+*Dry run mode*
+
+Dry run mode lets you simulate the entire posting process without actually sending the posts. This is useful for testing configurations or seeing what would happen before making real posts.
+
+```bash
+./gos --dry
+```
+
+*Normal run*
+
+Sharing to all platforms is as simple as the following (assuming it is configured correctly):
+
+```bash
+./gos
+```
+
+:-)
+
+=> ./sharing-on-social-media-with-gos/gos-screenshot.png Gos Screenshot
+
+However, you will notice that no messages are queued to be posted yet (not like on the screenshot yet!). Relax and read on...
+
+## Composing messages to be posted
+
+To post messages using Gos, you need to create text files containing the posts' content. These files are placed inside the directory specified by the `--gosDir` flag (the default directory is `~/.gosdir`). Each text file represents a single post and must have the .txt extension. You can also simply run `gos --compose` to compose a new entry. It will open simply a new text file in `gosDir`.
+
+### Basic structure of a message file
+
+Each text file should contain the message you want to post on the specified platforms. That's it. Example of a Basic Post File `~/.gosdir/samplepost.txt`:
+
+```
+This is a sample message to be posted on social media platforms.
+
+Maybe add a link here: https://foo.zone
+
+#foo #cool #gos #golang
+```
+
+The message is just arbitrary text, and, besides inline share tags (see later in this document) at the beginning, Gos does not parse any of the content other than ensuring the overall allowed size for the social media platform isn't exceeded. If it exceeds the limit, Gos will prompt you to edit the post using your standard text editor (as specified by the `EDITOR` environment variable). When posting, all the hyperlinks, hashtags, etc., are interpreted by the social platforms themselves (e.g., Mastodon, LinkedIn).
+
+### Adding share tags in the filename
+
+You can control which platforms a post is shared to, and manage other behaviors using tags embedded in the filename. Add tags in the format `share:platform1.-platform2` to target specific platforms within the filename. This instructs Gos to share the message only to `platform1` (e.g., Mastodon) and explicitly exclude `platform2` (e.g., LinkedIn). You can include multiple platforms by listing them after `share:`, separated by a `.`. Use the `-` symbol to exclude a platform.
+
+Currently, only `linkedin` and `mastodon` are supported, and the shortcuts `li` and `ma` also work.
+
+**Examples:**
+
+* To share only on Mastodon: `~/.gosdir/foopost.share:mastodon.txt`
+* To exclude sharing on LinkedIn: `~/.gosdir/foopost.share:-linkedin.txt`
+* To explicitly share on both LinkedIn and Mastodon: `~/.gosdir/foopost.share:linkedin:mastodon.txt`
+* To explicitly share only on LinkedIn and exclude Mastodon: `~/.gosdir/foopost.share:linkedin:-mastodon.txt`
+
+Besides encoding share tags in the filename, they can also be embedded within the `.txt` file content to be queued. For example, a file named `~/.gosdir/foopost.txt` with the following content:
+
+```
+share:mastodon The content of the post here
+```
+
+or
+
+```
+share:mastodon
+
+The content of the post is here https://some.foo/link
+
+#some #hashtags
+```
+
+Gos will parse this content, extract the tags, and queue it as `~/.gosdir/db/platforms/mastodon/foopost.share:mastodon.extracted.txt....` (see how post queueing works later in this document).
+
+### Using the `prio` tag
+
+Gos randomly picks any queued message without any specific order or priority. However, you can assign a higher priority to a message. The priority determines the order in which posts are processed, with messages without a priority tag being posted last and those with priority tags being posted first. If multiple messages have the priority tag, then a random message will be selected from them.
+
+*Examples using the Priority tag:*
+
+* To share only on Mastodon: `~/.gosdir/foopost.prio.share:mastodon.txt`
+* To not share on LinkedIn: `~/.gosdir/foopost.prio.share:-linkedin.txt`
+* To explicitly share on both: `~/.gosdir/foopost.prio.share:linkedin:mastodon.txt`
+* To explicitly share on only linkedin: `~/.gosdir/foopost.prio.share:linkedin:-mastodon.txt`
+
+There is more: you can also use the `soon` tag. It is almost the same as the `prio` tag, just with one lower priority.
+
+### More tags
+
+* A `.ask.` in the filename will prompt you to choose whether to queue, edit, or delete a file before queuing it.
+* A `.now.` in the filename will schedule a post immediately, regardless of the target status.
+
+So you could also have filenames like those:
+
+* `~/.gosdir/foopost.ask.txt`
+* `~/.gosdir/foopost.now.txt`
+* `~/.gosdir/foopost.ask.share:mastodon.txt`
+* `~/.gosdir/foopost.ask.prio.share:mastodon.txt`
+* `~/.gosdir/foopost.ask.now.share:-mastodon.txt`
+* `~/.gosdir/foopost.now.share:-linkedin.txt`
+
+etc...
+
+All of the above also works with embedded tags. E.g.:
+
+```
+share:mastodon,ask,prio Hello wold :-)
+```
+
+or
+
+```
+share:mastodon,ask,prio
+
+Hello World :-)
+```
+
+### The `gosc` binary
+
+`gosc` stands for Gos Composer and will simply launch your `$EDITOR` on a new text file in the `gosDir`. It's the same as running `gos --compose`, really. It is a quick way of composing new posts. Once composed, it will ask for your confirmation on whether the message should be queued or not.
+
+## How queueing works in gos
+
+When you place a message file in the `gosDir`, Gos processes it by moving the message through a queueing system before posting it to the target social media platforms. A message's lifecycle includes several key stages, from creation to posting, all managed through the `./db/platforms/PLATFORM` directories.
+
+### Step-by-step queueing process
+
+1. Inserting a Message into `gosDir`: You start by creating a text file that represents your post (e.g., `foo.txt`) and placing it in the `gosDir`. When Gos runs, this file is processed. The easiest way is to use `gosc` here.
+
+2. Moving to the Queue: Upon running Gos, the tool identifies the message in the `gosDir` and places it into the queue for the specified platform. The message is moved into the appropriate directory for each platform in `./db/platforms/PLATFORM`. During this stage, the message file is renamed to include a timestamp indicating when it was queued and given a `.queued` extension.
+
+*Example: If a message is queued for LinkedIn, the filename might look like this:*
+
+```
+~/.gosdir/db/platforms/linkedin/foo.share:-mastodon.txt.20241022-102343.queued
+```
+
+3. Posting the Message: Once a message is placed in the queue, Gos posts it to the specified social media platforms.
+
+4. Renaming to `.posted`: After a message is successfully posted to a platform, the corresponding `.queued` file is renamed to have a `.posted` extension, and the filename timestamp is also updated. This signals that the post has been processed and published.
+
+*Example - After a successful post to LinkedIn, the message file might look like this:*
+
+```
+./db/platforms/linkedin/foo.share:-mastodon.txt.20241112-121323.posted
+```
+
+### How message selection works in gos
+
+Gos decides which messages to post using a combination of priority, platform-specific tags, and timing rules. The message selection process ensures that messages are posted according to your configured cadence and targets while respecting pauses between posts and previously met goals.
+
+The key factors in message selection are:
+
+* Target Number of Posts Per Week: The `-target` flag defines how many posts per week should be made to a specific platform. This target helps Gos manage the posting rate, ensuring that the right number of posts are made without exceeding the desired frequency.
+* Post History Lookback: The `-lookback` flag tells Gos how many days back to look in the post history to calculate whether the weekly post target has already been met. It ensures that previously posted content is considered before deciding to queue up another message.
+* Message Priority: Messages with no priority value are processed after those with priority. If two messages have the same priority, one is selected randomly.
+* Pause Between Posts: The `-pauseDays` flag allows you to specify a minimum number of days to wait between posts for the same platform. This prevents oversaturation of content and ensures that posts are spread out over time.
+
+## Post summary as gemini gemtext
+
+For my blog, I want to post a summary of all the social messages posted over the last couple of months. For an example, have a look here:
+
+=> https://foo.zone/gemfeed/2025-01-01-posts-from-october-to-december-2024.html
+
+To accomplish this, run:
+
+```sh
+gos --geminiSummaryFor 202410,202411,202412
+```
+
+This outputs the summary for the three specified months, as shown in the example. The summary includes posts from all social media networks but removes duplicates.
+
+Also, add the `--gemtexterEnable` flag, if you are using Gemtexter:
+
+
+```sh
+gos --gemtexterEnable --geminiSummaryFor 202410,202411,202412
+```
+
+=> https://codeberg.org/snonux/gemtexter Gemtexter
+
+In case there are HTTP links that translate directly to the Geminispace for certain capsules, specify the Gemini capsules as a comma-separated list as follows:
+
+```sh
+gos --gemtexterEnable --geminiSummaryFor 202410,202411,202412 --geminiCapsules "foo.zone,paul.buetow.org"
+```
+
+It will then also generate Gemini Gemtext links in the summary page and flag them with `(Gemini)`.
+
+## Conclusion
+
+Overall, this was a fun little Go project with practical use for me personally. I hope you also had fun reading this, and maybe you will use it as well.
+
+E-Mail your comments to `paul@nospam.buetow.org` :-)
+
+=> ../ Back to the main site
diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml
index 035cdd3e..3d0931b9 100644
--- a/gemfeed/atom.xml
+++ b/gemfeed/atom.xml
@@ -1,12 +1,399 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <updated>2025-02-22T21:06:27+02:00</updated>
+ <updated>2025-03-04T21:22:08+02:00</updated>
<title>foo.zone feed</title>
<subtitle>To be in the .zone!</subtitle>
<link href="gemini://foo.zone/gemfeed/atom.xml" rel="self" />
<link href="gemini://foo.zone/" />
<id>gemini://foo.zone/</id>
<entry>
+ <title>Sharing on Social Media with Gos v1.0.0</title>
+ <link href="gemini://foo.zone/gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi" />
+ <id>gemini://foo.zone/gemfeed/2025-03-05-sharing-on-social-media-with-gos.gmi</id>
+ <updated>2025-03-04T21:22:07+02:00</updated>
+ <author>
+ <name>Paul Buetow aka snonux</name>
+ <email>paul@dev.buetow.org</email>
+ </author>
+ <summary>As you may have noticed, I like to share on Mastodon and LinkedIn all the technical things I find interesting, and this blog post is technically all about that.</summary>
+ <content type="xhtml">
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <h1 style='display: inline' id='sharing-on-social-media-with-gos-v100'>Sharing on Social Media with Gos v1.0.0</h1><br />
+<br />
+<span>As you may have noticed, I like to share on Mastodon and LinkedIn all the technical things I find interesting, and this blog post is technically all about that.</span><br />
+<br />
+<a href='./sharing-on-social-media-with-gos/gos.png'><img alt='Gos logo' title='Gos logo' src='./sharing-on-social-media-with-gos/gos.png' /></a><br />
+<br />
+<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br />
+<br />
+<ul>
+<li><a href='#sharing-on-social-media-with-gos-v100'>Sharing on Social Media with Gos v1.0.0</a></li>
+<li>⇢ <a href='#introduction'>Introduction</a></li>
+<li>⇢ <a href='#gos-features'>Gos features</a></li>
+<li>⇢ <a href='#installation'>Installation</a></li>
+<li>⇢ ⇢ <a href='#prequisites'>Prequisites</a></li>
+<li>⇢ ⇢ <a href='#build-and-install'>Build and install</a></li>
+<li>⇢ <a href='#configuration'>Configuration</a></li>
+<li>⇢ ⇢ <a href='#configuration-fields'>Configuration fields</a></li>
+<li>⇢ ⇢ <a href='#automatically-managed-fields'>Automatically managed fields</a></li>
+<li>⇢ <a href='#invoking-gos'>Invoking Gos</a></li>
+<li>⇢ ⇢ <a href='#common-flags'>Common flags</a></li>
+<li>⇢ ⇢ <a href='#examples'>Examples</a></li>
+<li>⇢ <a href='#composing-messages-to-be-posted'>Composing messages to be posted</a></li>
+<li>⇢ ⇢ <a href='#basic-structure-of-a-message-file'>Basic structure of a message file</a></li>
+<li>⇢ ⇢ <a href='#adding-share-tags-in-the-filename'>Adding share tags in the filename</a></li>
+<li>⇢ ⇢ <a href='#using-the-prio-tag'>Using the <span class='inlinecode'>prio</span> tag</a></li>
+<li>⇢ ⇢ <a href='#more-tags'>More tags</a></li>
+<li>⇢ ⇢ <a href='#the-gosc-binary'>The <span class='inlinecode'>gosc</span> binary</a></li>
+<li>⇢ <a href='#how-queueing-works-in-gos'>How queueing works in gos</a></li>
+<li>⇢ ⇢ <a href='#step-by-step-queueing-process'>Step-by-step queueing process</a></li>
+<li>⇢ ⇢ <a href='#how-message-selection-works-in-gos'>How message selection works in gos</a></li>
+<li>⇢ <a href='#post-summary-as-gemini-gemtext'>Post summary as gemini gemtext</a></li>
+<li>⇢ <a href='#conclusion'>Conclusion</a></li>
+</ul><br />
+<h2 style='display: inline' id='introduction'>Introduction</h2><br />
+<br />
+<span>Gos is a Go-based replacement (which I wrote) for Buffer.com, providing the ability to schedule and manage social media posts from the command line. It can be run, for example, every time you open a new shell or only once every N hours when you open a new shell.</span><br />
+<br />
+<span>I used Buffer.com to schedule and post my social media messages for a long time. However, over time, there were more problems with that service, including a slow and unintuitive UI, and the free version only allows scheduling up to 10 messages. At one point, they started to integrate an AI assistant (which would seemingly randomly pop up in separate JavaScript-powered input boxes), and then I had enough and decided I had to build my own social sharing tool—and Gos was born.</span><br />
+<br />
+<a class='textlink' href='https://buffer.com'>https://buffer.com</a><br />
+<a class='textlink' href='https://codeberg.org/snonux/gos'>https://codeberg.org/snonux/gos</a><br />
+<br />
+<h2 style='display: inline' id='gos-features'>Gos features</h2><br />
+<br />
+<ul>
+<li>Mastodon and LinkedIn support.</li>
+<li>Dry run mode for testing posts without actually publishing.</li>
+<li>Configurable via flags and environment variables.</li>
+<li>Easy to integrate into automated workflows.</li>
+<li>OAuth2 authentication for LinkedIn.</li>
+<li>Image previews for LinkedIn posts.</li>
+</ul><br />
+<h2 style='display: inline' id='installation'>Installation</h2><br />
+<br />
+<h3 style='display: inline' id='prequisites'>Prequisites</h3><br />
+<br />
+<span>The prerequisites are:</span><br />
+<br />
+<ul>
+<li>Go (version 1.24 or later)</li>
+<li>Supported browsers like Firefox, Chrome, etc for oauth2.</li>
+</ul><br />
+<h3 style='display: inline' id='build-and-install'>Build and install</h3><br />
+<br />
+<span>Clone the repository:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>git clone https://codeberg.org/snonux/gos.git
+cd gos
+</pre>
+<br />
+<span>Build the binaries:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>go build -o gos ./cmd/gos
+go build -o gosc ./cmd/gosc
+sudo mv gos ~/go/bin
+sudo mv gosc ~/go/bin
+</pre>
+<br />
+<span>Or, if you want to use the <span class='inlinecode'>Taskfile</span>:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>go-task install
+</pre>
+<br />
+<h2 style='display: inline' id='configuration'>Configuration</h2><br />
+<br />
+<span>Gos requires a configuration file to store API secrets and OAuth2 credentials for each supported social media platform. The configuration is managed using a Secrets structure, which is stored as a JSON file in <span class='inlinecode'>~/.config/gos/gos.json</span>.</span><br />
+<br />
+<span>Example Configuration File (<span class='inlinecode'>~/.config/gos/gos.json</span>):</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>{
+ "MastodonURL": "<font color="#808080">https://mastodon.example.com</font>",
+ "MastodonAccessToken": "<font color="#808080">your-mastodon-access-token</font>",
+ "LinkedInClientID": "<font color="#808080">your-linkedin-client-id</font>",
+ "LinkedInSecret": "<font color="#808080">your-linkedin-client-secret</font>",
+ "LinkedInRedirectURL": "<font color="#808080">http://localhost:8080/callback</font>",
+}
+</pre>
+<br />
+<h3 style='display: inline' id='configuration-fields'>Configuration fields</h3><br />
+<br />
+<ul>
+<li><span class='inlinecode'>MastodonURL</span>: The base URL of the Mastodon instance you are using (e.g., https://mastodon.social).</li>
+<li><span class='inlinecode'>MastodonAccessToken</span>: Your access token for the Mastodon API, which is used to authenticate your posts.</li>
+<li><span class='inlinecode'>LinkedInClientID</span>: The client ID for your LinkedIn app, which is needed for OAuth2 authentication.</li>
+<li><span class='inlinecode'>LinkedInSecret</span>: The client secret for your LinkedIn app.</li>
+<li><span class='inlinecode'>LinkedInRedirectURL</span>: The redirect URL configured for handling OAuth2 responses.</li>
+<li><span class='inlinecode'>LinkedInAccessToken</span>: Gos will automatically update this after successful OAuth2 authentication with LinkedIn.</li>
+<li><span class='inlinecode'>LinkedInPersonID</span>: Gos will automatically update this after successful OAuth2 authentication with LinkedIn.</li>
+</ul><br />
+<h3 style='display: inline' id='automatically-managed-fields'>Automatically managed fields</h3><br />
+<br />
+<span>Once you finish the OAuth2 setup (after the initial run of <span class='inlinecode'>gos</span>), some fields—like <span class='inlinecode'>LinkedInAccessToken</span> and <span class='inlinecode'>LinkedInPersonID</span> will get filled in automatically. To check if everything&#39;s working without actually posting anything, you can run the app in dry run mode with the <span class='inlinecode'>--dry</span> option. After OAuth2 is successful, the file will be updated with <span class='inlinecode'>LinkedInClientID</span> and <span class='inlinecode'>LinkedInAccessToken</span>. If the access token expires, it will go through the OAuth2 process again.</span><br />
+<br />
+<h2 style='display: inline' id='invoking-gos'>Invoking Gos</h2><br />
+<br />
+<span>Gos is a command-line tool for posting updates to multiple social media platforms. You can run it with various flags to customize its behaviour, such as posting in dry run mode, limiting posts by size, or targeting specific platforms.</span><br />
+<br />
+<span>Flags control the tool&#39;s behavior. Below are several common ways to invoke Gos and descriptions of the available flags.</span><br />
+<br />
+<h3 style='display: inline' id='common-flags'>Common flags</h3><br />
+<br />
+<ul>
+<li><span class='inlinecode'>-dry</span>: Run the application in dry run mode, simulating operations without making any changes.</li>
+<li><span class='inlinecode'>-version</span>: Display the current version of the application.</li>
+<li><span class='inlinecode'>-compose</span>: Compose a new entry. Default is set by <span class='inlinecode'>composeEntryDefault</span>.</li>
+<li><span class='inlinecode'>-gosDir</span>: Specify the directory for Gos&#39; queue and database files. The default is <span class='inlinecode'>~/.gosdir</span>.</li>
+<li><span class='inlinecode'>—cacheDir</span>: Specify the directory for Gos&#39; cache. The default is based on the <span class='inlinecode'>gosDir</span> path.</li>
+<li><span class='inlinecode'>-browser</span>: Choose the browser for OAuth2 processes. The default is "firefox".</li>
+<li><span class='inlinecode'>-configPath</span>: Path to the configuration file. Default is <span class='inlinecode'>~/.config/gos/gos.json</span>.</li>
+<li><span class='inlinecode'>—platforms</span>: The enabled platforms and their post size limits. The default is "Mastodon:500,LinkedIn:1000."</li>
+<li><span class='inlinecode'>-target</span>: Target number of posts per week. The default is 2.</li>
+<li><span class='inlinecode'>-minQueued</span>: Minimum number of queued items before a warning message is printed. The default is 4.</li>
+<li><span class='inlinecode'>-maxDaysQueued</span>: Maximum number of days&#39; worth of queued posts before the target increases and pauseDays decreases. The default is 365.</li>
+<li><span class='inlinecode'>-pauseDays</span>: Number of days until the next post can be submitted. The default is 3.</li>
+<li><span class='inlinecode'>-runInterval</span>: Number of hours until the next post run. The default is 12.</li>
+<li><span class='inlinecode'>—lookback</span>: The number of days to look back in time to review posting history. The default is 30.</li>
+<li><span class='inlinecode'>-geminiSummaryFor</span>: Generate a Gemini Gemtext format summary specifying months as a comma-separated string.</li>
+<li><span class='inlinecode'>-geminiCapsules</span>: Comma-separated list of Gemini capsules. Used to detect Gemtext links.</li>
+<li><span class='inlinecode'>-gemtexterEnable</span>: Add special tags for Gemtexter, the static site generator, to the Gemini Gemtext summary.</li>
+<li><span class='inlinecode'>-dev</span>: For internal development purposes only.</li>
+</ul><br />
+<h3 style='display: inline' id='examples'>Examples</h3><br />
+<br />
+<span>*Dry run mode*</span><br />
+<br />
+<span>Dry run mode lets you simulate the entire posting process without actually sending the posts. This is useful for testing configurations or seeing what would happen before making real posts.</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>./gos --dry
+</pre>
+<br />
+<span>*Normal run*</span><br />
+<br />
+<span>Sharing to all platforms is as simple as the following (assuming it is configured correctly):</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>./gos
+</pre>
+<br />
+<span>:-)</span><br />
+<br />
+<a href='./sharing-on-social-media-with-gos/gos-screenshot.png'><img alt='Gos Screenshot' title='Gos Screenshot' src='./sharing-on-social-media-with-gos/gos-screenshot.png' /></a><br />
+<br />
+<span>However, you will notice that no messages are queued to be posted yet (not like on the screenshot yet!). Relax and read on...</span><br />
+<br />
+<h2 style='display: inline' id='composing-messages-to-be-posted'>Composing messages to be posted</h2><br />
+<br />
+<span>To post messages using Gos, you need to create text files containing the posts&#39; content. These files are placed inside the directory specified by the <span class='inlinecode'>--gosDir</span> flag (the default directory is <span class='inlinecode'>~/.gosdir</span>). Each text file represents a single post and must have the .txt extension. You can also simply run <span class='inlinecode'>gos --compose</span> to compose a new entry. It will open simply a new text file in <span class='inlinecode'>gosDir</span>.</span><br />
+<br />
+<h3 style='display: inline' id='basic-structure-of-a-message-file'>Basic structure of a message file</h3><br />
+<br />
+<span>Each text file should contain the message you want to post on the specified platforms. That&#39;s it. Example of a Basic Post File <span class='inlinecode'>~/.gosdir/samplepost.txt</span>:</span><br />
+<br />
+<pre>
+This is a sample message to be posted on social media platforms.
+
+Maybe add a link here: https://foo.zone
+
+#foo #cool #gos #golang
+</pre>
+<br />
+<span>The message is just arbitrary text, and, besides inline share tags (see later in this document) at the beginning, Gos does not parse any of the content other than ensuring the overall allowed size for the social media platform isn&#39;t exceeded. If it exceeds the limit, Gos will prompt you to edit the post using your standard text editor (as specified by the <span class='inlinecode'>EDITOR</span> environment variable). When posting, all the hyperlinks, hashtags, etc., are interpreted by the social platforms themselves (e.g., Mastodon, LinkedIn).</span><br />
+<br />
+<h3 style='display: inline' id='adding-share-tags-in-the-filename'>Adding share tags in the filename</h3><br />
+<br />
+<span>You can control which platforms a post is shared to, and manage other behaviors using tags embedded in the filename. Add tags in the format <span class='inlinecode'>share:platform1.-platform2</span> to target specific platforms within the filename. This instructs Gos to share the message only to <span class='inlinecode'>platform1</span> (e.g., Mastodon) and explicitly exclude <span class='inlinecode'>platform2</span> (e.g., LinkedIn). You can include multiple platforms by listing them after <span class='inlinecode'>share:</span>, separated by a <span class='inlinecode'>.</span>. Use the <span class='inlinecode'>-</span> symbol to exclude a platform.</span><br />
+<br />
+<span>Currently, only <span class='inlinecode'>linkedin</span> and <span class='inlinecode'>mastodon</span> are supported, and the shortcuts <span class='inlinecode'>li</span> and <span class='inlinecode'>ma</span> also work.</span><br />
+<br />
+<span>**Examples:**</span><br />
+<br />
+<ul>
+<li>To share only on Mastodon: <span class='inlinecode'>~/.gosdir/foopost.share:mastodon.txt</span></li>
+<li>To exclude sharing on LinkedIn: <span class='inlinecode'>~/.gosdir/foopost.share:-linkedin.txt</span></li>
+<li>To explicitly share on both LinkedIn and Mastodon: <span class='inlinecode'>~/.gosdir/foopost.share:linkedin:mastodon.txt</span></li>
+<li>To explicitly share only on LinkedIn and exclude Mastodon: <span class='inlinecode'>~/.gosdir/foopost.share:linkedin:-mastodon.txt</span></li>
+</ul><br />
+<span>Besides encoding share tags in the filename, they can also be embedded within the <span class='inlinecode'>.txt</span> file content to be queued. For example, a file named <span class='inlinecode'>~/.gosdir/foopost.txt</span> with the following content:</span><br />
+<br />
+<pre>
+share:mastodon The content of the post here
+</pre>
+<br />
+<span>or</span><br />
+<br />
+<pre>
+share:mastodon
+
+The content of the post is here https://some.foo/link
+
+#some #hashtags
+</pre>
+<br />
+<span>Gos will parse this content, extract the tags, and queue it as <span class='inlinecode'>~/.gosdir/db/platforms/mastodon/foopost.share:mastodon.extracted.txt....</span> (see how post queueing works later in this document).</span><br />
+<br />
+<h3 style='display: inline' id='using-the-prio-tag'>Using the <span class='inlinecode'>prio</span> tag</h3><br />
+<br />
+<span>Gos randomly picks any queued message without any specific order or priority. However, you can assign a higher priority to a message. The priority determines the order in which posts are processed, with messages without a priority tag being posted last and those with priority tags being posted first. If multiple messages have the priority tag, then a random message will be selected from them.</span><br />
+<br />
+<span>*Examples using the Priority tag:* </span><br />
+<br />
+<ul>
+<li>To share only on Mastodon: <span class='inlinecode'>~/.gosdir/foopost.prio.share:mastodon.txt</span></li>
+<li>To not share on LinkedIn: <span class='inlinecode'>~/.gosdir/foopost.prio.share:-linkedin.txt</span></li>
+<li>To explicitly share on both: <span class='inlinecode'>~/.gosdir/foopost.prio.share:linkedin:mastodon.txt</span></li>
+<li>To explicitly share on only linkedin: <span class='inlinecode'>~/.gosdir/foopost.prio.share:linkedin:-mastodon.txt</span></li>
+</ul><br />
+<span>There is more: you can also use the <span class='inlinecode'>soon</span> tag. It is almost the same as the <span class='inlinecode'>prio</span> tag, just with one lower priority.</span><br />
+<br />
+<h3 style='display: inline' id='more-tags'>More tags</h3><br />
+<br />
+<ul>
+<li>A <span class='inlinecode'>.ask.</span> in the filename will prompt you to choose whether to queue, edit, or delete a file before queuing it.</li>
+<li>A <span class='inlinecode'>.now.</span> in the filename will schedule a post immediately, regardless of the target status.</li>
+</ul><br />
+<span>So you could also have filenames like those: </span><br />
+<br />
+<ul>
+<li><span class='inlinecode'>~/.gosdir/foopost.ask.txt</span></li>
+<li><span class='inlinecode'>~/.gosdir/foopost.now.txt</span></li>
+<li><span class='inlinecode'>~/.gosdir/foopost.ask.share:mastodon.txt</span></li>
+<li><span class='inlinecode'>~/.gosdir/foopost.ask.prio.share:mastodon.txt</span></li>
+<li><span class='inlinecode'>~/.gosdir/foopost.ask.now.share:-mastodon.txt</span></li>
+<li><span class='inlinecode'>~/.gosdir/foopost.now.share:-linkedin.txt</span></li>
+</ul><br />
+<span>etc...</span><br />
+<br />
+<span>All of the above also works with embedded tags. E.g.:</span><br />
+<br />
+<pre>
+share:mastodon,ask,prio Hello wold :-)
+</pre>
+<br />
+<span>or </span><br />
+<br />
+<pre>
+share:mastodon,ask,prio
+
+Hello World :-)
+</pre>
+<br />
+<h3 style='display: inline' id='the-gosc-binary'>The <span class='inlinecode'>gosc</span> binary</h3><br />
+<br />
+<span><span class='inlinecode'>gosc</span> stands for Gos Composer and will simply launch your <span class='inlinecode'>$EDITOR</span> on a new text file in the <span class='inlinecode'>gosDir</span>. It&#39;s the same as running <span class='inlinecode'>gos --compose</span>, really. It is a quick way of composing new posts. Once composed, it will ask for your confirmation on whether the message should be queued or not.</span><br />
+<br />
+<h2 style='display: inline' id='how-queueing-works-in-gos'>How queueing works in gos</h2><br />
+<br />
+<span>When you place a message file in the <span class='inlinecode'>gosDir</span>, Gos processes it by moving the message through a queueing system before posting it to the target social media platforms. A message&#39;s lifecycle includes several key stages, from creation to posting, all managed through the <span class='inlinecode'>./db/platforms/PLATFORM</span> directories.</span><br />
+<br />
+<h3 style='display: inline' id='step-by-step-queueing-process'>Step-by-step queueing process</h3><br />
+<br />
+<span>1. Inserting a Message into <span class='inlinecode'>gosDir</span>: You start by creating a text file that represents your post (e.g., <span class='inlinecode'>foo.txt</span>) and placing it in the <span class='inlinecode'>gosDir</span>. When Gos runs, this file is processed. The easiest way is to use <span class='inlinecode'>gosc</span> here.</span><br />
+<br />
+<span>2. Moving to the Queue: Upon running Gos, the tool identifies the message in the <span class='inlinecode'>gosDir</span> and places it into the queue for the specified platform. The message is moved into the appropriate directory for each platform in <span class='inlinecode'>./db/platforms/PLATFORM</span>. During this stage, the message file is renamed to include a timestamp indicating when it was queued and given a <span class='inlinecode'>.queued</span> extension.</span><br />
+<br />
+<span>*Example: If a message is queued for LinkedIn, the filename might look like this:*</span><br />
+<br />
+<pre>
+~/.gosdir/db/platforms/linkedin/foo.share:-mastodon.txt.20241022-102343.queued
+</pre>
+<br />
+<span>3. Posting the Message: Once a message is placed in the queue, Gos posts it to the specified social media platforms. </span><br />
+<br />
+<span>4. Renaming to <span class='inlinecode'>.posted</span>: After a message is successfully posted to a platform, the corresponding <span class='inlinecode'>.queued</span> file is renamed to have a <span class='inlinecode'>.posted</span> extension, and the filename timestamp is also updated. This signals that the post has been processed and published.</span><br />
+<br />
+<span>*Example - After a successful post to LinkedIn, the message file might look like this:*</span><br />
+<br />
+<pre>
+./db/platforms/linkedin/foo.share:-mastodon.txt.20241112-121323.posted
+</pre>
+<br />
+<h3 style='display: inline' id='how-message-selection-works-in-gos'>How message selection works in gos</h3><br />
+<br />
+<span>Gos decides which messages to post using a combination of priority, platform-specific tags, and timing rules. The message selection process ensures that messages are posted according to your configured cadence and targets while respecting pauses between posts and previously met goals.</span><br />
+<br />
+<span>The key factors in message selection are:</span><br />
+<br />
+<ul>
+<li>Target Number of Posts Per Week: The <span class='inlinecode'>-target</span> flag defines how many posts per week should be made to a specific platform. This target helps Gos manage the posting rate, ensuring that the right number of posts are made without exceeding the desired frequency. </li>
+<li>Post History Lookback: The <span class='inlinecode'>-lookback</span> flag tells Gos how many days back to look in the post history to calculate whether the weekly post target has already been met. It ensures that previously posted content is considered before deciding to queue up another message.</li>
+<li>Message Priority: Messages with no priority value are processed after those with priority. If two messages have the same priority, one is selected randomly.</li>
+<li>Pause Between Posts: The <span class='inlinecode'>-pauseDays</span> flag allows you to specify a minimum number of days to wait between posts for the same platform. This prevents oversaturation of content and ensures that posts are spread out over time.</li>
+</ul><br />
+<h2 style='display: inline' id='post-summary-as-gemini-gemtext'>Post summary as gemini gemtext</h2><br />
+<br />
+<span>For my blog, I want to post a summary of all the social messages posted over the last couple of months. For an example, have a look here:</span><br />
+<br />
+<a class='textlink' href='https://foo.zone/gemfeed/2025-01-01-posts-from-october-to-december-2024.html'>https://foo.zone/gemfeed/2025-01-01-posts-from-october-to-december-2024.html</a><br />
+<br />
+<span>To accomplish this, run:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>gos --geminiSummaryFor <font color="#000000">202410</font>,<font color="#000000">202411</font>,<font color="#000000">202412</font>
+</pre>
+<br />
+<span>This outputs the summary for the three specified months, as shown in the example. The summary includes posts from all social media networks but removes duplicates.</span><br />
+<br />
+<span>Also, add the <span class='inlinecode'>--gemtexterEnable</span> flag, if you are using Gemtexter:</span><br />
+<br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>gos --gemtexterEnable --geminiSummaryFor <font color="#000000">202410</font>,<font color="#000000">202411</font>,<font color="#000000">202412</font>
+</pre>
+<br />
+<a class='textlink' href='https://codeberg.org/snonux/gemtexter'>Gemtexter</a><br />
+<br />
+<span>In case there are HTTP links that translate directly to the Geminispace for certain capsules, specify the Gemini capsules as a comma-separated list as follows:</span><br />
+<br />
+<!-- Generator: GNU source-highlight 3.1.9
+by Lorenzo Bettini
+http://www.lorenzobettini.it
+http://www.gnu.org/software/src-highlite -->
+<pre>gos --gemtexterEnable --geminiSummaryFor <font color="#000000">202410</font>,<font color="#000000">202411</font>,<font color="#000000">202412</font> --geminiCapsules <font color="#808080">"foo.zone,paul.buetow.org"</font>
+</pre>
+<br />
+<span>It will then also generate Gemini Gemtext links in the summary page and flag them with <span class='inlinecode'>(Gemini)</span>.</span><br />
+<br />
+<h2 style='display: inline' id='conclusion'>Conclusion</h2><br />
+<br />
+<span>Overall, this was a fun little Go project with practical use for me personally. I hope you also had fun reading this, and maybe you will use it as well.</span><br />
+<br />
+<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br />
+<br />
+<a class='textlink' href='../'>Back to the main site</a><br />
+ </div>
+ </content>
+ </entry>
+ <entry>
<title>Random Weird Things - Part Ⅱ</title>
<link href="gemini://foo.zone/gemfeed/2025-02-08-random-weird-things-ii.gmi" />
<id>gemini://foo.zone/gemfeed/2025-02-08-random-weird-things-ii.gmi</id>
@@ -8760,138 +9147,4 @@ REMOTE|fishfinger|100|7|fstab|093f510ec5c0f512.h /usr/local ffs rw,wxallowed,nod
</div>
</content>
</entry>
- <entry>
- <title>After a bad night's sleep</title>
- <link href="gemini://foo.zone/gemfeed/2022-09-30-after-a-bad-nights-sleep.gmi" />
- <id>gemini://foo.zone/gemfeed/2022-09-30-after-a-bad-nights-sleep.gmi</id>
- <updated>2022-09-30T09:53:23+03:00</updated>
- <author>
- <name>Paul Buetow aka snonux</name>
- <email>paul@dev.buetow.org</email>
- </author>
- <summary>Everyone has it once in a while: A bad night's sleep. Here I attempt to list valuable tips on how to deal with it.</summary>
- <content type="xhtml">
- <div xmlns="http://www.w3.org/1999/xhtml">
- <h1 style='display: inline' id='after-a-bad-night-s-sleep'>After a bad night&#39;s sleep</h1><br />
-<br />
-<span class='quote'>Published at 2022-09-30T09:53:23+03:00; Updated at 2022-10-12</span><br />
-<br />
-<span>Everyone has it once in a while: A bad night&#39;s sleep. Here I attempt to list valuable tips on how to deal with it.</span><br />
-<br />
-<pre>
- z
- z
- Z
- .--. Z Z
- / _(c\ .-. __
- | / / &#39;-; \&#39;-&#39;` `\______
- \_\/&#39;/ __/ ) / ) | \--,
- | \`""`__-/ .&#39;--/ /--------\ \
- \\` ///-\/ / /---;-. &#39;-&#39;
-jgs (________\ \
- &#39;-&#39;
-</pre>
-<br />
-<h2 style='display: inline' id='table-of-contents'>Table of Contents</h2><br />
-<br />
-<ul>
-<li><a href='#after-a-bad-night-s-sleep'>After a bad night&#39;s sleep</a></li>
-<li>⇢ <a href='#don-t-take-the-day-off'>Don&#39;t take the day off.</a></li>
-<li>⇢ <a href='#start-work-early'>Start work early</a></li>
-<li>⇢ <a href='#sweat-the-small-stuff'>Sweat the small stuff</a></li>
-<li>⇢ <a href='#enter-the-flow-state'>Enter the flow state</a></li>
-<li>⇢ <a href='#reschedule-meetings'>Reschedule meetings</a></li>
-<li>⇢ <a href='#invent'>Invent</a></li>
-<li>⇢ <a href='#fast'>Fast</a></li>
-<li>⇢ <a href='#stretch'>Stretch</a></li>
-<li>⇢ <a href='#walk'>Walk</a></li>
-<li>⇢ <a href='#red-bull'>Red Bull</a></li>
-<li>⇢ <a href='#power-nap'>Power nap</a></li>
-<li>⇢ <a href='#don-t-take-anything-personally'>Don&#39;t take anything personally.</a></li>
-<li>⇢ <a href='#meditate'>Meditate</a></li>
-<li>⇢ <a href='#write-things-down'>Write things down</a></li>
-<li>⇢ <a href='#social-media'>Social media</a></li>
-</ul><br />
-<h2 style='display: inline' id='don-t-take-the-day-off'>Don&#39;t take the day off.</h2><br />
-<br />
-<span>Don&#39;t take a day off after not sleeping enough the previous night. That would be wasting the holiday allowance. It wouldn&#39;t be possible to enjoy my free time anyway, so why not just work? There&#39;s still a way for an IT Engineer to be productive (sometimes even more) with half or less of the concentration power available!</span><br />
-<br />
-<h2 style='display: inline' id='start-work-early'>Start work early</h2><br />
-<br />
-<span>Probably I am already awake early and am unable to fall asleep again. My strategy here is to "attack" the day: Start work early and finish early. The early bird will also encounter fewer distractions from colleagues.</span><br />
-<br />
-<h2 style='display: inline' id='sweat-the-small-stuff'>Sweat the small stuff</h2><br />
-<br />
-<span>There&#39;s never a shortage of small items to hook off my list. Most of these items don&#39;t require my full concentration power, and I will be happy to get them off my list so that the next day, after a good night&#39;s sleep, I can immerse myself again in focused, deep work with all concentration powers at hand.</span><br />
-<br />
-<span>Examples of "small work items" are:</span><br />
-<br />
-<ul>
-<li>Tidying up the workspace.</li>
-<li>Installing pending computer software updates.</li>
-<li>Going through the work backlog: Create new tickets, close obsolete ones, and roughly pre-plan upcoming work.</li>
-<li>Finishing off the easy tickets from the current sprint.</li>
-<li>Going through any tedious paperwork.</li>
-<li>Catch up with the journal and mark off all trivial action items.</li>
-</ul><br />
-<h2 style='display: inline' id='enter-the-flow-state'>Enter the flow state</h2><br />
-<br />
-<span>I find it easy to enter the "flow state" after a bad night&#39;s sleep. All I need to do is to put on some ambient music (preferably instrumental chill house) and start to work on a not-too-difficult ticket.</span><br />
-<br />
-<span>Usually, the "flow state" is associated with deep-focused work, but deep-focused work isn&#39;t easily possible under sleep deprivation. It&#39;s still possible to be in the flow by working on more manageable tasks and leaving the difficult ones for the next day.</span><br />
-<br />
-<h2 style='display: inline' id='reschedule-meetings'>Reschedule meetings</h2><br />
-<br />
-<span>I find engaging in discussions and demanding meetings challenging after a lousy night&#39;s sleep. I still attend the sessions I am invited to as "only" a participant, but I prefer to reschedule all meetings I am the primary driver of.</span><br />
-<br />
-<span>This, unfortunately, also includes interviews. Interviews require full concentration power. So for interviews, I would find a colleague to step in for me or ask to reschedule the interview altogether. Everything else wouldn&#39;t make it justice and would waste everyone&#39;s time!</span><br />
-<br />
-<h2 style='display: inline' id='invent'>Invent</h2><br />
-<br />
-<span>The mind works differently under sleep deprivation: It&#39;s easier to invent new stuff as it&#39;s easier to have a look at things from different perspectives. Until an hour ago, I didn&#39;t know yet what I would be blogging about for this month, and then I just started writing this, and it took me only half an hour to write the first draft of this blog post!</span><br />
-<br />
-<h2 style='display: inline' id='fast'>Fast</h2><br />
-<br />
-<span>I don&#39;t eat breakfast, and I don&#39;t eat lunch on these days. I only have dinner. Not eating means my mind doesn&#39;t get foggy, and I keep up the work momentum. This is called intermittent fasting, which not only generally helps to keep the weight under control and boosts the concentration power. Furthermore, intermittent fasting is healthy. You should include it in your routine, even after a good night&#39;s sleep.</span><br />
-<br />
-<h2 style='display: inline' id='stretch'>Stretch</h2><br />
-<br />
-<span>I won&#39;t have enough energy for strenuous physical exercise on those days, but a 30 to a 60-minute stretching session can make the day. Stretching will even hurt less under sleep deprivation! The stretching could also be substituted with a light Yoga session.</span><br />
-<br />
-<h2 style='display: inline' id='walk'>Walk</h2><br />
-<br />
-<span>Walking is healthy, and the time can be used to listen to interesting podcasts. The available concentration power might not be enough for more sophisticated audio literature. I will have enough energy for one or two daily walks (~10k steps for the day in total). Sometimes, I listen to music during walks. I also try to catch the bright sunlight.</span><br />
-<br />
-<h2 style='display: inline' id='red-bull'>Red Bull</h2><br />
-<br />
-<span>I don&#39;t think that Red Bull is a healthy drink. But once in a while, a can in the early afternoon brings wonders, and productivity will skyrocket. Other than Red Bull, drink a lot of water throughout the day. Don&#39;t forget to drink the sugar-free version; otherwise, your intermittent fast will be broken.</span><br />
-<br />
-<h2 style='display: inline' id='power-nap'>Power nap</h2><br />
-<br />
-<span>I don&#39;t know how to "enforce" a nap, but sometimes I manage to power nap, and it helps wonders. A 30-minute nap sometimes brings me back to normal. If you don&#39;t tend to fast as you are too hungry, it helps to try to nap approximately 30 minutes after eating something.</span><br />
-<br />
-<h2 style='display: inline' id='don-t-take-anything-personally'>Don&#39;t take anything personally.</h2><br />
-<br />
-<span>It&#39;s much more challenging to keep the mind "under control" in this state. Every annoyance can potentially upset, which could reflect on the work colleagues. It is wise to attempt to go with a positive attitude into the day, always smile and be polite to the family and colleagues at work. Don&#39;t let anything drop out to the people next; they don&#39;t deserve it as they didn&#39;t do anything wrong! Also, remember, it can&#39;t be controlled at all. It&#39;s time to let go of the annoyances for the day.</span><br />
-<br />
-<h2 style='display: inline' id='meditate'>Meditate</h2><br />
-<br />
-<span>To keep the good vibe, it helps to meditate for 10 minutes. Meditation must nothing be fancy. It can be just lying on the sofa and observing your thoughts as they come and go. Don&#39;t judge your thoughts, as that could put you in a negative mood. It&#39;s not necessary to sit in an uncomfortable Yoga pose, and it is not required to chant "Ohhmmmmm".</span><br />
-<br />
-<h2 style='display: inline' id='write-things-down'>Write things down</h2><br />
-<br />
-<span>Sometimes something requiring more concentration power demands time. This is where it helps to write a note in a journal and return to it another day. This doesn&#39;t mean slacking off but managing the rarely available concentration power for the day. I might repeat myself: Today, sweat all the small stuff. Tomorrow, do the deep-focused work on that crucial project again.</span><br />
-<br />
-<span>It&#39;s easier to forget things on those days, so everything should be written down so that it can be worked off later. Things written down will not be overlooked!</span><br />
-<br />
-<h2 style='display: inline' id='social-media'>Social media</h2><br />
-<br />
-<span>I wouldn&#39;t say I like checking social media, as it can consume a lot of time and can become addictive. But once in a while, I want to catch up with my "networks". After a bad night&#39;s sleep, it&#39;s the perfect time to check your social media. Once done, you don&#39;t have to do it anymore for the next couple of days!</span><br />
-<br />
-<span>E-Mail your comments to <span class='inlinecode'>paul@nospam.buetow.org</span> :-)</span><br />
-<br />
-<a class='textlink' href='../'>Back to the main site</a><br />
- </div>
- </content>
- </entry>
</feed>
diff --git a/gemfeed/index.gmi b/gemfeed/index.gmi
index 81d253c9..3fa70e06 100644
--- a/gemfeed/index.gmi
+++ b/gemfeed/index.gmi
@@ -2,6 +2,7 @@
## To be in the .zone!
+=> ./2025-03-05-sharing-on-social-media-with-gos.gmi 2025-03-05 - Sharing on Social Media with Gos v1.0.0
=> ./2025-02-08-random-weird-things-ii.gmi 2025-02-08 - Random Weird Things - Part Ⅱ
=> ./2025-02-01-f3s-kubernetes-with-freebsd-part-3.gmi 2025-02-01 - f3s: Kubernetes with FreeBSD - Part 3: Protecting from power cuts
=> ./2025-01-15-working-with-an-sre-interview.gmi 2025-01-15 - Working with an SRE Interview
diff --git a/gemfeed/sharing-on-social-media-with-gos/gos-screenshot.png b/gemfeed/sharing-on-social-media-with-gos/gos-screenshot.png
new file mode 100644
index 00000000..cc873df3
--- /dev/null
+++ b/gemfeed/sharing-on-social-media-with-gos/gos-screenshot.png
Binary files differ
diff --git a/gemfeed/sharing-on-social-media-with-gos/gos.png b/gemfeed/sharing-on-social-media-with-gos/gos.png
new file mode 100644
index 00000000..dc2808ce
--- /dev/null
+++ b/gemfeed/sharing-on-social-media-with-gos/gos.png
Binary files differ