clone of my dotfiles.ssp.sh
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

update rss

sspaeti e48730d8 51aa6bc6

+99
+6
newsboat/.config/newsboat/config
··· 1 + # Miniflux sync (uncomment when Miniflux is set up) 2 + # urls-source "miniflux" 3 + # miniflux-url "https://rss.ssp.sh/" 4 + # miniflux-login "simon" 5 + # miniflux-passwordeval "pass show miniflux/rss.ssp.sh" 6 + 1 7 # general settings 2 8 auto-reload yes 3 9 max-items 50
+93
newsboat/.config/newsboat/export-opml-with-categories.sh
··· 1 + #!/bin/bash 2 + # Generates a categorized OPML from: 3 + # - urls file (for tag/category mapping) 4 + # - urls.opml (exported via `newsboat -e`, has proper titles) 5 + # 6 + # Usage: ./export-opml-with-categories.sh > feeds-categorized.opml 7 + # Then import into Miniflux: Settings > Import > OPML file 8 + 9 + SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" 10 + URLS_FILE="$SCRIPT_DIR/urls" 11 + OPML_FILE="$SCRIPT_DIR/urls.opml" 12 + 13 + if [[ ! -f "$URLS_FILE" ]]; then 14 + echo "Error: $URLS_FILE not found (run 'make decrypt' first?)" >&2 15 + exit 1 16 + fi 17 + if [[ ! -f "$OPML_FILE" ]]; then 18 + echo "Error: $OPML_FILE not found (run 'newsboat -e > urls.opml' first)" >&2 19 + exit 1 20 + fi 21 + 22 + # Build URL -> tag mapping from urls file 23 + declare -A url_tags 24 + while IFS= read -r line; do 25 + # Skip empty lines, comments, query feeds, separators 26 + [[ -z "$line" || "$line" =~ ^[[:space:]]*# || "$line" =~ ^\"query: || "$line" == "---" ]] && continue 27 + 28 + # Extract URL (first non-whitespace token) 29 + url=$(echo "$line" | awk '{print $1}') 30 + [[ ! "$url" =~ ^https?:// ]] && continue 31 + 32 + # Extract tags: words after URL that aren't ! or quoted strings 33 + tags=() 34 + skip_url=true 35 + in_quote=false 36 + for word in $line; do 37 + if $skip_url; then skip_url=false; continue; fi 38 + # Skip ! (hidden marker) 39 + [[ "$word" == "!" ]] && continue 40 + # Skip quoted strings (titles like "~My Title") 41 + if [[ "$word" =~ ^\" ]]; then in_quote=true; fi 42 + if $in_quote; then 43 + [[ "$word" =~ \"$ ]] && in_quote=false 44 + continue 45 + fi 46 + tags+=("$word") 47 + done 48 + 49 + # Use first tag as category; default to "uncategorized" 50 + url_tags["$url"]="${tags[0]:-uncategorized}" 51 + done < "$URLS_FILE" 52 + 53 + # Parse OPML and group by category 54 + declare -A category_entries 55 + while IFS= read -r line; do 56 + # Extract xmlUrl 57 + if [[ "$line" =~ xmlUrl=\"([^\"]+)\" ]]; then 58 + xml_url="${BASH_REMATCH[1]}" 59 + # Skip separator entries 60 + [[ "$xml_url" == "---" ]] && continue 61 + 62 + category="${url_tags[$xml_url]:-uncategorized}" 63 + 64 + # Unescape &amp; in URL for lookup fallback 65 + if [[ "$category" == "uncategorized" && "$xml_url" =~ \&amp\; ]]; then 66 + plain_url="${xml_url//&amp;/&}" 67 + category="${url_tags[$plain_url]:-uncategorized}" 68 + fi 69 + 70 + category_entries["$category"]+=" $line"$'\n' 71 + fi 72 + done < "$OPML_FILE" 73 + 74 + # Output categorized OPML 75 + cat << 'HEADER' 76 + <?xml version="1.0" encoding="UTF-8"?> 77 + <opml version="2.0"> 78 + <head> 79 + <title>Newsboat Feeds (with categories)</title> 80 + </head> 81 + <body> 82 + HEADER 83 + 84 + for cat in $(echo "${!category_entries[@]}" | tr ' ' '\n' | sort); do 85 + echo " <outline text=\"$cat\" title=\"$cat\">" 86 + echo -n "${category_entries[$cat]}" 87 + echo " </outline>" 88 + done 89 + 90 + cat << 'FOOTER' 91 + </body> 92 + </opml> 93 + FOOTER
newsboat/.config/newsboat/urls.gpg

This is a binary file and will not be displayed.