Skip to content
This repository has been archived by the owner on Mar 2, 2024. It is now read-only.
Kirill Salnikov edited this page Feb 22, 2022 · 15 revisions

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, inka 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.
  • 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 Inka 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 Inka 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:

inka config -l

Example output:

┏━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┓
┃ Option           ┃ Value      ┃
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━┩
│ defaults.profile │            │
├──────────────────┼────────────┤
│ defaults.deck    │ Default    │
├──────────────────┼────────────┤
│ defaults.folder  │            │
├──────────────────┼────────────┤
│ 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:

inka 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:

inka 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:

inka config -e

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

inka config -r
Clone this wiki locally