Permalink
Browse files

fix #1762

  • Loading branch information...
ralsina committed Jun 1, 2015
1 parent 403036b commit 29aba4a5fe4edfcff53f62ec8ab95d9166610a0c
Showing with 17 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +0 −1 nikola/plugins/command/check.py
  3. +16 −0 nikola/plugins/command/install_theme.py
View
@@ -4,6 +4,7 @@ New in master
Features
--------
+* New --get-path option for ``nikola install_theme`` (Issue #1762)
* New `nikola rst2html` command (Issue #1710)
* New `nikola status` command (Issue #1740)
* Support [code] in wordpress importers (Issue #1186)
@@ -260,7 +260,6 @@ def analyze(self, fname, find_sources=False, check_remote=False):
self.existing_targets.add(target_filename)
else:
rv = True
- import pdb; pdb.set_trace()
self.logger.warn("Broken link in {0}: {1}".format(filename, target))
if find_sources:
self.logger.warn("Possible sources:")
@@ -88,6 +88,14 @@ class CommandInstallTheme(Command):
"https://themes.getnikola.com/v7/themes.json)",
'default': 'https://themes.getnikola.com/v7/themes.json'
},
+ {
+ 'name': 'getpath',
+ 'short': 'g',
+ 'long': 'get-path',
+ 'type': bool,
+ 'default': False,
+ 'help': "Print the path for installed theme",
+ },
]
def _execute(self, options, args):
@@ -102,6 +110,14 @@ def _execute(self, options, args):
else:
name = None
+ if options['getpath'] and name:
+ path = utils.get_theme_path(name)
+ if path:
+ print(path)
+ else:
+ print('not installed')
+ exit(0)
+
if name is None and not listing:
LOGGER.error("This command needs either a theme name or the -l option.")
return False

0 comments on commit 29aba4a

Please sign in to comment.