Giter Club home page Giter Club logo

instapexport's Introduction

Export your personal Instapaper data: bookmarked articles and highlights.

Setting up

  1. The easiest way is pip3 install --user git+https://github.com/karlicoss/instapexport.

    Alternatively, use git clone --recursive, or git pull && git submodules update --init. After that, you can use pip3 install --editable.

  2. To use the API, you’d need to request oauth_id and =oauth_secret= first
  3. Once you recieved them, use this to get oauth_token and oauth_token_secret (you only need to do it once): ./export.py --login

Exporting

Usage:

Recommended: create secrets.py keeping your api parameters, e.g.:

oauth_id = "OAUTH_ID"
oauth_secret = "OAUTH_SECRET"
oauth_token = "OAUTH_TOKEN"
oauth_token_secret = "OAUTH_TOKEN_SECRET"

After that, use:

python3 -m instapexport.export --secrets /path/to/secrets.py

That way you type less and have control over where you keep your plaintext secrets.

Alternatively, you can pass parameters directly, e.g.

python3 -m instapexport.export --oauth_id <oauth_id> --oauth_secret <oauth_secret> --oauth_token <oauth_token> --oauth_token_secret <oauth_token_secret>

However, this is verbose and prone to leaking your keys/tokens/passwords in shell history.

You can also import instapexport.export as a module and call get_json function directly to get raw JSON.

I highly recommend checking exported files at least once just to make sure they contain everything you expect from your export. If not, please feel free to ask or raise an issue!

Using the data

You can use instapexport.dal (stands for “Data Access/Abstraction Layer”) to access your exported data, even offline. I elaborate on motivation behind it here.

  • main usecase is to be imported as python module to allow for programmatic access to your data.

    You can find some inspiration in =my.= package that I’m using as an API to all my personal data.

  • to test it against your export, simply run: python3 -m instapexport.dal --source /path/to/export
  • you can also try it interactively: python3 -m instapexport.dal --source /path/to/export --interactive

Example output:

Parsed 203 pages
10 most highlighed pages:
  41 https://www.wired.com/1995/06/xanadu/ "The Curse of Xanadu"
  14 https://jborichevskiy.com/posts/digital-tools/ "Digital Tools I Wish Existed"
  12 http://slatestarcodex.com/2017/08/07/contra-grant-on-exaggerated-differences/ "Contra Grant On Exaggerated Differences"
  12 https://slatestarcodex.com/2019/06/04/book-review-the-secret-of-our-success/ "Book Review: The Secret Of Our Success"
  10 https://intelligence.org/2013/12/13/aaronson/ "Scott Aaronson on Philosophical Progress - Machine Intelligence Research Institute"
  10 http://www.thebioneer.com/nervous-system-training-muscle-fiber-recruitment-rate-coding-explained/ "Nervous System Training - Muscle Fiber Recruitment and Rate Coding Explained - The Bioneer"
   9 https://srconstantin.wordpress.com/2016/06/06/nootropics/ "Nootropics"
   9 https://blog.dropbox.com/topics/work-culture/-the-mind-at-work--guido-van-rossum-on-how-python-makes-thinking "The Mind at Work: Guido van Rossum on how Python makes thinking in code easier"
   9 https://slatestarcodex.com/2019/12/11/acc-is-eating-meat-a-net-harm/ "[ACC] Is Eating Meat A Net Harm?"
   9 https://beepb00p.xyz/my-data.html "What data on myself I collect and why? | Mildly entertainingᵝ"

instapexport's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

zuoquanxiong

instapexport's Issues

./export.py failing to obtain tokens

I'm trying to use Instaexport in conjunction with Promnesia to index my Instapaper highlights, but am having trouble at the 3rd step under the Setting Up section of the Readme. When I CD to the relevant directory and try to run ./export.py --login and/or python3 export.py --login, it returns an error of

  File "/Users/rwbarat/Library/Python/3.9/lib/python/site-packages/instapexport/export.py", line 6, in <module>
    from .exporthelpers.export_helper import Json
ImportError: attempted relative import with no known parent package

I already obtained my oauth_id and oauth_secret, so would like to proceed with the Exporting and User Data steps of the installation process, but need the oauth_token and oauth_token_secret to do so. Thanks!!

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.