about summary refs log tree commit diff stats
path: root/weedrc
diff options
context:
space:
mode:
authorCase Duckworth2022-08-13 22:50:17 -0500
committerCase Duckworth2022-08-13 22:50:17 -0500
commit7bffb9e0da2bc196061a4559449d9f6d877886bf (patch)
tree68ce2af86ebf57c6fc8bdc94e8b3dc466f032bf8 /weedrc
parentAdd noa's sotw (diff)
downloadsfeed-7bffb9e0da2bc196061a4559449d9f6d877886bf.tar.gz
sfeed-7bffb9e0da2bc196061a4559449d9f6d877886bf.zip
Add weeds generation
Diffstat (limited to 'weedrc')
-rw-r--r--weedrc31
1 files changed, 31 insertions, 0 deletions
diff --git a/weedrc b/weedrc new file mode 100644 index 0000000..ea22213 --- /dev/null +++ b/weedrc
@@ -0,0 +1,31 @@
1# -*- sh -*-
2
3SFEED="$HOME/.sfeed"
4USER_AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0'
5sfeedpath="$SFEED/weedsfeeds"
6maxjobs="$(nproc)"
7
8### Feeds #######################################################
9
10feeds() {
11 ## feed NAME FEED_URL BASE_URL ENCODING # defined by sfeedrc(5).
12 feed dozens "https://tilde.town/~dozens/rsspect/feed.xml" "https://tilde.town/~dozens/"
13 feed acdw "https://acdw.casa/weed.xml" "https://acdw.casa"
14 # feed lucidiot
15}
16
17# Fetch #########################################################
18
19fetch() { # fetch(name, url, feedfile)
20 "${NOFETCH:-false}" && return
21 curl -s -L \
22 --max-redirs 3 \
23 --header "'User-Agent: $USER_AGENT'" \
24 --fail \
25 --max-time 15 \
26 "$2"
27}
28
29# Local Variables:
30# truncate-lines: t
31# End: