fretboards 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: acdbd086f02d7a43a325ae37cb55286d1dcd6aba
4
- data.tar.gz: f57a83258298b07ec0493ad6b2767449561f36c3
2
+ SHA256:
3
+ metadata.gz: 2f74b94171d59d8205ea78288d485e0456c0cec05235384b1467031d55f8e16e
4
+ data.tar.gz: 77b288c138152851fb1c9ec3b3d888f78ce9a1cd81b9361e2128031f74b03b6d
5
5
  SHA512:
6
- metadata.gz: 38822205e32348e2303ef7cc0014cb4b7d0657f39f50a498e5cd0ca033a796492048a03a901ab77085305fc2714b21219343fc28bade9d0085015cbf1a948796
7
- data.tar.gz: 37d3ab744e72c69c6737258d56a761165c70308023fb4b91bb0f9b117b7ff557fd46a47fa720e6342fcd27d87deee2e4c57b2ff729f5cb66cd93baa47306e269
6
+ metadata.gz: 2b193399564a8ed351a954ee6198b493846cd89f3671da04fa84d992934b9f65fc767f3e0b0cab0a818f14c4eaf02accbcd1e317b1ac8c9cb82620677680f433
7
+ data.tar.gz: a64774090babf06d96e2811f33600488a0d61739bc868645a3ef2a145aae18ce4145198c3e160cdb29b6c45bb210822db35abe700dd22611ae1015101b63de0c
@@ -0,0 +1,8 @@
1
+ Copyright (c) 2019 Choan Gálvez
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
8
+
@@ -0,0 +1,67 @@
1
+ # Fretboards
2
+
3
+ Fretboards is a Ruby library to programatically define fretboard diagrams of string instruments and render them to SVG and other formats.
4
+
5
+
6
+ ## Installation
7
+
8
+ This package is available in RubyGems and can be installed with:
9
+
10
+ gem install fretboards
11
+
12
+ For users working with the source from GitHub, you can run:
13
+
14
+ rake install
15
+
16
+ Which will build and install the gem (you may need sudo/root permissions). You can also chose to build the gem manually if you want:
17
+
18
+ rake build
19
+
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ require 'fretboards'
25
+
26
+ # initialize the fretboard with a set tuning
27
+ # number of strings is taken from the tuning
28
+ fb = Fretboards::Fretboard.new(tuning: Fretboards::Tuning::UKULELE)
29
+
30
+ # use the `terse` method for adding marks
31
+ # marks are passed as an array and added sequentially
32
+ # from bottom to first string
33
+ fb.terse(%w{ 1 2 1 1 })
34
+
35
+ # use an opening square bracket to signal the top string of a barre
36
+ fb.terse(%w{ 1[ 2 1 1 })
37
+
38
+ # use an exclamation mark on any of the dots to set it as featured (root, i.e.)
39
+ fb.terse(%w{ 1[ 2 1 1! })
40
+
41
+ # fingerings ar preceded by a `-`
42
+ fb.terse(%w{ 1-1 2-3 1-2 3-4 })
43
+
44
+ # use a renderer subclass to turn the definition into a representation
45
+ # the task of getting the output into a file is up to the library user
46
+ renderer = Fretboards::Renderer::Svg.new
47
+ renderer.render(fb)
48
+ ```
49
+
50
+
51
+ ## Contributing
52
+
53
+ Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
54
+
55
+ Please make sure to update tests as appropriate.
56
+
57
+
58
+ ## License
59
+
60
+ This project is licensed under the MIT license, a copy of which can be found in the LICENSE.txt file.
61
+
62
+
63
+ ## Support
64
+
65
+ Users looking for support should file an issue on the GitHub issue tracking page (https://github.com/choan/fretboards/issues), or file a pull request (https://github.com/choan/fretboards/pulls) if you have a fix available.
66
+
67
+ Those who wish to contribute directly to the project can contact me at <choan.galvez@gmail.com> to talk about getting repository access granted.
@@ -1,13 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
- require "fretboards/version"
3
+ require 'fretboards/version'
4
4
 
5
5
  Gem::Specification.new do |s|
6
- s.name = "fretboards"
6
+ s.name = 'fretboards'
7
7
  s.version = Fretboards::VERSION
8
- s.authors = ["Choan Galvez"]
9
- s.email = ["choan.galvez@gmail.com"]
10
- s.homepage = ""
8
+ s.authors = ['Choan Galvez']
9
+ s.email = ['choan.galvez@gmail.com']
10
+ s.licenses = ['MIT']
11
+ s.homepage = ''
11
12
  s.summary = 'Define and draw fretboards'
12
13
  s.description = 'Allows defining instrument fretboard structures and representing them as highly customizable SVG graphics.'
13
14
 
@@ -17,7 +17,7 @@ module Fretboards
17
17
  :open_root_symbol_attrs => { :"stroke-width" => 2, :r => 3 },
18
18
  :open_phantom_root_symbol_attrs => { :"stroke-width" => 1, :r => 3, :"stroke-dasharray" => "1 1" },
19
19
  :svg_attrs => { :xmlns => "http://www.w3.org/2000/svg", :version => "1.1" },
20
- :in_dot_attrs => { :"text-anchor" => "middle", :fill => "#fff", :"font-weight" => "normal", :"font-size" => 10, :"font-family" => "sans-serif", :"font-weight" => "bold"},
20
+ :in_dot_attrs => { :"text-anchor" => "middle", :fill => "#fff", :"font-size" => 10, :"font-family" => "sans-serif", :"font-weight" => "bold"},
21
21
  :in_dot_root_symbol_attrs => { :fill => "#000", :"font-weight" => "bold" },
22
22
  :in_bottom_attrs => { :"text-anchor" => "middle", :fill => "#000", :"font-weight" => "normal", :"font-size" => 8, :"font-family" => "sans-serif" },
23
23
  :label_attrs => { :"text-anchor" => "end", :fill => "#000", :"font-size" => 10, :"font-family" => 'sans-serif' },
@@ -1,3 +1,3 @@
1
1
  module Fretboards
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fretboards
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Choan Galvez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-25 00:00:00.000000000 Z
11
+ date: 2019-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -35,7 +35,9 @@ extra_rdoc_files: []
35
35
  files:
36
36
  - ".gitignore"
37
37
  - Gemfile
38
+ - LICENSE.txt
38
39
  - Rakefile
40
+ - Readme.md
39
41
  - bin/fretboards_render
40
42
  - fretboards.gemspec
41
43
  - lib/..rb
@@ -49,11 +51,11 @@ files:
49
51
  - lib/fretboards/renderer/text.rb
50
52
  - lib/fretboards/tuning.rb
51
53
  - lib/fretboards/version.rb
52
- - readme.mdown
53
54
  - test/test_fretboard.rb
54
55
  - test/test_text_renderer.rb
55
56
  homepage: ''
56
- licenses: []
57
+ licenses:
58
+ - MIT
57
59
  metadata: {}
58
60
  post_install_message:
59
61
  rdoc_options: []
@@ -70,8 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
72
  - !ruby/object:Gem::Version
71
73
  version: '0'
72
74
  requirements: []
73
- rubyforge_project: fretboards
74
- rubygems_version: 2.4.2
75
+ rubygems_version: 3.0.4
75
76
  signing_key:
76
77
  specification_version: 4
77
78
  summary: Define and draw fretboards
@@ -1,5 +0,0 @@
1
- # Fretboards
2
-
3
- Define and draw instrument fretboards.
4
-
5
- To be continued...