cli.html 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Command-Line &#8212; xdice 1.0.0 documentation</title>
  7. <link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: './',
  12. VERSION: '1.0.0',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true,
  16. SOURCELINK_SUFFIX: '.txt'
  17. };
  18. </script>
  19. <script type="text/javascript" src="_static/jquery.js"></script>
  20. <script type="text/javascript" src="_static/underscore.js"></script>
  21. <script type="text/javascript" src="_static/doctools.js"></script>
  22. <link rel="index" title="Index" href="genindex.html" />
  23. <link rel="search" title="Search" href="search.html" />
  24. <link rel="next" title="API" href="api.html" />
  25. <link rel="prev" title="Dice Notation" href="dice_notation.html" />
  26. <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  27. <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
  28. </head>
  29. <body>
  30. <div class="document">
  31. <div class="documentwrapper">
  32. <div class="bodywrapper">
  33. <div class="body" role="main">
  34. <div class="section" id="command-line">
  35. <h1>Command-Line<a class="headerlink" href="#command-line" title="Permalink to this headline">¶</a></h1>
  36. <p>Run <code class="docutils literal"><span class="pre">python</span> <span class="pre">roll.py</span> <span class="pre">[options]</span> <span class="pre">&lt;expr&gt;</span></code></p>
  37. <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Usage</span><span class="p">:</span>
  38. <span class="n">roll</span> <span class="p">[</span><span class="n">options</span><span class="p">]</span> <span class="o">&lt;</span><span class="n">expr</span><span class="o">&gt;</span>
  39. <span class="n">Options</span><span class="p">:</span>
  40. <span class="o">-</span><span class="n">s</span> <span class="n">Numeric</span> <span class="n">score</span> <span class="n">only</span>
  41. <span class="o">-</span><span class="n">v</span> <span class="n">Verbose</span> <span class="n">result</span>
  42. <span class="o">-</span><span class="n">h</span> <span class="o">--</span><span class="n">help</span> <span class="n">Displays</span> <span class="n">help</span> <span class="n">message</span>
  43. <span class="o">--</span><span class="n">version</span> <span class="n">Displays</span> <span class="n">current</span> <span class="n">xdice</span> <span class="n">version</span>
  44. </pre></div>
  45. </div>
  46. <ul>
  47. <li><p class="first">Basic use</p>
  48. <p><code class="docutils literal"><span class="pre">python</span> <span class="pre">roll</span> <span class="pre">1d6+1</span></code>
  49. <code class="docutils literal"><span class="pre">&gt;&gt;</span> <span class="pre">2</span>&#160;&#160;&#160;&#160;&#160;&#160; <span class="pre">([1]+1)</span></code></p>
  50. </li>
  51. <li><p class="first">Numeric score only (-s)</p>
  52. <p><code class="docutils literal"><span class="pre">python</span> <span class="pre">roll</span> <span class="pre">-s</span> <span class="pre">1d6+1</span></code>
  53. <code class="docutils literal"><span class="pre">&gt;&gt;</span> <span class="pre">2</span></code></p>
  54. </li>
  55. <li><p class="first">Verbose (-v)</p>
  56. <p><code class="docutils literal"><span class="pre">python</span> <span class="pre">roll</span> <span class="pre">-v</span> <span class="pre">2*(3D6L1+2D4)+R3(1d4+2)</span></code>
  57. <code class="docutils literal"><span class="pre">&gt;&gt;</span> <span class="pre">(2*(3d6l1(scores:[5,</span> <span class="pre">6],</span> <span class="pre">dropped:[3])+2d4(scores:[2,</span> <span class="pre">1]))+(1d4(scores:[4])+2+1d4(scores:[1])+2+1d4(scores:[4])+2))</span></code></p>
  58. </li>
  59. </ul>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
  65. <div class="sphinxsidebarwrapper">
  66. <h1 class="logo"><a href="index.html">xdice</a></h1>
  67. <h3>Navigation</h3>
  68. <ul class="current">
  69. <li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li>
  70. <li class="toctree-l1"><a class="reference internal" href="dice_notation.html">Dice Notation</a></li>
  71. <li class="toctree-l1 current"><a class="current reference internal" href="#">Command-Line</a></li>
  72. <li class="toctree-l1"><a class="reference internal" href="api.html">API</a></li>
  73. </ul>
  74. <div class="relations">
  75. <h3>Related Topics</h3>
  76. <ul>
  77. <li><a href="index.html">Documentation overview</a><ul>
  78. <li>Previous: <a href="dice_notation.html" title="previous chapter">Dice Notation</a></li>
  79. <li>Next: <a href="api.html" title="next chapter">API</a></li>
  80. </ul></li>
  81. </ul>
  82. </div>
  83. <div id="searchbox" style="display: none" role="search">
  84. <h3>Quick search</h3>
  85. <form class="search" action="search.html" method="get">
  86. <div><input type="text" name="q" /></div>
  87. <div><input type="submit" value="Go" /></div>
  88. <input type="hidden" name="check_keywords" value="yes" />
  89. <input type="hidden" name="area" value="default" />
  90. </form>
  91. </div>
  92. <script type="text/javascript">$('#searchbox').show(0);</script>
  93. </div>
  94. </div>
  95. <div class="clearer"></div>
  96. </div>
  97. <div class="footer">
  98. &copy;2017, Olivier Massot.
  99. |
  100. Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.3</a>
  101. &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
  102. |
  103. <a href="_sources/cli.rst.txt"
  104. rel="nofollow">Page source</a>
  105. </div>
  106. </body>
  107. </html>