squib 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- 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/learning.rst
DELETED
data/docs/make.bat
DELETED
@@ -1,263 +0,0 @@
|
|
1
|
-
@ECHO OFF
|
2
|
-
|
3
|
-
REM Command file for Sphinx documentation
|
4
|
-
|
5
|
-
if "%SPHINXBUILD%" == "" (
|
6
|
-
set SPHINXBUILD=sphinx-build
|
7
|
-
)
|
8
|
-
set BUILDDIR=_build
|
9
|
-
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
|
10
|
-
set I18NSPHINXOPTS=%SPHINXOPTS% .
|
11
|
-
if NOT "%PAPER%" == "" (
|
12
|
-
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
13
|
-
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
|
14
|
-
)
|
15
|
-
|
16
|
-
if "%1" == "" goto help
|
17
|
-
|
18
|
-
if "%1" == "help" (
|
19
|
-
:help
|
20
|
-
echo.Please use `make ^<target^>` where ^<target^> is one of
|
21
|
-
echo. html to make standalone HTML files
|
22
|
-
echo. dirhtml to make HTML files named index.html in directories
|
23
|
-
echo. singlehtml to make a single large HTML file
|
24
|
-
echo. pickle to make pickle files
|
25
|
-
echo. json to make JSON files
|
26
|
-
echo. htmlhelp to make HTML files and a HTML help project
|
27
|
-
echo. qthelp to make HTML files and a qthelp project
|
28
|
-
echo. devhelp to make HTML files and a Devhelp project
|
29
|
-
echo. epub to make an epub
|
30
|
-
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
31
|
-
echo. text to make text files
|
32
|
-
echo. man to make manual pages
|
33
|
-
echo. texinfo to make Texinfo files
|
34
|
-
echo. gettext to make PO message catalogs
|
35
|
-
echo. changes to make an overview over all changed/added/deprecated items
|
36
|
-
echo. xml to make Docutils-native XML files
|
37
|
-
echo. pseudoxml to make pseudoxml-XML files for display purposes
|
38
|
-
echo. linkcheck to check all external links for integrity
|
39
|
-
echo. doctest to run all doctests embedded in the documentation if enabled
|
40
|
-
echo. coverage to run coverage check of the documentation if enabled
|
41
|
-
goto end
|
42
|
-
)
|
43
|
-
|
44
|
-
if "%1" == "clean" (
|
45
|
-
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
46
|
-
del /q /s %BUILDDIR%\*
|
47
|
-
goto end
|
48
|
-
)
|
49
|
-
|
50
|
-
|
51
|
-
REM Check if sphinx-build is available and fallback to Python version if any
|
52
|
-
%SPHINXBUILD% 1>NUL 2>NUL
|
53
|
-
if errorlevel 9009 goto sphinx_python
|
54
|
-
goto sphinx_ok
|
55
|
-
|
56
|
-
:sphinx_python
|
57
|
-
|
58
|
-
set SPHINXBUILD=python -m sphinx.__init__
|
59
|
-
%SPHINXBUILD% 2> nul
|
60
|
-
if errorlevel 9009 (
|
61
|
-
echo.
|
62
|
-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
63
|
-
echo.installed, then set the SPHINXBUILD environment variable to point
|
64
|
-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
65
|
-
echo.may add the Sphinx directory to PATH.
|
66
|
-
echo.
|
67
|
-
echo.If you don't have Sphinx installed, grab it from
|
68
|
-
echo.http://sphinx-doc.org/
|
69
|
-
exit /b 1
|
70
|
-
)
|
71
|
-
|
72
|
-
:sphinx_ok
|
73
|
-
|
74
|
-
|
75
|
-
if "%1" == "html" (
|
76
|
-
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
77
|
-
if errorlevel 1 exit /b 1
|
78
|
-
echo.
|
79
|
-
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
80
|
-
goto end
|
81
|
-
)
|
82
|
-
|
83
|
-
if "%1" == "dirhtml" (
|
84
|
-
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
85
|
-
if errorlevel 1 exit /b 1
|
86
|
-
echo.
|
87
|
-
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
88
|
-
goto end
|
89
|
-
)
|
90
|
-
|
91
|
-
if "%1" == "singlehtml" (
|
92
|
-
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
|
93
|
-
if errorlevel 1 exit /b 1
|
94
|
-
echo.
|
95
|
-
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
|
96
|
-
goto end
|
97
|
-
)
|
98
|
-
|
99
|
-
if "%1" == "pickle" (
|
100
|
-
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
101
|
-
if errorlevel 1 exit /b 1
|
102
|
-
echo.
|
103
|
-
echo.Build finished; now you can process the pickle files.
|
104
|
-
goto end
|
105
|
-
)
|
106
|
-
|
107
|
-
if "%1" == "json" (
|
108
|
-
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
109
|
-
if errorlevel 1 exit /b 1
|
110
|
-
echo.
|
111
|
-
echo.Build finished; now you can process the JSON files.
|
112
|
-
goto end
|
113
|
-
)
|
114
|
-
|
115
|
-
if "%1" == "htmlhelp" (
|
116
|
-
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
117
|
-
if errorlevel 1 exit /b 1
|
118
|
-
echo.
|
119
|
-
echo.Build finished; now you can run HTML Help Workshop with the ^
|
120
|
-
.hhp project file in %BUILDDIR%/htmlhelp.
|
121
|
-
goto end
|
122
|
-
)
|
123
|
-
|
124
|
-
if "%1" == "qthelp" (
|
125
|
-
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
126
|
-
if errorlevel 1 exit /b 1
|
127
|
-
echo.
|
128
|
-
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
129
|
-
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
130
|
-
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Squib.qhcp
|
131
|
-
echo.To view the help file:
|
132
|
-
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Squib.ghc
|
133
|
-
goto end
|
134
|
-
)
|
135
|
-
|
136
|
-
if "%1" == "devhelp" (
|
137
|
-
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
|
138
|
-
if errorlevel 1 exit /b 1
|
139
|
-
echo.
|
140
|
-
echo.Build finished.
|
141
|
-
goto end
|
142
|
-
)
|
143
|
-
|
144
|
-
if "%1" == "epub" (
|
145
|
-
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
|
146
|
-
if errorlevel 1 exit /b 1
|
147
|
-
echo.
|
148
|
-
echo.Build finished. The epub file is in %BUILDDIR%/epub.
|
149
|
-
goto end
|
150
|
-
)
|
151
|
-
|
152
|
-
if "%1" == "latex" (
|
153
|
-
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
154
|
-
if errorlevel 1 exit /b 1
|
155
|
-
echo.
|
156
|
-
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
157
|
-
goto end
|
158
|
-
)
|
159
|
-
|
160
|
-
if "%1" == "latexpdf" (
|
161
|
-
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
162
|
-
cd %BUILDDIR%/latex
|
163
|
-
make all-pdf
|
164
|
-
cd %~dp0
|
165
|
-
echo.
|
166
|
-
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
167
|
-
goto end
|
168
|
-
)
|
169
|
-
|
170
|
-
if "%1" == "latexpdfja" (
|
171
|
-
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
172
|
-
cd %BUILDDIR%/latex
|
173
|
-
make all-pdf-ja
|
174
|
-
cd %~dp0
|
175
|
-
echo.
|
176
|
-
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
177
|
-
goto end
|
178
|
-
)
|
179
|
-
|
180
|
-
if "%1" == "text" (
|
181
|
-
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
|
182
|
-
if errorlevel 1 exit /b 1
|
183
|
-
echo.
|
184
|
-
echo.Build finished. The text files are in %BUILDDIR%/text.
|
185
|
-
goto end
|
186
|
-
)
|
187
|
-
|
188
|
-
if "%1" == "man" (
|
189
|
-
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
|
190
|
-
if errorlevel 1 exit /b 1
|
191
|
-
echo.
|
192
|
-
echo.Build finished. The manual pages are in %BUILDDIR%/man.
|
193
|
-
goto end
|
194
|
-
)
|
195
|
-
|
196
|
-
if "%1" == "texinfo" (
|
197
|
-
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
|
198
|
-
if errorlevel 1 exit /b 1
|
199
|
-
echo.
|
200
|
-
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
|
201
|
-
goto end
|
202
|
-
)
|
203
|
-
|
204
|
-
if "%1" == "gettext" (
|
205
|
-
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
|
206
|
-
if errorlevel 1 exit /b 1
|
207
|
-
echo.
|
208
|
-
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
|
209
|
-
goto end
|
210
|
-
)
|
211
|
-
|
212
|
-
if "%1" == "changes" (
|
213
|
-
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
214
|
-
if errorlevel 1 exit /b 1
|
215
|
-
echo.
|
216
|
-
echo.The overview file is in %BUILDDIR%/changes.
|
217
|
-
goto end
|
218
|
-
)
|
219
|
-
|
220
|
-
if "%1" == "linkcheck" (
|
221
|
-
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
222
|
-
if errorlevel 1 exit /b 1
|
223
|
-
echo.
|
224
|
-
echo.Link check complete; look for any errors in the above output ^
|
225
|
-
or in %BUILDDIR%/linkcheck/output.txt.
|
226
|
-
goto end
|
227
|
-
)
|
228
|
-
|
229
|
-
if "%1" == "doctest" (
|
230
|
-
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
231
|
-
if errorlevel 1 exit /b 1
|
232
|
-
echo.
|
233
|
-
echo.Testing of doctests in the sources finished, look at the ^
|
234
|
-
results in %BUILDDIR%/doctest/output.txt.
|
235
|
-
goto end
|
236
|
-
)
|
237
|
-
|
238
|
-
if "%1" == "coverage" (
|
239
|
-
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
|
240
|
-
if errorlevel 1 exit /b 1
|
241
|
-
echo.
|
242
|
-
echo.Testing of coverage in the sources finished, look at the ^
|
243
|
-
results in %BUILDDIR%/coverage/python.txt.
|
244
|
-
goto end
|
245
|
-
)
|
246
|
-
|
247
|
-
if "%1" == "xml" (
|
248
|
-
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
|
249
|
-
if errorlevel 1 exit /b 1
|
250
|
-
echo.
|
251
|
-
echo.Build finished. The XML files are in %BUILDDIR%/xml.
|
252
|
-
goto end
|
253
|
-
)
|
254
|
-
|
255
|
-
if "%1" == "pseudoxml" (
|
256
|
-
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
|
257
|
-
if errorlevel 1 exit /b 1
|
258
|
-
echo.
|
259
|
-
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
|
260
|
-
goto end
|
261
|
-
)
|
262
|
-
|
263
|
-
:end
|
data/docs/parameters.rst
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
Parameters are Optional
|
2
|
-
=======================
|
3
|
-
|
4
|
-
Squib is all about sane defaults and shorthand specification. Arguments to DSL methods are almost always using hashes, which look a lot like `Ruby 2.0's named parameters <http://www.ruby-doc.org/core-2.0.0/doc/syntax/calling_methods_rdoc.html#label-Keyword+Arguments>`_. This means you can specify your parameters in any order you please. All parameters are optional.
|
5
|
-
|
6
|
-
For example ``x`` and ``y`` default to ``0`` (i.e. the upper-left corner of the card). Any parameter that is specified in the command overrides any Squib defaults or layout rules.
|
7
|
-
|
8
|
-
You must use *named parameters* rather than *positional parameters*. For example::
|
9
|
-
|
10
|
-
save(:png) # wrong
|
11
|
-
|
12
|
-
will lead to an error like this:
|
13
|
-
|
14
|
-
.. code-block:: none
|
15
|
-
|
16
|
-
C:/Ruby200/lib/ruby/gems/2.0.0/gems/squib-0.0.3/lib/squib/api/save.rb:12:in `save': wrong number of arguments (2 for 0..1) (ArgumentError)
|
17
|
-
from deck.rb:22:in `block in <main>'
|
18
|
-
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/squib-0.0.3/lib/squib/deck.rb:60:in `instance_eval'
|
19
|
-
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/squib-0.0.3/lib/squib/deck.rb:60:in `initialize'
|
20
|
-
from deck.rb:18:in `new'
|
21
|
-
from deck.rb:18:in `<main>'
|
22
|
-
|
23
|
-
Instead, you must name the parameters::
|
24
|
-
|
25
|
-
save(format: :png) # the right way
|
26
|
-
|
27
|
-
.. warning::
|
28
|
-
|
29
|
-
If you provide an option to a DSL method that the DSL method does not recognize, Squib ignores the extraenous option without warning. For example, these two calls have identical behavior::
|
30
|
-
|
31
|
-
save_png prefix: 'front_'
|
32
|
-
save_png prefix: 'front_', narf: true # narf has no effect
|
33
|
-
|
34
|
-
This can be troublesome when you accidentally misspell an option and don't realize it.
|
data/docs/server.bat
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
sphinx-autobuild . _build/html
|
data/docs/text_feature.rst
DELETED
@@ -1,115 +0,0 @@
|
|
1
|
-
The Mighty text Method
|
2
|
-
======================
|
3
|
-
|
4
|
-
The :doc:`/dsl/text` method is a particularly powerful method with a ton of options. Be sure to check the option-by-option details in the DSL reference, but here are the highlights.
|
5
|
-
|
6
|
-
Fonts
|
7
|
-
-----
|
8
|
-
|
9
|
-
To set the font, your ``text`` method call will look something like this::
|
10
|
-
|
11
|
-
text str: "Hello", font: 'MyFont Bold 32'
|
12
|
-
|
13
|
-
|
14
|
-
The ``'MyFont Bold 32'`` is specified as a "Pango font string", which can involve `a lot of options <http://ruby-gnome2.osdn.jp/hiki.cgi?Pango%3A%3AFontDescription#Pango%3A%3AFontDescription.new>`_ including backup font families, size, all-caps, stretch, oblique, italic, and degree of boldness. (These options are only available if the underlying font supports them, however.) Here's are some :doc:`/dsl/text` calls with different Pango font strings::
|
15
|
-
|
16
|
-
text str: "Hello", font: 'Sans 18'
|
17
|
-
text str: "Hello", font: 'Arial,Verdana weight=900 style=oblique 36'
|
18
|
-
text str: "Hello", font: 'Times New Roman,Sans 25'
|
19
|
-
|
20
|
-
|
21
|
-
Finally, Squib's ``text`` method has options such as ``font_size`` that allow you to override the font string. This means that you can set a blanket font for the whole deck, then adjust sizes from there. This is useful with layouts and ``extends`` too (see :doc:`/layouts`).
|
22
|
-
|
23
|
-
.. note::
|
24
|
-
|
25
|
-
When the font has a space in the name (e.g. Times New Roman), you'll need to put a backup to get Pango's parsing to work. In some operating systems, you'll want to simply end with a comma::
|
26
|
-
|
27
|
-
text str: "Hello", font: 'Times New Roman, 25'
|
28
|
-
|
29
|
-
.. note::
|
30
|
-
|
31
|
-
Most of the font rendering is done by a combination of your installed fonts, your OS, and your graphics card. Thus, different systems will render text slightly differently.
|
32
|
-
|
33
|
-
Width and Height
|
34
|
-
------------------
|
35
|
-
|
36
|
-
By default, Pango text boxes will scale the text box to whatever you need, hence the ``:native`` default. However, for most of the other customizations to work (e.g. center-aligned) you'll need to specify the width. If both the width and the height are specified and the text overflows, then the ``ellipsize`` option is consulted to figure out what to do with the overflow. Also, the ``valign`` will only work if ``height`` is also set to something other than ``:native``.
|
37
|
-
|
38
|
-
Hints
|
39
|
-
-----
|
40
|
-
|
41
|
-
Laying out text by typing in numbers can be confusing. What Squib calls "hints" is merely a rectangle around the text box. Hints can be turned on globally in the config file, using the :doc:`/dsl/hint` method, or in an individual text method. These are there merely for prototyping and are not intended for production. Additionally, these are not to be conflated with "rendering hints" that Pango and Cairo mention in their documentation.
|
42
|
-
|
43
|
-
Extents
|
44
|
-
-------
|
45
|
-
|
46
|
-
Sometimes you want size things based on the size of your rendered text. For example, drawing a rectangle around card's title such that the rectangle perfectly fits. Squib returns the final rendered size of the text so you can work with it afterward. It's an array of hashes that correspond to each card. The output looks like this::
|
47
|
-
|
48
|
-
Squib::Deck.new(cards: 2) do
|
49
|
-
extents = text(str: ['Hello', 'World!'])
|
50
|
-
puts extents
|
51
|
-
end
|
52
|
-
|
53
|
-
will output::
|
54
|
-
|
55
|
-
[{:width=>109, :height=>55}, {:width=>142, :height=>55}] # Hello was 109 pixels wide, World 142 pixels
|
56
|
-
|
57
|
-
Embedding Images
|
58
|
-
----------------
|
59
|
-
|
60
|
-
Squib can embed icons into the flow of text. To do this, you need to define text keys for Squib to look for, and then the corresponding files. The object given to the block is a ``TextEmbed``, which supports PNG and SVG. Here's a minimal example::
|
61
|
-
|
62
|
-
text(str: 'Gain 1 :health:') do |embed|
|
63
|
-
embed.svg key: ':health:', file: 'heart.svg'
|
64
|
-
end
|
65
|
-
|
66
|
-
Markup
|
67
|
-
------
|
68
|
-
|
69
|
-
See :ref:`Markup <text-markup>` in :doc:`/dsl/text`.
|
70
|
-
|
71
|
-
Samples
|
72
|
-
-------
|
73
|
-
|
74
|
-
These samples are maintained in the `repository here <https://github.com/andymeneely/squib/tree/master/samples>`_ in case you need some of the assets referenced.
|
75
|
-
|
76
|
-
Sample: _text.rb
|
77
|
-
^^^^^^^^^^^^^^^^
|
78
|
-
|
79
|
-
.. literalinclude:: ../samples/text/_text.rb
|
80
|
-
:language: ruby
|
81
|
-
:linenos:
|
82
|
-
|
83
|
-
.. raw:: html
|
84
|
-
|
85
|
-
<img src="text/_text_00_expected.png" width=600 class="figure">
|
86
|
-
|
87
|
-
Sample: text_options.rb
|
88
|
-
^^^^^^^^^^^^^^^^^^^^^^^
|
89
|
-
|
90
|
-
.. literalinclude:: ../samples/text_options.rb
|
91
|
-
:language: ruby
|
92
|
-
:linenos:
|
93
|
-
|
94
|
-
Sample: embed_text.rb
|
95
|
-
^^^^^^^^^^^^^^^^^^^^^
|
96
|
-
|
97
|
-
.. literalinclude:: ../samples/embed_text.rb
|
98
|
-
:language: ruby
|
99
|
-
:linenos:
|
100
|
-
|
101
|
-
|
102
|
-
Sample: config_text_markup.rb
|
103
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
104
|
-
|
105
|
-
.. literalinclude:: ../samples/config_text_markup.rb
|
106
|
-
:language: ruby
|
107
|
-
:linenos:
|
108
|
-
|
109
|
-
.. literalinclude:: ../samples/config_text_markup.yml
|
110
|
-
:language: ruby
|
111
|
-
:linenos:
|
112
|
-
|
113
|
-
.. literalinclude:: ../samples/config_disable_quotes.yml
|
114
|
-
:language: ruby
|
115
|
-
:linenos:
|
data/docs/units.rst
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Unit Conversion
|
2
|
-
===============
|
3
|
-
|
4
|
-
By default, Squib thinks in pixels. This decision was made so that we can have pixel-perfect layouts without automatically scaling everything, even though working in units is sometimes easier. We provide some conversion methods, including looking for strings that end in "in", "cm", or "mm" and computing based on the current DPI. The dpi is set on `Squib::Deck.new` (not `config.yml`).
|
5
|
-
|
6
|
-
Here are some examples, which `lives here <https://github.com/andymeneely/squib/tree/master/samples/units.rb>`_
|
7
|
-
|
8
|
-
.. literalinclude:: ../samples/units/_units.rb
|
9
|
-
:language: ruby
|
10
|
-
:linenos:
|
11
|
-
|
12
|
-
.. raw:: html
|
13
|
-
|
14
|
-
<img src="units/units_00_expected.png" class="figure">
|