fgdocx  0.2 [master]
FlightGear API Docs
Public Member Functions | Public Attributes | Static Public Attributes | Private Attributes | List of all members
Config Class Reference

Load the config file and access as objects. More...

Inheritance diagram for Config:
ConfigCore object

Public Member Functions

def __init__
 Load the default config from CONFIG_FILE. More...
 
def get_project_config_object (self, proj)
 Return ProjectConfig instance. More...
 
def get_project_dict (self, proj)
 Return project details. More...
 
def get_projects_index
 Return the project index. More...
 
def get_projects_list (self)
 
def has_project (self, proj)
 Return is configuration available for project. More...
 
def load_json_info (self, file_path)
 Loads a json encoded fiel from path. More...
 
def print_view
 Print the configuration. More...
 

Public Attributes

 conf
 
 raw_yaml_str
 

Static Public Attributes

string BUILD = "/home/fg/api-docs.freeflightsim.org/"
 Location of the build/ output directory WITH TRAILING /. More...
 
string CONFIG_FILE = "projects.config.yaml"
 Name of the config file. More...
 
string DEFAULT_DOXY = "doxy-default.conf"
 Name of the default doxygen file. More...
 
string ETC = ROOT+"etc/"
 Location of etc/ dir with trailing /. More...
 
string INFO_JSON_FILE = "info.json"
 Name of the json encoded. More...
 
tuple ROOT = os.path.abspath( os.path.dirname(__file__) + "/../" )
 Absolute directory path to location of this file with trailing /. More...
 
string SELF_PROJ = "fgdocx"
 This project itself. More...
 
string TEMP = ROOT+"temp/"
 Location of the temp/ directory with trailing /. More...
 
string TEMP_DOXY = "fg_docs_temp_doxy.conf"
 

Private Attributes

 _V
 

Detailed Description

Load the config file and access as objects.

Definition at line 175 of file config.py.

Constructor & Destructor Documentation

def __init__ (   self,
  verbose = 0 
)

Load the default config from CONFIG_FILE.

Definition at line 178 of file config.py.

Member Function Documentation

def get_project_config_object (   self,
  proj 
)

Return ProjectConfig instance.

Parameters
projthe project key
Return values
ProjectConfiginstance or None

Definition at line 202 of file config.py.

Referenced by Config.get_projects_index().

def get_project_dict (   self,
  proj 
)

Return project details.

Parameters
projthe project key
Return values
dictProject dictinary or None if project to exist

Definition at line 191 of file config.py.

Referenced by Config.get_project_config_object().

def get_projects_index (   self,
  load_info = True,
  runlevel = False 
)

Return the project index.

Definition at line 217 of file config.py.

def get_projects_list (   self)

Definition at line 208 of file config.py.

def has_project (   self,
  proj 
)

Return is configuration available for project.

Parameters
projthe project key
Return values
boolTrue if config exists

Definition at line 250 of file config.py.

Referenced by Config.get_project_config_object(), and Config.get_project_dict().

def load_json_info (   self,
  file_path 
)

Loads a json encoded fiel from path.

Parameters
file_pathto json encoded file
Return values
dictof values if file exists and readable, else None

Definition at line 239 of file config.py.

Referenced by Config.get_projects_index().

def print_view (   self,
  yaml_str = False 
)

Print the configuration.

Parameters
yaml_stroutputs the raw yaml string, otherwise nice

Definition at line 255 of file config.py.

Member Data Documentation

_V
private

Definition at line 180 of file config.py.

string BUILD = "/home/fg/api-docs.freeflightsim.org/"
staticinherited

Location of the build/ output directory WITH TRAILING /.

Definition at line 32 of file config.py.

conf
string CONFIG_FILE = "projects.config.yaml"
staticinherited

Name of the config file.

Definition at line 41 of file config.py.

string DEFAULT_DOXY = "doxy-default.conf"
staticinherited

Name of the default doxygen file.

Definition at line 35 of file config.py.

string ETC = ROOT+"etc/"
staticinherited

Location of etc/ dir with trailing /.

Definition at line 26 of file config.py.

string INFO_JSON_FILE = "info.json"
staticinherited

Name of the json encoded.

Definition at line 38 of file config.py.

raw_yaml_str

Definition at line 181 of file config.py.

Referenced by Config.print_view().

tuple ROOT = os.path.abspath( os.path.dirname(__file__) + "/../" )
staticinherited

Absolute directory path to location of this file with trailing /.

Definition at line 23 of file config.py.

string SELF_PROJ = "fgdocx"
staticinherited

This project itself.

Definition at line 20 of file config.py.

string TEMP = ROOT+"temp/"
staticinherited

Location of the temp/ directory with trailing /.

Definition at line 29 of file config.py.

string TEMP_DOXY = "fg_docs_temp_doxy.conf"
staticinherited

Definition at line 43 of file config.py.


The documentation for this class was generated from the following file: