Skip to content

Commit

Permalink
Add initial page with command line flags (close #149)
Browse files Browse the repository at this point in the history
  • Loading branch information
rlafuente committed May 2, 2018
1 parent 2d3395c commit 6d68097
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
77 changes: 77 additions & 0 deletions doc/source/cli_flags.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
Command-line flags reference
============================

This is a list of all the flags you can specify to the ``sbot`` command-line runner.

.. data:: --outputfile <FILENAME> / -o <FILENAME>

Run in headless mode, outputting the result directly to a file.

Supported extensions are ``.png``, ``.svg``, ``.pdf`` and ``.ps``.

.. data:: --socketserver / -s

Run a socket server for external variable control.

.. data:: --serverport <PORT> / -s <PORT>

Set the socket server port to listen for connections (default is 7777).

.. data:: --vars <VARS> / -v <VARS>

Initial variables, in JSON format.

Use single quotes **outside**, and double quotes **inside**, e.g.: ``--vars='{"variable1": 1}'``

.. data:: --namespace <NAMESPACE> / -ns <NAMESPACE>

Initial namespace, in JSON format.

Use single quotes **outside**, and double quotes **inside**, e.g.: ``--namespace='{"variable1": 1}'``

.. data:: --args <ARGS> / -a <ARGS>

Pass arguments to bot. [TODO: explain better]

.. data:: --l / -l

Open a shell for IDE interaction. [TODO: explain better what this does]

.. data:: --repeat <TIMES> / -r <TIMES>

Set number of iterations to run the script, producing multiple images.

.. data:: --grammar <LANG> / -g <LANG>

Select the language to use: ``nodebox`` (default) or ``drawbot``.

Note that Drawbot support is experimental.


.. data:: --window / -w

Run the script in a GTK window (default).

.. data:: --fullscreen / -f

Run the script in fullscreen mode.

.. data:: --title <TITLE> / -t <TITLE>

Set the window title.

.. data:: --close / -c

Close the window after running the script. Use with ``-r`` for benchmarking.

.. data:: --disable-vars / -dv

Disable the variables pane when in windowed mode.

.. data:: --disable-background-thread / -dt

Don't run code in a background thread.

.. data:: --verbose / -V

Show internal error information in tracebacks.
1 change: 1 addition & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Contents:
examples
troubleshooting
developing
cli_flags


.. We won't be needing these for now
Expand Down

2 comments on commit 6d68097

@stuaxo
Copy link
Contributor

@stuaxo stuaxo commented on 6d68097 May 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Open a shell for IDE interaction. [TODO: explain better what this does]
  • I'm a bit crap at explaining things (and being succinct) - but this could maybe emphasise the IDE integration less, and the fact you can control the bot (play, pause, stop, change variables)
  • Open a shell to control the bot as it runs (change speed, pause, set variables etc).

.. maybe useful to explain it can be used for an IDE as well.

@rlafuente
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one, fixed in 17765fa

Please sign in to comment.