Skip to content
sysid edited this page Feb 25, 2024 · 1 revision

Config file contained inside package folder and named config.ini. It is automatically created with default settings on first run (or if missing).

Options

  • defaults.profile - Anki profile to which cards will be added. If you haven't provided value for this option and you have multiple profiles, inka2 will ask you which profile should it use at startup. This option doesn't have default value.
  • defaults.deck - Anki deck to use, if you didn't specify deck for the section. Default value is Default.
  • defaults.folder - the path to the folder which is used if you don't pass the PATH argument to collect command. This option doesn't have default value.
  • defaults.escape_html - Escape inline html from markdown (you want this if you parse untrusted markdown).
  • defaults.add_filename - Adds the markdown filename to the end of the Anki card.
  • anki.path - path to the Anki folder. If empty default path for the current OS will be used. Is empty by default.
  • anki.basic_type - the name of the note type used to create Front/Back cards. The default value is inka2 Basic.
  • anki.front_field - the name of the front field of the Front/Back note type. The default value is Front.
  • anki.back_field - the name of the back field of the Front/Back note type. The default value is Back.
  • anki.cloze_type - the name of the note type used to create Cloze cards. The default value is inka2 Cloze.
  • anki.cloze_field - the name of the field of the Cloze note type. The default value is Text.
  • highlight.style - style that is used to highlight code blocks. The default value is monokai.

Interaction with config

You can interact with the config via the config command.


To list all config options, use the -l/--list flag:

inka2 config -l

Example output:

┏━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Option                ┃ Value      ┃
┡━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ defaults.profile      │            │
├───────────────────────┼────────────┤
│ defaults.deck         │ Default    │
├───────────────────────┼────────────┤
│ defaults.folder       │            │
├───────────────────────┼────────────┤
│ defaults.escape_html  │ False      │
├───────────────────────┼────────────┤
│ defaults.add_filename │ False      │
├───────────────────────┼────────────┤
│ anki.path             │            │
├───────────────────────┼────────────┤
│ anki.basic_type       │ Inka Basic │
├───────────────────────┼────────────┤
│ anki.front_field      │ Front      │
├───────────────────────┼────────────┤
│ anki.back_field       │ Back       │
├───────────────────────┼────────────┤
│ anki.cloze_type       │ Inka Cloze │
├───────────────────────┼────────────┤
│ anki.cloze_field      │ Text       │
├───────────────────────┼────────────┤
│ highlight.style       │ monokai    │
└───────────────────────┴────────────┘

To see value of an individual option, pass its name as the argument:

inka2 config defaults.deck

Example output:

Default

To change the value of the option, pass the options name as the first argument and the new value as the second:

inka2 config defaults.folder /home/user/my_folder

The flag -e/--edit allows you to open the config file in the editor specified in EDITOR environmental variable:

inka2 config -e

To reset the config to its default state, use -r/--reset flag:

inka2 config -r
Clone this wiki locally