readr

Minimal Terminal RSS Reader
Log | Files | Refs | README | LICENSE

config.h (1596B)


      1 #pragma once
      2 
      3 #define VERSION "v1.8"
      4 
      5 // recommended, pass as chrome for reddit feeds
      6 #define USER_AGENT                                                                                           \
      7 	"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 " \
      8 	"Safari/537.36"
      9 
     10 // seconds timeout for feed HTTP fetch
     11 #define TIMEOUT 15
     12 
     13 // source file for RSS URLS, one per line
     14 // folder and file must exist
     15 #define FEEDS "~/.config/readr/feeds"
     16 
     17 // verify SSL chain and ensure non-expiry and revoke status free
     18 #define VERIFY_SSL_PEER 1
     19 
     20 // enforce SSL cert is for the given host
     21 #define VERIFY_SSL_HOST 1
     22 
     23 // limited by the theorical limit of your OS "threads per process"
     24 // 2048 (safe), up to 8196 if configured on modern macOS
     25 #define MAX_FEEDS 512
     26 
     27 // folder must exist, file will be automatically created
     28 // can technically be cloud shared, dropbox etc. for replication
     29 #define DB_PATH "~/.config/readr/posts.sqlite"
     30 
     31 // the width of the left column (in chars)
     32 #define FEED_CAP 26
     33 
     34 // colours, for colour options, see termbox2.h
     35 #define LOGO_COLOR (TB_WHITE | TB_BRIGHT)
     36 #define TEXT_COLOR (TB_WHITE | TB_DIM)
     37 #define BACK_COLOR TB_DEFAULT
     38 #define LINE_COLOR (TB_WHITE | TB_DIM)
     39 #define FEED_COLOR TB_CYAN
     40 #define POST_COLOR (TB_YELLOW)
     41 #define DOMAIN_COLOR (TB_RED | TB_DIM)
     42 #define SEEN_COLOR (TB_YELLOW | TB_DIM)
     43 
     44 // how many posts we want to see per feed
     45 #define MAX_POST_PER_FEED 100
     46 
     47 // allocation caps, best not to fiddle with this
     48 #define POSTS_CAP 128
     49 #define FEEDS_CAP 32
     50 #define TITLE_CAP 128
     51 #define DOMAIN_CAP 64
     52 #define URL_CAP 8192