Commits

Anonymous committed ecb488e

Added twitter manage.py command for syncing

  • Participants
  • Parent commits ed3c0f5

Comments (0)

Files changed (3)

File syncr/twitter/management/__init__.py

Empty file added.

File syncr/twitter/management/commands/__init__.py

Empty file added.

File syncr/twitter/management/commands/syncr_twitter.py

+
+from django.core.management.base import LabelCommand
+from django.conf import settings
+
+from syncr.app.tweet import TwitterSyncr
+
+class Command(LabelCommand):
+  def handle_label(self, user, **options):
+
+    username = settings.TWITTER_USERNAME
+    password = settings.TWITTER_PASSWORD
+
+    t = TwitterSyncr(username, password)
+
+    print dir(t)
+    print t.syncTwitterUserTweets(user)
+
+