This will generate a random legal ISBN number
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Konstantine 4089066534 updated readme and badge 3 weeks ago
examples Changed class names of generate make sense 4 months ago
spec Changed class names of generate make sense 4 months ago
src updated version, test line, and notes 3 weeks ago
.editorconfig Initial commit 6 months ago
.gitignore Initial commit 6 months ago
.travis.yml Initial commit 6 months ago
Cakefile Initial commit 6 months ago
LICENSE Updated ifs to cases and updated version to be more accurate 5 months ago
Makefile Initial commit 6 months ago
README.md updated readme and badge 3 weeks ago
shard.yml update readme and ver 4 months ago

README.md

CrISBN - Crystal ISBN Library

Language Not Working

Note: This repo is still a work in progress, changes are being made for the ISBN Generating process to be correct and produce the intended results. Other than that, Libraries for search and book info will be added in future commits. Pull requests welcomed.

CrISBN - Crystal library to handle ISBNs. The goal is for this library to handle any action you’d want from an ISBN such as validate, generate new ones, check to see if an ISBN belongs to something and what, and other actions that come to mind.

Main Repository is the GitLab one https://github.com/MaterialFuture/crisbn

Installation

  • Recommended: if you want to use cake, which is make for crystal then, (this is recommended )
    • Make sure you have cake installed curl https://raw.githubusercontent.com/axvm/cake/master/install.sh | bash
    • Run cake build
    • Run ./bin/crisbn
  • if you want to use make run make build

Usage

Add it to your shard.yml:

dependencies:
  crisbn:
    github: MaterialFuture/crisbn

and then install the library into your project:

$ shards install

If you want to use this in your project just reference is with

ISBN::Generate.english

I also have a lottery-like variable that is used that could be used elsewhere, right now it’s accessed like

RandNum.fromZero

or

RandNum.fromOne

You can also validate an ISBN by using like below

ISBN::Generate.english()

For more examples look in examples/ directory.

Development

  • All dev will be done in src

  • Run using crystal src/crisbn.cr

  • Recommended: if you want to use cake, which is make for crystal

    • Make sure you have cake installed curl https://raw.githubusercontent.com/axvm/cake/master/install.sh | bash
    • Run cake build
    • Run ./bin/crisbn
  • if you want to use make run make build

Spec/Test

Run crystal spec to make sure that all the tests pass before developing, and if there’s anything that fails let me know or feel free to make a PR or issue.

Contributing

  1. Fork it (https://github.com/MaterialFuture/crisbn/forks/new)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Notes

ISBN number generated from list here: https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_to_ISBN-13_conversion

Todo

  • Change this to have more purpose, like an ISBN library so people can create, validate, search, convert to 10 or 13, etc.
  • Add more language options
  • Add support for Amazon’s AISN
  • Add Admiral cli and Table cli creation