Skip to main content

Installation

$ pip3 install minidoc

License

  • MIT

Quickstart

  • pip3 install minidoc

  • make a workdir, such as “TEST”

    mkdir TEST
    cd TEST
  • edit your code.tst.py as below:

    cat code.tst.py
/docs/images/code.tst.py.00.png
run cmd minidoc ,
will auto exec the code in code.tst.py,
and auto save the terminal screen-shot(or recording)
and auto generate a .rst doc-file
minidoc
tree
TEST# tree
.
├── code.tst.py
├── images------------------------------->generated svgs
│   ├── __getitem__.svg
│   └── __init__.svg
└── Usage.rst---------------------------->generated .rst

1 directory, 4 files
TEST#
/docs/images/code.tst.py.11.png /docs/images/code.tst.py.2.png
  • open generated .rst to check it

/docs/images/code.tst.py.3.png
  • minidoc -h

    TEST# minidoc -h
    usage: minidoc [-h] [-tst TEST_FILE] [-codec CODEC] [-still STILL_FRAMES]
                   [-rows ROWNUMS] [-dst DST_DIR] [-title TITLE] [-tbot TITLE_BOT]
                   [-ebot ENTRY_BOT]
    
    optional arguments:
      -h,                   --help                       show this help message and exit
      -tst    TEST_FILE,    --test_file TEST_FILE        .tst.py file name,default = "code.tst.py"
      -codec  CODEC,        --codec CODEC                .tst.py file codec,default = "utf-8"
      -still  STILL_FRAMES, --still_frames STILL_FRAMES  generate screen shot,default = True (which means still image but not recording)
      -rows   ROWNUMS,      --rownums ROWNUMS            screen height,default = 30
      -dst    DST_DIR,      --dst_dir DST_DIR            destination svg dir, default ="./images"
      -title  TITLE,        --title TITLE                parent title, default = "Usage"
      -tbot   TITLE_BOT,    --title_bot TITLE_BOT        parent title bottom char, default = '='
      -ebot   ENTRY_BOT,    --entry_bot ENTRY_BOT        entry title bottom char, default = '-'

Usage

  • from code

    In progressing.....
  • from cmdline

    # screen shot
    root@# minidoc -tst code.rst.py -dst ./images
    
    # screen recording
    root@# minidoc -tst code.rst.py -dst ./images -still false
    
    # on current dir,screen shot
    root@# minidoc -still true
    
    # on current dir,screen recording
    root@# minidoc -still false
  • from docstring only one level(experimental,no recursive support, since only one level AST walked)

    root@# minidoc_from_docstring -proj dtable

Features

  • auto generate .rst doc from .tst.py

  • auto exec test-code in .tst.py

  • auto record the screen and save as .svg

Restrict

  • currently only support python3

TODO

  • javascript

  • lua

  • tclsh

References

  • termtosvg

  • elist

  • efdir

  • estring

Metadata

Release files for minidoc 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for minidoc 0.0.4
File Size Uploaded Provenance
minidoc-0.0.4.tar.gz 7.5 kB Without provenance Details

Release files / minidoc-0.0.4.tar.gz

Download URL minidoc-0.0.4.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
df9d6eac8e4a105ea0d972ca7c54beaa96f967fcc4cde84d105876ea4145162e
BLAKE2b-256 checksum
How to use checksums
ddb59d0e845af71b1af88f3fbda9f355cf7ba609432e3b46be62721b0100dc21
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.8

Security for minidoc 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page