Documentation updates.

This commit is contained in:
Michael Lazar
2015-12-18 18:30:52 -08:00
parent 52760e4000
commit b6ff23acad
4 changed files with 16 additions and 32 deletions

View File

@@ -166,7 +166,7 @@ RTV uses OAuth to facilitate logging into your reddit user account [#]_. The log
1. You initiate a login by pressing the ``u`` key.
2. You're redirected to a webbrowser where reddit will ask you to login and authorize RTV.
3. RTV uses the generated token to login on your behalf.
4. The token is stored on your computer at ``~/.config/rtv/refresh-token`` for future sessions. You can disable this behavior by setting ``persistent=False`` in your RTV config.
4. The token is stored on your computer at ``{HOME}/.config/rtv/refresh-token`` for future sessions. You can disable this behavior by setting ``persistent=False`` in your RTV config.
Note that RTV no longer allows you to input your username/password directly. This method of cookie based authentication has been deprecated by reddit and will not be supported in future releases [#]_.
@@ -177,34 +177,14 @@ Note that RTV no longer allows you to input your username/password directly. Thi
Config File
-----------
RTV will read a configuration placed at ``~/.config/rtv/rtv.cfg`` (or ``$XDG_CONFIG_HOME``).
Each line in the file will replace the corresponding default argument in the launch script.
This can be used to avoid having to re-enter login credentials every time the program is launched.
RTV loads its config from ``{HOME}/.config/rtv/rtv.cfg`` (or ``$XDG_CONFIG_HOME``).
You can auto-generate this file by running
Example initial config:
.. code-block:: bash
**rtv.cfg**
.. code-block:: ini
[rtv]
# Log file location
log=/tmp/rtv.log
# Default subreddit
subreddit=CollegeBasketball
# Default submission link - will be opened every time the program starts
# link=http://www.reddit.com/r/CollegeBasketball/comments/31irjq
# Turn on ascii-only mode and disable all unicode characters
# This may be necessary for compatibility with some terminal browsers
# ascii=True
# Enable persistent storage of your authentication token
# This allows you to remain logged in when you restart the program
persistent=True
$ rtv --copy-config
View the default `config <rtv.cfg>`_.
===
FAQ
@@ -238,19 +218,19 @@ How do I run the repository code directly?
=========
Changelog
=========
Please see `CHANGELOG.rst <https://github.com/michael-lazar/rtv/blob/master/CHANGELOG.rst>`_.
Please see `CHANGELOG.rst <CHANGELOG.rst>`_.
============
Contributors
============
Please see `CONTRIBUTORS.rst <https://github.com/michael-lazar/rtv/blob/master/CONTRIBUTORS.rst>`_.
Please see `CONTRIBUTORS.rst <CONTRIBUTORS.rst>`_.
=======
License
=======
Please see `LICENSE <https://github.com/michael-lazar/rtv/blob/master/LICENSE>`_.
Please see `LICENSE <LICENSE>`_.
.. |python| image:: https://img.shields.io/badge/python-2.7%2C%203.5-blue.svg

View File

@@ -38,10 +38,10 @@ def build_parser():
help='full URL of a submission that will be opened on start')
parser.add_argument(
'--log', metavar='FILE', action='store',
help='log HTTP requests')
help='log HTTP requests to the given file')
parser.add_argument(
'--config', metavar='FILE', action='store',
help='Load configuration settings')
help='Load configuration settings from the given file')
parser.add_argument(
'--ascii', action='store_const', const=True,
help='enable ascii-only mode')

View File

@@ -26,6 +26,7 @@ Basic Commands
`j/k` or `UP/DOWN` : Move the cursor up/down
`m/n` or `PgUp/PgDn`: Jump to the previous/next page
`o` or `ENTER` : Open the selected item as a webpage
`1`-`5` : Toggle post order
`r` or `F5` : Refresh page content
`u` : Log in or switch accounts
`?` : Show the help screen

View File

@@ -18,6 +18,9 @@ ascii = False
; Default subreddit that will be opened when the program launches.
subreddit = front
;subreddit = python
;subreddit = python+linux+programming
;subreddit = all
; Allow rtv to store reddit authentication credentials between sessions.
persistent = True
@@ -32,7 +35,7 @@ history_size = 200
# OAuth Settings
################
; This sections defines the paramaters that will be used during the OAuth
; authentication process. RTV is registered as an "installed app",
; authentication process. rtv is registered as an "installed app",
; see https://github.com/reddit/reddit/wiki/OAuth2 for more information.
; These settings are defined at https://www.reddit.com/prefs/apps and should