squib 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +3 -2
- data/CHANGELOG.md +16 -1
- data/appveyor.yml +2 -3
- data/lib/squib/args/sheet.rb +66 -34
- data/lib/squib/graphics/save_pdf.rb +1 -1
- data/lib/squib/import/data_frame.rb +7 -7
- data/lib/squib/version.rb +1 -1
- data/samples/autoscale_font/_autoscale_font.rb +1 -1
- data/samples/build_groups/build_groups.rb +3 -3
- data/samples/colors/_colors.rb +1 -0
- data/samples/{config_text_markup.rb → config/config_text_markup.rb} +0 -0
- data/samples/{custom_config.rb → config/custom_config.rb} +0 -0
- data/samples/{cairo_access.rb → images/_cairo_access.rb} +0 -0
- data/samples/images/_images.rb +1 -1
- data/samples/{unicode.rb → images/_unicode.rb} +0 -0
- data/samples/intro/01_hello.rb +1 -2
- data/samples/intro/02_options.rb +1 -2
- data/samples/intro/03_layout.rb +1 -2
- data/samples/intro/04_arrays.rb +1 -2
- data/samples/intro/05_excel.rb +3 -4
- data/samples/{tgc_proofs.rb → proofs/_tgc_proofs.rb} +1 -4
- data/samples/saves/_save_pdf.rb +7 -0
- data/samples/{embed_text.rb → text/_embed_text.rb} +1 -0
- data/samples/text/_text.rb +1 -1
- data/samples/{text_options.rb → text/_text_options.rb} +1 -1
- data/samples/{bug134.rb → text/bug134.rb} +0 -0
- data/squib.gemspec +17 -16
- metadata +90 -596
- data/benchmarks/antialias_best.rb +0 -13
- data/benchmarks/antialias_best.yml +0 -1
- data/benchmarks/antialias_fast.rb +0 -13
- data/benchmarks/antialias_fast.yml +0 -1
- data/benchmarks/backend-svg.yml +0 -4
- data/benchmarks/backend_memory.rb +0 -14
- data/benchmarks/backend_svg.rb +0 -14
- data/benchmarks/shiny-purse.png +0 -0
- data/benchmarks/spanner.svg +0 -91
- data/benchmarks/tons_of_png.rb +0 -6
- data/benchmarks/tons_of_svg.rb +0 -7
- data/benchmarks/tons_of_text.rb +0 -8
- data/docs/Makefile +0 -216
- data/docs/_static/css/squibdocs.css +0 -23
- data/docs/args/draw.rst +0 -36
- data/docs/args/expansion.rst +0 -3
- data/docs/args/layout.rst +0 -6
- data/docs/args/output_dir.rst +0 -6
- data/docs/args/range.rst +0 -6
- data/docs/args/transform.rst +0 -51
- data/docs/args/trim.rst +0 -11
- data/docs/args/wh.rst +0 -12
- data/docs/args/xy.rst +0 -12
- data/docs/arrays.rst +0 -80
- data/docs/backends.rst +0 -20
- data/docs/bleed.rst +0 -13
- data/docs/build_groups.rst +0 -45
- data/docs/colors.rst +0 -90
- data/docs/conf.py +0 -287
- data/docs/config.rst +0 -135
- data/docs/data.rst +0 -26
- data/docs/dsl/background.rst +0 -20
- data/docs/dsl/build.rst +0 -32
- data/docs/dsl/build_groups.rst +0 -23
- data/docs/dsl/circle.rst +0 -27
- data/docs/dsl/cm.rst +0 -19
- data/docs/dsl/configure.rst +0 -18
- data/docs/dsl/csv.rst +0 -81
- data/docs/dsl/curve.rst +0 -63
- data/docs/dsl/data_frame.rst +0 -85
- data/docs/dsl/deck.rst +0 -45
- data/docs/dsl/disable_build.rst +0 -25
- data/docs/dsl/disable_build_globally.rst +0 -46
- data/docs/dsl/ellipse.rst +0 -23
- data/docs/dsl/enable_build.rst +0 -25
- data/docs/dsl/enable_build_globally.rst +0 -44
- data/docs/dsl/grid.rst +0 -31
- data/docs/dsl/hand.rst +0 -40
- data/docs/dsl/hint.rst +0 -15
- data/docs/dsl/inches.rst +0 -19
- data/docs/dsl/index.rst +0 -9
- data/docs/dsl/line.rst +0 -52
- data/docs/dsl/mm.rst +0 -19
- data/docs/dsl/png.rst +0 -49
- data/docs/dsl/polygon.rst +0 -28
- data/docs/dsl/rect.rst +0 -22
- data/docs/dsl/save.rst +0 -23
- data/docs/dsl/save_pdf.rst +0 -89
- data/docs/dsl/save_png.rst +0 -46
- data/docs/dsl/save_sheet.rst +0 -55
- data/docs/dsl/showcase.rst +0 -76
- data/docs/dsl/star.rst +0 -35
- data/docs/dsl/svg.rst +0 -119
- data/docs/dsl/text.rst +0 -292
- data/docs/dsl/triangle.rst +0 -50
- data/docs/dsl/use_layout.rst +0 -16
- data/docs/dsl/xlsx.rst +0 -56
- data/docs/guides/game_icons.rst +0 -126
- data/docs/guides/getting-started/index.rst +0 -5
- data/docs/guides/getting-started/part_0_learning_ruby.rst +0 -145
- data/docs/guides/getting-started/part_1_zero_to_game.rst +0 -217
- data/docs/guides/getting-started/part_2_iconography.rst +0 -228
- data/docs/guides/getting-started/part_3_workflows.rst +0 -46
- data/docs/guides/getting-started/part_4_ruby_power.rst +0 -18
- data/docs/guides/git.rst +0 -14
- data/docs/guides/guard.rst +0 -84
- data/docs/guides/hello_world.rst +0 -65
- data/docs/guides/projects.rst +0 -35
- data/docs/help.rst +0 -157
- data/docs/index.rst +0 -35
- data/docs/install.rst +0 -68
- data/docs/layouts.rst +0 -290
- data/docs/learning.rst +0 -12
- data/docs/make.bat +0 -263
- data/docs/parameters.rst +0 -34
- data/docs/server.bat +0 -1
- data/docs/text_feature.rst +0 -115
- data/docs/units.rst +0 -14
- data/samples/autoscale_font/.gitignore +0 -2
- data/samples/autoscale_font/card_00_expected.png +0 -0
- data/samples/backend/.gitignore +0 -1
- data/samples/backend/_backend-config.yml +0 -5
- data/samples/backend/backend_00_expected.png +0 -0
- data/samples/backend/backend_01_expected.png +0 -0
- data/samples/backend/backend_vectorized_expected.pdf +0 -0
- data/samples/backend/backend_vectors_00_expected.svg +0 -84
- data/samples/backend/backend_vectors_01_expected.svg +0 -84
- data/samples/backend/shiny-purse.png +0 -0
- data/samples/backend/showcase_expected.png +0 -0
- data/samples/backend/spanner.svg +0 -91
- data/samples/ball.png +0 -0
- data/samples/build_groups/.gitignore +0 -1
- data/samples/build_groups/Rakefile +0 -25
- data/samples/colors/.gitignore +0 -1
- data/samples/colors/color_constants_00_expected.png +0 -0
- data/samples/colors/colors_00_expected.png +0 -0
- data/samples/colors/gradient_00_expected.png +0 -0
- data/samples/config_disable_quotes.yml +0 -3
- data/samples/config_text_markup.yml +0 -9
- data/samples/custom-config.yml +0 -5
- data/samples/customconfig-imgdir/shiny-purse2.png +0 -0
- data/samples/customconfig-imgdir/spanner2.svg +0 -91
- data/samples/data/.gitignore +0 -1
- data/samples/data/explode_quantities.xlsx +0 -0
- data/samples/data/quantity_explosion.csv +0 -3
- data/samples/data/sample.csv +0 -3
- data/samples/data/sample.xlsx +0 -0
- data/samples/data/sample_csv_00_expected.png +0 -0
- data/samples/data/sample_csv_01_expected.png +0 -0
- data/samples/data/sample_csv_qty_00_expected.png +0 -0
- data/samples/data/sample_excel_00_expected.png +0 -0
- data/samples/data/sample_excel_01_expected.png +0 -0
- data/samples/data/sample_excel_02_expected.png +0 -0
- data/samples/data/sample_excel_resources_00_expected.png +0 -0
- data/samples/data/sample_excel_resources_01_expected.png +0 -0
- data/samples/data/sample_xlsx_qty_00_expected.png +0 -0
- data/samples/glass-heart.svg +0 -52
- data/samples/grit.png +0 -0
- data/samples/images/.gitignore +0 -8
- data/samples/images/_images_00_expected.png +0 -0
- data/samples/images/angler-fish.png +0 -0
- data/samples/images/ball.png +0 -0
- data/samples/images/glass-heart.svg +0 -52
- data/samples/images/grit.png +0 -0
- data/samples/images/offset.svg +0 -85
- data/samples/images/robot-golem.svg +0 -1
- data/samples/images/shiny-purse.png +0 -0
- data/samples/images/spanner.svg +0 -91
- data/samples/images/sprites.png +0 -0
- data/samples/images/with-alpha.png +0 -0
- data/samples/intro/.gitignore +0 -2
- data/samples/intro/auto-repair.svg +0 -1
- data/samples/intro/crawling.svg +0 -1
- data/samples/intro/data.xlsx +0 -0
- data/samples/intro/humans.svg +0 -1
- data/samples/intro/ninja-mask.svg +0 -1
- data/samples/intro/part1_00_expected.png +0 -0
- data/samples/intro/part2_00_expected.png +0 -0
- data/samples/intro/part3_00_expected.png +0 -0
- data/samples/intro/part3_layout.yml +0 -34
- data/samples/intro/part4_00_expected.png +0 -0
- data/samples/intro/part4_01_expected.png +0 -0
- data/samples/intro/part5_00_expected.png +0 -0
- data/samples/intro/part5_01_expected.png +0 -0
- data/samples/intro/part5_02_expected.png +0 -0
- data/samples/intro/part5_03_expected.png +0 -0
- data/samples/intro/part5_hand_expected.png +0 -0
- data/samples/intro/part5_showcase_expected.png +0 -0
- data/samples/intro/pirate-skull.svg +0 -1
- data/samples/intro/robot-golem.svg +0 -1
- data/samples/layouts/custom-layout.yml +0 -60
- data/samples/layouts/custom-layout2.yml +0 -15
- data/samples/layouts/expected_layouts_builtin_economy_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_fantasy_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_hand_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_playing_card_00.png +0 -0
- data/samples/layouts/expected_layouts_builtin_tuck_box_00.png +0 -0
- data/samples/layouts/shiny-purse.png +0 -0
- data/samples/layouts/spanner.svg +0 -91
- data/samples/load_images_config.yml +0 -1
- data/samples/offset.svg +0 -71
- data/samples/pokercard.png +0 -0
- data/samples/project/Gemfile +0 -6
- data/samples/project/Guardfile +0 -18
- data/samples/project/Rakefile +0 -25
- data/samples/project/bw/robot-golem.svg +0 -53
- data/samples/project/color/robot-golem.svg +0 -1
- data/samples/project/config.yml +0 -2
- data/samples/project/layouts/characters.yml +0 -3
- data/samples/project/layouts/skills.yml +0 -3
- data/samples/ranges/glass-heart.svg +0 -52
- data/samples/ranges/ranges_00_expected.png +0 -0
- data/samples/saves/.gitignore +0 -1
- data/samples/saves/hand_expected.png +0 -0
- data/samples/saves/hand_pretty_expected.png +0 -0
- data/samples/saves/save-pdf-small_expected.pdf +0 -0
- data/samples/saves/save-pdf_expected.pdf +0 -0
- data/samples/saves/save_png_00_expected.png +0 -0
- data/samples/saves/save_png_trimmed_00_expected.png +0 -0
- data/samples/saves/save_sheet_00_expected.png +0 -0
- data/samples/saves/save_sheet_01_expected.png +0 -0
- data/samples/saves/save_sheet_range_00_expected.png +0 -0
- data/samples/saves/save_sheet_range_01_expected.png +0 -0
- data/samples/saves/save_single_sheet_00_expected.png +0 -0
- data/samples/saves/saves_notrim_01_expected.png +0 -0
- data/samples/saves/showcase2_expected.png +0 -0
- data/samples/saves/showcase_expected.png +0 -0
- data/samples/saves/showcase_individual_00_expected.png +0 -0
- data/samples/saves/showcase_individual_01_expected.png +0 -0
- data/samples/saves/showcase_individual_02_expected.png +0 -0
- data/samples/saves/showcase_individual_03_expected.png +0 -0
- data/samples/saves/spanner.svg +0 -91
- data/samples/shapes/.gitignore +0 -1
- data/samples/shapes/shape_00_expected.png +0 -0
- data/samples/shiny-purse.png +0 -0
- data/samples/spanner.svg +0 -91
- data/samples/sprites.png +0 -0
- data/samples/text/.gitignore +0 -2
- data/samples/text/README.md +0 -1
- data/samples/text/_text_00_expected.png +0 -0
- data/samples/text/config.yml +0 -2
- data/samples/units/units_00_expected.png +0 -0
- data/samples/units/using_units.yml +0 -10
- data/spec/api/api_data_spec.rb +0 -172
- data/spec/api/api_groups_spec.rb +0 -49
- data/spec/api/api_settings_spec.rb +0 -38
- data/spec/api/api_units_spec.rb +0 -37
- data/spec/args/box_spec.rb +0 -127
- data/spec/args/draw_spec.rb +0 -101
- data/spec/args/embed_key_spec.rb +0 -13
- data/spec/args/input_file_spec.rb +0 -21
- data/spec/args/paint_spec.rb +0 -22
- data/spec/args/paragraph_spec.rb +0 -153
- data/spec/args/range_spec.rb +0 -41
- data/spec/args/save_batch_spec.rb +0 -51
- data/spec/args/scale_box_spec.rb +0 -71
- data/spec/args/sheet_spec.rb +0 -80
- data/spec/args/showcase_special_spec.rb +0 -15
- data/spec/args/transform_spec.rb +0 -25
- data/spec/args/typographer_spec.rb +0 -71
- data/spec/args/unit_conversion_spec.rb +0 -29
- data/spec/card_spec.rb +0 -11
- data/spec/commands/new_spec.rb +0 -48
- data/spec/conf_spec.rb +0 -47
- data/spec/data/conf/basic.yml +0 -1
- data/spec/data/conf/empty.yml +0 -1
- data/spec/data/conf/unrecognized.yml +0 -4
- data/spec/data/csv/basic.csv +0 -3
- data/spec/data/csv/custom_opts.csv +0 -2
- data/spec/data/csv/dup_cols.csv +0 -3
- data/spec/data/csv/newline.csv +0 -3
- data/spec/data/csv/qty.csv +0 -3
- data/spec/data/csv/qty_named.csv +0 -3
- data/spec/data/csv/with_spaces.csv +0 -3
- data/spec/data/csv/yield.csv +0 -3
- data/spec/data/layouts/easy-circular-extends.yml +0 -6
- data/spec/data/layouts/empty-rule.yml +0 -1
- data/spec/data/layouts/empty.yml +0 -1
- data/spec/data/layouts/extends-nonexists.yml +0 -3
- data/spec/data/layouts/extends-units-mixed.yml +0 -8
- data/spec/data/layouts/extends-units.yml +0 -8
- data/spec/data/layouts/hard-circular-extends.yml +0 -9
- data/spec/data/layouts/multi-extends-single-entry.yml +0 -14
- data/spec/data/layouts/multi-level-extends.yml +0 -10
- data/spec/data/layouts/multifile-a.yml +0 -4
- data/spec/data/layouts/multifile-b.yml +0 -4
- data/spec/data/layouts/multifile-extends-a.yml +0 -8
- data/spec/data/layouts/multifile-extends-b.yml +0 -9
- data/spec/data/layouts/no-extends.yml +0 -5
- data/spec/data/layouts/pre-extends.yml +0 -7
- data/spec/data/layouts/self-circular-extends.yml +0 -3
- data/spec/data/layouts/single-extends.yml +0 -7
- data/spec/data/layouts/single-level-multi-extends.yml +0 -12
- data/spec/data/samples/autoscale_font/_autoscale_font.rb.txt +0 -133
- data/spec/data/samples/basic.rb.txt +0 -248
- data/spec/data/samples/cairo_access.rb.txt +0 -59
- data/spec/data/samples/colors/_gradients.rb.txt +0 -84
- data/spec/data/samples/config_text_markup.rb.txt +0 -74
- data/spec/data/samples/custom_config.rb.txt +0 -59
- data/spec/data/samples/data/_csv.rb.txt +0 -231
- data/spec/data/samples/data/_excel.rb.txt +0 -704
- data/spec/data/samples/embed_text.rb.txt +0 -431
- data/spec/data/samples/hello_world.rb.txt +0 -38
- data/spec/data/samples/images/_more_load_images.rb.txt +0 -335
- data/spec/data/samples/layouts.rb.txt +0 -489
- data/spec/data/samples/ranges/_ranges.rb.txt +0 -484
- data/spec/data/samples/saves/_hand.rb.txt +0 -594
- data/spec/data/samples/saves/_portrait_landscape.rb.txt +0 -57
- data/spec/data/samples/saves/_save_pdf.rb.txt +0 -1601
- data/spec/data/samples/saves/_saves.rb.txt +0 -873
- data/spec/data/samples/saves/_showcase.rb.txt +0 -5942
- data/spec/data/samples/shapes/_draw_shapes.rb.txt +0 -757
- data/spec/data/samples/text_options.rb.txt +0 -1158
- data/spec/data/samples/tgc_proofs.rb.txt +0 -102
- data/spec/data/samples/units/_units.rb.txt +0 -53
- data/spec/data/xlsx/basic.xlsx +0 -0
- data/spec/data/xlsx/explode_quantities.xlsx +0 -0
- data/spec/data/xlsx/formulas.xlsx +0 -0
- data/spec/data/xlsx/whitespace.xlsx +0 -0
- data/spec/data/xlsx/with_macros.xlsm +0 -0
- data/spec/deck_spec.rb +0 -73
- data/spec/graphics/cairo_context_wrapper_spec.rb +0 -104
- data/spec/graphics/embedding_utils_spec.rb +0 -73
- data/spec/graphics/graphics_save_doc_spec.rb +0 -74
- data/spec/import/data_frame_spec.rb +0 -251
- data/spec/layout_parser_spec.rb +0 -226
- data/spec/logger_spec.rb +0 -12
- data/spec/samples/_diffs/gitkeep.txt +0 -0
- data/spec/samples/diff-with-css.example.html +0 -39
- data/spec/samples/expected/autoscale_00.png +0 -0
- data/spec/samples/expected/autoscale_01.png +0 -0
- data/spec/samples/expected/autoscale_02.png +0 -0
- data/spec/samples/expected/backend_00.png +0 -0
- data/spec/samples/expected/backend_00.svg +0 -78
- data/spec/samples/expected/backend_01.png +0 -0
- data/spec/samples/expected/backend_01.svg +0 -78
- data/spec/samples/expected/basic_00.png +0 -0
- data/spec/samples/expected/basic_01.png +0 -0
- data/spec/samples/expected/basic_02.png +0 -0
- data/spec/samples/expected/cairo_access_00.png +0 -0
- data/spec/samples/expected/cairo_access_01.png +0 -0
- data/spec/samples/expected/card_00.png +0 -0
- data/spec/samples/expected/card_01.png +0 -0
- data/spec/samples/expected/colors_00.png +0 -0
- data/spec/samples/expected/config_disable_text_00.png +0 -0
- data/spec/samples/expected/config_text_00.png +0 -0
- data/spec/samples/expected/custom-config_00.png +0 -0
- data/spec/samples/expected/embed_00.png +0 -0
- data/spec/samples/expected/embed_multisheet_00.png +0 -0
- data/spec/samples/expected/gitkeep.txt +0 -0
- data/spec/samples/expected/gradient_00.png +0 -0
- data/spec/samples/expected/hand.png +0 -0
- data/spec/samples/expected/hand_pretty.png +0 -0
- data/spec/samples/expected/landscape_00.png +0 -0
- data/spec/samples/expected/layout2_00.png +0 -0
- data/spec/samples/expected/layout_00.png +0 -0
- data/spec/samples/expected/layout_builtin_hand_00.png +0 -0
- data/spec/samples/expected/layout_builtin_playing_card_00.png +0 -0
- data/spec/samples/expected/load_images_00.png +0 -0
- data/spec/samples/expected/portrait_00.png +0 -0
- data/spec/samples/expected/ranges_00.png +0 -0
- data/spec/samples/expected/sample_csv_00.png +0 -0
- data/spec/samples/expected/sample_csv_01.png +0 -0
- data/spec/samples/expected/sample_excel_00.png +0 -0
- data/spec/samples/expected/sample_excel_01.png +0 -0
- data/spec/samples/expected/sample_excel_02.png +0 -0
- data/spec/samples/expected/save_sheet_00.png +0 -0
- data/spec/samples/expected/save_sheet_01.png +0 -0
- data/spec/samples/expected/save_sheet_range_00.png +0 -0
- data/spec/samples/expected/save_sheet_range_01.png +0 -0
- data/spec/samples/expected/save_single_sheet_00.png +0 -0
- data/spec/samples/expected/saves_notrim_01.png +0 -0
- data/spec/samples/expected/shape_00.png +0 -0
- data/spec/samples/expected/showcase.png +0 -0
- data/spec/samples/expected/showcase2.png +0 -0
- data/spec/samples/expected/showcase_individual_00.png +0 -0
- data/spec/samples/expected/showcase_individual_01.png +0 -0
- data/spec/samples/expected/showcase_individual_02.png +0 -0
- data/spec/samples/expected/showcase_individual_03.png +0 -0
- data/spec/samples/expected/text_00.png +0 -0
- data/spec/samples/expected/text_01.png +0 -0
- data/spec/samples/expected/text_02.png +0 -0
- data/spec/samples/expected/tgc_sample_00.png +0 -0
- data/spec/samples/expected/units_00.png +0 -0
- data/spec/samples/run_samples_spec.rb +0 -17
- data/spec/samples/samples_regression_spec.rb +0 -71
- data/spec/samples/sanity.html.erb +0 -28
- data/spec/samples/sanity.rb +0 -70
- data/spec/sanity/.gitignore +0 -1
- data/spec/sanity/sanity.html.erb +0 -42
- data/spec/sanity/sanity_test.rb +0 -42
- data/spec/sanity/tests.yml +0 -12
- data/spec/spec_helper.rb +0 -159
data/docs/dsl/data_frame.rst
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
Squib::DataFrame
|
|
2
|
-
================
|
|
3
|
-
|
|
4
|
-
As described in :doc:`/data`, the ``Squib::DataFrame`` is what is returned by Squib's data import methods (:doc:`/dsl/csv` and :doc:`/dsl/xlsx`).
|
|
5
|
-
|
|
6
|
-
It behaves like a ``Hash`` of ``Arrays``, so acessing an individual column can be done via the square brackets, e.g. ``data['title']``.
|
|
7
|
-
|
|
8
|
-
Here are some other convenience methods in ``Squib::DataFrame``
|
|
9
|
-
|
|
10
|
-
columns become methods
|
|
11
|
-
----------------------
|
|
12
|
-
|
|
13
|
-
Through magic of Ruby metaprogramming, every column also becomes a method on the data frame. So these two are equivalent:
|
|
14
|
-
|
|
15
|
-
.. code-block:: irb
|
|
16
|
-
|
|
17
|
-
irb(main):002:0> data = Squib.csv file: 'basic.csv'
|
|
18
|
-
=> #<Squib::DataFrame:0x00000003764550 @hash={"h1"=>[1, 3], "h2"=>[2, 4]}>
|
|
19
|
-
irb(main):003:0> data.h1
|
|
20
|
-
=> [1, 3]
|
|
21
|
-
irb(main):004:0> data['h1']
|
|
22
|
-
=> [1, 3]
|
|
23
|
-
|
|
24
|
-
#columns
|
|
25
|
-
--------
|
|
26
|
-
|
|
27
|
-
Returns an array of the column names in the data frame
|
|
28
|
-
|
|
29
|
-
#ncolumns
|
|
30
|
-
---------
|
|
31
|
-
|
|
32
|
-
Returns the number of columns in the data frame
|
|
33
|
-
|
|
34
|
-
#col?(name)
|
|
35
|
-
-----------
|
|
36
|
-
|
|
37
|
-
Returns ``true`` if there is column ``name``.
|
|
38
|
-
|
|
39
|
-
#row(i)
|
|
40
|
-
-------
|
|
41
|
-
|
|
42
|
-
Returns a hash of values across all columns in the ``i``th row of the dataframe. Represents a single card.
|
|
43
|
-
|
|
44
|
-
#nrows
|
|
45
|
-
------
|
|
46
|
-
|
|
47
|
-
Returns the number of rows the data frame has, computed by the maximum length of any column array.
|
|
48
|
-
|
|
49
|
-
#to_json
|
|
50
|
-
--------
|
|
51
|
-
|
|
52
|
-
Returns a ``json`` representation of the entire data frame.
|
|
53
|
-
|
|
54
|
-
#to_pretty_json
|
|
55
|
-
---------------
|
|
56
|
-
|
|
57
|
-
Returns a ``json`` representation of the entire data frame, formatted with indentation for human viewing.
|
|
58
|
-
|
|
59
|
-
#to_pretty_text
|
|
60
|
-
---------------
|
|
61
|
-
|
|
62
|
-
Returns a textual representation of the dataframe that emulates what the information looks like on an individual card. Here's an example:
|
|
63
|
-
|
|
64
|
-
.. code-block:: text
|
|
65
|
-
|
|
66
|
-
╭------------------------------------╮
|
|
67
|
-
Name | Mage |
|
|
68
|
-
Cost | 1 |
|
|
69
|
-
Description | You may cast 1 spell per turn |
|
|
70
|
-
Snark | Magic, dude. |
|
|
71
|
-
╰------------------------------------╯
|
|
72
|
-
╭------------------------------------╮
|
|
73
|
-
Name | Rogue |
|
|
74
|
-
Cost | 2 |
|
|
75
|
-
Description | You always take the first turn. |
|
|
76
|
-
Snark | I like to be sneaky |
|
|
77
|
-
╰------------------------------------╯
|
|
78
|
-
╭------------------------------------╮
|
|
79
|
-
Name | Warrior |
|
|
80
|
-
Cost | 3 |
|
|
81
|
-
Description |
|
|
82
|
-
Snark | I have a long story to tell to tes |
|
|
83
|
-
| t the word-wrapping ability of pre |
|
|
84
|
-
| tty text formatting. |
|
|
85
|
-
╰------------------------------------╯
|
data/docs/dsl/deck.rst
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
Squib::Deck.new
|
|
2
|
-
===============
|
|
3
|
-
|
|
4
|
-
The main interface to Squib. Yields to a block that is used for most of Squib's operations. The majority of the :doc:`DSL methods </dsl/index>` are instance methods of ``Squib::Deck``.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
-------
|
|
8
|
-
These options set immutable properties for the life of the deck. They are not intended to be changed in the middle of Squib's operation.
|
|
9
|
-
|
|
10
|
-
width
|
|
11
|
-
default: ``825``
|
|
12
|
-
|
|
13
|
-
the width of each card in pixels, :doc:`including bleed </bleed>`. Supports :doc:`/units` (e.g. ``'2.5in'``).
|
|
14
|
-
|
|
15
|
-
height
|
|
16
|
-
default: ``1125``
|
|
17
|
-
|
|
18
|
-
the height of each card in pixels, :doc:`including bleed </bleed>`. Supports :doc:`/units` (e.g. '3.5in').
|
|
19
|
-
|
|
20
|
-
cards
|
|
21
|
-
default: ``1``
|
|
22
|
-
|
|
23
|
-
the number of cards in the deck
|
|
24
|
-
|
|
25
|
-
dpi
|
|
26
|
-
default: ``300``
|
|
27
|
-
|
|
28
|
-
the pixels per inch when rendering out to PDF, doing :doc:`/units`, or other operations that require measurement.
|
|
29
|
-
|
|
30
|
-
config
|
|
31
|
-
default: ``'config.yml'``
|
|
32
|
-
|
|
33
|
-
the file used for global settings of this deck, see :doc:`/config`. If the file is not found, Squib does not complain.
|
|
34
|
-
|
|
35
|
-
.. note ::
|
|
36
|
-
|
|
37
|
-
Since this option has ``config.yml`` as a default, then Squib automatically looks up a ``config.yml`` in the current working directory.
|
|
38
|
-
|
|
39
|
-
layout
|
|
40
|
-
default: ``nil``
|
|
41
|
-
|
|
42
|
-
load a YML file of :doc:`custom layouts </layouts>`. Multiple files in an array are merged sequentially, redefining collisons in the merge process. If no layouts are found relative to the current working directory, then Squib checks for a `built-in layout <https://github.com/andymeneely/squib/tree/master/lib/squib/layouts>`_.
|
|
43
|
-
|
|
44
|
-
Examples
|
|
45
|
-
--------
|
data/docs/dsl/disable_build.rst
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
disable_build
|
|
2
|
-
=============
|
|
3
|
-
|
|
4
|
-
Disable the given build group for the rest of the build. Thus, code within the corresponding :doc:`/dsl/build` block will not be executed. See :doc:`/build_groups` for ways to use this effectively.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Required Arguments
|
|
8
|
-
------------------
|
|
9
|
-
|
|
10
|
-
build_group_name
|
|
11
|
-
default: ``:all``
|
|
12
|
-
the name of the group to disable. Convention is to use a Ruby symbol.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Examples
|
|
16
|
-
--------
|
|
17
|
-
|
|
18
|
-
Can be used to disable a group (even if it's enabled via command line)::
|
|
19
|
-
|
|
20
|
-
Squib::Deck.new do
|
|
21
|
-
disable_build :pnp
|
|
22
|
-
build :pnp do
|
|
23
|
-
save_pdf
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
disable_build_globally
|
|
2
|
-
======================
|
|
3
|
-
|
|
4
|
-
Disable the given build group for all future ``Squib::Deck`` runs.
|
|
5
|
-
|
|
6
|
-
Essentially a convenience method for setting the ``SQUIB_BUILD`` environment variable. See :doc:`/build_groups` for ways to use this effectively.
|
|
7
|
-
|
|
8
|
-
This is a member of the ``Squib`` module, so you must run it like this::
|
|
9
|
-
|
|
10
|
-
Squib.disable_build_globally :pdf
|
|
11
|
-
|
|
12
|
-
The intended purpose of this method is to be able to alter the environment from other build scripts, such as a Rakefile.
|
|
13
|
-
|
|
14
|
-
Required Arguments
|
|
15
|
-
------------------
|
|
16
|
-
|
|
17
|
-
build_group_name
|
|
18
|
-
|
|
19
|
-
the name of the build group to disable. Convention is to use a Ruby symbol.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Examples
|
|
23
|
-
--------
|
|
24
|
-
|
|
25
|
-
Can be used to disable a group, overriding setting the environment variable at the command line::
|
|
26
|
-
|
|
27
|
-
Squib.enable_build_globally :pdf
|
|
28
|
-
Squib.disable_build_globally :pdf
|
|
29
|
-
|
|
30
|
-
Squib::Deck.new do
|
|
31
|
-
build :pdf do
|
|
32
|
-
save_pdf #does not get run regardless of incoming environment
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
But gets overridden by an individual ``Squib::Deck`` programmatically enabling a build via :doc:`/dsl/enable_build`::
|
|
37
|
-
|
|
38
|
-
Squib.enable_build_globally :pdf
|
|
39
|
-
Squib.disable_build_globally :pdf
|
|
40
|
-
|
|
41
|
-
Squib::Deck.new do
|
|
42
|
-
enable_build :pdf
|
|
43
|
-
build :pdf do
|
|
44
|
-
save_pdf # this will be run no matter what
|
|
45
|
-
end
|
|
46
|
-
end
|
data/docs/dsl/ellipse.rst
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
ellipse
|
|
2
|
-
-------
|
|
3
|
-
|
|
4
|
-
Draw an ellipse at the given coordinates. An ellipse is an oval that is defined by a bounding rectangle. To draw a circle, see :doc:`circle`.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
^^^^^^^
|
|
8
|
-
.. include:: /args/expansion.rst
|
|
9
|
-
|
|
10
|
-
.. include:: /args/xy.rst
|
|
11
|
-
.. include:: /args/wh.rst
|
|
12
|
-
.. include:: /args/draw.rst
|
|
13
|
-
|
|
14
|
-
angle
|
|
15
|
-
default: 0
|
|
16
|
-
|
|
17
|
-
the angle at which to rotate the ellipse about it's upper-left corner
|
|
18
|
-
|
|
19
|
-
.. include:: /args/range.rst
|
|
20
|
-
.. include:: /args/layout.rst
|
|
21
|
-
|
|
22
|
-
Examples
|
|
23
|
-
^^^^^^^^
|
data/docs/dsl/enable_build.rst
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
enable_build
|
|
2
|
-
============
|
|
3
|
-
|
|
4
|
-
Enable the given build group for the rest of the build. Thus, code within the corresponding :doc:`/dsl/build` block will be executed. See :doc:`/build_groups` for ways to use this effectively.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Required Arguments
|
|
8
|
-
------------------
|
|
9
|
-
|
|
10
|
-
build_group_name
|
|
11
|
-
the name of the group to enable. Convention is to use a Ruby symbol.
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Examples
|
|
16
|
-
--------
|
|
17
|
-
|
|
18
|
-
Can be used to disable a group (even if it's enabled via command line)::
|
|
19
|
-
|
|
20
|
-
Squib::Deck.new do
|
|
21
|
-
disable_build :pnp
|
|
22
|
-
build :pnp do
|
|
23
|
-
save_pdf
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
disable_build_globally
|
|
2
|
-
======================
|
|
3
|
-
|
|
4
|
-
Enagle the given build group for all future ``Squib::Deck`` runs.
|
|
5
|
-
|
|
6
|
-
Essentially a convenience method for setting the ``SQUIB_BUILD`` environment variable. See :doc:`/build_groups` for ways to use this effectively.
|
|
7
|
-
|
|
8
|
-
This is a member of the ``Squib`` module, so you must run it like this::
|
|
9
|
-
|
|
10
|
-
Squib.enable_build_globally :pdf
|
|
11
|
-
|
|
12
|
-
The intended purpose of this method is to be able to alter the environment from other build scripts, such as a Rakefile.
|
|
13
|
-
|
|
14
|
-
Required Arguments
|
|
15
|
-
------------------
|
|
16
|
-
|
|
17
|
-
build_group_name
|
|
18
|
-
|
|
19
|
-
the name of the build group to enable. Convention is to use a Ruby symbol.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Examples
|
|
23
|
-
--------
|
|
24
|
-
|
|
25
|
-
Can be used to enable a group, overriding setting the environment variable at the command line::
|
|
26
|
-
|
|
27
|
-
Squib.enable_build_globally :pdf
|
|
28
|
-
|
|
29
|
-
Squib::Deck.new do
|
|
30
|
-
build :pdf do
|
|
31
|
-
save_pdf # this runs regardless of incoming environment
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
But gets overridden by an individual ``Squib::Deck`` programmatically enabling a build via :doc:`/dsl/enable_build`::
|
|
36
|
-
|
|
37
|
-
Squib.enable_build_globally :pdf
|
|
38
|
-
|
|
39
|
-
Squib::Deck.new do
|
|
40
|
-
disable_build :pdf
|
|
41
|
-
build :pdf do
|
|
42
|
-
save_pdf # this will NOT be run no matter what
|
|
43
|
-
end
|
|
44
|
-
end
|
data/docs/dsl/grid.rst
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
grid
|
|
2
|
-
----
|
|
3
|
-
|
|
4
|
-
Draw an unlimited square grid of lines on the deck, starting with x,y and extending off the end of the deck.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Options
|
|
8
|
-
^^^^^^^
|
|
9
|
-
.. include:: /args/expansion.rst
|
|
10
|
-
|
|
11
|
-
.. include:: /args/xy.rst
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
width
|
|
15
|
-
default: ``:deck`` (the width of the deck)
|
|
16
|
-
|
|
17
|
-
the spacing between vertical gridlines. Supports :doc:`/units`.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
height
|
|
21
|
-
default: ``:deck`` (the height of the deck)
|
|
22
|
-
|
|
23
|
-
the spacing between horizontal gridlines. Supports :doc:`/units`.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.. include:: /args/draw.rst
|
|
27
|
-
.. include:: /args/range.rst
|
|
28
|
-
.. include:: /args/layout.rst
|
|
29
|
-
|
|
30
|
-
Examples
|
|
31
|
-
^^^^^^^^
|
data/docs/dsl/hand.rst
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
hand
|
|
2
|
-
====
|
|
3
|
-
|
|
4
|
-
Renders a range of cards fanned out as if in a hand. Saves as PNG regardless of back end.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
-------
|
|
8
|
-
|
|
9
|
-
radius
|
|
10
|
-
default: ``:auto``
|
|
11
|
-
|
|
12
|
-
The distance from the bottom of each card to the center of the fan. If set to ``:auto``, then it is computed as 30% of the card's height. Why 30%? Because it looks good that way. Reasons.
|
|
13
|
-
|
|
14
|
-
angle_range
|
|
15
|
-
default: ``((Math::PI / -4.0)..(Math::PI / 2))``
|
|
16
|
-
|
|
17
|
-
The overall width of the fan, in radians. Angle of zero is a vertical card. Further negative angles widen the fan counter-clockwise and positive angles widen the fan clockwise.
|
|
18
|
-
|
|
19
|
-
margin
|
|
20
|
-
default: ``75``
|
|
21
|
-
|
|
22
|
-
the margin around the entire image. Supports :doc:`/units`.
|
|
23
|
-
|
|
24
|
-
fill_color
|
|
25
|
-
default: ``:white``
|
|
26
|
-
|
|
27
|
-
Backdrop color. See :doc:`/colors`.
|
|
28
|
-
|
|
29
|
-
.. include:: /args/trim.rst
|
|
30
|
-
|
|
31
|
-
file
|
|
32
|
-
default: ``'hand.png'``
|
|
33
|
-
|
|
34
|
-
The file to save relative to the current directory. Will overwrite without warning.
|
|
35
|
-
|
|
36
|
-
.. include:: /args/output_dir.rst
|
|
37
|
-
.. include:: /args/range.rst
|
|
38
|
-
|
|
39
|
-
Examples
|
|
40
|
-
--------
|
data/docs/dsl/hint.rst
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
hint
|
|
2
|
-
====
|
|
3
|
-
|
|
4
|
-
Toggle text hints globally. A text hint is a 1-pixel line drawn around the extents of a text box. They are intended to be temporary guides.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
-------
|
|
8
|
-
|
|
9
|
-
text
|
|
10
|
-
default: ``:off``
|
|
11
|
-
|
|
12
|
-
The color of the text hint. See :doc:`/colors` To turn off use ``:off`` or ``nil``.
|
|
13
|
-
|
|
14
|
-
Examples
|
|
15
|
-
--------
|
data/docs/dsl/inches.rst
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
inches
|
|
2
|
-
------
|
|
3
|
-
|
|
4
|
-
Given inches, returns the number of pixels according to the deck's DPI.
|
|
5
|
-
|
|
6
|
-
Parameters
|
|
7
|
-
^^^^^^^^^^
|
|
8
|
-
|
|
9
|
-
n
|
|
10
|
-
the number of inches
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
Examples
|
|
14
|
-
^^^^^^^^
|
|
15
|
-
|
|
16
|
-
.. code-block:: ruby
|
|
17
|
-
|
|
18
|
-
inches(2.5) # 750 (for default Deck::dpi of 300)
|
|
19
|
-
inches(2.5) + inches(0.5) # 900 (for default Deck::dpi of 300)
|
data/docs/dsl/index.rst
DELETED
data/docs/dsl/line.rst
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
line
|
|
2
|
-
----
|
|
3
|
-
|
|
4
|
-
Draw a line from x1,y1 to x2,y2.
|
|
5
|
-
|
|
6
|
-
Options
|
|
7
|
-
^^^^^^^
|
|
8
|
-
.. include:: /args/expansion.rst
|
|
9
|
-
|
|
10
|
-
x1
|
|
11
|
-
default: ``0``
|
|
12
|
-
|
|
13
|
-
the x-coordinate to place. Supports :doc:`/units/`
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
y1
|
|
17
|
-
default: ``0``
|
|
18
|
-
|
|
19
|
-
the y-coordinate to place. Supports :doc:`/units/`
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
x2
|
|
23
|
-
default: ``50``
|
|
24
|
-
|
|
25
|
-
the x-coordinate to place. Supports :doc:`/units/`
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
y2
|
|
29
|
-
default: ``50``
|
|
30
|
-
|
|
31
|
-
the y-coordinate to place. Supports :doc:`/units/`
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
x3
|
|
35
|
-
default: ``0``
|
|
36
|
-
|
|
37
|
-
the x-coordinate to place. Supports :doc:`/units/`
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
y3
|
|
41
|
-
default: ``50``
|
|
42
|
-
|
|
43
|
-
the y-coordinate to place. Supports :doc:`/units/`
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
.. include:: /args/draw.rst
|
|
48
|
-
.. include:: /args/range.rst
|
|
49
|
-
.. include:: /args/layout.rst
|
|
50
|
-
|
|
51
|
-
Examples
|
|
52
|
-
^^^^^^^^
|