RSS Parser Architecture & Specifications

1. Execution Modes & CLI Actions

The script can be invoked with specific actions (positional arguments without leading dashes). If no action is specified, the default behavior is triggered.


2. CLI Options (Flags with Dashes)

Global Options

Crawl-Specific Options (Only active/meaningful during ‘crawl’)

Post-Specific Options (Only active/meaningful during ‘post’)


3. Queue Mechanics


4. INI Configuration & Key Logic

INI Processing Snippet

# Convert space placeholders globally during INI load
$key =~ s/_/ /g;

5. XML Parsing & Data Extraction (parseRSS)

Matching Regex

Uses explicit character class matching letters and spaces inside double brackets, protected via \Q...\E for special characters:

# Inside description line-by-line loop
if ($line =~ /^\s*\Q$xmlfield\E\s*:\s*(.*)$/i) {
    $extracted{$alias} = ;
}

6. Post Structure & Splitting Logic

Posts are queued in chronological order of posting, but due to Timeline physics (newest on top), Part X is posted FIRST and lands at the bottom. Part 1 is posted LAST and lands at the top. Character tracking uses mastoLen. Framework overhead is calculated dynamically.

Part 1 (Top of Timeline - Posted LAST)

⚠️#Lebensmittelwarnung⚠️ (1/X)
Ware: [Content]

[Payload Part 1]

Quelle: [Link]
[Tags from INI]
Botinfo: [Text from INI]

Subsequent Parts up to Part X (Bottom of Timeline - Posted FIRST)

⚠️#Lebensmittelwarnung⚠️ (X/X)
Ware: [Content]

[Payload Part X]

Quelle: [Link]
[Tags from INI]