def set_readme_template_vars(self, role, repo_name):
        """
        Set the readme template variables.
        """
        # normalize and expose a bunch of fields to the template
        authors = []

        author = {
            "name": self.config["author_name"],
            "company": self.config["author_company"],
            "url": self.config["author_url"],
            "email": self.config["author_email"],
            "twitter": self.config["author_twitter"],
        }
        scm = {
            "host": self.config["scm_host"],
            "repo_prefix": self.config["scm_repo_prefix"],
            "type": self.config["scm_type"],
            "user": self.config["scm_user"],
        }
        license = {
            "type": self.config["license_type"],
            "url": self.config["license_url"],
        }

        role_name = utils.normalize_role(role, self.config)

        normalized_role = {
            "name": role_name,
            "galaxy_name": "{0}.{1}".format(self.config["scm_user"],
                                            role_name),
            "slug": "{0}{1}".format(self.config["scm_repo_prefix"],
                                    role_name),
        }

        if "authors" in self.meta_dict["ansigenome_info"]:
            authors = self.meta_dict["ansigenome_info"]["authors"]
        else:
            authors = [author]

            if "github" in self.config["scm_host"]:
                self.config["author_github"] = "{0}/{1}".format(
                    self.config["scm_host"],
                    self.config["scm_user"])

        self.readme_template_vars = {
            "authors": authors,
            "scm": scm,
            "role": normalized_role,
            "license": license,
            "galaxy_info": self.meta_dict["galaxy_info"],
            "dependencies": self.meta_dict["dependencies"],
            "ansigenome_info": self.meta_dict["ansigenome_info"]
        }

        # add the defaults and facts
        r_defaults = self.report["roles"][role]["defaults"]
        self.readme_template_vars["ansigenome_info"]["defaults"] = r_defaults

        facts = "\n".join(self.report["roles"][role]["facts"])
        self.readme_template_vars["ansigenome_info"]["facts"] = facts
def set_readme_template_vars ( self , role , repo_name ) : authors = [ ] author = { "name" : self . config [ "author_name" ] , "company" : self . config [ "author_company" ] , "url" : self . config [ "author_url" ] , "email" : self . config [ "author_email" ] , "twitter" : self . config [ "author_twitter" ] , } scm = { "host" : self . config [ "scm_host" ] , "repo_prefix" : self . config [ "scm_repo_prefix" ] , "type" : self . config [ "scm_type" ] , "user" : self . config [ "scm_user" ] , } license = { "type" : self . config [ "license_type" ] , "url" : self . config [ "license_url" ] , } role_name = utils . normalize_role ( role , self . config ) normalized_role = { "name" : role_name , "galaxy_name" : "{0}.{1}" . format ( self . config [ "scm_user" ] , role_name ) , "slug" : "{0}{1}" . format ( self . config [ "scm_repo_prefix" ] , role_name ) , } if "authors" in self . meta_dict [ "ansigenome_info" ] : authors = self . meta_dict [ "ansigenome_info" ] [ "authors" ] else : authors = [ author ] if "github" in self . config [ "scm_host" ] : self . config [ "author_github" ] = "{0}/{1}" . format ( self . config [ "scm_host" ] , self . config [ "scm_user" ] ) self . readme_template_vars = { "authors" : authors , "scm" : scm , "role" : normalized_role , "license" : license , "galaxy_info" : self . meta_dict [ "galaxy_info" ] , "dependencies" : self . meta_dict [ "dependencies" ] , "ansigenome_info" : self . meta_dict [ "ansigenome_info" ] } r_defaults = self . report [ "roles" ] [ role ] [ "defaults" ] self . readme_template_vars [ "ansigenome_info" ] [ "defaults" ] = r_defaults facts = "\n" . join ( self . report [ "roles" ] [ role ] [ "facts" ] ) self . readme_template_vars [ "ansigenome_info" ] [ "facts" ] = facts
Set the readme template variables.