Metadata-Version: 1.0
Name: rstspreadsheet
Version: 0.1.1
Summary: Add the `spreadsheet` directive to reStructuredText for Docutils and Sphinx
Home-page: UNKNOWN
Author: Takafumi Arakaki
Author-email: aka.tkf@gmail.com
License: MIT License
Description: 
        ============================================
         Spreadsheet directive for reStructuredText
        ============================================
        
        reStructuredSpreadsheet adds the `spreadsheet` directive for
        reStructuredText. You can use it from Docutils or Sphinx.
        Any python function/module can be used to calculate the cell value.
        
        
        Install
        -------
        ::
        
            pip install rstspreadsheet  # or
            easy_install rstspreadsheet
        
        
        Usage
        -----
        
        Use as a standalone program::
        
            python -m rstspreadsheet sample.rst sample.html
        
        Or use as a sphinx extension by adding it to `extensions`::
        
            extensions = [
                # other extensions...
                'rstspreadsheet']
        
        
        Examples
        --------
        
        Simple spreadsheet
        ^^^^^^^^^^^^^^^^^^
        
        You can do this simple calculation:
        
        === === ========= ===============
         p   q   p and q   not (p and q)
        === === ========= ===============
         0   0   0         1
         1   0   0         1
         0   1   0         1
         1   1   1         0
        === === ========= ===============
        
        with this simple code::
        
            .. spreadsheet::
               :eq: {2} = {0} and {1}
                    {3} = int(not {2})
        
               === === ========= ===============
                p   q   p and q   not (p and q)
               === === ========= ===============
                0   0
                1   0
                0   1
                1   1
               === === ========= ===============
        
        
        Spreadsheet with python functions
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        
        If you want to calculate some complicated math functions like this:
        
        .. table::
        
           ======== ======== ========== ======
           function argument expression result
           ======== ======== ========== ======
           fac      5        fac(5)     120.00
           sin      pi       sin(pi)    0.00
           cos      pi       cos(pi)    -1.00
           exp      1        exp(1)     2.72
           ======== ======== ========== ======
        
        use python module/function!::
        
            .. spreadsheet::
               :eq: {2} = '{0}({1})'
                    {3} = {2}
               :setup: from math import sin, cos, exp, pi
                       def fac(n):
                           return fac(n-1) * n if n > 1 else 1
               :format: 3:'%0.2f'
        
               ======== ======== ========== ======
               function argument expression result
               ======== ======== ========== ======
               fac      5
               sin      pi
               cos      pi
               exp      1
               ======== ======== ========== ======
        
        
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Topic :: Documentation
Classifier: Topic :: Utilities
