Markdown Generator
Last updated
Last updated
The Markdown Generator is a plugin made, published, and officially supported by Ango AI that allows you to create Markdown assets starting from a Markdown skeleton and a CSV table containing the data to fill in the skeleton.
Assume you have a CSV-formatted table, like the following:
Thomas
Haverford
28
Leslie
Knope
32
Ronald
Swanson
48
And that you have a Markdown-formatted skeleton, with the table column names wrapped around pipes (|), like the following:
(the above Markdown renders in Ango Hub like so:)
After feeding both the CSV file and the Markdown skeleton to the Markdown Plugin, the plugin will create three assets in the selected project for us (one for each row of the CSV), looking like the Markdown skeleton but with the "|name|", "|surname|", and "|age|" placeholders populated with the data from each CSV row.
As such, the three assets created by the Markdown Plugin, in our example, would look like this on Ango Hub, each with info from a row of the CSV:
As the plugin creates one asset for each row, you may have Ango Hub assign each row/asset to a specific batch on upload simply by indicating it in your CSV file.
To indicate batch information, add a column named any one of the following, case-insensitive:
batch, batch_name, batch-name, batchname
The resulting CSV will look something like this:
Thomas
Haverford
28
admins
Leslie
Knope
32
admins
Ronald
Swanson
48
players
On upload, if the batch exists, Ango Hub will assign the row/asset to that batch. If it does not, Hub will create it and assign the row/asset to it.
If you do not wish to use the default names for the batch column, you may specify the name of an already existing column, of any name, in the configuration JSON you pass to the plugin when you run it. More information on using the configuration JSON in the section below.
When running the plugin, you may select a column to be the provider of external IDs for each asset. For example, if you select the column "id" for the following table:
1
Thomas
Haverford
28
2
Leslie
Knope
32
3
Ronald
Swanson
48
The assets created with this table will have, as external ID, "1", "2", and "3".
More on selecting an external ID column in the following section.
From the Plugin Directory, search for Markdown Plugin and install the plugin to your organization. More information on installing plugins can be found in the Installing Plugins page.
As shown in the example above:
A comma-separated CSV
A Markdown file with placeholders immediately surrounded by pipes (e.g. "|name|") equal to the title of the CSV column from which the data needs to be pulled
Ensure the CSV you are using is comma-separated.
By default, Excel and Numbers export CSVs with columns separated by semicolons. You will need to replace semicolons with commas.
Navigate to the project where you'd like to create the assets.
Enter the Settings tab, then the Plugins section.
Find the Markdown Plugin, and click on Open. A dialog will appear:
Click on Upload CSV to open your OS file picker and select the CSV file. Then, click on Open Editor and paste your Markdown. You will be able to see a preview of the Markdown on the right side of the screen:
Click on Set Text to save the Markdown.
In the Config JSON area, you can tweak three settings. By default, they are:
batch_name_column
: Input here the title of the column you wish to use to assign assets to batches, as explained in this section. Leaving it on "AUTO_DETECT"
will make it so that batch, batch_name, batch-name, batchname
will be used to detect batch columns.
Example: "batch_name_column": "my_batch"
external_id_columns
: Specify here the column(s) to be used as external IDs. If you specify more than one column, the resulting external ID for each asset will be FIRSTCOLUMNID_SECONDCOLUMN
and so forth, separated with an underscore.
Example: "external_id_columns": ['id', 'phone']
upload_batch_size
: The MD plugin processes lines and creates/imports MD files in batches. You may select here how many assets will be processed at one time. The default, 100, should be sufficient and ideal for most scenarios.
Click on Run. The assets will be added to your project.
You may check the progress of the conversion from the Plugin Sessions dialog. More information on checking plugin progress here.
If the assets do not appear, it might be because you have reached your organization's asset limit. Make sure to check the Usage tab of your Organization page.
Depending on the number and size of the assets, it may take a long time for the assets to appear in your project. You may check the progress from the Plugin Sessions dialog.