This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
import sys | |
import re | |
import urllib.parse | |
# sorted by priority | |
markdown_priorities = [ | |
"highest", "high", "medium", "low", "lowest" | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"terminal version" | |
import os | |
import platform | |
try: | |
from tqdm import tqdm | |
USETQDM = True | |
except ImportError: | |
USETQDM = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Parses apache2 access log entries into json, adding ip details with the ipinfo.io API | |
Example entry: | |
95.90.223.124 - - [02/Jan/2023:18:38:29 +0000] "GET / HTTP/1.1" 500 6024 | |
""" | |
import sys | |
import traceback | |
import json | |
import time |