Skip to content

Feliix42/bitly-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bitly.rs

Build Status

This is a small command line program that shortens a URL, using the Bit.ly service.

As one of my first projects written in the Rust programming languages the code in this repository might not be the best in terms of style. Please, feel free to open an issue or a PR to help me improve my code!

Getting started

To use this program, follow these steps:

  1. Clone the repository with
$ git clone git@github.com:feliix42/bitly-rs
  1. Build the project.
$ cd bitly-rs
$ cargo build --release

Of course you can spare the release flag if you want to help me develop this program.

  1. Run it!
$ target/release/bitly https://google.com
Please enter your Bit.ly token:
[enter your token here]
http://bit.ly/1NpyVCz

Note that you will be asked for a Bit.ly access token the first time you run the script. It will be saved to ~/.bitly-rs.

Usage

Use $ bitly [long URL] to shorten any URL that comes to your mind.

Roadmap

  • Basic functionality
  • manage OAuth2 Access Token more elegant
  • take URL as command line argument
  • Error Handling (e.g. no network)
  • Better URL parsing
  • change/remove the saved token
  • Refactoring
  • Documentation

Notice

I am in no way associated with Bitly™, the only reason that this project uses Bitly as shortening service is that it has a nice API that is easy to handle. $other_shortening_service might also do a good job, sure!

License

bitly is available under the MIT license. See the LICENSE file for more info.

About

✂️ A terminal program that shortens URLs using Bitly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages