This script keeps your reddit account in sync with pocket by backing up all of your saved posts to Pocket. Reddit has a hard limit of 1000 posts which was the primary motivation behind making this script.
Run the following in the terminal
$ pip install -r requirements.txt
Before using this, you must create your own reddit app to obtain a public and a secret key. This can be done here.
Once you obtain your keys, create a new file in any text editor with the following content -
[mysettings]
client_id =YOUR_PUBLIC_APP_ID
client_secret = YOUR_SECRET_APP_ID
password = YOUR_PASSWORD
username = YOUR_USERNAME
Save it as praw.ini
.
Place it in your local working directory.
You will also need to create a Pocket app to obtain a consumer key for your Pocket account. This can be done here. Give it any name, description and give all the three permissions (Add, Modify, Retrieve). Check the Desktop (Other)
box in the platforms and click create. Copy the consumer key that you find on the next screen. It can also be found in my apps.
The first time run the script from the terminal and give your consumer key.
$ python reddit_pocket_sync.py --consumer YOUR_CONSUMER_KEY_HERE
It will ask you if you wish to save your key for future use. If you choose not to save it, you will have to provide it every single time . For future use just run the script -
$ python reddit_pocket_sync.py