Skip to content

Commit

Permalink
Just use package name for sphinxcontrib-shoebot
Browse files Browse the repository at this point in the history
  • Loading branch information
stuaxo committed May 1, 2016
1 parent b6eee38 commit 16c0b1a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 0 additions & 3 deletions doc/requirements-rtd.txt

This file was deleted.

2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sphinx
sphinx-rtd-theme
./sphinxcontrib-shoebot
sphinxcontrib-shoebot
2 changes: 1 addition & 1 deletion doc/sphinxcontrib-shoebot/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
#show_authors = False

# The name of the Pygments (syntax highlighting) style to use.
# pygments_style = 'python'
#pygments_style = 'python'

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
Expand Down
12 changes: 9 additions & 3 deletions doc/sphinxcontrib-shoebot/sphinxcontrib/shoebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ def run(self):

result = [nodes.raw('', parsed, format='html')]

if True: # If we want a snapshot - this should check the 'snapshot argument'#
if True:
# If we want a snapshot - this should check the 'snapshot argument'#
fn = '{}.png'.format(sha(text).hexdigest())
print("fn: %s" % fn)

env = self.state.document.settings.env
rel_filename, filename = env.relfn2path(fn)
Expand All @@ -118,8 +120,12 @@ def run(self):
ensuredir(os.path.dirname(outfn))
script_to_render = BOT_HEADER + text
try:
subprocess.call(['sbot', '-o', '%s' % outfn, script_to_render])
except Exception, e:
cmd = ['sbot', '-o', '%s' % outfn, script_to_render]
print("run: %s" % " ".join(cmd))
subprocess.call(cmd)
print("ran")
except Exception as e:
print("oops %e" % e)
raise ShoebotError(str(e))


Expand Down

0 comments on commit 16c0b1a

Please sign in to comment.