CameronWard301 / airtable

A Dokuwiki plugin to sync data from airtable
GNU General Public License v3.0
2 stars 2 forks source link
dokuwiki dokuwiki-plugin

Airtable Dokuwiki Sync

A Dokuwiki plugin to sync data from airtable Not For Production Use - this plugin is still in early development and may contain security flaws

Prerequisites:

Installation

Usage:

Use the following syntax on any dokuwiki page. {{airtable>type: "theType" | record-url: "theRecordURL"}}

Each parameter: is followed by a space and values enclosed in "". Parameters are separated by ' | ' (note the importance of spaces here)
Multiple fields are separated by ,

Required Parameters:

Tables:

To display data from airtable in a table, use the following syntax:
{{airtable>type: "table" | record-url: "theURL" | fields: "field1", "field2" | where: "FORMULA" | order-by: "field_to_order_by" | order: "ORDER DIRECTION" | max-records: "X"}}
You must specify at least one field.

Optional Parameters:

Example:

{{airtable>type: "table" | fields: "Name", "# of bulbs", "Posted By", "Post Text", "Post Image(s)" | where: "AND({Idea #} <= 3450, {Idea #} > 3430)" | max-records: "10" | order-by: "# of bulbs" | order: "asc" | record-url: "https://airtable.com/tblZnH5CY11MZEboF/viwVm4rH7dceE7VV2?blocks=hide"}}
Note: any media (images/audio/video) returned by airtable, will also be rendered inside the table. Table Example

Records:

Any table query that results in one record will also be rendered as a 'record'.
Records are rendered as a template where text is displayed on the left and media on the right. Syntax:
{{airtable>type: "record" | record-url: "theURL" | fields: "field1", "field2" | alt-tag: "ALT_TAG"}}
You must specify at least one field.

Optional Parameters:

Example:

{{airtable>Type: "record" | Fields: "Photo ID", "Ref #", "Upload Date", "Photo" | record-url: "https://airtable.com/tblwWxohDeMeAAzdW/viwlkwVdJY5sDNEWB/rec8WvGh6arIxPbqs?blocks=hide"}} Record Example

Images:

To embed an image from airtable use the following syntax:

{{airtable>type: "image" | record-url: "URL" | alt-tag: "ALT_TAG" | image-size: "IMG_SIZE" | position: "POS"}}

Optional Parameters:

Example:

{{airtable>type: "image" | record-url: "https://airtable.com/tblZnH5CY11MZEboF/recAvmU5363ofWYR6" | image-size: "full" | alt-tag: "Digital Snake to Ethernet" | position: "right"}} Image Example

Text:

To pull data from airtable and display as inline text use the following syntax:

{{airtable>type: "text" | fields: "field1", "field2" | record-url: "theRecordURL"}} This display type requires the additional parameter: fields
At least one field must be specified. Multiple fields will be concatenated to a single string Make sure to write the field exactly as it appears in airtable

Example:

Text Before: {{airtable>Type: "text" | Fields: "Part Name" | record-url: "https://airtable.com/tblK7lKsAP0YqSOwu/viwi6PpnGIhJsNAuf/recsKmhxWmZFckx66"}} :Text After
Will produce:
Text Before: Bottom Felt :Text After