<commit_before>#!/usr/bin/env python3

# <NAME> & <NAME>
# log.py logbook generation software

# Debug Tools
CSS_DEBUG = False

import os 
from shutil import copyfile 
import argparse 
import datetime

# Parse Arguments
parser = argparse.ArgumentParser(
    description = "Appends a log to logbook.html")

parser.add_argument('-m', metavar='message', type=str, 
    help = "message for log")
parser.add_argument('-I', action='store_true', help="important")
parser.add_argument('-t', metavar="title", type=str, help="title")
parser.add_argument('-s', metavar="section header", type=str, 
    help="section header")
parser.add_argument('-c', metavar='color', type=str,
    help="color the text this CSS color")
parser.add_argument('-f', metavar='path', type=str, nargs='*',
    help="file to be attached to log")
parser.add_argument('-u', metavar='url', type=str, nargs='*', 
    help='URL to be attached to log')
args = parser.parse_args()
<commit_msg>Added -o/--open argument. Limited choices to html, pdf and md.<commit_after>#!/usr/bin/env python3

# <NAME> & <NAME>
# log.py logbook generation software

# Debug Tools
CSS_DEBUG = False

import os, sys
from shutil import copyfile 
import argparse 
import datetime

# Parse Arguments
parser = argparse.ArgumentParser(
    description = "Appends a log to logbook.html")

parser.add_argument('-m', metavar='message', type=str, 
    help = "message for log")
parser.add_argument('-I', action='store_true', help="important")
parser.add_argument('-t', metavar="title", type=str, help="title")
parser.add_argument('-s', metavar="section header", type=str, 
    help="section header")
parser.add_argument('-c', metavar='color', type=str,
    help="color the text this CSS color")
parser.add_argument('-f', metavar='path', type=str, nargs='*',
    help="file to be attached to log")
parser.add_argument('-u', metavar='url', type=str, nargs='*', 
    help='URL to be attached to log')
parser.add_argument('-o', '--open', metavar='extension', type=str, 
    choices=['html','pdf','md'], help='open logbook.<html|md|pdf>')
args = parser.parse_args()

if args.open:
    print("opening .log/logbook."+args.open)
    os.system("open .log/logbook."+args.open)
    sys.exit()

{'fraction_non_alphanumeric': 0.16817359855334538, 'fraction_numerical': 0.0009041591320072332, 'mean_word_length': 5.113259668508287, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '426816', 'n_tokens_mistral': 748, 'n_tokens_neox': 738, 'n_words': 190}