Skip to content

Commit

Permalink
initial commit - v0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jvanasco committed Oct 22, 2013
1 parent 0263e24 commit 53404ea
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
@@ -0,0 +1,2 @@
0.0.1
initial import
15 changes: 15 additions & 0 deletions metadata_utils/__init__.py
@@ -0,0 +1,15 @@
from xml.sax.saxutils import escape, unescape

# https://wiki.python.org/moin/EscapingHtml
# escape() and unescape() takes care of &, < and > - we need to handle quotes, so we don't break things
html_attribute_escape_table = {
'"': "&quot;",
"'": "&apos;"
}
html_attribute_unescape_table = {v:k for k, v in html_attribute_escape_table.items()}
def html_attribute_escape(text):
return escape(text, html_attribute_escape_table)
def html_attribute_unescape(text):
return unescape(text, html_attribute_unescape_table)


2 changes: 2 additions & 0 deletions setup.cfg
@@ -0,0 +1,2 @@
[easy_install]
zip_ok = false
40 changes: 40 additions & 0 deletions setup.py
@@ -0,0 +1,40 @@
"""metadata_utils installation script.
"""
import os

from setuptools import setup
from setuptools import find_packages

here = os.path.abspath(os.path.dirname(__file__))
README = ''
try:
README = open(os.path.join(here, "README.md")).read()
README = README.split("\n\n", 1)[0] + "\n"
except:
pass

requires = []

setup(name="metadata_utils",
version="0.0.1",
description="Lightweight Metadata Support",
long_description=README,
classifiers=[
"Intended Audience :: Developers",
"Programming Language :: Python",
"License :: OSI Approved :: MIT License",
],
keywords="web",
author="Jonathan Vanasco",
author_email="jonathan@findmeon.com",
url="https://github.com/jvanasco/metadata_utils",
license="MIT",
py_modules=['metadata_utils'],
packages=find_packages(),
include_package_data=True,
zip_safe=False,
tests_require = requires,
install_requires = requires,
test_suite="tests",
)

1 change: 1 addition & 0 deletions tests.py
@@ -0,0 +1 @@

0 comments on commit 53404ea

Please sign in to comment.