#gemini #blog #sync #protocols #fediverse #synchronize #write-freely

app gemfreely

Synchronize Gemini protocol blogs to the Fediverse

7 releases

0.1.7 Mar 24, 2024
0.1.6 Mar 22, 2024

#1 in #fediverse

Download history 479/week @ 2024-03-20 38/week @ 2024-03-27 55/week @ 2024-04-03

572 downloads per month

AGPL-3.0-or-later

41KB
1K SLoC

Gemfreely

Main Repo: Agnos.is Git

Mirrored at GitHub

Sync Gemini protocol Gemlogs to WriteFreely instances.

Prerequisites, and who is this for?

To use gemfreely, You will need:

gemfreely is for people who want to link their Gemini capsule's gemlog into the Fediverse in a simple way. Gemini as a protocol is not so easily accessible to most who use the internet, and with the Fediverse gaining traction daily, this provides a way to increase the visibility of your Gemini capsule's blog posts.

What is Gemini? Gemini is a lightweight alternative to the regular Web, but not designed to replace it.

What is WriteFreely? WriteFreely is blogging software, similar to WordPress, that integrates with the so-called "Fediverse" (interconnected social media sites using the ActivityPub standard).

Usage

gemfreely help

Gemfreely is designed to be straightforward to use, and is mostly intended for use in an automated fashion. There are two steps to successfully synchronizing your gemlog to WriteFreely:

  1. gemfreely login
  2. gemfreely sync

WriteFreely Login

First, you must possess an access token to your WriteFreely instance. If you do not have one, gemfreely can create one for you:

gemfreely login --wf-url="https://witefreely.example.com/" -u yourusername -p "yourpassword"

If your login is successful, this will print out the WriteFreely access token. Save this for use, as it is not stored anywhere.

Sync Gemlog to WriteFreely

To synchronize your gemlog to WriteFreely, use the sync command. You will need:

  • Your WriteFreely access token. Note: Username and password are not supported for sync.
  • The full URL to your gemlog's feed (either Atom or Gemfeed, but Atom is preferable for publish date accuracy).
  • The URL of your writefreely blog.
gemfreely \
  -t "YourWFAccessToken" \
  --wf-alias="yourusername" \
  sync \
  --gemlog-url="gemini://example.com/gemlog/atom.xml" \
  --wf-url="https://writefreely.example.com"

The --wf-alias argument, in WriteFreely terms, is the alias of your WriteFreely collection. In more common terms, this is the identifier of your blog, and it's usually the same as your WriteFreely username.

Additional Options

The sync command has two additional options relating to sanitization of the converted gemlog posts:

--strip-before-marker <STRIP_BEFORE_MARKER>
  Remove all text BEFORE this marker in the Gemlog post

--strip-after-marker <STRIP_AFTER_MARKER>
  Remove all text AFTER this marker in the Gemlog post

These markers can be any valid UTF-8 string. The primary purpose of these options is to remove text that is present in the gemlog post, but doesn't need to be in the converted blog post in Markdown. On my gemlog, it is used to remove the title, footer, and header, which contain links to go back to other parts of the Gemini capsule. These don't need to be present in the WriteFreely post.

Logout

It is possible to invalidate the WriteFreely access token by using gemfreely logout:

gemfreely --wf-alias="youralias"
  \ -t "YourAccessToken" logout \
  --wf-url="https://writefreely.example.com"

This will revoke the access token on WriteFreely, and a new one will be required to use the sync command.

Reporting Issues

Issues can be reported at either GitHub or the canonical repository at https://git.agnos.is/.

Dependencies

~23–39MB
~744K SLoC