Skip to content

Commit

Permalink
copy_theme support in .cfg INI file
Browse files Browse the repository at this point in the history
  • Loading branch information
philpennock committed Nov 30, 2012
1 parent 11ceed5 commit d97bf81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/landslide/generator.py
Expand Up @@ -111,6 +111,7 @@ def __init__(self, source, **kwargs):
self.DEFAULT_DESTINATION)
self.embed = config.get('embed', False)
self.relative = config.get('relative', False)
self.copy_theme = config.get('copy_theme', False)
self.extensions = config.get('extensions', '')
self.theme = config.get('theme', 'default')
self.add_user_css(config.get('css', []))
Expand Down Expand Up @@ -454,10 +455,9 @@ def parse_config(self, config_source):
config['destination'] = raw_config.get('landslide', 'destination')
if raw_config.has_option('landslide', 'linenos'):
config['linenos'] = raw_config.get('landslide', 'linenos')
if raw_config.has_option('landslide', 'embed'):
config['embed'] = raw_config.getboolean('landslide', 'embed')
if raw_config.has_option('landslide', 'relative'):
config['relative'] = raw_config.getboolean('landslide', 'relative')
for boolopt in ('embed', 'relative', 'copy_theme'):
if raw_config.has_option('landslide', boolopt):
config[boolopt] = raw_config.getboolean('landslide', boolopt)
if raw_config.has_option('landslide', 'extensions'):
config['extensions'] = ",".join(raw_config.get('landslide', 'extensions')\
.replace('\r', '').split('\n'))
Expand Down

0 comments on commit d97bf81

Please sign in to comment.