Gemfreely

Git Repository

Gemfreely is a simple tool that synchronizes a gemlog from Geminispace into the Fediverse by leveraging WriteFreely, a federated blogging platform.

https://writefreely.org

Synchronization is currently one-way: posts are copied from the gemlog into the WriteFreely blog, which then sends them out to the Fediverse. The tool is designed to be primarily used in an automated setting, e.g. as part of a CI/CD pipeline for deploying a static site (which is how this capsule is built).

Documentation

The main documentation is always maintained at the Git repository. If there is a conflict between the information here and the information in the Git README, assume that the README has the most up-to-date information.

README - Main Documentation

This page contains a summary of how to use gemfreely. To use it, you will need:

Installation

Gemfreely can be installed in one of two ways: download a precompiled binary, or installed via cargo.

Precompiled binary releases can be found here.

To install with cargo:

cargo install gemfreely

Login

Gemfreely requires an API access token to sync posts to WriteFreely. If you do not have an access token already, the tool can generate one for you. If your login is successful, this will print out the WriteFreely access token. Save this for use, as it is not stored anywhere.

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

Syncing

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

The --wf-alias argument: In WriteFreely terms, it 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.

gemfreely \
  -t "YourWFAccessToken" \
  --wf-alias="yourusername" \
  sync \
  --gemlog-url="gemini://example.com/gemlog/atom.xml" \
  --wf-url="https://writefreely.example.com"

Sanitizing Posts

The sync command has some optional parameters that can be used to strip out text from the blog posts before they are sent to WriteFreely.

These markers can be any valid UTF-8 string. The primary purpose of these options is to remove text present in the gemlog post that doesn't need to be in the converted 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 in a WriteFreely post.

Logout

Finally, it is possible to invalidate the WriteFreely access token using gemfreely. This will revoke the access token on WriteFreely, and a new one will be required to use the sync command.

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

‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗

⤴️ [/projects] 🏠 Home