Presence.SocialFormat.Console
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.
The prebuilt binary is either Presence.SocialFormat.Console
(Mac OS or Linux), or Presence.SocialFormat.Console.exe
(Windows).
--help
parameter for more information-f
/ --input-file
) parameter, or through stdin
-i
/ --input-format
parameter-i JSON
- a JSON-formatted ThreadCompositionRequest
describing the content-i MD
- a pseudo-markdown formatted file describing the content-n
/ --networks
parameter--help
text, or see: Network specific configurationExamples of supported networks are:
Console
- the ‘Console’ network (prints to console, useful for testing)AT
- an AT-network (ie. BlueSky)-o
/ --output-format
parameter.-o JSON
- a JSON-formatted ThreadCompositionResponse
-o MD
- pseudo-markdown format-o HR
- a friendlier human-readable format (useful for inspecting output)NB. JSON is most useful if you intend to post using Presence.Posting.Console
See also: SampleData
(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
Provide input as either:
ThreadCompositionRequest
, orSee: Create threads with markdown
The SampleData/
directory contains some examples of each.
Presence.SocialFormat.Console -f SampleData/SimpleThread.md -n Console,AT -o HR
-f SampleData/SimpleThread.md
- use the markdown-like sample input file-n Console,AT
- format threads for the Console (test), and AT (BlueSky) networks-o HR
- render the results in a simple, human readable formatResult:
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