Commits

Dan Carroll committed e196914

Fix license in setup.py, add more info to readme

Comments (0)

Files changed (2)

 be automated by using a utility like cron.
 
 
---------
 Features
---------
+========
 
 - Currently supports the following activity providers:
 
   easy to add support for additional networks
 
 
-------------
 Dependencies
-------------
+============
+
 Dependencies that *must* be meet to use the application:
 
 - Twitter support depends on python-twitter_
 - Google Reader and Reddit support depend on feedparser_
 
 
-------------
 Installation
-------------
+============
 
 From pypi_::
 
 
     $ hg clone https://bitbucket.org/dancarroll/django-activitysync
 
-and add social_auth to PYTHONPATH::
+and add activitysync to PYTHONPATH::
 
     $ export PYTHONPATH=$PYTHONPATH:$(pwd)/django-activitysync/
 
     $ sudo python setup.py install
 
 
--------------
 Configuration
--------------
-- Add activitysync to PYTHONPATH and installed applications::
+=============
+
+- Add activitysync to ``INSTALLED_APPS`` in settings.py::
 
     INSTALLED_APPS = (
         ...
         'activitysync'
     )
 
-- Add desired providers to ACTIVITYSYNC_PROVIDERS setting::
+- Add desired providers to ``ACTIVITYSYNC_PROVIDERS`` setting::
 
     ACTIVITYSYNC_PROVIDERS = (
         'activitysync.providers.googlereader.GoogleReaderProvider',
         'activitysync.providers.redditprovider.RedditProvider',
     )
 
-- Setup provider settings (dependent on which providers are added). Settings
-  required for built-in providers are::
+- Add provider settings to settings.py (dependent on which providers are added).
+  Settings required for built-in providers are::
 
     TWITTER_USERNAME        = ''
     REDDIT_USERNAME         = ''
     python manage.py migrate activitysync
 
 
------
 Usage
------
+=====
+
+Fetching and creating activity items
+------------------------------------
+
 Once configuration is completed, run the included management command
 to fetch activities for the configured providers::
 
 
 There are a few options available for the management command.
 
-- Use the --send-result option to send an email to the site admins (controlled
-  by the Django ADMIN setting) with the newly added activities (no email is
-  sent if there are no new items)::
+- Use the ``--send-result`` option to send an email to the site admins
+  (controlled by the Django ADMIN setting) with the newly added activities
+  (no email is sent if there are no new items)::
 
     python manage.py updateactivities --send_result
 
-- Use the --dry-run option to output the items to the console, but not
+- Use the ``--dry-run option`` to output the items to the console, but not
   actually create items in the database::
 
     python manage.py updateactivities --dry-run
 
 
+Using activity items
+--------------------
+
+Activity items can be accessed like any other model using Django's ORM. Here
+is a quick example of getting all published activity items (fetched items
+default to public, but can be hidden by modifying the item in the Django
+admin site)::
+
+    from django.shortcuts import render_to_response
+    from activitysync.models import Activity
+
+    def index(request):
+        return render_to_response(
+            'index.html',
+            { 'activities': Activity.objects.published() }
+        )
+
+Django-activitysync also provides a template tag for displaying items::
+
+    {% load activitysync_extras %}
+    {% render_activities activities %}
+
+The ``render_activities`` template tag will pass the object list and
+``MEDIA_URL`` values to the template ``activitysync/activities_tag.html``.
+The project comes with a sample template that will be used by default, or you
+can use it as a basis for your own. A second template tag,
+``render_activities_with_date_headers`` renders the activity list along with
+date headers for each unique day encountered.
+
+
 .. _Twitter: http://twitter.com/
 .. _Google Reader: http://www.google.com/reader/
 .. _Reddit: http://reddit.com/
     version = version,
     author = 'Dan Carroll',
     author_email = 'dan@dancarroll.org',
-    description = 'Fast and easy social activity aggregation for Django projects',
-    license = 'GPL',
-    keywords = 'django, social, application, twitter',
+    description = 'Fast, easy, and extensible social activity aggregation for Django projects',
+    license = 'BSD',
+    keywords = 'django, social, activity, application, twitter, reddit, google reader',
     url = 'https://bitbucket.org/dancarroll/django-activitysync',
     download_url = 'https://bitbucket.org/dancarroll/django-activitysync/downloads',
     packages = find_packages(),
     classifiers = ['Framework :: Django',
                    'Development Status :: 4 - Beta',
                    'Topic :: Internet',
+                   'Topic :: Software Development :: Libraries :: Python',
                    'Intended Audience :: Developers',
                    'Environment :: Web Environment',
+                   'Programming Language :: Python',
                    'Programming Language :: Python :: 2.6',
-                   'Programming Language :: Python :: 2.7'],
+                   'Programming Language :: Python :: 2.7',
+                   'License :: OSI Approved :: BSD License',
+                   'Operating System :: OS Independent'],
 )
+
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.