2008-03-13 15:55:28 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
"""
|
|
|
|
* setup.py - script to install SettingGUI
|
|
|
|
* (C) 2007 by Kristian Mueller <kristian-m@kristian-m.de>
|
|
|
|
* All Rights Reserved
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
"""
|
|
|
|
|
|
|
|
from distutils.core import setup
|
|
|
|
import os
|
|
|
|
|
|
|
|
setup(name='pyPenNotes',
|
|
|
|
description='write Notes on touch screens',
|
|
|
|
long_description='Tool to write notes using the touch screen on FIC Neo1973 (OpenMoko Distribution)',
|
|
|
|
author='Kristian Mueller',
|
|
|
|
author_email='kristian-m@kristian-m.de',
|
|
|
|
url='http://wiki.openmoko.org/wiki/PyPenNotes',
|
|
|
|
version='0.3b',
|
|
|
|
license='GPL_v2',
|
FEATURE: Compress Data
CLEANUP: Separating out much of the concern of the large pyPenNotes.py file into SaveRestore.py and UserDrawingArea.py
patch from haakeyar Thanks a lot!
--- Full Ticket Message ---
UserDrawingArea.py is a widget that the user can draw on and you can receive tha strokes that the user has drawn.
SaveRestore contains classes for saving and loading the data. It is split into two closes. A base class takes care of things in common for all file formats, while a subclass implements the actual file format. This way, we could easily implement other file formats, for example a text format where only parts of the file are loaded, to improve loading speed, or ability to save to an sqlite file.
In the base class, I have implemented a simple compression of the notes. Points closer than QUALITY_LOSS (currently set at 5) pixels are merged. This compressed a test note file with 77% and you can barely see the difference. I have attached the original file, the compressed file and a a file with two notes file, the compressed first and the original last (open this file in the original pyPenNotes and switch between the notes to see the difference).
There are also other ways to compress the notes even more (no need for more than two points in a straight line), but I have not implemented that (yet).
Maybe it would be better to move the compression to UserDrawingArea - it would have both good and bad sides.
pyPenNotes.py still has too much responsibility in my opinion - it both displays the window and coordinates SaveRestore and UserDrawingArea, but I haven't done anything about that (yet).
If you want to discuss any of the changes, feel free to contact me on IRC or mail me at my nick at gmail dot com if you want to discuss the changes.
git-svn-id: http://www.neo1973-germany.de/svn@73 46df4e5c-bc4e-4628-a0fc-830ba316316d
2008-04-24 18:21:45 +00:00
|
|
|
scripts=['pyPenNotes.py', 'SaveRestore.py', 'UserDrawingArea.py'],
|
2008-03-13 15:55:28 +00:00
|
|
|
)
|