about summary refs log tree commit diff stats
path: root/weedrc
blob: ea2221353280507280c66cc12d9d1dc2b1be9e4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# -*- sh -*-

SFEED="$HOME/.sfeed"
USER_AGENT='Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0'
sfeedpath="$SFEED/weedsfeeds"
maxjobs="$(nproc)"

### Feeds #######################################################

feeds() {
	## feed NAME FEED_URL BASE_URL ENCODING # defined by sfeedrc(5).
	feed dozens "https://tilde.town/~dozens/rsspect/feed.xml" "https://tilde.town/~dozens/"
	feed acdw "https://acdw.casa/weed.xml" "https://acdw.casa"
	# feed lucidiot
}

# Fetch #########################################################

fetch() { # fetch(name, url, feedfile)
	"${NOFETCH:-false}" && return
	curl -s -L \
		--max-redirs 3 \
		--header "'User-Agent: $USER_AGENT'" \
		--fail \
		--max-time 15 \
		"$2"
}

# Local Variables:
# truncate-lines: t
# End: