mirror of
https://github.com/twisterarmy/feed2twister.git
synced 2025-02-01 01:24:21 +00:00
user_shortener -- roll your own
Since is.gd is tor-hostile and ur1.ca is http only, I ran out of 3rd party ideas. Like my wife says: "What you don't do yourself, you do later" write a user_shortener.py file with a shorten(long_url) that returns a short url. May the source be with you.
This commit is contained in:
parent
4691f72792
commit
66c998c18c
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,3 +5,4 @@ README.html
|
||||
*.swp
|
||||
*~
|
||||
*.conf
|
||||
user_shortener.py
|
||||
|
@ -27,6 +27,9 @@ max_new_items_per_feed = 3
|
||||
# * Ur1.ca [Less tor-hostile] -- Dependencies:
|
||||
# * https://github.com/legoktm/ur1
|
||||
# * https://github.com/MiCHiLU/python-functools32
|
||||
# * user_shortener -- roll your own
|
||||
# * write a user_shortener.py file with a shorten(long_url)
|
||||
# that returns a short url. May the source be with you.
|
||||
use_shortener = False
|
||||
# tell is.gd to publicly show statistics for the shortened url
|
||||
shortener_stats = True
|
||||
|
@ -58,6 +58,8 @@ elif shortener in ['v', 'vgd', 'v.gd']:
|
||||
elif shortener in ['ur1', 'ur1.ca', 'ur1ca']:
|
||||
import ur1
|
||||
shorten = lambda url: ur1.shorten(url)
|
||||
elif shortener in ['user_shortener', 'user']:
|
||||
from user_shortener import shorten # User should create user_shortener.py
|
||||
elif shortener in ['false', 'no', 'n', '0']:
|
||||
shorten = lambda url: url
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user