https://github.com/tejasbubane/emacs-git-io
URL shortner for emacs using https://git.io/
https://github.com/tejasbubane/emacs-git-io
emacs emacs-lisp github gitio url-shortener
Last synced: 12 months ago
JSON representation
URL shortner for emacs using https://git.io/
- Host: GitHub
- URL: https://github.com/tejasbubane/emacs-git-io
- Owner: tejasbubane
- License: gpl-3.0
- Created: 2018-02-22T18:44:49.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-03-22T10:38:50.000Z (almost 3 years ago)
- Last Synced: 2025-01-13T03:09:34.781Z (about 1 year ago)
- Topics: emacs, emacs-lisp, github, gitio, url-shortener
- Language: Emacs Lisp
- Homepage:
- Size: 73.2 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# emacs-git-io
[](https://melpa.org/#/git-io)
Interactive command to replace github URL at point with a shortened one using [git.io](https://git.io/).
Gets the URL at current cursor position, makes a request to [git.io](https://git.io/)
to get the shortened URL and replaces the original url with the shortened one.
**Note:** This package uses [git.io](https://git.io/) which works only for github URLs.
## Installation:
* **MELPA**: Package is available for install in MELPA - `git-io`
* **Manual**: Place the `git-io.el` file in your loadpath
and require it: `(require 'git-io)`.
## Usage:
Once the package is loaded, an interactive command `git-io-shorten` is available.
Point on the github url and invoke `git-io-shorten` command: `M-x git-io-shorten`.
Optionally, bind a key for quick usage:
```elisp
(global-set-key (kbd "C-x \\") 'git-io-shorten)
```
## Example:
See it in action:

## TODO:
* Handle the invalid url error better - give proper message.
* For some strange reason [git.io](https://git.io/) does not work with `http://` urls
check for `http://` urls and convert them to `https://` before making request.
* Write some tests.