• Stars
    star
    13
  • Rank 1,465,120 (Top 30 %)
  • Language
    Crystal
  • License
    MIT License
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A tiny library to use URL shortening services

shorturl.cr Build Status

A simple library to use URL shortening services. Inspired by Robby Russell's shorturl.

Installation

As a dependency in shards.yml:

dependencies:
  shorturl:
    github: veelenga/shorturl.cr
    branch: master

Usage

As easy as it could be:

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:

$ 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:

Contributing

  1. Fork it
  2. Create your feature branch
  3. Implement your feature
  4. Run tests with crystal spec
  5. Commit your changes
  6. Push to the branch
  7. Create a new Pull Request

More Repositories

1

awesome-crystal

๐Ÿ’Ž A collection of awesome Crystal libraries, tools, frameworks and software
Crystal
3,307
star
2

dress

๐Ÿ‘— Dress up your stdout
Elixir
62
star
3

lua.cr

Crystal to Lua bridge
Crystal
59
star
4

carbon-now-sh.el

Emacs to https://carbon.now.sh integration
Emacs Lisp
56
star
5

aasm.cr

๐Ÿ”ƒ Easy to use finite state machine for Crystal classes
Crystal
50
star
6

emoji.cr

๐Ÿ’š Emoji for Crystal
Crystal
47
star
7

vicr

โœŒ๏ธ Vim-like Interactive CRystal
Crystal
41
star
8

i3ipc-ruby

๐Ÿ›ซ An improved Ruby library to control i3wm
Ruby
35
star
9

crystal-zsh

.oh-my-zsh plugin for Crystal
Shell
28
star
10

aws-lambda-face-blur

AWS Lambda Face Blur
JavaScript
17
star
11

aws-heic-converter

AWS Lamba HEIC Converter
JavaScript
13
star
12

rainbow-spec

Rainbow spec formatter for Crystal
Crystal
12
star
13

rblist

Russia Ban List
TypeScript
11
star
14

yymmdd

โณ Simple DSL for working with dates.
Crystal
9
star
15

wil

What I Learnt
Ruby
8
star
16

terminal-focus-reporting.el

Minor mode for terminal focus reporting
Emacs Lisp
7
star
17

ember-mail-to

Ember component to create HTML mailto links
JavaScript
6
star
18

play-crystal.el

Emacs to https://play.crystal-lang.org integration
Emacs Lisp
6
star
19

jsonapi-payload-explorer

JSON::API Payload Explorer
JavaScript
6
star
20

bojack.ex

Elixir client for BoJack - the unreliable key-value store ๐Ÿด
Elixir
5
star
21

aws-dynamodb.cr

Crystal client for AWS DynamoDB
Crystal
5
star
22

jira_report

๐Ÿ“Ž Cli tool that prints jira activity report.
Ruby
4
star
23

nyancat.ex

Nyancat for Elixir ๐Ÿฑ
Elixir
4
star
24

gh-pr-review-voodoo

A GitHub bot to improve PR review workflow.
TypeScript
3
star
25

crystal-snippets

YASnippet Crystal snippets for Emacs
Emacs Lisp
3
star
26

raph

Ruby Argument Parsing for Humans
Ruby
2
star
27

heroku-buildpack-sidekiq.cr

Sidekiq for Crystal Heroku Buildpack
Shell
2
star
28

curly.el

Straight way to work with current file locations in Emacs
Emacs Lisp
2
star
29

microtest

Smaller test framework, because it has power asserts as the only assertion.
Crystal
1
star
30

aws-lambda-blur-by-rekognition-label

AWS Lambda to blur objects detected by AWS Rekognition
JavaScript
1
star
31

homebrew-tap

Ruby
1
star
32

veelenga.github.io

My own blog pages
CSS
1
star
33

cybfootball

ะคัƒั‚ะฑะพะปัŒะฝั– ั‚ัƒั€ะฝั–ั€ะธ ั„ะฐะบัƒะปัŒั‚ะตั‚ัƒ ะบั–ะฑะตั€ะฝะตั‚ะธะบะธ
Ruby
1
star
34

libcurl.cr

Crystal bindings to libcurl [WIP]
Crystal
1
star
35

crown

Preview markdown files locally with Crystal Markdown
Crystal
1
star
36

any_setting

Load your settings with ease
Crystal
1
star
37

ee

exercism exercises
Elixir
1
star
38

hallo

I tiny project for Make your own Shard in Crystal language tutorial
Crystal
1
star
39

ctci

Solutions for Cracking the Coding Interview, 5th edition
Crystal
1
star
40

react-flash-messages

Rails flash messages with React
Ruby
1
star
41

rev.ex

Use reveal.js in your Elixir ๐Ÿšง
Elixir
1
star
42

dotfiles

Storing my dotfiles
Emacs Lisp
1
star
43

kyiv-coworking-map

Kyiv Coworking Map
HTML
1
star