summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2007-06-15 22:10:10 +0200
committerGuillaume Seguin <guillaume@segu.in>2007-06-15 22:10:10 +0200
commit362abb65c1410f93f2f8915450a9355fd8d6e75d (patch)
treea1b74b4f44e7a7b4c8bbf57f9b869df58455913b
parent12355201a2631d61f8d3defd2e1e3d5ead12474c (diff)
downloadscreenshot-beautifier-362abb65c1410f93f2f8915450a9355fd8d6e75d.tar.gz
screenshot-beautifier-362abb65c1410f93f2f8915450a9355fd8d6e75d.tar.bz2
* Fix file name generation
-rwxr-xr-xbeautifier.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/beautifier.py b/beautifier.py
index 36a3cee..e0cbb1b 100755
--- a/beautifier.py
+++ b/beautifier.py
@@ -3,7 +3,8 @@
import cairo
from math import pi
from sys import argv
-from os.path import exists
+from os.path import exists, basename
+
class Color:
def __init__ (self, r = 1, g = 1, b = 1, a = 1):
self.r = r
@@ -149,7 +150,7 @@ if __name__ == "__main__":
print "Source file not found!"
raise SystemExit
if len (argv) > 2: out = argv[2]
- else: out = ".".join (file.split (".")[:-1]) + ".thumb.png"
+ else: out = ".".join (basename (file).split (".")[:-1]) + ".thumb.png"
if len (argv) > 3: radius = float (argv[3])
else: radius = 0
s = cairo_beautify (file, radius = radius)