https://github.com/airblade/label_definitions
An open source list of label dimensions.
https://github.com/airblade/label_definitions
Last synced: 7 months ago
JSON representation
An open source list of label dimensions.
- Host: GitHub
- URL: https://github.com/airblade/label_definitions
- Owner: airblade
- License: mit
- Created: 2013-11-20T15:47:35.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2018-02-28T11:17:29.000Z (over 7 years ago)
- Last Synced: 2025-02-26T14:41:58.357Z (7 months ago)
- Language: Ruby
- Size: 19.5 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Label Definitions
An open source list of label dimensions. The data are in [labels.yml](./labels.yml).
Surprisingly Avery doesn't publish a structured list of their labels. Even more surprisingly, I can't find a good list on the internet. So here's a start.
Avery has so many labels that I add them here on an as-needed basis. Feel free to open a pull request for additional labels (supplying the dimensions).
## Installation
Add this line to your application's Gemfile:
gem 'label_definitions'
And then execute:
$ bundle
Or install it yourself as:
$ gem install label_definitions
## Usage
```ruby
# Get all the labels
LabelDefinitions.all
# => [ #, ... ]# Get a specific label
LabelDefinitions.find 'Avery 5160'
# => ## Add a custom label (not persisted)
custom = Label.new name: 'Custom', ...
LabelDefinitions.add custom
LabelDefinitions.find 'Custom'
# => #
```## Intellectual Property
Copyright 2013 Andrew Stewart, AirBlade Software Ltd. Released under the MIT licence.