presence

Using Presence.SocialFormat.Console

Installation

You can either install the CLI tools for your system from the latest release, or build and run the latest version of the code from the source code repository.

To build and run from the repository, clone the repository (if you haven’t already), and use the format.sh script. (You’ll need to have .NET 8 installed.)

Examples in this document use installed binaries, ie. Presence.SocialFormat.Console. You can substitute ./format.sh to invoke the post script if needed.

Usage

The prebuilt binary is either Presence.SocialFormat.Console (Mac OS or Linux), or Presence.SocialFormat.Console.exe (Windows).

Inputs

Examples of supported networks are:

Outputs

NB. JSON is most useful if you intend to post using Presence.Posting.Console

See also: SampleData

Examples

(These examples assume that the pre-built binary is available in the working directory.)

To format the sample thread for BlueSky (AT), you can pass in the request json as a file:

Presence.SocialFormat.Console -f SampleData/simple-snippets.json -n AT

Or pipe it in through stdin:

cat SampleData/simple-snippets.json | Presence.SocialFormat.Console -n AT

Input formats

Provide input as either:

See: Create threads with markdown

Example

The SampleData/ directory contains some examples of each.

Presence.SocialFormat.Console -f SampleData/SimpleThread.md -n Console,AT -o HR

Result:

Network: Console#0 ✅
---
 ⏩ 1. Hello from Presence! Presence is a social network
#Presence #CSharp #SocialNetwork #Posting #Tool
   ---
 ⏩ 2. thread formatting and posting tool.
#Presence #CSharp #SocialNetwork #Posting #Tool
   ---
 ⏩ 3. Find out more about Presence, the social
#Presence #CSharp #SocialNetwork #Posting #Tool
   ---
 ⏩ 4. formatting library, at:
#Presence #CSharp #SocialNetwork #Posting #Tool
   ---
 ⏩ 5. https://instantiator.dev/presence
#Presence #CSharp #SocialNetwork #Posting #Tool

Network: AT#0 ✅
---
 ⏩ 1. Hello from Presence! Presence is a social network thread formatting and posting tool. #Presence #CSharp #SocialNetwork #Posting #Tool
   ---
 ⏩ 2. Find out more about Presence, the social formatting library, at: https://instantiator.dev/presence