Skip to content

PSWriteHTML is PowerShell module allowing to create HTML in easy way.

Notifications You must be signed in to change notification settings

XR71MK9/PSWriteHTML

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSWriteHTML - PowerShell Module

PSWriteHTML is fork of ReportHTML module. I've forked ReportHTML due to it being outdated and not really maintained. I also wanted to address some problems it has and possibly add more features. As it stands PSWriteHTML doesn't use same naming convention as ReportHTML therefore you can have both. Keep in mind the approach on building html is much more simplified and I'm adding more and more features as I go (fixes included).

Advantages over ReportHTML:

  • faster report building (from 20+ seconds to 0-2 seconds)
  • updated libraries
  • bunch of different, new features
  • easier building HTML

Credits

Matthew Quickenden (@lucidqdreams) - author of ReportHTML - without him this wouldn't be possible.

Projects using PSWriteHTML (to give you ideas what you can do):

  • Statusimo is a PowerShell module that is able to generate a Status Page entirely from PowerShell.
  • Dashimo is a PowerShell module that makes generating Dashboards, nice looking HTML, a breeze.
  • Emailimo is a PowerShell module that makes writting nice looking HTML emails, easy!
  • Out-HTMLView is a PowerShell cross-platform command alternative to Out-GridView

Out-HTMLView

Following external libaries and frameworks are in use. They make PSWriteHTML what it is now. This list is dynamic and doesn't cover everything yet.

PSWriteHTML - External JS Framework - DataTables

Following JS Framework is intergrated as part of this module. It's responsible for building Tables

DataTables Example

It was downloaded from https://datatables.net/download/ with following settings.

  • Styling Framework:
    • DataTables' default styling.v1.10.18
  • Selected Packages:
    • jQuery 3 DataTables requires jQuery. Don't select either version if you already have it.v3.3.1
    • Enhance HTML tables with advanced interaction controls.v1.10.18
  • Extensions:
    • AutoFill Excel-like click and drag copying and filling of data.v2.3.2
    • Buttons A common framework for user interaction buttons.v1.5.4
    • Column visibility End user buttons to control column visibility.v1.5.4
    • Flash export Create Excel, PDF, CSV files and copy data from the table. For legacy browsers.v1.5.4
    • HTML5 export Copy to clipboard and create Excel, PDF and CSV files from the table's data.v1.5.4
      • JSZip Required for the Excel HTML5 export button.v2.5.0
      • pdfmake Required for the PDF HTML5 export button.v0.1.36
    • Print view Button that will display a printable view of the table.v1.5.4
    • ColReorder Click-and-drag column reordering.v1.5.0
    • FixedColumns Fix one or more columns to the left or right of a scrolling table.v3.2.5
    • FixedHeader Sticky header and / or footer for the table.v3.1.4
    • KeyTable Keyboard navigation of cells in a table, just like a spreadsheet.v2.5.0
    • Responsive Dynamically show and hide columns based on the browser size.v2.2.2
    • RowGroup Show similar data grouped together by a custom data point.v1.1.0
    • RowReorder Click-and-drag reordering of rows.v1.2.4
    • Scroller Virtual rendering of a scrolling table for large data sets.v1.5.0
    • Select Adds row, column and cell selection abilities to a table.v1.2.6

JSZip and PDFMake are not downloaded as part of this package. They fail to import properly hence they are not bundled as one minified version.

PSWriteHTML - External JS Framework -EnlighterJS

PSWriteHTML provides built-in EnlighterJS JavaScript. It's responsible for building Code Blocks

EnlighterJS Example

This allows for code blocks support. Currently it uses Release Candidate version as it's first version to support PowerShell highlighting and many additional languages. It will be updated to new version

Following languages are supported for New-HTMLCodeBlock

  • Assembly (assembly, asm)
  • AVR Assembly (avrassembly, avrasm)
  • C/C++ (c,cpp, c++)
  • C# (csharp)
  • CSS (css)
  • Cython (cython)
  • CordPro (cordpro)
  • diff (diff)
  • Dockerfile (docker, dockerfile)
  • Generic (generic, standard) - default highlighting scheme
  • Groovy (groovy)
  • Go (go, golang)
  • HTML (html)
  • Ini (ini, conf)
  • Java (java)
  • Javascript (js, javascript, jquery, mootools, ext.js)
  • JSON (json)
  • Kotlin (kotlin)
  • LESS (less)
  • LUA (lua)
  • Markdown (gfm, md, markdown)
  • Matlab/Octave (octave, matlab)
  • NSIS (nsis)
  • PHP (php)
  • Powerhsell (powershell)
  • Prolog (prolog)
  • Python (py, python)
  • RAW (raw) - raw code without highlighting with EnlighterJS container styles!
  • Ruby (ruby)
  • Rust (rust)
  • SCSS (scss, sass)
  • Shellscript (shell, bash)
  • SQL (sql)
  • Squirrel (squirrel)
  • Swift (swift)
  • Typescript (typescript)
  • VHDL (vhdl)
  • VisualBasic (visualbasic, vb)
  • XML (xml)
  • YAML (yaml)

Following themes are supported for New-HTMLCodeBlock

  • Enlighter (enlighter, standard) - Enlighter`s default Theme
  • Classic (classic) - SyntaxHighlighter inspired
  • Bootstrap (bootstrap4) - Bootstrap 4 inpired themes, high contrast
  • Beyond (beyond) - BeyondTechnology Theme
  • Godzilla (godzilla) - A MDN inspired Theme
  • Eclipse (eclipse) - Eclipse inspired
  • MooTwo (mootwo) - Inspired by the MooTools Website
  • Droide (droide) - Modern, minimalistic
  • Minimal (minimal) - Bright, High contrast
  • Atomic (atomic) - Dark, Colorful
  • Dracula (dracula) - Dark, using official draculatheme colorscheme
  • Rowhammer (rowhammer) - Light, Transparent, divided rows

About

PSWriteHTML is PowerShell module allowing to create HTML in easy way.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 64.9%
  • CSS 24.5%
  • JavaScript 10.6%