Browse Source

docs: overall cleanup

dev
Andy Meneely 9 years ago
parent
commit
8604ebd684
  1. 2
      docs/colors.rst
  2. 4
      docs/dsl/csv.rst
  3. 5
      docs/dsl/disable_build.rst
  4. 2
      docs/dsl/enable_build.rst
  5. 2
      docs/dsl/text.rst
  6. 6
      docs/layouts.rst
  7. 7
      docs/text_feature.rst

2
docs/colors.rst

@ -40,7 +40,7 @@ by custom name
In your ``config.yml``, as described in :doc:`/config`, you can specify custom names of colors. For example, ``'foreground'``. In your ``config.yml``, as described in :doc:`/config`, you can specify custom names of colors. For example, ``'foreground'``.
Gradients Gradients
-------- ---------
In most places where colors are allowed, you may also supply a string that defines a gradient. Squib supports two flavors of gradients: linear and radial. Gradients are specified by supplying some xy coordinates, which are relative to the card (not the command). Each stop must be between ``0.0`` and ``1.0``, and you can supply as many as you like. Colors can be specified as above (in any of the hex notations or built-in constant). If you add two or more colors at the same stop, then the gradient keeps the colors in the in order specified and treats it like sharp transition. In most places where colors are allowed, you may also supply a string that defines a gradient. Squib supports two flavors of gradients: linear and radial. Gradients are specified by supplying some xy coordinates, which are relative to the card (not the command). Each stop must be between ``0.0`` and ``1.0``, and you can supply as many as you like. Colors can be specified as above (in any of the hex notations or built-in constant). If you add two or more colors at the same stop, then the gradient keeps the colors in the in order specified and treats it like sharp transition.

4
docs/dsl/csv.rst

@ -71,11 +71,11 @@ To get the sample Excel files, go to `its source <https://github.com/andymeneely
Here's the sample.csv Here's the sample.csv
.. literalinclude:: ../../samples/data/sample.csv .. literalinclude:: ../../samples/data/sample.csv
:language: csv :language: text
:linenos: :linenos:
Here's the quantity_explosion.csv Here's the quantity_explosion.csv
.. literalinclude:: ../../samples/data/quantity_explosion.csv .. literalinclude:: ../../samples/data/quantity_explosion.csv
:language: csv :language: text
:linenos: :linenos:

5
docs/dsl/disable_build.rst

@ -1,7 +1,7 @@
disable_build disable_build
============= =============
Disable the given build group for the rest of the build. Thus, code within the corresponding :doc:`/dsl/group` block will not be executed. See :doc:`/build_groups` for ways to use this effectively. 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.
Required Arguments Required Arguments
@ -11,9 +11,6 @@ build_group_name
default: ``:all`` default: ``:all``
the name of the group to disable. Convention is to use a Ruby symbol. the name of the group to disable. Convention is to use a Ruby symbol.
.. note::
Examples Examples
-------- --------

2
docs/dsl/enable_build.rst

@ -1,7 +1,7 @@
enable_build enable_build
============ ============
Enable the given build group for the rest of the build. Thus, code within the corresponding :doc:`/dsl/group` block will be executed. See :doc:`/build_groups` for ways to use this effectively. 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.
Required Arguments Required Arguments

2
docs/dsl/text.rst

@ -18,7 +18,7 @@ str
font font
default: ``'Arial 36'`` default: ``'Arial 36'``
the Font description string, including family, styles, and size. (e.g. ``'Arial bold italic 12'``). For the official documentation, see the `Pango docs <http://ruby-gnome2.sourceforge.jp/hiki.cgi?Pango%3A%3AFontDescription#style>)`_. This `description <http://www.pygtk.org/pygtk2reference/class-pangofontdescription.html>`_ is also quite good. the Font description string, including family, styles, and size. (e.g. ``'Arial bold italic 12'``). For the official documentation, see the `Pango docs <http://ruby-gnome2.sourceforge.jp/hiki.cgi?Pango%3A%3AFontDescription#style>`_. This `description <http://www.pygtk.org/pygtk2reference/class-pangofontdescription.html>`_ is also quite good.
font_size font_size
default: ``nil`` default: ``nil``

6
docs/layouts.rst

@ -250,7 +250,7 @@ economy.yml
https://github.com/andymeneely/squib/tree/master/lib/squib/layouts/economy.yml https://github.com/andymeneely/squib/tree/master/lib/squib/layouts/economy.yml
tuck_box.yml tuck_box.yml
~~~~~~~~~~~ ~~~~~~~~~~~~
Based on TheGameCrafter's template. Based on TheGameCrafter's template.
@ -263,7 +263,7 @@ https://github.com/andymeneely/squib/tree/master/lib/squib/layouts/tuck_box.yml
hand.yml hand.yml
~~~~~~~~~~~ ~~~~~~~~
.. raw:: html .. raw:: html
@ -273,7 +273,7 @@ hand.yml
https://github.com/andymeneely/squib/tree/master/lib/squib/layouts/hand.yml https://github.com/andymeneely/squib/tree/master/lib/squib/layouts/hand.yml
playing_card.yml playing_card.yml
~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
.. raw:: html .. raw:: html

7
docs/text_feature.rst

@ -1,7 +1,6 @@
The Mighty text Method The Mighty text Method
====================== ======================
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. 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.
Fonts Fonts
@ -42,7 +41,7 @@ Hints
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. 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.
Extents Extents
------ -------
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:: 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::
@ -56,7 +55,7 @@ will output::
[{:width=>109, :height=>55}, {:width=>142, :height=>55}] # Hello was 109 pixels wide, World 142 pixels [{:width=>109, :height=>55}, {:width=>142, :height=>55}] # Hello was 109 pixels wide, World 142 pixels
Embedding Images Embedding Images
------------------ ----------------
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:: 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::
@ -111,6 +110,6 @@ Sample: config_text_markup.rb
:language: ruby :language: ruby
:linenos: :linenos:
.. literalinclude:: ../samples/config_disable_quote.yml .. literalinclude:: ../samples/config_disable_quotes.yml
:language: ruby :language: ruby
:linenos: :linenos:

Loading…
Cancel
Save