Skip to content

Commit

Permalink
set up configuration to input subproject's urls and docpath (#167)
Browse files Browse the repository at this point in the history
  • Loading branch information
pri22296 authored and mariobehling committed Jun 21, 2017
1 parent c02ee46 commit 5912511
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions modules/scripts/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ def _get_default_config(username, reponame):
conf = {'metadata': {'projectname': reponame,
'version': utctime,
'author': username,
'subproject': [],
},
'build': {'markdown_flavour': 'markdown_github',
'logo': '',
Expand Down Expand Up @@ -64,10 +65,18 @@ def _get_env_dict(conf):
metadata = conf['metadata']
build = conf['build']
publish = conf['publish']

subproject = metadata['subproject']
if not isinstance(subproject, list):
subproject = [subproject]

return {'PROJECTNAME': metadata['projectname'],
'VERSION': metadata['version'],
'AUTHOR': metadata['author'],
'SUBPROJECT_URLS': ','.join(project['url']
for project in subproject),
'SUBPROJECT_DOCPATHS': ','.join(project.get('docpath', 'docs')
for project in subproject),

'MARKDOWN_FLAVOUR': build['markdown_flavour'],
'LOGO': build['logo'],
Expand Down

0 comments on commit 5912511

Please sign in to comment.