Skip to main content

auto generate a mini rst doc (code block + svg) from a test-file

Project description


$ pip3 install minidoc


  • MIT


  • pip3 install minidoc

  • make a workdir, such as “TEST”

    mkdir TEST
    cd TEST
  • edit your as below:

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

1 directory, 4 files
/docs/images/ /docs/images/
  • open generated .rst to check it
  • 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 file name,default = ""
      -codec  CODEC,        --codec CODEC       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 = '-'


  • from code

    In progressing.....
  • from cmdline

    # screen shot
    root@# minidoc -tst -dst ./images
    # screen recording
    root@# minidoc -tst -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


  • auto generate .rst doc from
  • auto exec test-code in
  • auto record the screen and save as .svg


  • currently only support python3


  • javascript
  • lua
  • tclsh


  • termtosvg
  • elist
  • efdir
  • estring

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for minidoc, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size minidoc-0.0.4.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page