Overview

Artemis allows users to define custom key-value fields in their configuration file which will be automatically substituted into their @doc and @blockdoc anchors when referenced in the format %%field_name%%. This provides a convenient way to define and re-use expressions such as your code's repository, author name, revision number, etc throughout your code without hassle.

Creating Fields

Artemis allows you to create your own fields by adding them to the fields dictionary in the get_fields() function in the config file.

707707

Special Fields

Artemis provides several special fields which give contextual information when used in your code.

Anchor

Use

Example

__LINE__

Insert line number

%%__LINE__%%

__FILE__

Insert file name

%%__FILE__%%

__CWD__

Insert working directory path

%%__CWD__%%

Example

Example 1: Using fields to display author name and email fields, defined in the config file.

# @doc **Author**: %%author%%
# @doc **Email**: [Here](%%email%%)
663663

Example 2: Using fields to display the current date.

Config file:

642642

Primary script:

# @card title="Welcome"
# @doc **Date** %%date%%
695695

Example 3: Using __LINE__ field.

# @card title="Welcome"
# @doc **this is line** %%__LINE__%%
11101110

Did this page help you?