Skip to main content

GitHub pages-powered shortlinks.

Project description

gitlinks - Git Powered Go Links

Map memorable keys to URLS using Git and GitHub Pages
pip install gitlinks

Jump to setup | Follow me on Twitter

Quick Overview

gitlinks is a command line tool that maps keys to URLs via Git and GitHub Pages. The following table shows example mappings for user lengstrom's gitlinks repository goto:

Key URL GitHub Pages Reference
zoom https://mit.zoom.us/j/95091088705 http://loganengstrom.com/go/zoom
classes/NLP https://canvas.mit.edu/courses/7503 http://loganengstrom.com/go/classes/nlp

Here, if user lengstrom maps zoom to https://mit.zoom.us/j/95091088705, he (or any other user) can then access it at http://loganengstrom.com/goto/zoom (since the GitHub pages site lengstrom.github.io maps to loganengstrom.com). We can also organize keys through nesting, such as with classes/NLP.

Add, remove, and visualize link mappings through the command line!

$ gitlinks set zoom https://mit.zoom.us/j/95091088705
  => Success: Set key "zoom" → "https://mit.zoom.us/j/95091088705".
$ gitlinks delete zoom
  => Success: Deleted key "zoom".
$ gitlinks show
  => Checking for changes from remote...
  == GitLinks (Remote: git@github.com:lengstrom/goto.git) ==
  chungus                  →   https://en.wikipedia.org/wiki/Chungus
  classes/18.102           →   http://math.mit.edu/~rbm/18-102-S17/
  classes/6.005            →   http://web.mit.edu/6.031/www/fa18/general/
  classes/nlp              →   https://canvas.mit.edu/courses/7503
  friends/ilyas            →   http://andrewilyas.com
  friends/kwokchain        →   https://twitter.com/antimatter15
  friends/nomo             →   https://noahmoroze.com
  friends/penger           →   http://tonypeng.com
  friends/yang             →   https://yang.money
  papers/bugsnotfeatures   →   https://arxiv.org/abs/1905.02175
  papers/robusttransfer    →   https://arxiv.org/abs/2007.08489
  papers/unadversarial     →   https://arxiv.org/abs/2012.12235

gitlinks also generates an index page for your GitLinks: see http://loganengstrom.com/goto/ as an example.

Setup

Configure gitlinks in two steps!

First: Cook up a new GitHub Repository

First, visit https://github.com/new and choose a short, memorable name like go for your gitlinks repository.

Now, check the box "Add a README file" (the repository can't be empty).

Make the repository, then go your repository's settings (e.g. https://github.com/yourusername/repository_name/settings). Then, scroll down to the GitHub Pages section, and enable it for the `main` branch:

Initialize gitlinks locally

Install the gitlinks executable via pip: pip install gitlinks. Then, initialize gitlinks to use your repository: gitlinks init remote_url. Your remote_url can be found here:

Shoutouts

  • Tony Peng (Twitter, Website) - for inspiring this project!
  • Michael Yang (Twitter, Website) - for some massive PRs and aesthetics expertise!

License

GPL v3

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitlinks-0.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

gitlinks-0.1-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page