How it works...

First, we import the required libraries to handle argument parsing, parsing dates, and the html_dashboard script we created in the previous recipe:

from __future__ import print_functionimport argparsefrom datetime import datetimeimport osimport sysimport html_dashboard

This recipe's command-line handler takes two positional arguments, INPUT_DIR and OUTPUT_DIR, which represent the path to the directory containing acquisition logs and the desired output path, respectively. After creating the output directory, if necessary, and validating that the input directory exists, we call the main() method and pass these two variables to it:

if __name__ == "__main__":    # Command-line Argument Parser    parser = argparse.ArgumentParser( description=__description__, ...

Get Python Digital Forensics Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.