Skip to content

Latest commit

 

History

History
140 lines (99 loc) · 4.85 KB

USE.md

File metadata and controls

140 lines (99 loc) · 4.85 KB

Use the Katharsis

Prerequisites

Linux and macOS

First, download the appropriate binary from the Releases page.

You can find the platform comparison table in the Platform Support section.

If you're using a Debian-based system, you can directly install the .deb file from the download directory using apt:

sudo apt install katharsis.deb

Otherwise, you'll need to follow the step-by-step instructions below to install Katharsis.

Run the following command to extract the downloaded file:

tar -xzf ~/your/download/path/katharsis.tar.gz

Next, execute the following command in your home directory to create the necessary folders:

mkdir -p Formulae/bin

Move the downloaded binary to ~/Formulae/bin:

mv ~/your/extract/path/katharsis ~/Formulae/bin/katharsis

Modify your .zshrc or .bashrc file by adding the following configuration:

# Formulae
export PATH=$HOME/Formulae/bin:$PATH

You can also add an alias in the .zshrc or .bashrc file:

alias rss=katharsis

Alternatively, you can rename the binary file directly:

mv ~/Formulae/bin/katharsis ~/Formulae/bin/rss

Run the following command to apply the changes:

source .zshrc
# or
source .bashrc

Example

You can refer to our Examples.

Run the following command to generate a katharsis.config.toml file in the current directory:

katharsis init

Run the following command to create a default rss.xml:

katharsis

For a detailed explanation of the fields in the katharsis.config.toml file, refer to the Overview section below.

Command Overview

Command Description
init Generates a katharsis.config.toml file in the current directory.
help Displays help information.

Parameter Overview

Parameter Description
-c Specifies a katharsis.config.toml file as the configuration.
-h Displays help information.
-V Displays the current version of Katharsis.

If you do not specify the -c parameter, the katharsis.config.toml file in the current directory will be used by default.

Explanation of katharsis.config.toml Fields

You can refer to the RSS 2.0 at Harvard Law for more detailed documentation.

rss

Field Description
title The title of the website.
description A description of the website.
site_url The main URL of the website.
image Path to the channel's logo.
copyright Copyright information.
language Preferred language.
output Path to the local output RSS file.

Important Notes:

article

Field Description
title The tag containing the article's title.
description The tag or attribute containing the article's description.
input The file(s) to be used as input, matching specified rules.
author Information about the article's author.
link The prefix for the article's URL.
content The tag or attribute containing the article's content.
date The tag containing the article's publication date.
image File(s) to be used as the article's cover image.
sort Whether to sort articles by their publication date.

Important Notes:

  • The input field corresponds to the file body, which is the same as the article's URL slug.
  • The date field's tag must include a datetime attribute, and the attribute value must follow the %Y-%m-%d format.
  • The image field’s folder name must match the article's URL slug.