squib 0.9.0 → 0.10.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.
Files changed (230) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/.gitmodules +22 -0
  4. data/.travis.yml +4 -5
  5. data/CHANGELOG.md +23 -0
  6. data/CONTRIBUTING.md +40 -0
  7. data/README.md +25 -553
  8. data/RELEASE TODO.md +2 -2
  9. data/Rakefile +6 -64
  10. data/appveyor.yml +0 -4
  11. data/benchmarks/antialias_best.rb +2 -2
  12. data/benchmarks/antialias_fast.rb +2 -2
  13. data/benchmarks/{backend-memory.rb → backend_memory.rb} +2 -2
  14. data/benchmarks/{backend-svg.rb → backend_svg.rb} +2 -2
  15. data/benchmarks/tons_of_png.rb +1 -1
  16. data/benchmarks/tons_of_svg.rb +1 -1
  17. data/benchmarks/tons_of_text.rb +1 -1
  18. data/docs/Makefile +216 -0
  19. data/docs/_static/css/squibdocs.css +18 -0
  20. data/docs/args/draw.rst +36 -0
  21. data/docs/args/expansion.rst +3 -0
  22. data/docs/args/layout.rst +6 -0
  23. data/docs/args/output_dir.rst +6 -0
  24. data/docs/args/range.rst +6 -0
  25. data/docs/args/transform.rst +51 -0
  26. data/docs/args/trim.rst +11 -0
  27. data/docs/args/wh.rst +12 -0
  28. data/docs/args/xy.rst +12 -0
  29. data/docs/arrays.rst +77 -0
  30. data/docs/backends.rst +20 -0
  31. data/docs/bleed.rst +13 -0
  32. data/docs/build_groups.rst +47 -0
  33. data/docs/colors.rst +64 -0
  34. data/docs/conf.py +287 -0
  35. data/docs/config.rst +117 -0
  36. data/docs/data.rst +22 -0
  37. data/docs/dsl/background.rst +20 -0
  38. data/docs/dsl/build.rst +32 -0
  39. data/docs/dsl/build_groups.rst +23 -0
  40. data/docs/dsl/circle.rst +27 -0
  41. data/docs/dsl/cm.rst +19 -0
  42. data/docs/dsl/csv.rst +62 -0
  43. data/docs/dsl/curve.rst +63 -0
  44. data/docs/dsl/deck.rst +45 -0
  45. data/docs/dsl/disable_build.rst +28 -0
  46. data/docs/dsl/ellipse.rst +17 -0
  47. data/docs/dsl/enable_build.rst +25 -0
  48. data/docs/dsl/grid.rst +31 -0
  49. data/docs/dsl/hand.rst +40 -0
  50. data/docs/dsl/hint.rst +15 -0
  51. data/docs/dsl/inches.rst +19 -0
  52. data/docs/dsl/index.rst +9 -0
  53. data/docs/dsl/line.rst +52 -0
  54. data/docs/dsl/png.rst +49 -0
  55. data/docs/dsl/polygon.rst +28 -0
  56. data/docs/dsl/rect.rst +18 -0
  57. data/docs/dsl/save.rst +23 -0
  58. data/docs/dsl/save_pdf.rst +48 -0
  59. data/docs/dsl/save_png.rst +46 -0
  60. data/docs/dsl/save_sheet.rst +55 -0
  61. data/docs/dsl/showcase.rst +65 -0
  62. data/docs/dsl/star.rst +35 -0
  63. data/docs/dsl/svg.rst +119 -0
  64. data/docs/dsl/text.rst +294 -0
  65. data/docs/dsl/triangle.rst +38 -0
  66. data/docs/dsl/use_layout.rst +16 -0
  67. data/docs/dsl/xlsx.rst +50 -0
  68. data/docs/guides/game_icons.rst +2 -0
  69. data/docs/guides/getting-started/index.rst +5 -0
  70. data/docs/guides/getting-started/part_0_learning_ruby.rst +145 -0
  71. data/docs/guides/getting-started/part_1_zero_to_game.rst +216 -0
  72. data/docs/guides/getting-started/part_2_iconography.rst +152 -0
  73. data/docs/guides/getting-started/part_3_workflows.rst +4 -0
  74. data/docs/guides/git.rst +13 -0
  75. data/docs/guides/hello_world.rst +6 -0
  76. data/docs/help.rst +157 -0
  77. data/docs/index.rst +35 -0
  78. data/docs/install.rst +66 -0
  79. data/docs/layouts.rst +235 -0
  80. data/docs/learning.rst +10 -0
  81. data/docs/make.bat +263 -0
  82. data/docs/parameters.rst +26 -0
  83. data/docs/server.bat +1 -0
  84. data/docs/text_feature.rst +86 -0
  85. data/docs/units.rst +6 -0
  86. data/lib/squib.rb +4 -4
  87. data/lib/squib/api/background.rb +5 -10
  88. data/lib/squib/api/data.rb +30 -54
  89. data/lib/squib/api/groups.rb +47 -0
  90. data/lib/squib/api/image.rb +8 -67
  91. data/lib/squib/api/save.rb +15 -105
  92. data/lib/squib/api/settings.rb +8 -22
  93. data/lib/squib/api/shapes.rb +15 -185
  94. data/lib/squib/api/text.rb +9 -49
  95. data/lib/squib/api/text_embed.rb +12 -12
  96. data/lib/squib/api/units.rb +3 -17
  97. data/lib/squib/args/arg_loader.rb +6 -6
  98. data/lib/squib/args/box.rb +2 -2
  99. data/lib/squib/args/card_range.rb +1 -1
  100. data/lib/squib/args/color_validator.rb +2 -2
  101. data/lib/squib/args/coords.rb +2 -2
  102. data/lib/squib/args/csv_opts.rb +25 -0
  103. data/lib/squib/args/dir_validator.rb +1 -1
  104. data/lib/squib/args/draw.rb +2 -2
  105. data/lib/squib/args/embed_adjust.rb +1 -1
  106. data/lib/squib/args/embed_key.rb +1 -1
  107. data/lib/squib/args/hand_special.rb +37 -37
  108. data/lib/squib/args/import.rb +2 -2
  109. data/lib/squib/args/input_file.rb +1 -1
  110. data/lib/squib/args/paint.rb +3 -3
  111. data/lib/squib/args/paragraph.rb +2 -2
  112. data/lib/squib/args/save_batch.rb +2 -2
  113. data/lib/squib/args/scale_box.rb +1 -1
  114. data/lib/squib/args/sheet.rb +3 -3
  115. data/lib/squib/args/showcase_special.rb +2 -2
  116. data/lib/squib/args/svg_special.rb +1 -1
  117. data/lib/squib/args/transform.rb +2 -2
  118. data/lib/squib/args/typographer.rb +5 -4
  119. data/lib/squib/args/unit_conversion.rb +4 -4
  120. data/lib/squib/card.rb +8 -8
  121. data/lib/squib/conf.rb +5 -5
  122. data/lib/squib/deck.rb +20 -18
  123. data/lib/squib/graphics/cairo_context_wrapper.rb +3 -3
  124. data/lib/squib/graphics/gradient_regex.rb +1 -1
  125. data/lib/squib/graphics/hand.rb +2 -2
  126. data/lib/squib/graphics/save_doc.rb +9 -8
  127. data/lib/squib/graphics/save_images.rb +24 -11
  128. data/lib/squib/graphics/shapes.rb +16 -17
  129. data/lib/squib/graphics/showcase.rb +9 -9
  130. data/lib/squib/graphics/text.rb +21 -21
  131. data/lib/squib/layout_parser.rb +9 -9
  132. data/lib/squib/layouts/economy.yml +85 -85
  133. data/lib/squib/layouts/fantasy.yml +101 -101
  134. data/lib/squib/layouts/hand.yml +62 -62
  135. data/lib/squib/layouts/playing-card.yml +35 -35
  136. data/lib/squib/layouts/tuck_box.yml +45 -45
  137. data/lib/squib/sample_helpers.rb +1 -1
  138. data/lib/squib/version.rb +1 -1
  139. data/samples/{backend.rb → backend/_backend.rb} +2 -2
  140. data/samples/basic.rb +3 -3
  141. data/samples/bug134.rb +14 -0
  142. data/samples/build_groups/build_groups.rb +36 -0
  143. data/samples/cairo_access.rb +12 -1
  144. data/samples/{colors.rb → colors/_colors.rb} +12 -12
  145. data/samples/{gradients.rb → colors/_gradients.rb} +1 -1
  146. data/samples/config_text_markup.rb +2 -2
  147. data/samples/custom-config.yml +5 -5
  148. data/samples/custom_config.rb +18 -18
  149. data/samples/{csv_import.rb → data/_csv.rb} +8 -1
  150. data/samples/{excel.rb → data/_excel.rb} +3 -3
  151. data/samples/embed_text.rb +21 -0
  152. data/samples/hello_world.rb +1 -1
  153. data/samples/{load_images.rb → images/_more_load_images.rb} +2 -2
  154. data/samples/layouts.rb +11 -1
  155. data/samples/layouts_builtin.rb +51 -51
  156. data/samples/offset.svg +71 -71
  157. data/samples/ranges.rb +7 -7
  158. data/samples/{hand.rb → saves/_hand.rb} +1 -2
  159. data/samples/{portrait-landscape.rb → saves/_portrait_landscape.rb} +4 -4
  160. data/samples/{saves.rb → saves/_saves.rb} +0 -0
  161. data/samples/{showcase.rb → saves/_showcase.rb} +2 -2
  162. data/samples/{draw_shapes.rb → shapes/_draw_shapes.rb} +1 -1
  163. data/samples/text/_text.rb +4 -3
  164. data/samples/text_options.rb +6 -6
  165. data/samples/unicode.rb +1 -1
  166. data/spec/api/api_data_spec.rb +59 -4
  167. data/spec/api/api_settings_spec.rb +1 -1
  168. data/spec/args/box_spec.rb +7 -7
  169. data/spec/args/draw_spec.rb +19 -19
  170. data/spec/args/embed_key_spec.rb +13 -13
  171. data/spec/args/input_file_spec.rb +2 -2
  172. data/spec/args/paint_spec.rb +5 -5
  173. data/spec/args/paragraph_spec.rb +28 -28
  174. data/spec/args/range_spec.rb +1 -1
  175. data/spec/args/save_batch_spec.rb +10 -10
  176. data/spec/args/scale_box_spec.rb +9 -9
  177. data/spec/args/sheet_spec.rb +8 -8
  178. data/spec/args/showcase_special_spec.rb +15 -15
  179. data/spec/args/transform_spec.rb +4 -4
  180. data/spec/args/typographer_spec.rb +11 -11
  181. data/spec/args/unit_conversion_spec.rb +2 -2
  182. data/spec/card_spec.rb +1 -1
  183. data/spec/commands/new_spec.rb +1 -1
  184. data/spec/data/csv/custom_opts.csv +2 -0
  185. data/spec/data/csv/newline.csv +3 -0
  186. data/spec/data/csv/qty.csv +2 -2
  187. data/spec/data/csv/qty_named.csv +2 -2
  188. data/spec/data/csv/with_spaces.csv +2 -2
  189. data/spec/data/csv/yield.csv +3 -0
  190. data/spec/data/samples/{autoscale_font.rb.txt → autoscale_font/_autoscale_font.rb.txt} +55 -18
  191. data/spec/data/samples/cairo_access.rb.txt +24 -0
  192. data/spec/data/samples/{gradients.rb.txt → colors/_gradients.rb.txt} +0 -0
  193. data/spec/data/samples/config_text_markup.rb.txt +72 -72
  194. data/spec/data/samples/custom_config.rb.txt +1 -0
  195. data/spec/data/samples/{csv_import.rb.txt → data/_csv.rb.txt} +0 -0
  196. data/spec/data/samples/{excel.rb.txt → data/_excel.rb.txt} +0 -0
  197. data/spec/data/samples/embed_text.rb.txt +79 -0
  198. data/spec/data/samples/hello_world.rb.txt +36 -36
  199. data/spec/data/samples/{load_images.rb.txt → images/_more_load_images.rb.txt} +4 -4
  200. data/spec/data/samples/{hand.rb.txt → saves/_hand.rb.txt} +0 -0
  201. data/spec/data/samples/{portrait-landscape.rb.txt → saves/_portrait_landscape.rb.txt} +11 -7
  202. data/spec/data/samples/{save_pdf.rb.txt → saves/_save_pdf.rb.txt} +0 -0
  203. data/spec/data/samples/{saves.rb.txt → saves/_saves.rb.txt} +3 -4
  204. data/spec/data/samples/{showcase.rb.txt → saves/_showcase.rb.txt} +0 -0
  205. data/spec/data/samples/{draw_shapes.rb.txt → shapes/_draw_shapes.rb.txt} +0 -0
  206. data/spec/data/samples/text_options.rb.txt +1125 -1125
  207. data/spec/graphics/cairo_context_wrapper_spec.rb +10 -10
  208. data/spec/graphics/graphics_save_doc_spec.rb +11 -5
  209. data/spec/layout_parser_spec.rb +21 -9
  210. data/spec/logger_spec.rb +2 -2
  211. data/spec/samples/run_samples_spec.rb +1 -1
  212. data/spec/samples/samples_regression_spec.rb +16 -18
  213. data/spec/samples/sanity.rb +9 -9
  214. data/spec/sanity/.gitignore +1 -0
  215. data/spec/sanity/sanity.html.erb +42 -0
  216. data/spec/sanity/sanity_test.rb +42 -0
  217. data/spec/sanity/tests.yml +12 -0
  218. data/spec/spec_helper.rb +22 -20
  219. data/squib.gemspec +3 -4
  220. metadata +143 -81
  221. data/.rspec +0 -1
  222. data/.yardopts +0 -10
  223. data/samples/autoscale_font.rb +0 -27
  224. data/samples/backend-config.yml +0 -5
  225. data/samples/color_shortcuts.rb +0 -6
  226. data/samples/explode_quantities.xlsx +0 -0
  227. data/samples/quantity_explosion.csv +0 -3
  228. data/samples/sample.csv +0 -3
  229. data/samples/sample.xlsx +0 -0
  230. data/squib.sublime-project +0 -42
data/RELEASE TODO.md CHANGED
@@ -3,16 +3,16 @@ Be sure to remember to do the following for releases. (Copy into a GitHub issue)
3
3
  - [ ] CHANGELOG is written for all new changes
4
4
  - [ ] README is updated
5
5
  - [ ] Samples are updated
6
- - [ ] `rake doc`
7
6
  - [ ] Check `sample_regression_spec.rb` regression tests are all enabled (i.e. `overwrite_sample` is commented out)
8
7
  - [ ] Bump version.rb
9
8
  - [ ] Do a full rake locally
10
9
  - [ ] `rake sanity`, and check visually
11
10
  - [ ] Travis is passing on dev branch
12
11
  - [ ] Merge master branch
12
+ - [ ] Push master branch
13
13
  - [ ] Create GitHub release tag
14
14
  - [ ] `gem push pkg/squib-x.y.z.gem`
15
15
  - [ ] Github milestone closed
16
- - [ ] Push `rake doc` to website
16
+ - [ ] Activate version on squib.readthedocs.org
17
17
  - [ ] Bump version.rb to the next alpha
18
18
  - [ ] Publish on BoardGameGeek thread
data/Rakefile CHANGED
@@ -1,6 +1,5 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rspec/core/rake_task'
3
- require 'yard'
4
3
  require 'benchmark'
5
4
  # require 'byebug'
6
5
 
@@ -10,34 +9,25 @@ task default: [:install, :spec]
10
9
  # Useful for hooking up with SublimeText.
11
10
  # e.g. rake sample[basic.rb]
12
11
  desc 'Run a specific sample'
13
- task :run,[:file] => :install do |t, args|
12
+ task :run, [:file] => :install do |t, args|
14
13
  args.with_defaults(file: 'basic.rb')
15
14
  Dir.chdir('samples') do
16
- args[:file] << ".rb" unless args[:file].end_with? '.rb'
15
+ args[:file] << '.rb' unless args[:file].end_with? '.rb'
17
16
  puts "Running samples/#{args[:file]}"
18
17
  load args[:file]
19
18
  end
20
19
  end
21
20
 
22
-
23
21
  RSpec::Core::RakeTask.new(:spec)
24
22
 
25
23
  RSpec::Core::RakeTask.new(:spec_fastonly) do |t|
26
- t.rspec_opts = "--tag ~slow"
27
- end
28
-
29
- desc 'Build API docs'
30
- task doc: [:yarddoc, :apply_google_analytics]
31
-
32
- YARD::Rake::YardocTask.new(:yarddoc) do |t|
33
- t.files = ['lib/**/*.rb', 'samples/**/*.rb'] # optional
34
- #t.options = ['--any', '--extra', '--opts'] # optional
24
+ t.rspec_opts = '--tag ~slow'
35
25
  end
36
26
 
37
27
  desc 'Run some performance benchmarks'
38
28
  task benchmark: [:install] do
39
29
  require 'squib'
40
- Squib::logger.level = Logger::ERROR #silence warnings
30
+ Squib::logger.level = Logger::ERROR # silence warnings
41
31
  Dir.chdir('benchmarks') do
42
32
  Benchmark.bm(15) do |bm|
43
33
  Dir['*.rb'].each do | script |
@@ -50,57 +40,9 @@ end
50
40
 
51
41
  desc 'Run sanity tests without a full rebuild'
52
42
  task :sanity_only do
53
- require_relative 'spec/samples/sanity.rb'
54
- Sanity.new.run
43
+ require_relative 'spec/sanity/sanity_test.rb'
44
+ SanityTest.new.run
55
45
  end
56
46
 
57
47
  desc 'Run full rebuild with sanity tests'
58
48
  task sanity: [:install, :spec, :sanity_only]
59
-
60
- desc 'Insert Google Analytics into documentation build'
61
- task :apply_google_analytics do
62
- # The string to replace in the html document. This is chosen to be the end
63
- # body </body> tag. So the script can be injected as the last thing in the
64
- # document body.
65
- string_to_replace = "</body>"
66
- # This is the string to replace with. It include the google analytics script
67
- # as well as the end </body> tag.
68
- string_to_replace_with = <<-EOF
69
- <script>
70
- (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
71
- (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
72
- m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
73
- })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
74
-
75
- ga('create', 'UA-54811605-1', 'auto');
76
- ga('send', 'pageview');
77
-
78
- </script>
79
- </body>
80
- EOF
81
-
82
- files = Dir.glob("doc/**/*.html")
83
-
84
- files.each do |html_file|
85
- puts "Processing file: #{html_file}"
86
- contents = ""
87
- # Read the file contents
88
- file = File.open(html_file)
89
- file.each { |line| contents << line }
90
- file.close
91
-
92
- # If the file already has google analytics tracking info, skip it.
93
- if contents.include?(string_to_replace_with)
94
- puts "Skipped..."
95
- next
96
- end
97
-
98
- # Apply google analytics tracking info to the html file
99
- contents.gsub!(string_to_replace, string_to_replace_with)
100
-
101
- # Write the contents with the google analytics info to the file
102
- file = File.open(html_file, "w")
103
- file.write(contents)
104
- file.close
105
- end
106
- end
data/appveyor.yml CHANGED
@@ -4,10 +4,6 @@ skip_tags: true
4
4
 
5
5
  environment:
6
6
  matrix:
7
- - ruby_version: "200"
8
- - ruby_version: "200-x64"
9
- - ruby_version: "21"
10
- - ruby_version: "21-x64"
11
7
  - ruby_version: "22"
12
8
  - ruby_version: "22-x64"
13
9
 
@@ -9,5 +9,5 @@ Squib::Deck.new(cards: 200, config: 'antialias_best.yml') do
9
9
  x: (i % 17) * 50,
10
10
  y: (i / 17) * 50
11
11
  end
12
- save_png prefix: 'antialias_best_'
13
- end
12
+ save_png prefix: 'antialias_best_'
13
+ end
@@ -9,5 +9,5 @@ Squib::Deck.new(cards: 200, config: 'antialias_fast.yml') do
9
9
  x: (i % 17) * 50,
10
10
  y: (i / 17) * 50
11
11
  end
12
- save_png prefix: 'antialias_fast_'
13
- end
12
+ save_png prefix: 'antialias_fast_'
13
+ end
@@ -2,7 +2,7 @@ require 'squib'
2
2
 
3
3
  Squib::Deck.new(cards: 200) do
4
4
  background color: :white
5
- text str: "Hello, world!", y: 500, width: 825, font: 'Sans bold 72', align: :center
5
+ text str: 'Hello, world!', y: 500, width: 825, font: 'Sans bold 72', align: :center
6
6
  rect x: 10, y: 10, width: 20, height: 20
7
7
  circle x: 40, y: 40, radius: 25
8
8
  triangle x1: 50, y1: 15, x2: 60, y2: 25, x3: 75, y3: 25
@@ -11,4 +11,4 @@ Squib::Deck.new(cards: 200) do
11
11
  png file: 'shiny-purse.png', x: 250, y: 20
12
12
  save_png prefix: 'rasterized_'
13
13
  save_pdf file: 'backend.pdf'
14
- end
14
+ end
@@ -2,7 +2,7 @@ require 'squib'
2
2
 
3
3
  Squib::Deck.new(cards: 200, config: 'backend-svg.yml') do
4
4
  background color: :white
5
- text str: "Hello, world!", y: 500, width: 825, font: 'Sans bold 72', align: :center
5
+ text str: 'Hello, world!', y: 500, width: 825, font: 'Sans bold 72', align: :center
6
6
  rect x: 10, y: 10, width: 20, height: 20
7
7
  circle x: 40, y: 40, radius: 25
8
8
  triangle x1: 50, y1: 15, x2: 60, y2: 25, x3: 75, y3: 25
@@ -11,4 +11,4 @@ Squib::Deck.new(cards: 200, config: 'backend-svg.yml') do
11
11
  png file: 'shiny-purse.png', x: 250, y: 20
12
12
  save_png prefix: 'rasterized_'
13
13
  save_pdf file: 'backend.pdf'
14
- end
14
+ end
@@ -3,4 +3,4 @@ require 'squib'
3
3
  Squib::Deck.new(cards: 200) do
4
4
  png file: 'shiny-purse.png'
5
5
  save_png prefix: 'tons_of_png_'
6
- end
6
+ end
@@ -4,4 +4,4 @@ Squib::Deck.new(cards: 200) do
4
4
  svg file: 'spanner.svg',
5
5
  width: 400, height: 400
6
6
  save_png prefix: 'tons_of_svg_'
7
- end
7
+ end
@@ -5,4 +5,4 @@ Squib::Deck.new(cards: 200) do
5
5
  font: 'Sans bold 12', width: 825,
6
6
  ellipsize: false
7
7
  save_png prefix: 'tons_of_text_'
8
- end
8
+ end
data/docs/Makefile ADDED
@@ -0,0 +1,216 @@
1
+ # Makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ PAPER =
8
+ BUILDDIR = _build
9
+
10
+ # User-friendly check for sphinx-build
11
+ ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12
+ $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13
+ endif
14
+
15
+ # Internal variables.
16
+ PAPEROPT_a4 = -D latex_paper_size=a4
17
+ PAPEROPT_letter = -D latex_paper_size=letter
18
+ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
19
+ # the i18n builder cannot share the environment and doctrees with the others
20
+ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
21
+
22
+ .PHONY: help
23
+ help:
24
+ @echo "Please use \`make <target>' where <target> is one of"
25
+ @echo " html to make standalone HTML files"
26
+ @echo " dirhtml to make HTML files named index.html in directories"
27
+ @echo " singlehtml to make a single large HTML file"
28
+ @echo " pickle to make pickle files"
29
+ @echo " json to make JSON files"
30
+ @echo " htmlhelp to make HTML files and a HTML help project"
31
+ @echo " qthelp to make HTML files and a qthelp project"
32
+ @echo " applehelp to make an Apple Help Book"
33
+ @echo " devhelp to make HTML files and a Devhelp project"
34
+ @echo " epub to make an epub"
35
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
36
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
37
+ @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
38
+ @echo " text to make text files"
39
+ @echo " man to make manual pages"
40
+ @echo " texinfo to make Texinfo files"
41
+ @echo " info to make Texinfo files and run them through makeinfo"
42
+ @echo " gettext to make PO message catalogs"
43
+ @echo " changes to make an overview of all changed/added/deprecated items"
44
+ @echo " xml to make Docutils-native XML files"
45
+ @echo " pseudoxml to make pseudoxml-XML files for display purposes"
46
+ @echo " linkcheck to check all external links for integrity"
47
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
48
+ @echo " coverage to run coverage check of the documentation (if enabled)"
49
+
50
+ .PHONY: clean
51
+ clean:
52
+ rm -rf $(BUILDDIR)/*
53
+
54
+ .PHONY: html
55
+ html:
56
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
57
+ @echo
58
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
59
+
60
+ .PHONY: dirhtml
61
+ dirhtml:
62
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
63
+ @echo
64
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
65
+
66
+ .PHONY: singlehtml
67
+ singlehtml:
68
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
69
+ @echo
70
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
71
+
72
+ .PHONY: pickle
73
+ pickle:
74
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
75
+ @echo
76
+ @echo "Build finished; now you can process the pickle files."
77
+
78
+ .PHONY: json
79
+ json:
80
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
81
+ @echo
82
+ @echo "Build finished; now you can process the JSON files."
83
+
84
+ .PHONY: htmlhelp
85
+ htmlhelp:
86
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
87
+ @echo
88
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
89
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
90
+
91
+ .PHONY: qthelp
92
+ qthelp:
93
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
94
+ @echo
95
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
96
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
97
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Squib.qhcp"
98
+ @echo "To view the help file:"
99
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Squib.qhc"
100
+
101
+ .PHONY: applehelp
102
+ applehelp:
103
+ $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
104
+ @echo
105
+ @echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
106
+ @echo "N.B. You won't be able to view it unless you put it in" \
107
+ "~/Library/Documentation/Help or install it in your application" \
108
+ "bundle."
109
+
110
+ .PHONY: devhelp
111
+ devhelp:
112
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
113
+ @echo
114
+ @echo "Build finished."
115
+ @echo "To view the help file:"
116
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/Squib"
117
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Squib"
118
+ @echo "# devhelp"
119
+
120
+ .PHONY: epub
121
+ epub:
122
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
123
+ @echo
124
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
125
+
126
+ .PHONY: latex
127
+ latex:
128
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
129
+ @echo
130
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
131
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
132
+ "(use \`make latexpdf' here to do that automatically)."
133
+
134
+ .PHONY: latexpdf
135
+ latexpdf:
136
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
137
+ @echo "Running LaTeX files through pdflatex..."
138
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
139
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
140
+
141
+ .PHONY: latexpdfja
142
+ latexpdfja:
143
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
144
+ @echo "Running LaTeX files through platex and dvipdfmx..."
145
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
146
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
147
+
148
+ .PHONY: text
149
+ text:
150
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
151
+ @echo
152
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
153
+
154
+ .PHONY: man
155
+ man:
156
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
157
+ @echo
158
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
159
+
160
+ .PHONY: texinfo
161
+ texinfo:
162
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
163
+ @echo
164
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
165
+ @echo "Run \`make' in that directory to run these through makeinfo" \
166
+ "(use \`make info' here to do that automatically)."
167
+
168
+ .PHONY: info
169
+ info:
170
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
171
+ @echo "Running Texinfo files through makeinfo..."
172
+ make -C $(BUILDDIR)/texinfo info
173
+ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
174
+
175
+ .PHONY: gettext
176
+ gettext:
177
+ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
178
+ @echo
179
+ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
180
+
181
+ .PHONY: changes
182
+ changes:
183
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
184
+ @echo
185
+ @echo "The overview file is in $(BUILDDIR)/changes."
186
+
187
+ .PHONY: linkcheck
188
+ linkcheck:
189
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
190
+ @echo
191
+ @echo "Link check complete; look for any errors in the above output " \
192
+ "or in $(BUILDDIR)/linkcheck/output.txt."
193
+
194
+ .PHONY: doctest
195
+ doctest:
196
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
197
+ @echo "Testing of doctests in the sources finished, look at the " \
198
+ "results in $(BUILDDIR)/doctest/output.txt."
199
+
200
+ .PHONY: coverage
201
+ coverage:
202
+ $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
203
+ @echo "Testing of coverage in the sources finished, look at the " \
204
+ "results in $(BUILDDIR)/coverage/python.txt."
205
+
206
+ .PHONY: xml
207
+ xml:
208
+ $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
209
+ @echo
210
+ @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
211
+
212
+ .PHONY: pseudoxml
213
+ pseudoxml:
214
+ $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
215
+ @echo
216
+ @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
@@ -0,0 +1,18 @@
1
+ @import url("theme.css");
2
+
3
+ /* Can add custom styling here */
4
+ .attribution{
5
+ text-align: right;
6
+ }
7
+
8
+ code.literal span.pre{
9
+ color: black;
10
+ }
11
+
12
+ code.code_img{
13
+ width: 50%;
14
+ }
15
+
16
+ code.code_img_small{
17
+ width: 33%;
18
+ }
@@ -0,0 +1,36 @@
1
+ .. :orphan:
2
+
3
+ fill_color
4
+ default: ``'#0000'`` (fully transparent)
5
+
6
+ the color or gradient to fill with. See :doc:`/colors`.
7
+
8
+
9
+ stroke_color
10
+ default: ``:black``
11
+
12
+ the color with which to stroke the outside of the shape. See :doc:`/colors`.
13
+
14
+
15
+ stroke_width
16
+ default: ``2``
17
+
18
+ the width of the outside stroke. Supports :doc:`/units`.
19
+
20
+
21
+ stroke_strategy
22
+ default: ``:fill_first``
23
+
24
+ Specify whether the stroke is done before (thinner) or after (thicker) filling the shape.
25
+
26
+ Must be either ``:fill_first`` or ``:stroke_first`` (or their string equivalents).
27
+
28
+ dash
29
+ default: ``''`` (no dash pattern set)
30
+
31
+ Define a dash pattern for the stroke. This is a special string with space-separated numbers that define the pattern of on-and-off alternating strokes, measured in pixels or units. For example, ``'0.02in 0.02in'`` will be an equal on-and-off dash pattern. Supports :doc:`/units`.
32
+
33
+ cap
34
+ default: ``:butt``
35
+
36
+ Define how the end of the stroke is drawn. Options are ``:square``, ``:butt``, and ``:round`` (or string equivalents of those).