#17280: Notebook commandline argparse
-------------------------------------+-------------------------------------
       Reporter:  vbraun             |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  blocker            |    Milestone:  sage-6.4
      Component:  scripts            |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Volker Braun       |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vbraun/notebook_commandline_argparse|  
ce9db90e99881ed20cda5a3a3d490365b912b7b2
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by kcrisman):

 I don't want to commit until I'm sure I'm following standards for man-type
 help... here is a potential commit.
 {{{
 #!diff
 diff --git a/src/bin/sage b/src/bin/sage
 index 06dfef8..f3551d5 100755
 --- a/src/bin/sage
 +++ b/src/bin/sage
 @@ -72,14 +72,17 @@ usage_advanced() {
      ####
 1.......................26..................................................78
      ####
 |.....................--.|...................................................|
      echo "Running the notebook:"
 -    echo "  --notebook=[...]    -- start the Sage notebook (valid options
 are"
 -    echo "                         'default', 'sagenb', and 'ipython').
 See the output"
 -    echo "                         'of sage --notebook --help for more
 details"
 +    echo "  --notebook[=default] [...] -- start the Sage notebook (valid
 options are"
 +    echo "                         'default', 'sagenb', and 'ipython').
 Notebook-specific"
 +    echo "                         options are passed on; if notebook is
 not specified, they"
 +    echo "                         must be in the form '--option=foo' or
 '-- option=foo'."
 +    echo "                         See sage --notebook --help for more
 details"
      echo "  -bn, -build-and-notebook [...] -- build the Sage library then
 start"
      echo "                         the Sage notebook"
      echo "  -inotebook [...]    -- start the *insecure* Sage notebook
 (deprecated)"
 -    echo "  -n, -notebook [...] -- start the Sage notebook (options are
 the same"
 -    echo "                         as for the notebook command in Sage)"
 +    echo "  -n, -notebook [...] -- start the default Sage notebook.
 (Options are the same"
 +    echo "                         as for the notebook command in Sage,
 passed in the form"
 +    echo "                         'option=foo'.)"

      echo
      ####
 1.......................26..................................................78
 diff --git a/src/bin/sage-notebook b/src/bin/sage-notebook
 index d2a6c93..042b72f 100755
 --- a/src/bin/sage-notebook
 +++ b/src/bin/sage-notebook
 @@ -77,6 +77,11 @@ description = \
  The Sage notebook launcher is used to start the notebook, and allows
  you to choose between different implementations. Any further command
  line options are passed to the respective notebook.
 +
 +Examples:
 +
 +sage -n default port=1234                              # pass port=1234
 to default notebook
 +sage --notebook=ipython --notebook-dir=/home/foo/bar   # ipython notebook
 in custom dir
  """

  help_help = \
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/17280#comment:22>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to