Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorWalter Bender <walter.bender@gmail.com>2011-11-16 15:13:12 (GMT)
committer Walter Bender <walter.bender@gmail.com>2011-11-16 15:13:12 (GMT)
commitcec49b8b5338c6709f23129e6afb80178fdd8f7c (patch)
treea658b8359633c2ea091b6e7bbc11911c1cde3ed1 /utils.py
parent6b051458f92dda9dc7ba9d6193defe718a7ea5f6 (diff)
cleaned up audio code; added audio notes to HTML output
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils.py b/utils.py
index 1d0cefc..a2898cf 100644
--- a/utils.py
+++ b/utils.py
@@ -105,6 +105,10 @@ def image_to_base64(pixbuf, path_name):
file_name = os.path.join(path_name, 'imagetmp.png')
if pixbuf != None:
pixbuf.save(file_name, "png")
+ return file_to_base64(file_name, path_name)
+
+
+def file_to_base64(file_name, path_name):
base64 = os.path.join(path_name, 'base64tmp')
cmd = "base64 <" + file_name + " >" + base64
subprocess.check_call(cmd, shell=True)