#!/usr/bin/env python3
import sys, os
def htmlencode(string):
outstring = ""
for char in string:
if char in ["<", ">", "'", "’", "\"", "&"]:
replacements = {
"<": "<",
">": ">",
"'": "'",
"’": "'",
"\"": """,
"&": "&"
}
outstring = outstring + replacements[char]
elif ord(char)>127:
outstring = outstring + "" + str(ord(char)) + ";"
else:
outstring = outstring + char
return outstring
if len(sys.argv)<3:
print("Usage: " + sys.argv[0] + "