summaryrefslogtreecommitdiff
path: root/synctwitter.py
AgeCommit message (Collapse)Author
2020-07-11Misc fixes to make pep8 happyMagnus Hagander
Mostly whitespace fixes, but also some bare-exception fixes. Add a setup.cfg that specifies which pep8 settings we normally run with.
2020-07-11Convert tabs to spacesMagnus Hagander
Finally time to clean this repo up
2019-06-28Fix unicode and printing for python 3Magnus Hagander
2019-06-28Fix imports for python 3Magnus Hagander
2019-02-05Update twitter sync code to use requests_oauthlibMagnus Hagander
This simplifies the code a lot, and also adds the functionality to not get stuck in a cron-loop when somebody specifies a non-public twitter account as their twitter account. Instead when that happens just remove the twitter account from the feed (storing it in a new field, oldtwitteraccount, just to be on the safe side in case twitter does evil things to us at some point) Code mostly stolen from the pgeu website code.
2016-03-08Don't synchronize twitter users for unapproved feedsMagnus Hagander
2015-12-31Move all tables to public schemaMagnus Hagander
Since django still does not properly support multiple schemas, it creates a lot of pain to maintain the tables in different schemas. And the planet database has a very simple schema with few tables anyway, so there is arguably no actual gain from keeping them separate. When deploying, run SQL manually to move existing tables over: ALTER TABLE admin.auditlog SET SCHEMA public; ALTER TABLE admin.auth_group SET SCHEMA public; ALTER TABLE admin.auth_group_permissions SET SCHEMA public; ALTER TABLE admin.auth_message SET SCHEMA public; ALTER TABLE admin.auth_permission SET SCHEMA public; ALTER TABLE admin.auth_user SET SCHEMA public; ALTER TABLE admin.auth_user_groups SET SCHEMA public; ALTER TABLE admin.auth_user_user_permissions SET SCHEMA public; ALTER TABLE admin.django_admin_log SET SCHEMA public; ALTER TABLE admin.django_content_type SET SCHEMA public; ALTER TABLE admin.django_session SET SCHEMA public; ALTER TABLE admin.django_site SET SCHEMA public; ALTER TABLE planet.aggregatorlog SET SCHEMA public; ALTER TABLE planet.feeds SET SCHEMA public; ALTER TABLE planet.posts SET SCHEMA public; ALTER TABLE planet.teams SET SCHEMA public; DROP SCHEMA admin; DROP SCHEMA planet; and if there is a planetadmin user, also run ALTER USER planetadmin RESET search_path;
2013-06-13Avoid using global variable that wasn't intended to be globalMagnus Hagander
2012-09-11Oops, fix SQL query properlyMagnus Hagander
2012-09-11Turn all twitter handles to lowercase when comparingMagnus Hagander
You can't have different users with twitter handles only differing in case anyway.
2011-08-18Remove @ signs from twitter namesMagnus Hagander
2010-08-28The list_subscribers function belongs in TwitterClientMagnus Hagander
2010-08-28Refactor the posttotwitter.py script to use TwitterClient.Magnus Hagander
2010-08-28Add a script that synchronizes a twitter list with the list of subscribers.Magnus Hagander
In passing, create a TwitterClient base class for use for all communication with twitter.