2. Initialization API

This document describes the IVE_TANIM initialization API, which initializes the configuration settings for the custom logger and initializes the IVE_TANIM configuration file, which is JSON file that lives in ~/.config/ive_tanim/config.json.

The logger has a custom format: '%(levelname)s %(module)s.%(funcName)s (%(lineno)d): %(message)s'. See the logging cookbook for more information on what this format means.

Some of the Core Functionality command line tools have an extra argument flag, --level, that specifies whether to print out logging output and the following debug levels: DEBUG, INFO, or ERROR.

ive_tanim.baseConfDir = '/home/tanim/.config/ive_tanim'

the directory where IVE_TANIM user data is stored – ~/.config/ive_tanim.

ive_tanim.configFile = '/home/tanim/.config/ive_tanim/config.json'

The configuration file location of IVE_TANIM configuration data – ~/.config/ive_tanim/config.json.

ive_tanim.create_config()

Creates the necessary JSON configuration file into ~/.config/ive_tanim/config.json, AND to create the ~/.config/ive_tanim if not there. The configuration file contains three empty keys by default.

  • me with an empty string “” value.

  • aliases with an empty dict value.

  • smtp with a dict describing a default SMTP server.

    { 'server' : 'localhost',
      'port' : 25 }
    

Useful methods in rst2html will do the following:

  • Set the default sender (owned by the me key).

  • Add aliases (key-value pairs into the dict owned by the the aliases key).

  • Set the default SMTP server settings (changing the server name and changing the default port).