If installed on your iPhone/iPod touch or iPad, Card Decks will be opened when you click on an URL which starts with carddecks://
, which designates an URL based on the Card Decks URL scheme. When opened, Card Decks will run the action which is encoded into the URL.
In Card Decks 1.x, only a single URL action, the 'add a new card deck' action, is available. This action will add the card deck which is encoded into the URL to your set of card decks.
Examples:
A version 1 'add a new card deck' URL has the following structure:
carddecks:///add?<deck>[&<card>[&<card>[...]]]where
<deck>
contains the name of the card deck, the default text color, and the default background color which is used for the deck's cards. A <card>
entry contains the card's text, and optionally its text color and background color.
The structure of <deck>
is as follows:
<name>,<default-text-color>,<default-background-color>where occurrences of the comma ',' character inside the card deck's name must be escaped as '%2c', because the comma is used for separating the different components of the card deck definition. The default text color and background color are specified as 6 digit red-green-blue hexadecimal numbers, e.g. 'ffffff' for white, 'ff0000' for red, and '000000' for black.
A <card>
entry has basically the same structure as <deck>
:
<text>[,[<text-color>][,[<background-color>]]]but specifying the colors is optional.
Since version 1.1, a <card>
entry may contain a text orientation:
<text>[,[<text-color>][,[<background-color>][,[<text-orientation>]]]]Valid text orientations are 'u'(p), 'r'(ight), 'd'(own), and 'l'(eft). The default text orientation is 'u'.
In order to use special characters in the <text>
or <name>
field, simply add the URL encoding of a character's UTF-8 encoding, e.g. '%e2%98%ba' encodes the smiling face character '☺' and '%e2%98%b9' encodes the frowning face '☹'.
While Card Decks 2 still understands the URL format of Card Decks 1.x, it uses a new format when sending card decks by e-mail in order to encode a card deck's settings, the default card, etc.
A version 2 'add a new card deck' URL has the following structure:
carddecks:///2/add?<deck>&<default-card>[&<card>[&<card>[...]]]where
<deck>
contains the name of the card deck and the deck's settings, e.g. whether auto-rotation is enabled. <default-card>
defines the values for the deck's card defaults which will be used when a new card is added to the deck.
Examples:
The structure of <deck>
is:
<name>[,<setting>[,<setting>[...]]]where possible settings are:
A <card>
entry is an extended version of the <card>
entry from version 1.x which adds a value for the card's font size:
<text>[,[<text-color>][,[<background-color>][,[<text-orientation>][,[<font-size>]]]]]The font size is a value between '0' and '100' where '0' denotes that the card's text will be auto-sized to fit the card.
Additionally, Card Decks 2 supports 8 digit red-green-blue-alpha hexadecimal numbers for colors, e.g. 'ffffffff' for white, or 'ff000080' for red with an alpha value of 0x80.