### Command execution examples for feed sources Source: https://rssguard.readthedocs.io/en/stable/_sources/services/standard-sources.md.txt Examples of commands used to generate or process feed data, utilizing the %data% placeholder for the user-data directory. ```text bash "%data%/scripts/download-feed.sh" python "%data%/scripts/build-feed.py" %data%\jq.exe "{ version: \"1.1\", title: \"Stars\", items: . }" ``` -------------------------------- ### Install and configure CSS2RSS Source: https://rssguard.readthedocs.io/en/stable/_sources/troubleshooting/flatpak.md.txt Commands to install dependencies, download the script, and manage the Flatpak SDK environment for CSS2RSS. ```sh flatpak install org.freedesktop.Sdk//25.08 ``` ```sh flatpak run --runtime=org.freedesktop.Sdk//25.08 --command=pip io.github.martinrotter.rssguard install beautifulsoup4 maya ``` ```sh flatpak run --command=curl io.github.martinrotter.rssguard https://raw.githubusercontent.com/Owyn/CSS2RSS/refs/heads/main/css2rss.py -o ~/.var/app/io.github.martinrotter.rssguard/config/rssguard5/css2rss.py ``` ```sh flatpak uninstall org.freedesktop.Sdk//25.08 ``` -------------------------------- ### Define ProcDump Extraction Path Source: https://rssguard.readthedocs.io/en/stable/_sources/contrib/bugs.md.txt Example path for extracting the ProcDump utility files. ```text C:\Users\YOUR_USER_NAME\Downloads\Procdump ``` -------------------------------- ### Generate Debug Log via Command Line Source: https://rssguard.readthedocs.io/en/stable/contrib/bugs.html Use the --debug and --log flags to capture detailed diagnostic information into a file. Ensure the application is closed before starting to capture the full session. ```bash rssguard --debug --log "rssguard.log" ``` ```bash "%ProgramFiles%\RSS Guard\rssguard.exe" --debug --log "%USERPROFILE%\Desktop\rssguard.log" ``` ```bash rssguard.exe --debug --log "%USERPROFILE%\Desktop\rssguard.log" ``` ```bash rssguard --debug --log "$HOME/rssguard.log" ``` ```bash /Applications/RSSGuard.app/Contents/MacOS/rssguard --debug --log "$HOME/Desktop/rssguard.log" ``` ```bash rssguard --debug --log "" ``` -------------------------------- ### Example JSON custom_data structure Source: https://rssguard.readthedocs.io/en/stable/_sources/contrib/migrate.md.txt Represents the serialized JSON format used for storing account-specific feed metadata in the 4.x database schema. ```json { "encoding": "UTF-8", "password": "AwUujeO2efOgYpX3g1/zoOTp9JULcLTZzwfY", "post_process": "", "protected": false, "source_type": 0, "type": 3, "username": "" } ``` -------------------------------- ### Display RSS Guard CLI help Source: https://rssguard.readthedocs.io/en/stable/features/cli.html View available command-line options and usage instructions. ```text Usage: rssguard [options] [url-1 ... url-n] RSS Guard Options: -h, --help Displays overview of CLI. -v, --version Displays version of the application. -d, --data Use custom folder for user data and disable single instance application mode. -s, --no-single-instance Allow running of multiple application instances. -g, --debug Enable "debug" CLI output. -l, --log Log application standard/error output to file. When empty string is provided as argument, then the log file will be stored in user data folder. -t, --style Force some application style. -u, --user-agent User custom User-Agent HTTP header for all network requests. This option takes precedence over User-Agent set via application settings. --threads Specify number of threads. Note that number cannot be higher than 32. Arguments: urls List of URL addresses pointing to individual online feeds which should be added. ``` -------------------------------- ### Display CLI Help Source: https://rssguard.readthedocs.io/en/stable/_sources/features/cli.md.txt Run this command in your terminal to view all available CLI options and arguments. ```bash rssguard --help ``` -------------------------------- ### fs.runExecutableGetOutput Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Launches an external executable and returns its standard output. ```APIDOC ## runExecutableGetOutput(String exec, Array params, String stdin_data, String working_directory) ### Description Launches an external executable, waits for it to finish, and returns its standard output as text. ### Parameters - **exec** (String) - The executable path. - **params** (Array) - Command line arguments. - **stdin_data** (String) - Data to pass to standard input. - **working_directory** (String) - The working directory for the process. ### Return Value - **String** - The standard output of the executable. ``` -------------------------------- ### fs.runExecutable Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Launches an external executable without waiting for it to finish. ```APIDOC ## runExecutable(String exec, Array params, String stdin_data, String working_directory) ### Description Launches an external executable with optional parameters, standard input, and working directory, without waiting for it to finish. ### Parameters - **exec** (String) - The executable path. - **params** (Array) - Command line arguments. - **stdin_data** (String) - Data to pass to standard input. - **working_directory** (String) - The working directory for the process. ``` -------------------------------- ### Use a SOCKS5 proxy with authentication Source: https://rssguard.readthedocs.io/en/stable/_sources/features/extractor.md.txt Configures a SOCKS5 proxy with username and password authentication. ```bash printf '{"proxy":{"type":"socks5","address":"127.0.0.1:1080","username":"user","password":"pass"}}' \ | rssguard-article-extractor "https://example.com/article" ``` -------------------------------- ### Use enclosure as URL Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Promotes the first enclosure URL to the main article URL. ```javascript /* * Turn the first enclosure into the main article URL. */ function filterMessage() { if (msg.enclosures.length > 0) { msg.url = msg.enclosures[0].url; msg.removeEnclosure(0); } return Msg.Accept; } ``` -------------------------------- ### Grant autostart directory access Source: https://rssguard.readthedocs.io/en/stable/_sources/troubleshooting/flatpak.md.txt Allows RSS Guard to write to the autostart directory for system startup functionality. ```sh flatpak override --user --filesystem=xdg-config/autostart io.github.martinrotter.rssguard ``` -------------------------------- ### Run ProcDump for Crash Monitoring Source: https://rssguard.readthedocs.io/en/stable/_sources/contrib/bugs.md.txt Commands to initiate ProcDump monitoring for RSS Guard crashes. ```batch procdump64.exe -accepteula -e -mm -n 1 -w rssguard.exe "%USERPROFILE%\Desktop\rssguard-dumps" ``` ```batch procdump.exe -accepteula -e -mm -n 1 -w rssguard.exe "%USERPROFILE%\Desktop\rssguard-dumps" ``` -------------------------------- ### Use existing HTML instead of downloading Source: https://rssguard.readthedocs.io/en/stable/_sources/features/extractor.md.txt Processes a provided HTML string directly instead of fetching content from the URL. ```bash printf '{"html":"

Hello

Body.

"}' \ | rssguard-article-extractor "https://example.com/article" ``` ```powershell '{"html":"

Hello

Body.

"}' | rssguard-article-extractor "https://example.com/article" ``` -------------------------------- ### Generate Debug Log via Command Line Source: https://rssguard.readthedocs.io/en/stable/_sources/contrib/bugs.md.txt Standard command to launch RSS Guard with debug logging enabled and output directed to a file. ```bash rssguard --debug --log "rssguard.log" ``` ```bash rssguard --debug --log "rssguard.log" ``` ```batch "%ProgramFiles%\RSS Guard\rssguard.exe" --debug --log "%USERPROFILE%\Desktop\rssguard.log" ``` ```batch rssguard.exe --debug --log "%USERPROFILE%\Desktop\rssguard.log" ``` ```bash rssguard --debug --log "$HOME/rssguard.log" ``` ```bash /Applications/RSSGuard.app/Contents/MacOS/rssguard --debug --log "$HOME/Desktop/rssguard.log" ``` ```bash rssguard --debug --log "" ``` -------------------------------- ### fs Source: https://rssguard.readthedocs.io/en/stable/features/filters.html File system and external process execution functions. ```APIDOC ## fs.runExecutable(String exec, Array params, String stdin_data, String working_directory) ### Description Launches an external executable without waiting for it to finish. ## fs.runExecutableGetOutput(String exec, Array params, String stdin_data, String working_directory) ### Description Launches an external executable, waits for it to finish, and returns its standard output as text. ``` -------------------------------- ### Execute Article Extractor via Command Line Source: https://rssguard.readthedocs.io/en/stable/_sources/features/extractor.md.txt Basic command line usage for the extractor tool, requiring a URL as the primary argument. ```text rssguard-article-extractor [options] ``` -------------------------------- ### Use an HTTP proxy Source: https://rssguard.readthedocs.io/en/stable/_sources/features/extractor.md.txt Configures an HTTP proxy for the extraction request. ```bash printf '{"proxy":{"type":"http","address":"127.0.0.1:8080"}}' \ | rssguard-article-extractor "https://example.com/article" ``` -------------------------------- ### Configure Extra XMPP Nodes Source: https://rssguard.readthedocs.io/en/stable/_sources/services/xmpp.md.txt Specify additional PubSub services, XMPP accounts, or chat rooms by adding one address per line in the Extra nodes configuration. ```text news.movim.eu person@example.org room@conference.example.org ``` -------------------------------- ### Custom Skin Directory Path Source: https://rssguard.readthedocs.io/en/stable/features/skins.html The directory structure for a custom skin named 'greenland' within the user-data path. ```text \skins\greenland ``` -------------------------------- ### Open Command Prompt Source: https://rssguard.readthedocs.io/en/stable/_sources/contrib/bugs.md.txt Command to open a terminal window from the File Explorer address bar. ```text cmd ``` -------------------------------- ### Navigate to ProcDump Directory Source: https://rssguard.readthedocs.io/en/stable/_sources/contrib/bugs.md.txt Command to change the working directory to the ProcDump folder in an elevated Command Prompt. ```batch cd /d "%USERPROFILE%\Downloads\Procdump" ``` -------------------------------- ### Application Functions Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Functions for logging and user notifications. ```APIDOC ## app Functions - `log(String message)`: Prints a message to the log and script output box. - `showNotification(String title, String text)`: Displays a desktop notification. ``` -------------------------------- ### Create Crash Dump Directory Source: https://rssguard.readthedocs.io/en/stable/_sources/contrib/bugs.md.txt Folder name to create on the Desktop for storing generated crash dump files. ```text rssguard-dumps ``` -------------------------------- ### utils Source: https://rssguard.readthedocs.io/en/stable/features/filters.html Utility functions for data conversion and file operations. ```APIDOC ## utils.fromXmlToJson(String xml_string) ### Description Converts an XML string into JSON. ## utils.readFile(String filename) ### Description Reads a file into a byte array. ## utils.writeFile(String filename, ArrayBuffer data) ### Description Writes a byte array to a file. ## utils.readTextFile(String filename) ### Description Reads a text file as UTF-8. ## utils.writeTextFile(String filename, String text) ### Description Writes text as UTF-8. ## utils.parseDateTime(String date_time) ### Description Converts a textual date/time representation into a proper Date object. ``` -------------------------------- ### Convert HTML to Plain Text via Pandoc Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Invokes an external Pandoc binary located in the user-data directory to convert HTML content. ```javascript /* * Convert article contents from HTML to plain text with Pandoc. * * This uses a Pandoc binary placed directly in the user-data folder. */ function filterMessage() { let res = fs.runExecutableGetOutput( '%data%\\pandoc.exe', ['-f', 'html', '-t', 'plain'], msg.contents); msg.contents = res; return Msg.Accept; } ``` -------------------------------- ### Grant permission to launch external applications Source: https://rssguard.readthedocs.io/en/stable/_sources/troubleshooting/flatpak.md.txt Provides the necessary permissions for RSS Guard to interact with external browsers or tools via the Flatpak portal. ```sh flatpak --user override --talk-name=org.freedesktop.Flatpak io.github.martinrotter.rssguard ``` -------------------------------- ### Filter articles by whitelist Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Accepts articles if their title matches any regular expression in the whitelist array. ```javascript /* * Accept whitelisted articles based on regular-expression filtering. */ function filterMessage() { const whitelist = [ /ubuntu.+desktop/i, /linux.+app/i, /\d.billion/i ]; if (whitelist.some(re => re.test(msg.title))) { return Msg.Accept; } return Msg.Ignore; } ``` -------------------------------- ### Whitelist articles via external file Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Accepts articles if they contain keywords found in an external text file. ```javascript /* * Keep a whitelist in an external text file. */ function filterMessage() { let keywords = []; try { let fileContent = utils.readTextFile('%data%\\whitelist.txt'); keywords = fileContent.split(/\r?\n/).filter(line => line.trim() !== ''); } catch (e) { app.log('No whitelist file found, accepting all articles.'); return Msg.Accept; } for (let k of keywords) { let re = new RegExp(k, 'i'); if (re.test(msg.title) || re.test(msg.contents)) { msg.isImportant = true; return Msg.Accept; } } return Msg.Ignore; } ``` -------------------------------- ### Add Feeds via CLI Source: https://rssguard.readthedocs.io/en/stable/_sources/features/cli.md.txt Pass feed URLs as arguments to add them to RSS Guard. Supports standard HTTP and feed URI schemes. ```powershell rssguard.exe "feed://archlinux.org/feeds/news" rssguard.exe "feed:https://archlinux.org/feeds/news" rssguard.exe "https://archlinux.org/feeds/news" ``` -------------------------------- ### Scripting Reference Documentation Source: https://rssguard.readthedocs.io/en/stable/contrib/compile.html Reference for the scripting objects available when writing article filters in RSS Guard. ```APIDOC ## Scripting Reference ### Available Objects - **msg**: Provides properties and functions for accessing message data. - **app**: Provides global application functions. - **run**: Provides properties related to the current execution context. - **acc**: Provides properties and functions for account management. - **feed**: Provides properties for feed data. - **utils**: Provides utility functions and properties. - **fs**: Provides file system interaction functions. ### Shared Data Types - **FilteringAction** (enum) - **DuplicityCheck** (enum) - **MessageEnclosure** (object) - **MessageCategory** (object) - **Label** (object) ``` -------------------------------- ### Configure Server Address for Google Reader API Source: https://rssguard.readthedocs.io/en/stable/services/google-reader-api.html Enter the base URL of the reader service without adding specific API path suffixes. ```text https://reader.example.com ``` -------------------------------- ### Locate SQLite database file Source: https://rssguard.readthedocs.io/en/stable/features/db.html The default SQLite database is stored in the database subdirectory within the user data folder. ```text \database\database.db ``` -------------------------------- ### Extract HTML from a URL Source: https://rssguard.readthedocs.io/en/stable/_sources/features/extractor.md.txt Basic usage to extract the article content in HTML format from a specified URL. ```bash rssguard-article-extractor "https://example.com/article" ``` -------------------------------- ### Configure Extractor with JSON Input Source: https://rssguard.readthedocs.io/en/stable/_sources/features/extractor.md.txt Optional JSON structure for providing custom HTTP headers, pre-fetched HTML content, or proxy settings via standard input. ```json { "headers": { "User-Agent": "Custom user agent", "Accept-Language": "en-US" }, "html": "...", "proxy": { "type": "http", "address": "127.0.0.1:8080", "username": "optional-user", "password": "optional-password" } } ``` -------------------------------- ### utils.writeFile Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Writes a byte array to a file. ```APIDOC ## writeFile(String filename, ArrayBuffer data) ### Description Writes a byte array to a file. ### Parameters - **filename** (String) - The path to the file. - **data** (ArrayBuffer) - The data to write. ``` -------------------------------- ### Export categories to labels Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Automatically converts feed categories into labels. ```javascript /* * Create labels automatically from message categories. */ function filterMessage() { msg.exportCategoriesToLabels(true); return Msg.Accept; } ``` -------------------------------- ### Pass custom headers Source: https://rssguard.readthedocs.io/en/stable/_sources/features/extractor.md.txt Provides custom HTTP headers via JSON input to the extractor. ```bash printf '{"headers":{"User-Agent":"RSS Guard script","Accept-Language":"en-US"}}' \ | rssguard-article-extractor "https://example.com/article" ``` ```powershell '{"headers":{"User-Agent":"RSS Guard script","Accept-Language":"en-US"}}' | rssguard-article-extractor "https://example.com/article" ``` -------------------------------- ### Specify Dump File Location Source: https://rssguard.readthedocs.io/en/stable/_sources/contrib/bugs.md.txt The expected directory path for the generated crash dump file. ```text Desktop\rssguard-dumps ``` -------------------------------- ### Extract plain text Source: https://rssguard.readthedocs.io/en/stable/_sources/features/extractor.md.txt Extracts the article content as plain text instead of HTML. ```bash rssguard-article-extractor -t "https://example.com/article" ``` -------------------------------- ### Assign labels to articles Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Assigns a specific label to articles matching certain keywords. ```javascript /* * Assign label "AI" to matching articles. * Make sure the label already exists. */ function filterMessage() { if (/AI|robot|software|hardware/i.test(msg.title)) { let id = acc.findLabel("AI"); if (id) { msg.assignLabel(id); } } return Msg.Accept; } ``` -------------------------------- ### Fetch full article contents Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Triggers the built-in article extractor for new, unique articles. ```javascript /* * Fetch fuller contents only for articles that seem new enough to keep. * * This uses RSS Guard's built-in article extractor automatically. */ function filterMessage() { if (!msg.isAlreadyInDatabase(Msg.SameCustomId | Msg.AllFeedsSameAccount)) { msg.fetchFullContents(false); } return Msg.Accept; } ``` -------------------------------- ### Run external article extractor Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Executes an external binary to clean up HTML content stored in the message. ```javascript /* * Run RSS Guard's article extractor directly on HTML already stored in msg.contents. * * This is useful when the feed already carries HTML and you want readability cleanup * without downloading the article URL again. */ function filterMessage() { if (!msg.url || !msg.contents) { return Msg.Accept; } const extractor = "C:\\Path\\To\\rssguard-article-extractor.exe"; const config = JSON.stringify({ html: msg.contents }); const extracted = fs.runExecutableGetOutput( extractor, [msg.url], config ); if (extracted && extracted.trim()) { msg.contents = extracted.trim(); } return Msg.Accept; } ``` -------------------------------- ### utils.writeTextFile Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Writes text as UTF-8. ```APIDOC ## writeTextFile(String filename, String text) ### Description Writes text as UTF-8. ### Parameters - **filename** (String) - The path to the file. - **text** (String) - The text content to write. ``` -------------------------------- ### Show desktop notifications Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Displays a notification for breaking news that hasn't been seen before. ```javascript /* * Show a desktop notification only for apparently new breaking news. */ function filterMessage() { if (/breaking/i.test(msg.title) && !msg.isAlreadyInDatabaseWinkler(Msg.SameTitle, 0.05)) { app.showNotification("Breaking News", msg.title); msg.isImportant = true; } return Msg.Accept; } ``` -------------------------------- ### Score articles via keyword file Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Reads a CSV file of keywords and scores to calculate an article's importance. ```javascript /* * Use a keyword file from the user-data folder to assign a score. * * Each line should be: * keyword,score */ function filterMessage() { let keywords = []; try { let fileContent = utils.readTextFile('%data%/keywords.txt'); keywords = fileContent .split(/\r?\n/) .map(line => { let parts = line.split(','); if (parts.length === 2) { return { term: parts[0].trim(), score: Number(parts[1].trim()) }; } return null; }) .filter(k => k && !isNaN(k.score)); } catch (e) { app.log('Keywords file missing -> default score 0.'); msg.score = 0; return Msg.Accept; } let totalScore = 0; for (let k of keywords) { let re = new RegExp(k.term, 'i'); if (re.test(msg.title) || re.test(msg.contents)) { totalScore += k.score; } } msg.score = Math.min(totalScore, 100); if (msg.score >= 70) { msg.isImportant = true; } return Msg.Accept; } ``` -------------------------------- ### utils.readFile Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Reads a file into a byte array. ```APIDOC ## readFile(String filename) ### Description Reads a file into a byte array. ### Parameters - **filename** (String) - The path to the file. ### Return Value - **ArrayBuffer** - The file contents as a byte array. ``` -------------------------------- ### Article Filtering Scripting Reference Source: https://rssguard.readthedocs.io/en/stable/index.html Reference for the scripting environment used in Article Filters, including available objects like msg, app, and feed. ```APIDOC ## Article Filtering Scripting Reference ### Description Users can write custom filters using the provided scripting objects and functions. ### Available Objects - **msg**: Provides properties and functions for article messages. - **app**: Provides global application functions. - **run**: Provides access to runtime properties. - **acc**: Provides properties and functions for accounts. - **feed**: Provides properties for feed data. - **utils**: Provides utility functions. - **fs**: Provides file system functions. ``` -------------------------------- ### Account Management Source: https://rssguard.readthedocs.io/en/stable/_sources/features/filters.md.txt Properties and functions for managing account labels. ```APIDOC ## acc Properties - `id` (Number): Database ID of the account. - `title` (String): Title of the account. - `availableLabels` (Array