g j o t s 2 By Bob Hepple Brisbane Queensland Australia Version 3.2.1 bob.hepple@gmail.com http://bhepple.com//doku/doku.php?id=gjots
gjots2 is a jotter application for your desktop. Why do we need yet another jotter program? Well, when my faithful old Psion-5 organiser died I needed to move all my bits and pieces onto Linux and I started to look around for software to fill that need. I found lots of software for diary and I already wrote a beaut calculator (gdcalc) but somehow nothing was quite right for the jotter. Other packages that I looked at were either: * much too simplistic (eg. a single level hierarchy), * too complex (too many components like Corba, SQL or suchlike) * web based * unable to display & work on the tree at the same time as the text entries * too messy - throwing windows up like 3M yellow stickers all over the screen Then there were the ones I couldn't get to work or which just plain bombed. Nonetheless, there are many fine packages around but none really suited my needs. kjots seemed at the time to be the best of the lot. Anyhow, I needed to learn how to do GTK trees and practise glade - and so gjots was born and lives still. It was originally written in C (now Python), glade and gtk, was pretty fast and is still something I use every day. Judging by the emails I've been sent it is quite useful to others too, which is nice. There was even a Japanese version created from an early cut of gjots (0.3?) but the code was never contributed back to the mainstream which is a shame. However the world doesn't stop still and GTK-2 came along and there was an increasing number of people who wanted LOTE (Languages Other Than English) including myself. I also wanted to learn about python and hence the current python version of gjots - gjots2 or "son of gjots" came into being. Being written in an interpreted language it isn't quite so fast to start up as the original gjots* but it offers heaps more features: Like Goldilocks said about the chairs, porridge and beds, gjots2 is "just right". * this was true when I wrote this in about 2004. In 2012, my i7 brings it up practically instantly.
If possible, use dnf/yum/rpm or apt - better package management than setup.py
fedora includes gjots2 but is often out of date - better get the latest package from the homepage VERSION=3.2.1 wget http://bhepple.freeshell.org/gjots/gjots2-${VERSION}-1.noarch.rpm dnf install gjots2 There are builds on COPR: https://copr.fedorainfracloud.org/coprs/wef/gjots2/
VERSION=3.2.1 wget http://bhepple.freeshell.org/gjots/gjots2-${VERSION}.tgz If installing from the tarball, after unpacking the tar file and cd'ing to it do this: python setup.py install [ --prefix=/usr/... ] glib-compile-schemas $prefix/share/glib-2.0/schemas Uninstall with the uninstall.sh script provided here. On some systems, you may have permission problems with system-wide installations from source. All new directories installed should have permissions 0755, and all installed files should have permissions 0644, with the exception of 'docbook2gjots', 'gjots2', 'gjots2docbook', 'gjots2emacs', 'gjots2org' and 'gjots2html', which should have permissions 0755.
Let yum/dnf/apt take the strain ... otherwise ... Version 3.1.0+: Install sourceview4 Install gtk3 Install python3-gobject Earlier versions: Install pygtksourceview to enable Undo/Redo For gjots2-2.x.x: (Fedora <= 20 Centos <= 6) python gnome-python2 pygtk2-libglade gnome-python2-gconf For gjots2-3.x.x: (Fedora-21+ Centos-7+) You may need to install (or re-install) libglade, pygtk, or gtk for your current version of python or possibly you can just set your PYTHONPATH eg. export PYTHONPATH=/usr/local/lib/python2.7/site-packages/ gjots2 was written with glade-3 so if you want to change or fix the code you will need to install it too. Otherwise, it's just python!
We have two mailing lists setup for development and support of gjots: <NOTE: these are SPAM-infested - I rarely look at them! better send to bob.hepple@gmail.com> Gjots Developers <gjots2-devel@lists.sourceforge.net>: http://lists.sourceforge.net/lists/listinfo/gjots2-devel Gjots Users <gjots2-users@lists.sourceforge.net>: http://lists.sourceforge.net/mailman/listinfo/gjots2-users Bug fixes are very welcome! If anyone wants to translate this into another language please get in touch and I will provide an internationalised version and message catalogs. I will incorporate any new features that people want to contribute provided I like them too. If you want to add something to the mainstream development please drop me a line first and I will make sure no-one else is working on that area. Please use diff -ru to create the patch, and send it as a gzipped file attachment. If I choose not to incorporate your favourite feature, feel free to fork the development but please choose a different name for the program. This is GPL code after all. Note that to protect the GPL license I will need to include your name and email address in the Authors and License section. If you want to contribute please get in touch with me at bob.hepple@gmail.com, to make sure work is not duplicated. For general ideas, please see "Planned Features".
Just start it as "gjots2" - it will save anything in $HOME/.gjotsfile Or use an argument - gjots2 accepts a single file, eg: gjots2 todo.gjots These options are available: -h, --help: this help -d, --debug: debug to stdout -2, --glade2: use glade-2 gui if available -t, --trace: trace lines as they execute -g 123x456, --geometry=123x456: initial geometry (X x Y) -p, --purge-password don't remember password -r, --readonly: no editing (or locking) -V, --version: print the version and exit For supported languages other than English, you can use eg: LC_ALL=de_DE.utf8 gjots2 or (eg fedora-16+): LANGUAGE=de_DE.utf8 gjots2 To see what languages are currently supported: ls /usr/{,local/}share/locale/*/LC_MESSAGES/gjots2.mo
Open and save do the usual and operate on gjots-format text files (see below). Unless readonly mode is in effect, gjots2 will create a lockfile to enforce single-writer but allow multiple readers. If a file is opened while it is already locked then a popup window will offer "Try Again" or "Readonly". The "Try Again" option allows you to exit the program which is locking the file. The lock file is a simple file called .#filename, where filename is the name of the gjots2 file being edited. It is in the same directory as the original gjots2 file and it contains just the process identifier (pid) of the locking process. If the locking process dies without cleaning up the lockfile then gjots2 can detect it on the next open. Thus, locking is viable even on an NFS mounted volume. Files opened "readonly" have no locking applied. There is a menu item under "Files" which allows the readonly status of the program to be toggled. It also takes care of locking and unlocking the file as above. When gjots2 saves a file it moves any prior version of the file to a backup in the manner of emacs ie. if saving to "file.gjots" which already exists, the old version would get saved to "file.gjots~" If your filename ends in ".cpt", gjots will attempt to decrypt and encrypt the file using ccrypt(1). If ccrypt is not installed (it is not a standard part of all Linux distributions) the IO will fail. Similiarly, .ssl will be opened using (DES3) openssl and .gpg will be opened with (DES3) gpg. Install ccrypt, openssl or gpg for good security! As of version 2.4.3 *.org files are supported for intercourse with emacs org-mode.
The screen has a menubar and toolbar at the top which should be fairly self-explanatory. The toolbar on the left controls the tree hierarchy. Just play around with it and you'll soon get the hang of it. "New Page" create a new sibling of the current page. "New Child" creates a new child of the current item. "Up" Moves the current selection to before the previous sibling. "Down" does the opposite of Up. "Back" makes the currently selected item(s) into children of their grandparent (or, if you prefer, siblings of their parent). "Forward" makes the current items(s) into children of the sibling immediately before them. "Split item" takes the currently selected text (in the right hand panel) and moves it into a new item. "Merge Items" merges the text of all currently selected items into one big item (separated by a newline character) "Hide All" collapses the view of the tree to just the children of the root item. "Show All" expands all the children of the currently selected items (recursively). "Sort Tree" brings up the sort dialog box where you can sort elements based on a given criteria. When a folder loses all of its child items it gets automatically demoted to a plain item. On the top toolbar, we have: "Save" is the usual thing. The 'Print' button pops up the Print dialog. See the "Printing" item one level up from here. The "Undo" and "Redo" functions only operate on the text buffer, not on the tree. They are only available if the gtksourceview library is available. "Cut", "Paste" and "Copy" have dual functionality, thus, they operate on both text and tree items based on whether the text or tree panels are selected. The "Wrap" button formats the current paragraph according to the line length set in the preferences dialog (also activated by ^L) The "Ext.Ed" button invokes an external editor according to the command string in the Preferences dialog. The default string is either 'nedit %s', 'xedit %s' or 'xterm -e vi %s' - depending on what is installed on the system - the %s is replaced by the temporary filename. Any other editor can be used as long as it can accept a filename as an argument - personally, I prefer "emacsclient %s". The "Date" button puts a date stamp into the file at the current position. You can adjust the format of the date stamp in the Preferences dialog - it uses the date format from strftime(3) - please check the manual for full details. Some popular choices: %F : (2002-11-03) ... this is the default %c : Sun 03 Nov 2002 10:33:22 AM EST (%d %b %y) : (03 Nov 02) %d/%m/%Y : 28/07/2007 The "Find" button pops up the find & replace dialog. "Sort" pops up the sort dialog. "Prefs" button will pop up the preferences dialog.
^F, Edit->Find or the Find button in the top toolbar popup the find & replace dialog. The top toolbar also holds the most recent find string and quick forward and back search buttons. There is a drop-down of recent searches to the right of this. ^G is a shortcut for 'next' and Shift-^G is for 'previous'. The operation should be intuitive - type in what you want to find into the Find & Replace dialog Find entry and press the Find button. To replace one occurance put the new text in the Replace entry box and press the Replace button. The program will search forward - press it again and it will and replace the text and search forward again. To replace all occurances (from the current position to the end of file) press the Replace All button. The Close and Cancel button both hide the find dialog - the close button saves any new settings for future use (except for the Find and Replace strings). The Clear button just clears the Find & Replace entries. Any errors appear both in the area immediately below the button and also in the main program status bar. Options appear below the Find & Replace buttons and include "Match Case" to limit the search to the same upper and lower case. "Global" is the default and allows the search to take place across the whole file. The alternative is to limit the search to the current item. "Regular Expression" permits the use of POSIX Extended Regular Expressions as defined in "man 7 regex" (ie as used in egrep). A quick reference to regular expressions (note that gjots2 uses Python's re package - see the Python docs for full details, it is rather simpler than the regex used in the C version of gjots): . any character ^ start of line (only as the first item in the RE) $ end of line (only as the last item in the RE) * zero or more repetitions of the previous RE + one or more repetitions of the previous RE ? zero or one repetitions of the previous RE {n} exactly n repetitions of the previous RE {n,} n or more repetitions of the previous RE {n,m} n to m repetitions of the previous RE [ ] matches any character in the set. Ranges are eg. [a-z] [^ ] matches any character not in the set ( ) forms a 'remembered' pattern | pattern alternation eg. x|y means "matches x or y" \n n is 1 to 9 - a backreference to a previous pattern \b start or end of a word \d a digit == [0-9] \s whitespace == [ \t\n\r\f\v] \S non-whitespace \w alphanumeric \W non-alphanumeric To match one of the 'magic' characters ^.[$()|*+?{\ escape it with \ For the replacement pattern the following sequences are available: \& paste the entire found string \1..\9 paste the nth found sub-pattern (defined with (...) ) \n insert a newline
The Print dialog lets you select "what to print": the current page, the current selection or the whole thing and a few enhancements: page feed after every gjots item and auto numbering (not actually implemented yet) The print command that ships with 2.3.7 and later is "gjots2lpr" which is a simple script to try to find useful printing tools and to use them. The default operation is to pass the text through "a2ps" and to view the result with "gv". If these programs are not installed, others are sought - see "gjots2lpr -h" for more details. Before 2.6.7 the default print comman was rather long, but it expanded to the following which is supposed to do something similar: if type gv; then GV='gv -seascape' else if type ggv; then GV=ggv; else lpr $1 exit fi fi T=/tmp/.tmp.$$ mpage -f -2 -I1 -P- $1 > $T ($GV $T; rm $T)& Some possible suggestions for the "Print command" instead of the default: To simply send the raw output directly to the printer: lpr $1
The following items can be selected as preferences by gconf: Text formatter - default is "fmt -w %d" Text line length - used in paragraph formating, (65) External Editor - editor to use with the Ext.Ed. button eg.: nedit %s xedit %s xterm -e vi %s emacsclient %s Date format - format string to feed to strftime(3) for use in date stamp. Do a "man strftime" for details. e.g.: %F : (2002-11-03) ... this is the default %c : Sun 03 Nov 2002 10:33:22 AM EST (%d %b %y) : (03 Nov 02) %d/%m/%Y : 28/07/2007 Font - the font to be used for the text display. The controls and tree still use the default GTK-2 fonts.
Most of the key shortcuts are the usual. In the text display, the normal GTK-2 key mappings apply (slightly different to the C/GTK-1 version of gjots): ^a Select all text home goto start of line end goto end of line left move back one place right move forward one place ^left move one word left ^right move one word right down move to next line up move to previous line ^home/end goto start/end of text delete delete one char backspace delete one char backwards ^L paragraph re-format or "wrap" Shift and <move> mark the region. Plus the following work: ^x cut ^c copy ^v paste Key mappings in the tree: In general, plain keys just move around the tree. Control keys manipulate the tree. up goto previous item down goto next item ^up move the current item(s) up the tree ^down move the current item(s) down the tree shift-up/down extend the selection left ascend the tree right descend the tree ^left promote items ^right demote items home goto to the first item at the present level end goto to the last item at the present level ^home goto the very first item ^end goto the very last (expanded) item Global key mappings: ^s does save ^q does quit ^f Popup the find dialog ^g find next shift-^g find previous
You can bring data in and out of gjots2 using the import and export functions. These operate on the currently selected item so you can control exactly what gets saved. The format of the file is the normal gjots2 format.
The same as gjots which is plain text but with a hierarchy introduced by some keywords: \NewEntry title1 this is the stuff that goes into title1 \NewFolder \NewEntry title2 this is title2's stuff \NewEntry title3 title 3's stuff \EndFolder The \keywords need to be at the start of the line to be recognised.
As of 2.4.3 emacs' the header/sub-heading structures of org-mode is also recognised. A file written with a .org filename extension will be saved in org-mode format: text * heading ** sub-heading more text ** sub-heading * etc etc Extended features of org-mode such as tables, links, agendas etc are not recognised by gjots2. gjots2org and org2gjots are also provided.
This major mode for emacs is in testing: ; GJOTS MODE - remaining problems: ; you must show-all before saving ; it prompts for coding. default raw-text is OK (setq format-alist (cons '(gjots "gjots" nil "gjots2org" "org2gjots" t nil) format-alist)) (define-derived-mode gjots-mode org-mode "gjots" "Major mode for editing gjots files." (format-decode-buffer 'gjots) (hide-sublevels '1)) (autoload 'gjots-mode "gjots-mode" "Major mode to edit gjots files." t) (setq auto-mode-alist (cons '("\\.gjots$" . gjots-mode) auto-mode-alist))
gjots2 can encrypt and decrypt files using the ccrypt(1), openssl(1), gpg2(1) or gpg(1) packages. If the gpg-agent is detected (ie if the GPG_AGENT_INFO variable is set) then it is used for passwords. Files are saved with encryption according to the file suffix you provide: .cpt ccrypt .ssl openssl .gpg gpg gjots2 prompts for passwords where needed. Make sure you have ccrypt, openssl, gpg2 or gpg installed if you want to use this feature. Don't lose your password - I can't help you recover lost passwords!!
gjots2 has not been audited for security, so don't assume it is secure. That said, it's probably secure enough for most private use. The static, encrypted files on disc are as good as gpg/openssl/ccrypt, ie pretty good, (the default algorithm and key lengths are used in each encryption program). For encryption in ccrypt, I've used the equivalent of: {write cleartext} | KEYWORD=password ccencrypt -E KEYWORD >filename.cpt This exposes the password briefly as an environment parameter although it is 'scrubbed' and removed from the gjots2 process environment immediately after use. According to the ccrypt man page, "on most modern systems" the ps command protects environment parameters from ordinary users. Under Linux, you can 'cat /proc/PID/environ' to see the environment parameters of any process that you own - only root can spy on another's environment so using -E is no less secure than your login password and root's login password. The only other way to do this (AFAICS) would be: {write cleartext} >file.gjot echo password |ccencrypt -k - file.gjot ... while this provides better protection for the password, this (briefly) exposes the cleartext as a file - as bad as or worse than exposing the key as an environment parameter! Decrypting is much easier - I use stdin to pass in the password: echo password |ccdecrypt -c -k - filename.cpt | {read from pipe} A supplementary channel (eg. stdin=0, stdout=1 stderr=3 stdpasswd=3) for ccrypt to read passwords would be a better solution (but ccrypt does not provide it).
If you double-click on a URL then your browser is activated and the URL is selected. Only http[s]://... URLs are recognised. The browser that gets started or activated is the first from: An already-running browser from the list below is activated. Failing that, the BROWSER environment parameter is obeyed Failing that, the gnome prefered browser is run. Failing that, then the first one from the list that can be found is run. xdg-open gnome-open firefox4 chrome firefox konqueror epiphany opera dillo
gjots2html converts a gjots2 file into HTML together with a table of contents which looks remarkably like the subject tree. See the man page for more details. gjots2html.py is a python version of the same utility which may be more reliable.
converts a gjots2 file into DOCBOOK XML format. See the man page for more details.
Converts DOCBOOK XML into gjots2 - see the man page for full details See the man page for more details.
gjots2emacs converts a gjotsfile to a format more or less suitable for emacs' outline mode. Usage: gjots2emacs [filename] Converts a gjots file to emacs outline mode (on stdout). The emacs outline-regexp is defaulted to ===>+ -b base: base string for outline-regexp (default '===') -F char: marker for headers in outline-regexp (default '>')
gjots2org converts a gjotsfile to and from a format more or less suitable for emacs' org mode. Usage: gjots2org [filename] Converts a gjots file to emacs org mode (on stdout). -F char: marker for headers in outline-regexp (default '*')
If you have ideas on how to improve gjots2, please email to bob.hepple@gmail.com
What gets added will be limited to the design goal of "fast and lightweight", but might include: Localisation ============ As of version 2.3.0, gjots2 is internationalized and ready for translations. If you would like to see your language supported, please contact the mailing list on bob.hepple@gmail.com Check the webpage for localisations already complete. gjots2 ====== Add timestamp to every item & display in appbar when selected autosort on/off for folders Edit->Clear, Properties, Settings->preferences autosave Support for item options: \Options including: open/closed para details ...? gjots2html ========== gjots2html is undergoing some possible changes. There is a new script marked as beta written in Python, and supports the following features: 1) Add <HR> lines after each section. 2) Adds a link to the Table of Contents after each section. 3) Specify a title to the page. 4) Embed the output of gjots2html.py into a pre-existing HTML template file. 5) Suppress the table of contents section. 6) Output the HTML to a specified file. 7) Add a link to a specified Cascading Style Sheet. 8) Wrap the gjots2 text at a specified width. It also supports an arbitrary number of levels in the hierarchy, even though HTML only supports 9. Add options: -r N, --rule=N: <HR> for all levels up to N
None known, of course, other than: Inappropriate error messages if can't open a gjots2 file on initial startup. The sort dialog can't set itself to the values stored in gconf.
Tested on the following platforms: Fedora-31 Older version were tested on: Gentoo Linux i386 Mandrake 10.1 Fedora Core 3, 4 Novell Linux Desktop 9 SUSE 9.2, 9.3 Ubuntu Feisty Some of these platforms may require updated packages. Refer to our FAQ for a discussion of these issues.
Frequently Asked Questions regarding gjots2. If you ever have any questions that aren't answered here, please contact the gjots2 users list <gjots2-users@lists.sourceforge.net>.
A: You are using a buggy version of libglade2. Upgrade libglade to a version >= 2.4.1. We recommed you update this package through your distribution package manager.
building gjots2 from source. A: Your distribution has effectively *broken* the python installation by not including the distutils modules, which are part of the python core package. Install python correctly to fix this issue. This is known to happen in: Ubuntu (5.10), NLD9, SUSE 9.2. Ubuntu 5.10 fix: # apt-get install pythonX.X-dev
A: Install gnome-python-2. This package will contain the Python bindings for gconf and is located here: http://www.pygtk.org/ You should be able to find pre-built packages for these such as the following. Mandrake 10.1: # rpm -ivh gnome-python-gconf-2.0.3-1mdk.i586.rpm Fedora Core 3: # rpm -ivh gnome-python2-gconf-2.6.0-3.i386.rpm
A: You will have to install gnome-python (and its dependencies).
new python version gjots-2.X.X A: At the 2.0.0 release, these were the differences (for development since then see the CHANGES logs): Unicode support in the data files - so I can make notes in Russian - maybe Turkish, Arabic, who knows what will work. Reports solicited and most welcome! The potential for LOTE support in the program itself - any volunteers for I18N and L10N? Drag and Drop in the tree view to simplify organisation. gconf support with GTK-2 themes. Sorting items and/or text Merging items Spliting items Printing
A: Have you got the gtksourceview libraries installed?
Written by: Bob Hepple <bob.hepple@gmail.com> Assistance from: Gabriel Munoz <munozga@gmail.com> Jiahua Huang <jhuangjiahua@gmail.com> Logo by: DSP Popeck <wokoglopulator@yahoo.com>, 2002 French translation by: Rui Nibau <rui.nibau@omacronides.com> Norwegian translation by: Robert Emil Berge <filoktetes@linuxophic.org> Russian tranlsation by: Sergey Bezdenezhnyh <sib-mail@mtu-net.ru> Italian tranlation by: Raimondo Giammanco <rongten@member.fsf.org> Czech translation by: Martin Sin <martin.sin@zshk.cz> Spanish translation by: Cecilio Salmeron <s.cecilio@gmail.com> Slovenian translation by: Aleksa Šušulić <susulic@gmail.com> German translation by: Uwe Steinmann <uwe@steinmann.cx>
Copyright (C) 2007 Robert Hepple Copyright (C) 2002 DSP Popeck GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS