README.md in ascii_to_svg-0.1.2 vs README.md in ascii_to_svg-0.1.3

- old
+ new

@@ -1,14 +1,16 @@ -# Ascii To Svg Generator for Ruby -This module generates beautiful svg images based on a string input. +<img src="https://github.com/a6b8/a6b8/blob/main/docs/ascii-to-svg-for-ruby/readme/ascii-to-svg-generator-headline.png" height="70" /><br> +**Ascii to Svg Generator for Ruby** +This module generates beautiful svg images based on a input string. + ## Examples e <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/banners/0.svg"> ```ruby -character_set = [ '-', '/', '|', "\\", '#' ] +character_set = [ '-', '/', '|', "\", '#' ] ``` <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/banners/3.svg"> ```ruby @@ -16,11 +18,11 @@ ``` <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/banners/4.svg"> ```ruby -character_set = [ '-', '|', '#', 'o', '\\' ] +character_set = [ '-', '|', '#', 'o', '\' ] ``` <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/banners/6.svg"> ```ruby @@ -32,11 +34,11 @@ ``` <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/banners/7.svg"> ```ruby -character_set = [ '/', '\\' ] +character_set = [ '/', '\' ] options = { style__line__stroke__color: 'brown', style__ellipse__stroke__color: 'orange' } ``` @@ -66,11 +68,11 @@ 2. Run Code ```ruby require 'ascii_to_svg' # Generate Example String - ascii = AsciiToSvg.example_string( ['x', 'o'], 256 ) + ascii = AsciiToSvg.example_string( [ 'x', 'o' ], 256 ) # Generate SVG svg = AsciiToSvg.from_string( ascii, 16, {} ) # => "<svg xmlns=\"http://www.w3.org/2000/svg ... @@ -91,11 +93,11 @@ | **length** | ```Integer``` | No | ```512``` | Lengt of generated String | | <br> ```ruby one = AsciiToSvg.example_string() - two = AsciiToSvg.example_string( ['x', 'o' ], 512 ) + two = AsciiToSvg.example_string( [ 'x', 'o' ], 512 ) ``` ### AsciiToSvg.from_string() | | **Type** | **Required** | **Description** | @@ -115,14 +117,14 @@ ### AsciiToSvg.similar_svg() ```ruby - original_str = AsciiToSvg.example_string( ['x', 'o'], 256 ) + original_str = AsciiToSvg.example_string( [ 'x', 'o' ], 256 ) original_svg = AsciiToSvg.from_string( original_str, 16, {} ) - copy_str = original_str[ 0, original_str.length-1 ] + copy_str = original_str[ 0, original_str.length - 1 ] copy_svg = AsciiToSvg.from_string( copy_str, 16, {} ) AsciiToSvg.similar_svg( original_svg, copy_svg ) # => => {:hexdigest1=>"79d5e81d230214749672a1c10e103c46", :hexdigest2=>"f48cacecf2720633dd081c3421d84981", :unique=>false, :score=>0.002799275481640046} ``` @@ -145,14 +147,10 @@ | | | | Offset Y | | | | V | | | ------------------------ ``` - - - - ## Signs | Nr | Sign | Image | SVG Element | | :-- | :-- | :-- | :-- | | 1 | "\\" | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/3-tl-br.svg"> | Line | @@ -189,18 +187,18 @@ ### Symbols Defines which `char` will be interpreted as "`svg element`" | Nr | Name | Key | Default | Type | Image | | :-- | :-- | :-- | :-- | :-- | :-- | -| C.1. | \ |:options__\\\\ | `["\\"]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/3-tl-br.svg"> | -| C.2. | / | :options__/ | `["/"]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/1-tr-bl.svg"> | -| C.3. | X | :options__X | `["X", "x"]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/7-x.svg"> | -| C.4. | - | :options__- | `["-"]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/0-minus.svg"> | -| C.5. | \| | :options__\| | `["\|", "1"]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/2-vertical.svg"> | -| C.6. | O | :options__O | `["O", "o", "0"]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/8-ellipse.svg"> | -| C.7. | + | :options__+ | `["+"]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/4-plus.svg"> | -| C.8. | # | :options__# | `["#"]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/5-rectangle.svg"> | +| C.1. | \ |:"symbols__\\\\" | `[ "\\" ]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/3-tl-br.svg"> | +| C.2. | / | :"symbols__/" | `[ "/" ]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/1-tr-bl.svg"> | +| C.3. | X | :"symbols__X" | `[ "X", "x" ]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/7-x.svg"> | +| C.4. | - | :"symbols__-" | `[ "-" ]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/0-minus.svg"> | +| C.5. | \| | :"symbols__\" | | `[ "\|", "1" ]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/2-vertical.svg"> | +| C.6. | O | :"symbols__O" | `[ "O", "o", "0" ]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/8-ellipse.svg"> | +| C.7. | + | :"symbols__+" | `[ "+" ]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/4-plus.svg"> | +| C.8. | # | :"symbols__#" | `[ "#" ]` | Array | <img src="https://raw.githubusercontent.com/a6b8/a6b8/main/docs/ascii-to-svg-for-ruby/readme/symbols/5-rectangle.svg"> | ### Style Defines all Style Attributes. Styles can only changed by type of the svg element except "Canvas". Under "Symbol" you can find out which Symbol uses which svg Element. @@ -234,14 +232,14 @@ | D.13. | Fill Opacity |:style__canvas__fill__opacity | `1.0` | Float | Set canvas infill opacity, use floating numbers.| ## Contributing -Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/ascii_to_svg. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/ascii_to_svg/blob/master/CODE_OF_CONDUCT.md). +Bug reports and pull requests are welcome on GitHub at https://github.com/a6b8/ascii_to_svg. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/a6b8/ascii_to_svg/blob/master/CODE_OF_CONDUCT.md). ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT). ## Code of Conduct -Everyone interacting in the AsciiToSvg project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/ascii_to_svg/blob/master/CODE_OF_CONDUCT.md). +Everyone interacting in the AsciiToSvg project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/a6b8/ascii_to_svg/blob/master/CODE_OF_CONDUCT.md).