gen_avr8.pro.template_dir module

Module
template_dir.py
Copyright
Copyright (C) 2018 Vladimir Roncevic <elektron.ronca@gmail.com> gen_avr8 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_avr8 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class TemplateDir with attribute(s) and method(s). Created API for checking project template directory.
class gen_avr8.pro.template_dir.TemplateDir[source]

Bases: object

Defined class TemplateDir with attribute(s) and method(s). Created API for checking project template directory. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
CONF_DIR - configuration directory path.
TEMPLATE_DIR - template directory path.
methods:
check_dir - check project directory.
setup_conf_dir - setup configuration directory.
setup_template_dir - setup template directory.
__str__ - dunder method for TemplateDir.
CONF_DIR = '/../conf/'
GEN_VERBOSE = 'GEN_AVR8::PRO::TEMPLATE_DIR'
TEMPLATE_DIR = '/../conf/template/'
classmethod check_dir(target_dir, verbose=False)[source]

Checking project directory.

Parameters:
  • target_dir (<str>) – target directory to be checked.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

boolean status, True directory ok | False.

Return type:

<bool>

Exceptions:

None

classmethod setup_conf_dir(verbose=False)[source]

Setup configuration directory.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:template directory | None.
Return type:<str> | <NoneType>
Exceptions:None
classmethod setup_template_dir(verbose=False)[source]

Setup template directory.

Parameters:verbose (<bool>) – enable/disable verbose option.
Returns:template directory | None.
Return type:<str> | <NoneType>
Exceptions:None