| Crates.io | lemmy-scheduled-post-bot |
| lib.rs | lemmy-scheduled-post-bot |
| version | 0.1.1 |
| created_at | 2024-10-25 17:59:49.558621+00 |
| updated_at | 2024-10-25 18:33:44.293258+00 |
| description | Make posts to Lemmy based on the next configured post in a TOML file |
| homepage | |
| repository | https://github.com/stevenvergenz/lemmy-scheduled-post-bot |
| max_upload_size | |
| id | 1422780 |
| size | 108,399 |
Make posts to Lemmy based on the next configured post in a TOML file.
lemmy-scheduled-post-bot ./sample.toml.This program then does the following:
Note that this does not run as a service, and must be invoked directly to run. It's recommended to use in conjunction with cron or the Windows Task Scheduler.
This program takes as an argument the filename of a TOML file. This TOML file can contain the following sections:
settings (required)The [settings] section must contain the following fields:
instance - The domain of an instance of Lemmy, i.e. "lemmy.world".community - The community on that instance to which to post.username_or_email - The login of the account that will make the post.password - The password of the account.enabled - If absent or false, the input file is validated but no server communication is attempted.defaults (optional)The [defaults] section can contain all the same fields as [[post]], and if a field is absent in the post, the default field's value is used.
postOne or more [[post]] sections can be supplied, each of which can contain the following fields:
post_at (required) - A date and time when the post should be published. Should be a string in ISO 8601 format.
title - The name of the post.
body - The text content of the post in Markdown format.
link - The URL content of the post.
thumbnail - A URL to an image that should appear alongside the post.
alt_text - A text description of the thumbnail.
The post fields support limited template substitution. Supply custom fields in the [defaults] or [[post]] sections, and reference them within the post fields within braces like so: "My name is {name}.". Templating is not recursive, and only the defined post fields will be interpolated. See sample.toml for a full example.
Copyright (C) 2024 Steven Vergenz Licensed under the terms of the General Public License 3.0 or later