Skip to content

Commit

Permalink
add wallabag doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Demah committed Apr 22, 2016
1 parent 0af38a4 commit 3135f1a
Show file tree
Hide file tree
Showing 15 changed files with 136 additions and 12 deletions.
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ for pelican support

* `awesome-slugify <https://pypi.python.org/pypi/awesome-slugify>`_ == 1.6.5

for wallabag support

* `wallabag_api <https://pypi.python.org/pypi/wallabag_api>`_ == 1.0.0

and finally :

Expand Down
6 changes: 3 additions & 3 deletions django_th/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,16 +288,16 @@
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
},
# Pelican
# Wallabag
'th_wallabag':
{
{
'TIMEOUT': 3600,
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/9",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
},
},
'redis-cache':
{
'TIMEOUT': 3600,
Expand Down
13 changes: 13 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ add the module django_th, and its friends, to the INSTALLED_APPS
# 'haystack', # mandatory if you plan to use th_search
# 'th_search', # then follow instructions from http://django-haystack.readthedocs.org/
# 'th_pelican',
# 'th_wallabag',
)
Expand All @@ -78,6 +79,7 @@ TH_SERVICES is a list of the services, like for example,
# 'th_trello.my_trello.ServiceTrello',
# 'th_twitter.my_twitter.ServiceTwitter',
# 'th_github.my_github.ServiceGithub',
# 'th_wallabag.my_wallabag.ServiceWallabag',
)
do not forget to uncomment one of the line to enable another service, or the application wont work.
Expand Down Expand Up @@ -296,6 +298,17 @@ For each TriggerHappy component, define one cache like below
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
},
# Wallabag
'th_wallabag':
{
'TIMEOUT': 3600,
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/9",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
},
}
in the settings, 'default' may already exist in your settings.py, so dont use it, otherwise, if it doesnt, django will complain, so add it.
Expand Down
2 changes: 1 addition & 1 deletion docs/evernote.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ from http://yourdomain.com/admin/django_th/servicesactivated/add/
* Select "Evernote",
* Set the Status to "Enabled"
* Check Auth Required: this will permit to redirect to the user (or you) to Evernote to ask to confirm the access to hist/your Evernote account
* Check Auth Required: this will permit to redirect to the user (or you) to Evernote to ask to confirm the access to his/your Evernote account
* Fill a description
2 changes: 1 addition & 1 deletion docs/github.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ from http://yourdomain.com/admin/django_th/servicesactivated/add/
* Select "GitHub",
* Set the Status to "Enabled"
* Check Auth Required: this will permit to redirect to the user (or you) to GitHub to ask to confirm the access to hist/your GitHub account
* Check Auth Required: this will permit to redirect to the user (or you) to GitHub to ask to confirm the access to his/your GitHub account
* Fill a description
3 changes: 3 additions & 0 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,6 @@ for pelican support

* `awesome-slugify <https://pypi.python.org/pypi/awesome-slugify>`_ == 1.6.5

for wallabag support

* `wallabag_api <https://pypi.python.org/pypi/wallabag_api>`_ == 1.0.0
2 changes: 1 addition & 1 deletion docs/pocket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ from http://yourdomain.com/admin/django_th/servicesactivated/add/
* Select "Pocket",
* Set the Status to "Enabled"
* Check Auth Required: this will permit to redirect to the user (or you) to Pocket to ask to confirm the access to hist/your Pocket account
* Check Auth Required: this will permit to redirect to the user (or you) to Pocket to ask to confirm the access to his/your Pocket account
* Fill a description
2 changes: 1 addition & 1 deletion docs/readability.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ from http://yourdomain.com/admin/django_th/servicesactivated/add/
* Select "Readability",
* Set the Status to "Enabled"
* Check Auth Required: this will permit to redirect to the user (or you) to Readability to ask to confirm the access to hist/your Readability account
* Check Auth Required: this will permit to redirect to the user (or you) to Readability to ask to confirm the access to his/your Readability account
* Fill a description
1 change: 1 addition & 0 deletions docs/services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ For all the services, the installation is the same :
search
trello
twitter
wallabag


2 changes: 1 addition & 1 deletion docs/trello.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ from http://yourdomain.com/admin/django_th/servicesactivated/add/
* Select "Trello",
* Set the Status to "Enabled"
* Check Auth Required: this will permit to redirect to the user (or you) to Trello to ask to confirm the access to hist/your Trello account
* Check Auth Required: this will permit to redirect to the user (or you) to Trello to ask to confirm the access to his/your Trello account
* Fill a description
Expand Down
2 changes: 1 addition & 1 deletion docs/twitter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,5 @@ from http://yourdomain.com/admin/django_th/servicesactivated/add/
* Select "Twitter",
* Set the Status to "Enabled"
* Check Auth Required: this will permit to redirect to the user (or you) to Twitter to ask to confirm the access to hist/your Twitter account
* Check Auth Required: this will permit to redirect to the user (or you) to Twitter to ask to confirm the access to his/your Twitter account
* Fill a description
6 changes: 4 additions & 2 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ Usage
Activating services :
---------------------

The user activates the service for their own need. If the service requires an external authentication, he will be redirected to the service which will ask him the authorization to acces the user's account. Once it's done, goes back to django-trigger-happy to finish and record the "auth token".
The user activates the service for their own need. If the service requires an external authentication,
he will be redirected to the service which will ask him the authorization to acces the user's account.
Once it's done, goes back to django-trigger-happy to finish and record the "auth token".

Using the activated services :
------------------------------
Expand All @@ -22,4 +24,4 @@ For example :
Fire the Triggers :
===================

Grabbing data and publishing data are done by Python-RQ each 12min and 15min.
Grabbing data and publishing data are done each 12min and 15min from your crontab
96 changes: 96 additions & 0 deletions docs/wallabag.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Wallabag
========

Service Description:
--------------------

a self hostable application for saving web pages

modifications of settings.py
----------------------------

1) INSTALLED_APPS :

.. code-block:: python
INSTALLED_APPS = (
'th_wallabag',
)
2) Cache :

After the default cache add :

.. code-block:: python
CACHES = {
'default':
{
'BACKEND': 'django.core.cache.backends.filebased.FileBasedCache',
'LOCATION': BASE_DIR + '/cache/',
'TIMEOUT': 600,
'OPTIONS': {
'MAX_ENTRIES': 1000
}
},
# Wallabag Cache
'th_wallabag':
{
'TIMEOUT': 500,
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": "redis://127.0.0.1:6379/9",
"OPTIONS": {
"CLIENT_CLASS": "django_redis.client.DefaultClient",
}
},
3) TH_SERVICES
add this line to the TH_SERVICES setting
.. code-block:: python
TH_SERVICES = (
'th_wallabag.my_wallabag.ServiceWallabag',
)
4) The service keys
I strongly recommend that your put the following in a local_settings.py, to avoid to accidentally push this to a public repository
.. code-block:: python
TH_WALLABAG = {
'host': 'http://localhost:8080',
'username': '<user>',
'password': '<password>',
'client_id': '<your client id>',
'client_secret': '<your client secret>'
}
to fill the parameters, have a look at https://github.com/foxmask/wallabag_api/blob/master/README.rst
creation of the table of the services
-------------------------------------
enter the following command
.. code-block:: bash
python manage.py migrate
from the admin panel, activation of the service
-----------------------------------------------
from http://yourdomain.com/admin/django_th/servicesactivated/add/
* Select "Wallabag",
* Set the Status to "Enabled"
* Check Auth Required: this will permit to redirect to the user (or you) to your Wallabag application which will request a token
* Fill a description
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ django-haystack==2.4.1
py-trello==0.4.3
twython==3.3.0
awesome-slugify==1.6.5
wallabag_api==1.0.0
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@
'awesome-slugify==1.6.5',
]

extras_require_wallabag = [
'wallabag_api==1.0.0',
]

extras_require_all = extras_require_github\
+ extras_require_pocket + extras_require_readability + extras_require_rss\
+ extras_require_search + extras_require_trello + extras_require_twitter\
+ extras_require_pelican
+ extras_require_pelican + extras_require_wallabag

setup(
name='django_th',
Expand Down Expand Up @@ -77,6 +81,7 @@
'trello': extras_require_trello,
'twitter': extras_require_twitter,
'pelican': extras_require_pelican,
'wallabag': extras_require_wallabag,
},
include_package_data=True,
)

0 comments on commit 3135f1a

Please sign in to comment.