Skip to content

Commit

Permalink
central file to keep the version number of multitoner
Browse files Browse the repository at this point in the history
  • Loading branch information
graphicore committed Oct 4, 2013
1 parent 29cd8fc commit 82e611f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions VERSION
@@ -0,0 +1 @@
0.5.0
10 changes: 9 additions & 1 deletion epstool.py
Expand Up @@ -20,6 +20,7 @@

from __future__ import unicode_literals, print_function

import os
from string import Template
import binascii
from datetime import datetime
Expand All @@ -29,6 +30,10 @@

__all__ = ['EPSTool', 'EPSToolException']

DIRECTORY = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(DIRECTORY, 'VERSION')) as f:
VERSION = f.read()

init_colors = Template("""gsave % clipping path gsave
%note: 4.2 More Free Advice
%%+ ...
Expand All @@ -53,7 +58,7 @@


eps_template = Template("""%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Multitoner V0.0
%%Creator: Multitoner v $Version
%%Title: no title given
%%CreationDate: $CreationDate
%%BoundingBox: 0 0 $width $height
Expand Down Expand Up @@ -414,6 +419,9 @@ class EPSTool(object):
"""
def __init__(self):
self._mapping = {}

self._mapping['Version'] = VERSION

self._has_color = False
self._has_image = False

Expand Down
4 changes: 3 additions & 1 deletion gtk_dialogs.py
Expand Up @@ -31,6 +31,8 @@
'show_notice_dialog', 'show_message', 'show_about_dialog']

DIRECTORY = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(DIRECTORY, 'VERSION')) as f:
VERSION = f.read()

# just a preparation for i18n
def _(string):
Expand Down Expand Up @@ -132,7 +134,7 @@ def show_about_dialog(window):

about = Gtk.AboutDialog(parent=window
, program_name='Multitoner'
, version='v 0.5.0'
, version='v {0}'.format(VERSION)
, copyright='Copyright © 2013 by Lasse Fister <commander@graphicore.de>'
, license="""
Multitoner is free software: you can redistribute it and/or modify
Expand Down

0 comments on commit 82e611f

Please sign in to comment.