All Projects → karlicoss → ghexport

karlicoss / ghexport

Licence: MIT License
Export your Github activity: events, repositories, stars, etc.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ghexport

pockexport
Export/access your Pocket data, including highlights!
Stars: ✭ 124 (+588.89%)
Mutual labels:  export, backup, takeout, data-liberation
goodrexport
Goodreads data export
Stars: ✭ 16 (-11.11%)
Mutual labels:  export, backup, data-liberation
arctee
Atomic tee
Stars: ✭ 22 (+22.22%)
Mutual labels:  export, backup, data-liberation
Dynein
DynamoDB CLI written in Rust.
Stars: ✭ 126 (+600%)
Mutual labels:  export, backup
Quip Export
Export all folders and documents from Quip
Stars: ✭ 28 (+55.56%)
Mutual labels:  export, backup
Rexport
Reddit takeout: export your account data as JSON: comments, submissions, upvotes etc. 🦖
Stars: ✭ 87 (+383.33%)
Mutual labels:  export, backup
Wikiteam
Tools for downloading and preserving wikis. We archive wikis, from Wikipedia to tiniest wikis. As of 2020, WikiTeam has preserved more than 250,000 wikis.
Stars: ✭ 404 (+2144.44%)
Mutual labels:  export, backup
open2fa
Two-factor authentication app with import/export for iOS and macOS. All codes encrypted with AES 256. FaceID & TouchID support included. Written with love in SwiftUI ❤️
Stars: ✭ 24 (+33.33%)
Mutual labels:  export, backup
Flares
Flares 🔥 is a CloudFlare DNS backup tool
Stars: ✭ 156 (+766.67%)
Mutual labels:  export, backup
Hangons
Web app to parse and save your Hangouts.json file into a more friendly format.
Stars: ✭ 45 (+150%)
Mutual labels:  backup, takeout
calcardbackup
calcardbackup: moved to https://codeberg.org/BernieO/calcardbackup
Stars: ✭ 67 (+272.22%)
Mutual labels:  export, backup
evernote-backup
Backup & export all Evernote notes and notebooks
Stars: ✭ 104 (+477.78%)
Mutual labels:  export, backup
Elasticsearch Dump
Import and export tools for elasticsearch
Stars: ✭ 5,977 (+33105.56%)
Mutual labels:  export, backup
Roam To Git
Automatic RoamResearch backup to Git
Stars: ✭ 489 (+2616.67%)
Mutual labels:  export, backup
Github records archiver
Backs up a GitHub organization's repositories and all their associated information for archival purposes.
Stars: ✭ 100 (+455.56%)
Mutual labels:  export, backup
Qzoneexport
QQ空间导出助手,用于备份QQ空间的说说、日志、私密日记、相册、视频、留言板、QQ好友、收藏夹、分享、最近访客为文件,便于迁移与保存
Stars: ✭ 456 (+2433.33%)
Mutual labels:  export, backup
Node Firestore Import Export
Firestore data import and export
Stars: ✭ 271 (+1405.56%)
Mutual labels:  export, backup
connect-backup
A tool to backup and restore AWS Connect, with some useful other utilities too
Stars: ✭ 19 (+5.56%)
Mutual labels:  export, backup
browserexport
backup and parse browser history databases (chrome, firefox, safari, and other chrome/firefox derivatives)
Stars: ✭ 54 (+200%)
Mutual labels:  export, backup
fb-export
Export (most) of your Facebook data using Node.js and the Graph API.
Stars: ✭ 21 (+16.67%)
Mutual labels:  export, backup
Export your Github personal data: issues, PRs, comments, followers and followings, etc.

Note: this only deals with metadata. If you want a download of actual git repositories, I recommend using python-github-backup.

Setting up

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

    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 need to get a personal access token from settings. Note that you need to use repo scope.

Exporting

Usage:

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

token = "TOKEN"

After that, use:

python3 -m ghexport.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 ghexport.export --token <token>

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

You can also import ghexport.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!

API limitations

WARNING: github API limits extent to which you can retrieve certain data, e.g. events you can only get events from the past 90 days, and not more than 300 events.

I highly recommend to export regularly and keep old exports. Easy way to achieve it is command like this:

python3 -m ghexport.export --secrets /path/to/secrets.py >"export-$(date -I).json"

Or, you can use arctee that automates this.

To get your older data past 90 days, you can request a manual export in your account settings.

Known Issues

The requests (and therefore PyGithub) modules on which this depends seems to sometimes fail to login if a ~.netrc file is present, see here for context.

Using the data

You can use ghexport.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 ghexport.dal --source /path/to/export
  • you can also try it interactively: python3 -m ghexport.dal --source /path/to/export --interactive

Example output:

Your events:
Counter({'PushEvent': 181,
         'WatchEvent': 27,
         'CreateEvent': 22,
         'IssueCommentEvent': 20,
         'PullRequestEvent': 15,
         'IssuesEvent': 5,
         'DeleteEvent': 5,
         'ForkEvent': 3,
         'PullRequestReviewCommentEvent': 1})
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].