Skip to content

pbehnke/reportng

 
 

Repository files navigation

reportng

Build Status Documentation Read the Docs PyPI PyPI version repo size Twitter Follow Analytics

reportng is a simple python module that allows one to create beautiful yet simple Bootstrap 4 html reports. Reportng is capable of with any string type output that is generated by python. Use cases are building beautiful output from tools/scripts or just python in general

Currently, reportng supports the following:

  • Search and highlight (supports regex) and hit count
  • Self populating dropdown menu for report sections.
  • Code sections with lexing
  • Asciinema integration
  • Image carousels with captions
  • Stackable cards
  • Social integrated footers
  • Progress bar
  • Tables
  • List groups

The following decorators can also be added:

  • modals
  • reference buttons
  • badges

Installation

pip install -U reportng

Documentation

Documentation is on readthedocs

Example

See on the documentation page

Main methods

All the usable methods start with the prefix report

  • report_header is used to create the header section of the report and controls things like theme and highlight color.
  • report_section is used to create the main body/section for reportng. This method supports pre tags by default, but p can be used also.
  • report_image_carousel is used to add an image carousel. It takes *args and multiple images can be passed to it.

  • report_asciinema is used to add an asciinema. At the moment, it can use take a valid asciinema url. Example https://asciinema.org/a/117928
  • report_code_section is used to add code that is lexed and highlighted using highlight.js
  • report_captions is used to add a simple p tag. Useful to add information below sections
  • report_cards is used to create stackable cards
  • report_table is used to create tables
  • report_footer is used to add an optional footer. The footer supports social icons like github, twitter etc along with custom messages.
  • report_save is used to save the report to disk.

About

A simple Bootstrap 4 report writer built with Python.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 86.2%
  • HTML 13.8%