From d2a5f3d25f544466455b0151b8c148588ddd2f63 Mon Sep 17 00:00:00 2001 From: Jovansonlee Cesar Date: Mon, 3 Feb 2020 11:22:17 +0800 Subject: Merge the rearchitecture code into the main svgbob code --- .gitignore | 1 + Behavior.md | 39 - Cargo.lock | 978 +- Cargo.toml | 5 + LICENSE | 202 - README.md | 348 - TODO.md | 12 - screenshots/vim.svg | 538 - spec.md | 184 - svgbob/Behavior.md | 39 + svgbob/Cargo.lock | 900 +- svgbob/Cargo.toml | 25 +- svgbob/Changelog.md | 8 + svgbob/LICENSE | 202 + svgbob/README.md | 348 + svgbob/TODO.md | 12 + svgbob/concepts.md | 11 + svgbob/examples/circuits.bob | 102 - svgbob/examples/circuits.rs | 20 +- svgbob/examples/circuits.svg | 334 - svgbob/examples/demo.bob | 296 - svgbob/examples/demo.rs | 19 +- svgbob/examples/demo.svg | 4601 ---- svgbob/examples/grid.rs | 8 - svgbob/examples/issue19.rs | 25 - svgbob/examples/issue19.svg | 66 - svgbob/examples/issue25.rs | 25 - svgbob/examples/issue25.svg | 42 - svgbob/examples/long.bob | 2016 -- svgbob/examples/long.rs | 20 +- svgbob/examples/long.svg | 21170 ------------------- svgbob/examples/simple.rs | 12 + svgbob/examples/spec1.rs | 17 - svgbob/examples/spec1.svg | 45 - svgbob/run_demo.sh | 1 + svgbob/run_long.sh | 1 + svgbob/run_simple.sh | 1 + svgbob/run_svg_to_ascii.sh | 1 + svgbob/spec.md | 184 + svgbob/src/block.rs | 31 - svgbob/src/box_drawing.rs | 225 - svgbob/src/buffer.rs | 9 + svgbob/src/buffer/cell_buffer.rs | 497 + svgbob/src/buffer/cell_buffer/cell.rs | 433 + svgbob/src/buffer/cell_buffer/cell/cell_grid.rs | 210 + svgbob/src/buffer/cell_buffer/contacts.rs | 67 + svgbob/src/buffer/cell_buffer/endorse.rs | 212 + svgbob/src/buffer/cell_buffer/settings.rs | 37 + svgbob/src/buffer/cell_buffer/span.rs | 591 + svgbob/src/buffer/fragment_buffer.rs | 173 + svgbob/src/buffer/fragment_buffer/fragment.rs | 735 + svgbob/src/buffer/fragment_buffer/fragment/arc.rs | 273 + .../src/buffer/fragment_buffer/fragment/circle.rs | 91 + svgbob/src/buffer/fragment_buffer/fragment/line.rs | 734 + .../buffer/fragment_buffer/fragment/marker_line.rs | 179 + .../src/buffer/fragment_buffer/fragment/polygon.rs | 163 + svgbob/src/buffer/fragment_buffer/fragment/rect.rs | 142 + svgbob/src/buffer/fragment_buffer/fragment/text.rs | 275 + svgbob/src/buffer/fragment_buffer/fragment_tree.rs | 210 + svgbob/src/buffer/property_buffer.rs | 347 + svgbob/src/buffer/property_buffer/property.rs | 281 + svgbob/src/buffer/string_buffer.rs | 107 + svgbob/src/element.rs | 360 - svgbob/src/enhance.rs | 380 - svgbob/src/enhance_circle.rs | 583 - svgbob/src/focus_char.rs | 431 - svgbob/src/fragments.rs | 60 - svgbob/src/grid.rs | 646 - svgbob/src/lib.rs | 90 +- svgbob/src/loc.rs | 150 - svgbob/src/loc_block.rs | 231 - svgbob/src/location.rs | 165 - svgbob/src/map.rs | 6 + svgbob/src/map/ascii_map.rs | 908 + svgbob/src/map/circle_map.rs | 475 + svgbob/src/map/unicode_map.rs | 346 + svgbob/src/optimizer.rs | 198 - svgbob/src/options.rs | 18 + svgbob/src/point.rs | 140 +- svgbob/src/point_block.rs | 48 - svgbob/src/properties.rs | 1750 -- svgbob/src/settings.rs | 49 - svgbob/src/svg_element.rs | 23 - svgbob/src/tests.rs | 116 - svgbob/src/util.rs | 413 + svgbob/test.sh | 1 + svgbob/test_data/circuits.bob | 102 + svgbob/test_data/demo.bob | 943 + svgbob/test_data/long.bob | 2017 ++ svgbob/test_data/simple.bob | 57 + svgbob_cli/Cargo.lock | 873 +- svgbob_cli/Cargo.toml | 9 +- svgbob_cli/examples/ascii_art.bob | 267 - svgbob_cli/examples/ascii_art.rs | 36 - svgbob_cli/examples/comic.bob | 33 - svgbob_cli/examples/comic.rs | 33 - svgbob_cli/examples/demo.rs | 129 - svgbob_cli/examples/demo.svg | 330 - svgbob_cli/examples/demo_clean.svg | 1 - svgbob_cli/examples/long.bob | 472 - svgbob_cli/examples/long.sh | 2 - svgbob_cli/examples/long.svg | 3871 ---- svgbob_cli/examples/memes.bob | 570 - svgbob_cli/examples/memes2.bob | 450 - svgbob_cli/examples/memes2.rs | 33 - svgbob_cli/examples/memes3.bob | 436 - svgbob_cli/examples/memes3.rs | 33 - svgbob_cli/examples/nice_to_have.bob | 63 - svgbob_cli/examples/render.rs | 33 - svgbob_cli/examples/schematic.bob | 609 - svgbob_cli/examples/schematic.svg | 2717 --- svgbob_cli/examples/simple.rs | 10 - svgbob_cli/src/main.rs | 33 +- 113 files changed, 14680 insertions(+), 45949 deletions(-) delete mode 100644 Behavior.md create mode 100644 Cargo.toml delete mode 100644 LICENSE delete mode 100644 README.md delete mode 100644 TODO.md delete mode 100644 screenshots/vim.svg delete mode 100644 spec.md create mode 100644 svgbob/Behavior.md create mode 100644 svgbob/Changelog.md create mode 100644 svgbob/LICENSE create mode 100644 svgbob/README.md create mode 100644 svgbob/TODO.md create mode 100644 svgbob/concepts.md delete mode 100644 svgbob/examples/circuits.bob delete mode 100644 svgbob/examples/circuits.svg delete mode 100644 svgbob/examples/demo.bob delete mode 100644 svgbob/examples/demo.svg delete mode 100644 svgbob/examples/grid.rs delete mode 100644 svgbob/examples/issue19.rs delete mode 100644 svgbob/examples/issue19.svg delete mode 100644 svgbob/examples/issue25.rs delete mode 100644 svgbob/examples/issue25.svg delete mode 100644 svgbob/examples/long.bob delete mode 100644 svgbob/examples/long.svg create mode 100644 svgbob/examples/simple.rs delete mode 100644 svgbob/examples/spec1.rs delete mode 100644 svgbob/examples/spec1.svg create mode 100755 svgbob/run_demo.sh create mode 100755 svgbob/run_long.sh create mode 100755 svgbob/run_simple.sh create mode 100755 svgbob/run_svg_to_ascii.sh create mode 100644 svgbob/spec.md delete mode 100644 svgbob/src/block.rs delete mode 100644 svgbob/src/box_drawing.rs create mode 100644 svgbob/src/buffer.rs create mode 100644 svgbob/src/buffer/cell_buffer.rs create mode 100644 svgbob/src/buffer/cell_buffer/cell.rs create mode 100644 svgbob/src/buffer/cell_buffer/cell/cell_grid.rs create mode 100644 svgbob/src/buffer/cell_buffer/contacts.rs create mode 100644 svgbob/src/buffer/cell_buffer/endorse.rs create mode 100644 svgbob/src/buffer/cell_buffer/settings.rs create mode 100644 svgbob/src/buffer/cell_buffer/span.rs create mode 100644 svgbob/src/buffer/fragment_buffer.rs create mode 100644 svgbob/src/buffer/fragment_buffer/fragment.rs create mode 100644 svgbob/src/buffer/fragment_buffer/fragment/arc.rs create mode 100644 svgbob/src/buffer/fragment_buffer/fragment/circle.rs create mode 100644 svgbob/src/buffer/fragment_buffer/fragment/line.rs create mode 100644 svgbob/src/buffer/fragment_buffer/fragment/marker_line.rs create mode 100644 svgbob/src/buffer/fragment_buffer/fragment/polygon.rs create mode 100644 svgbob/src/buffer/fragment_buffer/fragment/rect.rs create mode 100644 svgbob/src/buffer/fragment_buffer/fragment/text.rs create mode 100644 svgbob/src/buffer/fragment_buffer/fragment_tree.rs create mode 100644 svgbob/src/buffer/property_buffer.rs create mode 100644 svgbob/src/buffer/property_buffer/property.rs create mode 100644 svgbob/src/buffer/string_buffer.rs delete mode 100644 svgbob/src/element.rs delete mode 100644 svgbob/src/enhance.rs delete mode 100644 svgbob/src/enhance_circle.rs delete mode 100644 svgbob/src/focus_char.rs delete mode 100644 svgbob/src/fragments.rs delete mode 100644 svgbob/src/grid.rs delete mode 100644 svgbob/src/loc.rs delete mode 100644 svgbob/src/loc_block.rs delete mode 100644 svgbob/src/location.rs create mode 100644 svgbob/src/map.rs create mode 100644 svgbob/src/map/ascii_map.rs create mode 100644 svgbob/src/map/circle_map.rs create mode 100644 svgbob/src/map/unicode_map.rs delete mode 100644 svgbob/src/optimizer.rs create mode 100644 svgbob/src/options.rs delete mode 100644 svgbob/src/point_block.rs delete mode 100644 svgbob/src/properties.rs delete mode 100644 svgbob/src/settings.rs delete mode 100644 svgbob/src/svg_element.rs delete mode 100644 svgbob/src/tests.rs create mode 100644 svgbob/src/util.rs create mode 100755 svgbob/test.sh create mode 100644 svgbob/test_data/circuits.bob create mode 100644 svgbob/test_data/demo.bob create mode 100644 svgbob/test_data/long.bob create mode 100644 svgbob/test_data/simple.bob delete mode 100644 svgbob_cli/examples/ascii_art.bob delete mode 100644 svgbob_cli/examples/ascii_art.rs delete mode 100644 svgbob_cli/examples/comic.bob delete mode 100644 svgbob_cli/examples/comic.rs delete mode 100644 svgbob_cli/examples/demo.rs delete mode 100644 svgbob_cli/examples/demo.svg delete mode 100644 svgbob_cli/examples/demo_clean.svg delete mode 100644 svgbob_cli/examples/long.bob delete mode 100755 svgbob_cli/examples/long.sh delete mode 100644 svgbob_cli/examples/long.svg delete mode 100644 svgbob_cli/examples/memes.bob delete mode 100644 svgbob_cli/examples/memes2.bob delete mode 100644 svgbob_cli/examples/memes2.rs delete mode 100644 svgbob_cli/examples/memes3.bob delete mode 100644 svgbob_cli/examples/memes3.rs delete mode 100644 svgbob_cli/examples/nice_to_have.bob delete mode 100644 svgbob_cli/examples/render.rs delete mode 100644 svgbob_cli/examples/schematic.bob delete mode 100644 svgbob_cli/examples/schematic.svg delete mode 100644 svgbob_cli/examples/simple.rs diff --git a/.gitignore b/.gitignore index 2b2b90f..9be293f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ public/ parts/ prime/ snap/ +**/out/* stage/ *.snap* *.tar* diff --git a/Behavior.md b/Behavior.md deleted file mode 100644 index 4b001eb..0000000 --- a/Behavior.md +++ /dev/null @@ -1,39 +0,0 @@ - -`.` will make a rounded corner for top-left and top-right -`,` will make a rounded corner, only on the top-left -`\`` will make a rounded corner for bottom-left -`'` will make a rounded corner for bottom-left and bottom-right - -`+` will make a sharp corner when connected from 2 perpendicular lines. -will become a cross-section when connected from 4 directions (top, right, bottom, left) - -`\*` is a small solid circle when connected to a line - -`o` is a small clear circle when connected to a line -`O` is a bigger clear circle when connected to a line - -`-` is a solid line - when 3 `- - -` is separated by space will make a broken line - -`|` is a vertical line - -`~` is a broken line - -`\_` is a lowered solid line - -`:` is a vertical broken line - -`!` is a vertical broken line - -`<` will make an arrow to the left if a line connects from right - -`>` will make an arrow to the right if a line connects from left - -`V` will make an arrow pointing bottom if a line connects from top - will make an arrow pointing bottom-left if a line connects from top-right - will make an arrow pointing bottom-right if a line connects from top-left - -`^` will make an upward arrow if a line connects from bottom - will make an arrow pointing top-left if a line connects from bottom-right - will make an arrow pointing top-right if a line connects from bottom-left - diff --git a/Cargo.lock b/Cargo.lock index 3addd36..e49388f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,249 +1,1023 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] +name = "alga" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658f9468113d34781f6ca9d014d174c74b73de870f1e0e3ad32079bbab253b19" +dependencies = [ + "approx", + "libm", + "num-complex", + "num-traits", +] + [[package]] name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +dependencies = [ + "winapi", +] + +[[package]] +name = "anyhow" +version = "1.0.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7825f6833612eb2414095684fcf6c635becf3ce97fe48cf6421321e93bfbd53c" + +[[package]] +name = "approx" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" dependencies = [ - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits", ] [[package]] name = "atty" -version = "0.2.11" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", + "hermit-abi", + "libc", + "winapi", ] +[[package]] +name = "autocfg" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" + +[[package]] +name = "autocfg" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" + [[package]] name = "bitflags" -version = "1.0.3" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] -name = "cc" -version = "1.0.18" +name = "bumpalo" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fb8038c1ddc0a5f73787b130f4cc75151e96ed33e417fde765eb5a81e3532f4" [[package]] name = "cfg-if" -version = "0.1.5" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "clap" -version = "2.32.0" +version = "2.33.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5067f5bb2d80ef5d68b4c87db81601f0b75bca627bc2ef76b141d7b846a3c6d9" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "atty", + "bitflags", + "strsim", + "textwrap", + "unicode-width", + "vec_map", ] [[package]] -name = "difference" -version = "1.0.0" +name = "cloudabi" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "downcast-rs" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6" + +[[package]] +name = "either" +version = "1.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" + +[[package]] +name = "fixedbitset" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86d4de0081402f5e88cdac65c8dcdcc73118c1a7a465e2a05f0da05843a8ea33" + +[[package]] +name = "fuchsia-cprng" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" + +[[package]] +name = "futf" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b" +dependencies = [ + "mac", + "new_debug_unreachable", +] + +[[package]] +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +dependencies = [ + "typenum", +] + +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +dependencies = [ + "unicode-width", +] [[package]] name = "handlebars" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "937e9d49d65ffb5f70e95710a6c8539addf40200275ad8b6cdba0f0a59d5814d" +dependencies = [ + "log 0.3.9", + "pest", + "quick-error", + "rustc-serialize", +] + +[[package]] +name = "heck" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "hermit-abi" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff2656d88f158ce120947499e971d743c05dbcbed62e5bd2f38f1698bbc3772" +dependencies = [ + "libc", +] + +[[package]] +name = "html5ever" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ce65ac8028cf5a287a7dbf6c4e0a6cf2dcf022ed5b167a81bae66ebf599a8b7" +dependencies = [ + "log 0.4.8", + "mac", + "markup5ever", + "proc-macro2 0.4.30", + "quote 0.6.13", + "syn 0.15.44", +] + +[[package]] +name = "itertools" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" dependencies = [ - "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "either", ] +[[package]] +name = "itoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" + +[[package]] +name = "js-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7889c7c36282151f6bf465be4700359318aef36baa951462382eae49e9577cf9" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "lazy_static" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" + [[package]] name = "libc" -version = "0.2.43" +version = "0.2.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d515b1f41455adea1313a4a2ac8a8a477634fbae63cc6100e3aebb207ce61558" + +[[package]] +name = "libm" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" [[package]] name = "log" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" dependencies = [ - "log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", ] [[package]] name = "log" -version = "0.4.3" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "mac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4" + +[[package]] +name = "markup5ever" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1af46a727284117e09780d05038b1ce6fc9c76cc6df183c3dae5a8955a25e21" dependencies = [ - "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", + "phf", + "phf_codegen", + "serde", + "serde_derive", + "serde_json", + "string_cache", + "string_cache_codegen", + "tendril", ] +[[package]] +name = "matrixmultiply" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f" +dependencies = [ + "rawpointer", +] + +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + +[[package]] +name = "memchr" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3197e20c7edb283f87c071ddfc7a2cca8f8e0b888c242959846a6fce03c72223" + +[[package]] +name = "nalgebra" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaa9fddbc34c8c35dd2108515587b8ce0cab396f17977b8c738568e4edb521a2" +dependencies = [ + "alga", + "approx", + "generic-array", + "matrixmultiply", + "num-complex", + "num-rational", + "num-traits", + "rand", + "typenum", +] + +[[package]] +name = "ncollide2d" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd7791f03728b7fa45bd18af5adcb6f162a05e10853f273133547e9e12fa1910" +dependencies = [ + "alga", + "approx", + "bitflags", + "downcast-rs", + "either", + "nalgebra", + "num-traits", + "petgraph", + "rand", + "slab", + "smallvec", +] + +[[package]] +name = "new_debug_unreachable" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" + +[[package]] +name = "nom" +version = "4.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +dependencies = [ + "memchr", + "version_check 0.1.5", +] + +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg 1.0.0", + "num-traits", +] + +[[package]] +name = "num-integer" +version = "0.1.42" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +dependencies = [ + "autocfg 1.0.0", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da4dc79f9e6c81bef96148c8f6b8e72ad4541caa4a24373e900a36da07de03a3" +dependencies = [ + "autocfg 1.0.0", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +dependencies = [ + "autocfg 1.0.0", +] + +[[package]] +name = "ordermap" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a86ed3f5f244b372d6b1a00b72ef7f8876d0bc6a78a4c9985c53614041512063" + [[package]] name = "pest" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8" + +[[package]] +name = "petgraph" +version = "0.4.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" +dependencies = [ + "fixedbitset", + "ordermap", +] + +[[package]] +name = "phf" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3da44b85f8e8dfaec21adae67f95d93244b2ecf6ad2a692320598dcc8e6dd18" +dependencies = [ + "phf_shared", +] + +[[package]] +name = "phf_codegen" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b03e85129e324ad4166b06b2c7491ae27fe3ec353af72e72cd1654c7225d517e" +dependencies = [ + "phf_generator", + "phf_shared", +] + +[[package]] +name = "phf_generator" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662" +dependencies = [ + "phf_shared", + "rand", +] + +[[package]] +name = "phf_shared" +version = "0.7.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0" +dependencies = [ + "siphasher", +] [[package]] name = "pom" -version = "1.1.0" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef5cf7f52c12da93c26b63ee0d9f012bc82fb071851c546c030dc6ecb5f2994b" [[package]] -name = "pretty_assertions" -version = "0.2.1" +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "proc-macro2" +version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3acb317c6ff86a4e579dfa00fc5e6cca91ecbb4e7eb2df0468805b674eb88548" +dependencies = [ + "unicode-xid 0.2.0", +] + +[[package]] +name = "pulldown-cmark" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77043da1282374688ee212dc44b3f37ff929431de9c9adc3053bd3cee5630357" +dependencies = [ + "bitflags", + "getopts", + "memchr", + "unicase", ] [[package]] name = "quick-error" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] -name = "redox_syscall" -version = "0.1.40" +name = "quote" +version = "0.6.13" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +dependencies = [ + "proc-macro2 0.4.30", +] [[package]] -name = "redox_termios" +name = "quote" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "053a8c8bcc71fcce321828dc897a98ab9760bef03a4fc36693c231e5b3216cfe" +dependencies = [ + "proc-macro2 1.0.8", +] + +[[package]] +name = "rand" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" +dependencies = [ + "autocfg 0.1.7", + "libc", + "rand_chacha", + "rand_core 0.4.2", + "rand_hc", + "rand_isaac", + "rand_jitter", + "rand_os", + "rand_pcg", + "rand_xorshift", + "winapi", +] + +[[package]] +name = "rand_chacha" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.3.1", +] + +[[package]] +name = "rand_core" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" +dependencies = [ + "rand_core 0.4.2", +] + +[[package]] +name = "rand_core" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" + +[[package]] +name = "rand_hc" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_isaac" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rand_jitter" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" +dependencies = [ + "libc", + "rand_core 0.4.2", + "winapi", +] + +[[package]] +name = "rand_os" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +dependencies = [ + "cloudabi", + "fuchsia-cprng", + "libc", + "rand_core 0.4.2", + "rdrand", + "winapi", +] + +[[package]] +name = "rand_pcg" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +dependencies = [ + "autocfg 0.1.7", + "rand_core 0.4.2", +] + +[[package]] +name = "rand_xorshift" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +dependencies = [ + "rand_core 0.3.1", +] + +[[package]] +name = "rawpointer" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" + +[[package]] +name = "rdrand" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" dependencies = [ - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.3.1", ] [[package]] name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" [[package]] -name = "strsim" -version = "0.7.0" +name = "ryu" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8" [[package]] -name = "svg" -version = "0.5.11" +name = "sauron" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee92eb275e1c4dd3d2f314cf162d67f9db7916436a59aebf93715c40d6818c16" +dependencies = [ + "cfg-if", + "js-sys", + "lazy_static", + "log 0.4.8", + "pulldown-cmark", + "sauron_vdom 0.21.0", + "wasm-bindgen", + "web-sys", +] [[package]] -name = "svgbob" -version = "0.2.8" +name = "sauron_vdom" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfe93084d05ccac8279a19e75be5201cc7a3891a266617d6e2f320a00cc9261c" + +[[package]] +name = "sauron_vdom" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce9de12db6e3f973366706550ff4a3a2a3396d5dd4398ec666dd8d3552eb5ebe" dependencies = [ - "handlebars 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)", - "pom 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "pretty_assertions 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "svg 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "sys-info 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.8", ] [[package]] -name = "svgbob" -version = "0.2.8" +name = "serde" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449" + +[[package]] +name = "serde_derive" +version = "1.0.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64" +dependencies = [ + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn 1.0.14", +] + +[[package]] +name = "serde_json" +version = "1.0.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b01d7f0288608a01dca632cf1df859df6fd6ffa885300fc275ce2ba6221953" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "siphasher" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" + +[[package]] +name = "slab" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" + +[[package]] +name = "smallvec" +version = "0.6.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7b0758c52e15a8b5e3691eae6cc559f08eee9406e548a4477ba4e67770a82b6" +dependencies = [ + "maybe-uninit", +] + +[[package]] +name = "sourcefile" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bf77cb82ba8453b42b6ae1d692e4cdc92f9a47beaf89a847c8be83f4e328ad3" + +[[package]] +name = "string_cache" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89c058a82f9fd69b1becf8c274f412281038877c553182f1d02eb027045a2d67" +dependencies = [ + "lazy_static", + "new_debug_unreachable", + "phf_shared", + "precomputed-hash", + "serde", + "string_cache_codegen", + "string_cache_shared", +] + +[[package]] +name = "string_cache_codegen" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f45ed1b65bf9a4bf2f7b7dc59212d1926e9eaf00fa998988e420fd124467c6" +dependencies = [ + "phf_generator", + "phf_shared", + "proc-macro2 1.0.8", + "quote 1.0.2", + "string_cache_shared", +] + +[[package]] +name = "string_cache_shared" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc" + +[[package]] +name = "strsim" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -replace = "svgbob 0.2.8" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "svgbob" +version = "0.5.0" +dependencies = [ + "html5ever", + "itertools", + "lazy_static", + "nalgebra", + "ncollide2d", + "pom", + "sauron", + "sauron_vdom 0.20.0", + "serde_json", + "unicode-width", +] [[package]] name = "svgbob_cli" -version = "0.2.8" +version = "0.5.0" +dependencies = [ + "clap", + "handlebars", + "svgbob", +] + +[[package]] +name = "syn" +version = "0.15.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" dependencies = [ - "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "handlebars 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)", - "svg 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)", - "svgbob 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.13", + "unicode-xid 0.1.0", ] [[package]] -name = "sys-info" -version = "0.5.6" +name = "syn" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af6f3550d8dff9ef7dc34d384ac6f107e5d31c8f57d9f28e0081503f547ac8f5" dependencies = [ - "cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.8", + "quote 1.0.2", + "unicode-xid 0.2.0", ] [[package]] -name = "termion" -version = "1.5.1" +name = "tendril" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707feda9f2582d5d680d733e38755547a3e8fb471e7ba11452ecfd9ce93a5d3b" dependencies = [ - "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futf", + "mac", + "utf-8", ] [[package]] name = "textwrap" -version = "0.10.0" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "typenum" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d2783fe2d6b8c1101136184eb41be8b1ad379e4657050b8aaff0c79ee7575f9" + +[[package]] +name = "unicase" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" dependencies = [ - "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "version_check 0.9.1", ] +[[package]] +name = "unicode-segmentation" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" + [[package]] name = "unicode-width" -version = "0.1.5" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" + +[[package]] +name = "unicode-xid" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" + +[[package]] +name = "utf-8" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7" [[package]] name = "vec_map" version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" + +[[package]] +name = "version_check" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" + +[[package]] +name = "version_check" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" + +[[package]] +name = "wasm-bindgen" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5205e9afdf42282b192e2310a5b463a6d1c1d774e30dc3c791ac37ab42d2616c" +dependencies = [ + "cfg-if", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11cdb95816290b525b32587d76419facd99662a07e59d3cdb560488a819d9a45" +dependencies = [ + "bumpalo", + "lazy_static", + "log 0.4.8", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn 1.0.14", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "574094772ce6921576fb6f2e3f7497b8a76273b6db092be18fc48a082de09dc3" +dependencies = [ + "quote 1.0.2", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e85031354f25eaebe78bb7db1c3d86140312a911a106b2e29f9cc440ce3e7668" +dependencies = [ + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn 1.0.14", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5e7e61fc929f4c0dddb748b102ebf9f632e2b8d739f2016542b4de2965a9601" + +[[package]] +name = "wasm-bindgen-webidl" +version = "0.2.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef012a0d93fc0432df126a8eaf547b2dce25a8ce9212e1d3cbeef5c11157975d" +dependencies = [ + "anyhow", + "heck", + "log 0.4.8", + "proc-macro2 1.0.8", + "quote 1.0.2", + "syn 1.0.14", + "wasm-bindgen-backend", + "weedle", +] + +[[package]] +name = "web-sys" +version = "0.3.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf97caf6aa8c2b1dac90faf0db529d9d63c93846cca4911856f78a83cebf53b" +dependencies = [ + "anyhow", + "js-sys", + "sourcefile", + "wasm-bindgen", + "wasm-bindgen-webidl", +] + +[[package]] +name = "weedle" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3bb43f70885151e629e2a19ce9e50bd730fd436cfd4b666894c9ce4de9141164" +dependencies = [ + "nom", +] [[package]] name = "winapi" -version = "0.3.5" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" -"checksum bitflags 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d0c54bb8f454c567f21197eefcdbf5679d0bd99f2ddbe52e84c77061952e6789" -"checksum cc 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)" = "2119ea4867bd2b8ed3aecab467709720b2d55b1bcfe09f772fd68066eaf15275" -"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" -"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" -"checksum difference 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3304d19798a8e067e48d8e69b2c37f0b5e9b4e462504ad9e27e9f3fce02bba8" -"checksum handlebars 0.21.1 (registry+https://github.com/rust-lang/crates.io-index)" = "937e9d49d65ffb5f70e95710a6c8539addf40200275ad8b6cdba0f0a59d5814d" -"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" -"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" -"checksum log 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "61bd98ae7f7b754bc53dca7d44b604f733c6bba044ea6f41bc8d89272d8161d2" -"checksum pest 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0a6dda33d67c26f0aac90d324ab2eb7239c819fc7b2552fe9faa4fe88441edc8" -"checksum pom 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60f6ce597ecdcc9a098e7fddacb1065093a3d66446fa16c675e7e71d1b5c28e6" -"checksum pretty_assertions 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1d510007841e87c7a6d829a36f7f0acb72aef12e38cc89073fe39810c1d976ac" -"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" -"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" -"checksum svg 0.5.11 (registry+https://github.com/rust-lang/crates.io-index)" = "7518a18ac78da03c41ca0611128c6d8adf1efae0773c337d6c19793dce860c9b" -"checksum svgbob 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "e0a04e79a650ad14ceb021dc289e9f14e44d21fa44d9a3e9108243eff7797602" -"checksum sys-info 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "617f594d3869801871433390254b4a79f2a18176d7f4ad5784fa990bc8c12986" -"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" -"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" -"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" -"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" -"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..59e188d --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,5 @@ +[workspace] +members = [ + "svgbob", + "svgbob_cli", +] diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 7dc9935..0000000 --- a/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2016 Jovansonlee B. Cesar - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index 27779ee..0000000 --- a/README.md +++ /dev/null @@ -1,348 +0,0 @@ -# Svgbob - -svgbob’s current version badge - - - -Svgbob is an ascii to svg converter. - -There is a Work-in-Progress spec [here](https://github.com/ivanceras/svgbob/blob/master/spec.md) -Contribution to the spec is welcomed. - -#### Please support this project: - [![Become a patron](https://c5.patreon.com/external/logo/become_a_patron_button.png)](https://www.patreon.com/ivanceras) - - -[Demo](http://ivanceras.github.io/svgbob-editor/) - -[Docs](https://docs.rs/svgbob) - - -# Using in command line - -`cargo install svgbob_cli` - -`svgbob` normally operates on stdin and stdout: -```console -$ svgbob < examples/long.bob > long.svg -``` -produces an SVG in `long.svg` similar to the one produced by the old `main` binary. `svgbob` also allows passing arguments instead: -```console -$ svgbob examples/long.bob -o long.svg -``` -And you can mix and match: -```console -$ svgbob -o long.svg < examples/long.bob -$ svgbob examples/long.bob > long.svg -``` - -You can pipe string from the output of other program: -```console -echo -e "+--+\n| |\n+--+" | svgbob -``` -You can also pass an inline string: -```console -svgbob -s -- "+--+\n| |\n+--+" -``` - -This is also documented in the output of `svgbob --help`: -```console - -svgbob 0.2.5 -SvgBobRus is an ascii to svg converter - -USAGE: - svgbob [FLAGS] [OPTIONS] [input] [SUBCOMMAND] - -FLAGS: - -h, --help Prints help information - -s parse an inline string - -V, --version Prints version information - -OPTIONS: - --font-family text will be rendered with this font (default: 'arial') - --font-size text will be rendered with this font size (default: 14) - -o, --output where to write svg output [default: STDOUT] - --scale scale the entire svg (dimensions, font size, stroke width) by this factor - (default: 1) - --stroke-width stroke width for all lines (default: 2) - -ARGS: - svgbob text file or inline string to parse [default: STDIN] - -SUBCOMMANDS: - build Batch convert files to svg. - help Prints this message or the help of the given subcommand(s) - -``` - - - - - - -The SVG image is generated from the ascii text below. - -```bob - -Svgbob is a diagramming model -which uses a set of typing characters -to approximate the intended shape. - - .---. - /-o-/-- - .-/ / /-> - ( * \/ - '-. \ - \ / - ' -It uses a combination of these characters -"which are readily available on your keyboards". - -What can it do? - - o-> Basic shapes - . - +------+ .------. .------. /\ .' `. - | | | | ( ) / \ .' `. - +------+ '------' '------' '----' `. .' - _______ ________ `.' ^ / - / \ /\ \ \ ----> | ^ / / - / \ / \ ) ) <---- | | / v - \ / \ / /_______/ v | - \_______/ \/ - - .-----------. . <. .> . ^ \ - ( ) ( ) ( ) \ \ - '-----+ ,---' `> ' ` <' \ v - |/ - - - o-> Quick logo scribbles -