Project

silly-id

0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
Generate memorable random names to use in your apps or anywhere else.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

>= 0
 Project Readme

SillyId Gem Version

Generate Heroku-like memorable random names - in different languages (currently supporting 🇬🇧 and 🇳🇱).

The source repository was forked in order to support multiple languages, and to allow for easy customization of used nouns and adjectives.

Installation

Add this line to your application's Gemfile:

gem 'silly-id'

And then execute:

$ bundle

Or install it yourself as:

$ gem install silly-id

Usage

SillyId.haiku # =>"rough-snowflake-1142"

# Another locale? Change your I18n.locale
I18n.available_locales = [:en, :nl]; 
I18n.locale = :nl
SillyId.haiku # => "fabuleuse-kabeljauw-3699"

# Token range
SillyId.haiku(100) # => "nameless-star-13"

# Don't include the token
SillyId.haiku(0) # => "long-flower"

# Use a different delimiter
SillyId.haiku(9999, '.') # => "cool.leaf.6743"

# No token, no delimiter
SillyId.haiku(0, ' ') # => "green fire"

Supported locales

  • English
  • Dutch
  • Adding your language is easy, see below ↓

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

  • Add adjectives and nouns for your language, see lib/silly-id/words/
  • Report bugs
  • Fix bugs and submit pull requests
  • Write, clarify, or fix documentation
  • Suggest or add new features