[yt-svn] commit/yt-3.0: ngoldbaum: Grabbing the title form the notebook filename rather than insisting on a title arg.
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Sat Sep 28 14:00:57 PDT 2013
1 new commit in yt-3.0:
https://bitbucket.org/yt_analysis/yt-3.0/commits/2404bce41fc3/
Changeset: 2404bce41fc3
Branch: yt-3.0
User: ngoldbaum
Date: 2013-09-28 21:40:56
Summary: Grabbing the title form the notebook filename rather than insisting on a title arg.
Affected #: 1 file
diff -r 6cab1c41f28e73b69489fe1548e6497c26bd78fd -r 2404bce41fc387fd35cc4c22203373ef8bef418e yt/utilities/command_line.py
--- a/yt/utilities/command_line.py
+++ b/yt/utilities/command_line.py
@@ -1225,8 +1225,7 @@
lo.main( None, download=args.number )
class YTNotebookUploadCmd(YTCommand):
- args = (dict(short="file", type=str),
- dict(long="--title", short="-t", type=str, default = None))
+ args = (dict(short="file", type=str),)
description = \
"""
Upload an IPython notebook to hub.yt-project.org.
@@ -1245,11 +1244,8 @@
t = json.loads(open(filename).read())['metadata']['name']
except (ValueError, KeyError):
print "File does not appear to be an IPython notebook."
- if args.title is not None:
- t = args.title
if len(t) == 0:
- print "You need to specify a title with --title ."
- return 1
+ t = filename.strip(".ipynb")
from yt.utilities.minimal_representation import MinimalNotebook
mn = MinimalNotebook(filename, t)
rv = mn.upload()
Repository URL: https://bitbucket.org/yt_analysis/yt-3.0/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the yt-svn
mailing list