diff --git a/.gitignore b/.gitignore index 308f886..9643d0a 100755 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ tests/* docs/_build/* MANIFEST barcode/version.py +/.idea diff --git a/barcode/__init__.py b/barcode/__init__.py index 0c2592d..61b698b 100755 --- a/barcode/__init__.py +++ b/barcode/__init__.py @@ -17,7 +17,7 @@ from barcode.isxn import ISBN10, ISBN13, ISSN from barcode.upc import UPCA from barcode.itf import ITF -from barcode.version import version # noqa: F401 +# from barcode.version import version # noqa: F401 try: _strbase = basestring # lint:ok diff --git a/barcode/base.py b/barcode/base.py index 6a42bf5..6a6feb8 100755 --- a/barcode/base.py +++ b/barcode/base.py @@ -19,10 +19,10 @@ class Barcode(object): default_writer_options = { 'module_width': 0.2, - 'module_height': 15.0, - 'quiet_zone': 6.5, - 'font_size': 10, - 'text_distance': 5.0, + 'module_height': 4.25, + 'quiet_zone': 1, + 'font_size': 4, + 'text_distance': 1.35, 'background': 'white', 'foreground': 'black', 'write_text': True, diff --git a/barcode/writer.py b/barcode/writer.py index 415f26f..799b065 100755 --- a/barcode/writer.py +++ b/barcode/writer.py @@ -6,7 +6,7 @@ import os import xml.dom -from barcode.version import version +# from barcode.version import version try: import Image @@ -49,7 +49,7 @@ def create_svg_object(): SIZE = '{0:.3f}mm' -COMMENT = 'Autogenerated with python-barcode {0}'.format(version) +COMMENT = 'Autogenerated with python-barcode {0}'.format('wls') PATH = os.path.dirname(os.path.abspath(__file__)) FONT = os.path.join(PATH, 'DejaVuSansMono.ttf') @@ -85,15 +85,15 @@ def __init__(self, initialize=None, paint_module=None, paint_text=None, initialize=initialize, paint_module=paint_module, paint_text=paint_text, finish=finish ) - self.module_width = 10 - self.module_height = 10 - self.font_size = 10 - self.quiet_zone = 6.5 + self.module_width = 20 + self.module_height = 20 + self.font_size = 20 + self.quiet_zone = 13 self.background = 'white' self.foreground = 'black' self.text = '' self.human = '' # human readable text - self.text_distance = 5 + self.text_distance = 10 self.center_text = True def calculate_size(self, modules_per_line, number_of_lines, dpi=300): @@ -272,7 +272,7 @@ def _create_text(self, xpos, ypos): if self.human != '': barcodetext = self.human else: - barcodetext = self.text + barcodetext = 'www.welikesmall.com - {0}'.format(self.text) text_element = self._document.createTextNode(barcodetext) element.appendChild(text_element) self._group.appendChild(element)