diff --git a/.gitignore b/.gitignore index afc499a..84016f9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ README.html *.swp *~ *.conf +user_shortener.py diff --git a/feed2twister.conf.example b/feed2twister.conf.example index e391898..8a9fb2e 100644 --- a/feed2twister.conf.example +++ b/feed2twister.conf.example @@ -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 diff --git a/feed2twister.py b/feed2twister.py index 4de1a61..59f8a5b 100755 --- a/feed2twister.py +++ b/feed2twister.py @@ -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: