rsticle 0.1.0

Treat source files as articles / narrative documentation
Documentation
#{
"""
This is an example module.

This text should not appear in the narrative output,
however, it should appear in the pydoc output
"""
#}

#: .. highlight:: python
#: 
#: A Python Example
#: ================
#:
#: We're outputting ReStructuredText, whose directive require
#: that their content be indented by four spaces.
#: Therefore we use the following ``rsticle`` directive::
#: 
#:     #> ____
#> ____
#:
#: Read this as "dedent every code block, then add this number of spaces".
#: 
#: This file will showcase the following function::

def strlen(s: str) -> int:
    return len(s)

#: As you can see, we need to explicitly control indentation,
#: because ReStructuredText directives need to be indented by four spaces.
#:
#: The following blocks will retain their relative indentation
#: by explicitly adding the required amount.
#:
#: We define a function::

def some_fun():
    #> ________
    #:
    #: document it::
    #:
    """This function does stuff"""
    #:
    #: but it ultimately does nothing::
    #:
    pass  # The docstring lied!
#> ____

if __name__ == "__main__": #
    print("strlen:", strlen("some text")) #