Compare commits
3 commits
643ff396fe
...
4a2c9d359b
Author | SHA1 | Date | |
---|---|---|---|
4a2c9d359b | |||
44ad9a1028 | |||
230d42c193 |
1 changed files with 4 additions and 2 deletions
6
uoeia
6
uoeia
|
@ -40,6 +40,7 @@ die() {
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm -f -- "$cache_dir"/*
|
rm -f -- "$cache_dir"/*
|
||||||
|
rm -r -- "$cache_dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
from_local() {
|
from_local() {
|
||||||
|
@ -75,12 +76,13 @@ dereference() {
|
||||||
# default replacements:
|
# default replacements:
|
||||||
# teddit to original redd.it hosted picture
|
# teddit to original redd.it hosted picture
|
||||||
output="${1//teddit.net\/pics\/w:null_/i.redd.it/}"
|
output="${1//teddit.net\/pics\/w:null_/i.redd.it/}"
|
||||||
|
output="${output//teddit.net/reddit.com}"
|
||||||
# nitter to twitter
|
# nitter to twitter
|
||||||
output="${1//nitter.net/twitter.com}"
|
output="${output//nitter.net/twitter.com}"
|
||||||
|
|
||||||
# custom replacements:
|
# custom replacements:
|
||||||
for rep in "${replacements[@]}"; do
|
for rep in "${replacements[@]}"; do
|
||||||
output="${1//${rep%:::*}/${rep#*:::}}"
|
output="${output//${rep%:::*}/${rep#*:::}}"
|
||||||
done
|
done
|
||||||
echo "$output"
|
echo "$output"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue