Code Monkey home page Code Monkey logo

export-saved-reddit's Introduction

Export Saved Reddit Posts

Build Status Code Coverage

Exports saved and/or upvoted Reddit posts into a HTML file that is ready to be imported into Google Chrome. Sorts items into folders by subreddit.

Requirements

Installation

First, make sure you have Python 3.x, pip, and git installed on your machine.

Run the following in your command prompt to install:

git clone https://github.com/csu/export-saved-reddit.git
cd export-saved-reddit
pip install -r requirements.txt

To install without git, download the source code from GitHub, extract the archive, and follow the steps above beginning from the second line.

Usage

  1. Make a new Reddit app to get a client id and a client secret.

    • Scroll to the bottom of the page and click "create app"
    • You can name the app anything (e.g. "export-saved"). Select the "script" option. Put anything for the redirect URI (e.g. https://christopher.su).
    • After creating the app, the client id will appear under the app name while the client secret will be labeled "secret".

  2. In the export-saved-reddit folder, rename the AccountDetails.py.example file to AccountDetails.py.

  3. Open the AccountDetails.py in a text editor and enter your Reddit username, password, client id, client secret within the corresponding quotation marks. Save and close the file.

  4. Back in your shell, run python export_saved.py in the export-saved-reddit folder. This will run the export, which will create chrome-bookmarks.html and export-saved.csv files containing your data in the same folder.

Additional Options

usage: export_saved.py [-h] [-u USERNAME] [-p PASSWORD] [-id CLIENT_ID]
                       [-s CLIENT_SECRET] [-v] [-up] [-all] [-V]

Exports saved Reddit posts into a HTML file that is ready to be imported into
Google Chrome or Firefox

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        pass in username as argument
  -p PASSWORD, --password PASSWORD
                        pass in password as argument
  -id CLIENT_ID, --client-id CLIENT_ID
                        pass in client id as argument
  -s CLIENT_SECRET, --client-secret CLIENT_SECRET
                        pass in client secret as argument
  -v, --verbose         increase output verbosity (deprecated; doesn't do
                        anything now)
  -up, --upvoted        get upvoted posts instead of saved posts
  -all, --all           get upvoted, saved, comments and submissions
  -V, --version         get program version.

Updating

To update the script to the latest version, enter the export-saved-reddit folder in your shell/command prompt and enter the following:

git pull

Help

If you have any questions or comments, please open an issue on GitHub.

If you would like to contribute, check out the project's open issues. Pull requests are welcome.

export-saved-reddit's People

Contributors

csu avatar rachmadaniharyono avatar 0xmh avatar kevinwaddle avatar favrik avatar lukepayne avatar losuler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.