shorturl
Version, currently 0.2.04 versions
- 0.2.1latestJun 22, 2018
- 0.2.0not indexedJan 2, 2020
- 0.1.1not indexedJan 2, 2020
- 0.1.0not indexedJan 2, 2020
github.com/veelenga/shorturl.cr
A tiny library to use URL shortening services
14 stars
0 dependents
License: MIT
Nothing has been indexed for 0.2.0 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
shorturl:
github: veelenga/shorturl.cr
version: ~> 0.2.0Then run:
shards installshard.yml
No shard.yml has been indexed for 0.2.0. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
# shorturl.cr [](https://travis-ci.org/veelenga/shorturl.cr)
A simple library to use URL shortening services. Inspired by Robby Russell's [shorturl](https://github.com/robbyrussell/shorturl).
## Installation
As a dependency in `shards.yml`:
```yaml
dependencies:
shorturl:
github: veelenga/shorturl.cr
branch: master
```
## Usage
As easy as it could be:
```crystal
require "shorturl"
# shorten
ShortURL.shorten "http://google.com" # => "http://tinyurl.com/2tx"
ShortURL.shorten "http://google.com", :tinyurl # => "http://tinyurl.com/2tx"
ShortURL.shorten "http://google.com", :isgd # => "http://is.gd/OwycZW"
# expand
ShortURL.expand "http://tinyurl.com/2tx" # => "http://google.com"
```
## Binary
As an addition, `shorturl` binary available for you:
```sh
$ crystal build bin/shorturl && ./shorturl -h
Usage: shorturl [arguments]
-u URL, --url=URL URL to be shortened
-s SERVICE, --service=SERVICE Shortening service
-V, --verbose Verbose output
-v, --version Version
-h, --help Prints this help
$ ./shorturl http://google.com
http://tinyurl.com/2tx
```
## Available services
Here is a list of available shortening services in shorturl.cr:
* [is.gd](http://is.gd)
* [shorl.com](http://shorl.com)
* [tinyurl.com](http://tinyurl.com)
* [v.gd](http://v.gd)
## Contributing
1. Fork it
1. Create your feature branch
1. Implement your feature
1. Run tests with `crystal spec`
1. Commit your changes
1. Push to the branch
1. Create a new Pull Request
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.2.0- Tagged
- Jan 2, 2020
- Commit
373188990c75- Indexed
- not yet
Dependents
No indexed shard depends on this one yet.
Repository
github.com/veelenga/shorturl.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 4