├── .bzrignore ├── CHANGELOG.txt ├── HACKING ├── Coding_Style_&_Guidelines.txt ├── Compatibility.txt ├── Config_Files.txt ├── Development_Tools.txt ├── Formats_modules.txt ├── Ideas.txt ├── Ideas │ ├── Attachments.txt │ ├── Database_and_Album.txt │ ├── Export_OpenOffice.txt │ ├── Forms.txt │ ├── Inline_Latex.txt │ ├── Parse_Tree.txt │ ├── Profiles.txt │ ├── SavedSearch.txt │ ├── Search.txt │ ├── Separate_Window.txt │ ├── Spell_Checking.txt │ ├── Storage.txt │ ├── Synchronization.txt │ ├── Tables.txt │ ├── Tags.txt │ ├── Task_List.txt │ ├── Templates.txt │ └── Transclusion.txt ├── Limitations.txt ├── Parse_Tree.txt ├── Release_checklist.txt ├── Signals.txt ├── Start.txt ├── Store_modules.txt ├── Tasks.txt ├── Test_Suite.txt ├── Translation_Guidelines.txt ├── Unicode.txt ├── Usage │ └── Document_Editing_and_Creative_Writing.txt ├── Writing_plugins.txt ├── notebook.zim └── objects.dot ├── LICENSE.txt ├── MANIFEST.in ├── Makefile ├── README.txt ├── cgi-bin └── zim.cgi ├── contrib └── zim2trac.py ├── data ├── dates.list ├── globe.svg ├── globe_banner.svg ├── globe_banner_small.png ├── helpers │ └── compare_files │ │ └── meld.desktop ├── manual │ ├── About.txt │ ├── Bugs.txt │ ├── FAQ.txt │ ├── Help.txt │ ├── Help │ │ ├── Attachments.txt │ │ ├── Auto_Formatting.txt │ │ ├── Automount.txt │ │ ├── Check_Boxes.txt │ │ ├── Commandline_Options.txt │ │ ├── Config_Files.txt │ │ ├── Custom_Tools.txt │ │ ├── Default_Applications.txt │ │ ├── Export.txt │ │ ├── Export │ │ │ ├── HTML.txt │ │ │ └── LaTeX.txt │ │ ├── Importing_external_files.txt │ │ ├── Key_Bindings.txt │ │ ├── Links.txt │ │ ├── Menu_Items.txt │ │ ├── Notebooks.txt │ │ ├── Pages.txt │ │ ├── Preferences.txt │ │ ├── Properties.txt │ │ ├── Searching.txt │ │ ├── Tags.txt │ │ ├── Templates.txt │ │ └── Wiki_Syntax.txt │ ├── Plugins.txt │ ├── Plugins │ │ ├── Arithmetic.txt │ │ ├── Attachment_Browser.txt │ │ ├── BackLinks_Pane.txt │ │ ├── Diagram_Editor.txt │ │ ├── Diagram_Editor │ │ │ └── diagram.png │ │ ├── Distraction_Free_Editing.txt │ │ ├── Ditaa_Editor.txt │ │ ├── Ditaa_Editor │ │ │ ├── ditaa.dia │ │ │ └── ditaa.png │ │ ├── Equation_Editor.txt │ │ ├── Equation_Editor │ │ │ └── equation_01.png │ │ ├── GNU_R_Plot_Editor.txt │ │ ├── GNU_R_Plot_Editor │ │ │ ├── gnu_r_plot.png │ │ │ ├── gnu_r_plot.r │ │ │ ├── gnu_r_plot001.png │ │ │ └── gnu_r_plot001.r │ │ ├── Gnuplot_Editor.txt │ │ ├── Gnuplot_Editor │ │ │ ├── gnuplot.gnu │ │ │ └── gnuplot.png │ │ ├── Inline_Calculator.txt │ │ ├── Insert_Screenshot.txt │ │ ├── Insert_Symbol.txt │ │ ├── Journal.txt │ │ ├── Line_Sorter.txt │ │ ├── Link_Map.txt │ │ ├── Log_events_with_Zeitgeist.txt │ │ ├── Print_to_Browser.txt │ │ ├── Quick_Note.txt │ │ ├── Score_Editor.txt │ │ ├── Score_Editor │ │ │ ├── score.ly │ │ │ ├── score.png │ │ │ ├── score001.ly │ │ │ ├── score001.png │ │ │ ├── score002.ly │ │ │ ├── score002.png │ │ │ ├── score003.ly │ │ │ └── score003.png │ │ ├── Sequence_Diagram_Editor.txt │ │ ├── Sequence_Diagram_Editor │ │ │ └── diagram.png │ │ ├── Source_View.txt │ │ ├── Spell_Checker.txt │ │ ├── Table_Of_Contents.txt │ │ ├── Tags.txt │ │ ├── Task_List.txt │ │ ├── Tray_Icon.txt │ │ └── Version_Control.txt │ ├── Start.txt │ ├── Usage.txt │ ├── Usage │ │ ├── Collaboration.txt │ │ ├── Creative_Writing.txt │ │ ├── Daily_Journal.txt │ │ ├── GTD_flowchart.png │ │ ├── GTD_flowchart.svg │ │ ├── Getting_Started.txt │ │ ├── Getting_Things_Done.txt │ │ └── Publishing.txt │ └── notebook.zim ├── menubar-maemo4.xml ├── menubar-maemo5.xml ├── menubar.xml ├── pixmaps │ ├── attachment.png │ ├── calendar.png │ ├── checked-box.png │ ├── favicon.ico │ ├── link.png │ ├── linkmap.png │ ├── linkmap.svg │ ├── task-list.png │ ├── unchecked-box.png │ └── xchecked-box.png ├── style.conf ├── symbols.list ├── templates │ ├── html │ │ ├── Default.html │ │ ├── Default_with_index.html │ │ ├── Presentation.html │ │ ├── Print.html │ │ ├── SlideShow_(S5).html │ │ └── ZeroFiveEight.html │ ├── latex │ │ ├── Article.tex │ │ ├── Part.tex │ │ └── Report.tex │ ├── markdown │ │ └── Default.markdown │ ├── plugins │ │ ├── equationeditor.tex │ │ ├── gnu_r_editor.r │ │ ├── gnuploteditor.gnu │ │ ├── quicknote.txt │ │ └── scoreeditor.ly │ ├── rst │ │ └── Default.rst │ └── wiki │ │ ├── Default.txt │ │ └── Journal.txt ├── urls.list └── zim.png ├── debian ├── changelog ├── compat ├── control ├── copyright ├── pyversions ├── rules └── source │ └── format ├── epydoc.conf ├── icons ├── ubuntu-mono-dark │ └── zim-panel.svg ├── ubuntu-mono-light │ └── zim-panel.svg ├── zim.ico ├── zim16.png ├── zim16.svg ├── zim22.png ├── zim22.svg ├── zim24.png ├── zim32.png ├── zim32.svg ├── zim48.png └── zim48.svg ├── maemo ├── README-BUILD-Maemo.txt ├── applications │ ├── fennec.desktop │ ├── hildon-mime-summon.desktop │ ├── microb.desktop │ ├── modest.desktop │ ├── opera.desktop │ └── tear.desktop ├── hildon-mime-summon.c ├── modest-mailto.sh └── zim-26x26.png ├── makeman.py ├── msgfmt.py ├── setup.py ├── test.py ├── tests ├── __init__.py ├── applications.py ├── attachmentbrowser.py ├── calendar.py ├── clipboard.py ├── config.py ├── data │ ├── byteordermark.txt │ ├── formats │ │ ├── README.txt │ │ ├── equation001.tex │ │ ├── export.html │ │ ├── export.markdown │ │ ├── export.rst │ │ ├── export.tex │ │ ├── parsetree.xml │ │ ├── plain.txt │ │ ├── update.sh │ │ └── wiki.txt │ ├── non-utf8.txt │ ├── notebook-list-old-format.list │ ├── notebook-wiki.xml │ ├── notebook.gjots │ └── templates │ │ └── html │ │ ├── Default.html │ │ └── Default │ │ ├── checked-box.png │ │ └── foo │ │ └── bar.png ├── datetimetz.py ├── environ.py ├── errors.py ├── export.py ├── formats.py ├── fs.py ├── gui.py ├── history.py ├── imagegenerators.py ├── index.py ├── inlinecalculator.py ├── insertsymbol.py ├── ipc.py ├── main.py ├── notebook.py ├── objectmanager.py ├── package.py ├── pageview.py ├── parsing.py ├── plugins.py ├── printtobrowser.py ├── quicknote.py ├── search.py ├── signals.py ├── stores.py ├── tableofcontents.py ├── tags.py ├── tasklist.py ├── templates.py ├── translations.py ├── utils.py ├── versioncontrol.py ├── widgets.py └── www.py ├── tools ├── build_website.sh ├── class_tree.py ├── clean.py ├── dump_clipboard.py ├── extract_dependencies.py ├── extract_translator_comments.py ├── generate_test_notebook.py ├── import-launchpad-translations.py ├── internationalizer.py ├── list_TODO_FIXME_tags.sh ├── package_test_data.py ├── replace_in_all_files.py ├── test_website.py ├── time_parsing.py ├── xdot_tree.py └── xgettext.sh ├── translations ├── ca.po ├── cs.po ├── da.po ├── de.po ├── el.po ├── en_GB.po ├── es.po ├── et.po ├── fr.po ├── gl.po ├── he.po ├── hu.po ├── it.po ├── ja.po ├── ko.po ├── nb.po ├── nl.po ├── pl.po ├── pt_BR.po ├── ro.po ├── ru.po ├── sk.po ├── sl.po ├── sr.po ├── sv.po ├── tr.po ├── uk.po ├── zh_CN.po ├── zh_TW.po └── zim.pot ├── website ├── files │ ├── favicon.ico │ ├── images │ │ ├── bullet.png │ │ ├── globe.png │ │ ├── invade_your_desktop.png │ │ ├── os-ubuntu.png │ │ ├── os-windows.gif │ │ ├── package-x-generic.png │ │ ├── zim.png │ │ ├── zim32.png │ │ └── zim64.png │ ├── screenshots │ │ ├── thumbs │ │ │ ├── zim-calendar-embedded.png │ │ │ ├── zim-calendar.png │ │ │ ├── zim-equation-editor.png │ │ │ ├── zim-image-open.png │ │ │ ├── zim-minimal.png │ │ │ ├── zim-normal.png │ │ │ ├── zim-tasklist.png │ │ │ └── zim-versions.png │ │ ├── zim-calendar-embedded.png │ │ ├── zim-calendar.png │ │ ├── zim-equation-editor.png │ │ ├── zim-image-open.png │ │ ├── zim-minimal.png │ │ ├── zim-normal.png │ │ ├── zim-tasklist.png │ │ └── zim-versions.png │ └── zim.css ├── pages │ ├── contact.txt │ ├── contribute.txt │ ├── development.txt │ ├── donations.txt │ ├── downloads.txt │ ├── index.txt │ ├── install.txt │ ├── notebook.zim │ ├── screenshots.txt │ └── translations.txt └── template.html ├── windows ├── README-BUILD-win32.txt ├── build_win32.py ├── create-zim-setup.nsi └── src │ ├── App │ └── readme.txt │ ├── AppInfo │ ├── Launcher │ │ ├── Custom.nsh │ │ ├── ZimDesktopWikiPortable.ini │ │ └── splash.jpg │ ├── appicon_128.png │ └── appinfo.ini │ ├── Other │ ├── Help │ │ └── images │ │ │ └── globe_64.png │ └── Source │ │ ├── AppNamePortable.ini │ │ ├── LICENSE.txt │ │ └── readme.txt │ ├── help.html │ ├── hicolor-icon-theme__index.theme │ ├── registerExtension.nsh │ └── zim-logo-big.bmp ├── xdg ├── hildon │ └── zim.desktop ├── zim.desktop └── zim.xml ├── zim.py └── zim ├── __init__.py ├── actions.py ├── applications.py ├── base.py ├── command.py ├── config ├── __init__.py ├── basedirs.py ├── dicts.py └── manager.py ├── datetimetz.py ├── environ.py ├── errors.py ├── exporter.py ├── formats ├── __init__.py ├── __main__.py ├── html.py ├── latex.py ├── markdown.py ├── plain.py ├── rst.py └── wiki.py ├── fs.py ├── gui ├── __init__.py ├── applications.py ├── clipboard.py ├── customtools.py ├── exportdialog.py ├── notebookdialog.py ├── pageindex.py ├── pageview.py ├── pathbar.py ├── preferencesdialog.py ├── propertiesdialog.py ├── recentchangesdialog.py ├── searchdialog.py ├── server.py ├── templateeditordialog.py └── widgets.py ├── history.py ├── inc ├── __init__.py ├── arithmetic.py └── xdot.py ├── index.py ├── ipc.py ├── main.py ├── notebook.py ├── objectmanager.py ├── parser.py ├── parsing.py ├── plugins ├── __init__.py ├── arithmetic.py ├── attachmentbrowser.py ├── backlinkpane.py ├── base │ ├── __init__.py │ └── imagegenerator.py ├── calendar.py ├── diagrameditor.py ├── distractionfree.py ├── ditaaeditor.py ├── equationeditor.py ├── gnu_r_ploteditor.py ├── gnuplot_ploteditor.py ├── inlinecalculator.py ├── insertsymbol.py ├── linesorter.py ├── linkmap.py ├── printtobrowser.py ├── quicknote.py ├── scoreeditor.py ├── screenshot.py ├── sequencediagrameditor.py ├── sourceview.py ├── spell.py ├── tableofcontents.py ├── tags.py ├── tasklist.py ├── trayicon.py ├── versioncontrol │ ├── __init__.py │ ├── bzr.py │ ├── git.py │ └── hg.py └── zeitgeist-logger.py ├── search.py ├── signals.py ├── stores ├── __init__.py ├── files.py ├── memory.py └── xml.py ├── templates.py ├── utils.py └── www.py /.bzrignore: -------------------------------------------------------------------------------- 1 | ./build 2 | ./dist 3 | ./tmp* 4 | ./.coverage 5 | *,cover 6 | *.bak 7 | ./zim/_version.py 8 | ./MANIFEST 9 | **/.zim 10 | .coverage* 11 | ./coverage 12 | ./tests/tmp 13 | ./doxygen 14 | ./bin 15 | ./locale 16 | ./debian/pycompat 17 | ./man 18 | ./html 19 | ./apidocs 20 | ./windows/build 21 | ./windows/version-and-date.nsi 22 | ./xdg/hicolor 23 | test_report.html 24 | ./NOTES.txt 25 | ./NOTES 26 | -------------------------------------------------------------------------------- /HACKING/Compatibility.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Sat, 04 Apr 2009 10:53:24 +0200 4 | 5 | ====== Compatibility ====== 6 | 7 | 8 | ===== Changes from zim < 0.42 ===== 9 | We depend on Gtk+ >= 2.6 instead of >= 2.4 10 | 11 | === Config files === 12 | * ... 13 | * Backward compatibility with files like notebook.list / repositories.list ? 14 | * Removed profile options - use different XDG dirs if needed 15 | 16 | === Templates === 17 | * Templates now use "[%-" and "-%]" to remove linebreaks around tags 18 | 19 | === File links === 20 | * Dropped backward support for linking images in same namespace as dir with "./" now only works with "../" while "./" is reserved for attachments. 21 | * Made paths starting with '/' always refer to the document root. Absolute paths now always need the file:// syntax. (Only in the case where a notebook really doesn't have a directory will the document root default to the filesystem root.) 22 | -------------------------------------------------------------------------------- /HACKING/Config_Files.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Thu, 09 Apr 2009 21:23:30 +0200 4 | 5 | ====== Config Files ====== 6 | 7 | Zim uses several config files for different kinds of data: 8 | 9 | **XDG_CONFIG_HOME/zim/preferences.conf** 10 | This file is used for all kinds of settings that are constant across notebooks. Mainly contains the contents of the "preferences" dialog and some hidden settings. Can be accessed in the code as ... FIXME 11 | 12 | If this file does not exist a default will be looked for first in the XDG_CONFIG_DIRS and then in the XDG_DATA_DIRS. 13 | 14 | **NOTEBOOK/notebook.zim** 15 | Used to save notebook specific settings. This file has the same format as the other ".conf" files, but the extension ".zim" is used so we can have our own mimetype (application/x-zim-notebook). When we configure zim as the default application for this mimetype we get to open notebooks by clicking on this file in the notebook. Can be accessed in the code as ... FIXME 16 | 17 | **NOTEBOOK/.zim/state.conf** 18 | Used for state parameters that are specific per notebook but do not belong to the notebook configuration. E.g. the window size, the last template used for export etc. We want to keep these out of notebook.zim because when the notebook is for example under version control, we do not want notebook.conf to change after every usage of zim. Can be accessed in the code as ... FIXME 19 | 20 | The files in NOTEBOOK/.zim/ can also be saved in XDG_CACHE/notebook_path/ when the notebook is read-only. 21 | 22 | **XDG_CONFIG_HOME/zim/accelmap** 23 | Specifies the key bindings for menu items if these are customized. Format is a scheme variant used byt gtk. can be loaded and saved by ''gtk.accel_map_load()'' and ''gtk.accel_map_save()'' respectively. 24 | 25 | If this file does not exist a default will be looked for first in the XDG_CONFIG_DIRS and then in the XDG_DATA_DIRS. 26 | 27 | **XDG_CONFIG_HOME/zim/style.conf** 28 | Specifies the look of the various text styles in the GUI. 29 | 30 | If this file does not exist a default will be looked for first in the XDG_CONFIG_DIRS and then in the XDG_DATA_DIRS. 31 | -------------------------------------------------------------------------------- /HACKING/Development_Tools.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2011-07-12T19:09:49+02:00 4 | 5 | ====== Development tools ====== 6 | 7 | We use the following resources to communicate on zim development" 8 | 9 | **Bug tracker:** 10 | https://bugs.launchpad.net/zim 11 | Also for feature requests 12 | 13 | **Development wiki:** 14 | http://www.zim-wiki.org/wiki/ 15 | Has e.g. the planning for some of the developers 16 | 17 | **Mailing list:** 18 | https://launchpad.net/~zim-wiki 19 | For all your questions 20 | 21 | 22 | ===== Working with Bazaar ===== 23 | The zim code is kept under version control using the bazaar version control system. See the website for documentation on using this system: http://bazaar.canonical.com/en/ 24 | 25 | The quick course, to get a copy of the zim code: 26 | 27 | ''' 28 | bzr branch lp:zim 29 | ''' 30 | 31 | To check in some changes (don't forget to give some meaningful changelog) 32 | 33 | ''' 34 | bzr add 35 | bzr commit 36 | ''' 37 | 38 | 39 | To create a patch that can be mailed: 40 | 41 | ''' 42 | bzr send -o some-description.patch 43 | ''' 44 | 45 | Alternatively you can publish your branch directly on the launchpad website and file a merge proposal. 46 | 47 | ===== Development scripts ===== 48 | When you are working with the development code check the folder "''./tools/''" for some useful scripts. 49 | -------------------------------------------------------------------------------- /HACKING/Formats_modules.txt: -------------------------------------------------------------------------------- 1 | 2 | TODO: more info about writing format modules 3 | 4 | Each module in zim.formats should contains exactly one subclass of DumperClass and exactly one subclass of ParserClass (optional for export formats). This includes imports, so do not import other classes that derive from these base classes directly into the module. When zim loads the format it finds the correct parser and dumper classes by looking at the base class of each class object. 5 | 6 | -------------------------------------------------------------------------------- /HACKING/Ideas/Attachments.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Attachments ====== 5 | Created Friday 18 December 2009 6 | 7 | Attachments live in the same folder as the notes. This limits the use of text files as attachments as zim will confuse them for pages and try to open them. Sometimes that is not an issue other times it may fail. 8 | 9 | To distinguish better between notes and attachments we could check the content, e.g. match on the header of a note. However this may have the disadvantage that we have a name conflict between page names and attachment names. 10 | 11 | Alternatively we can use a special file extension for zim (like .zim or .zim.txt). This has been discussed extensively, but no consensus reached. Also this can not for 100% exclude the possibility of conflicts. 12 | 13 | So we need to be able to deal with conflicts anyway. In that case checking page contents is not a bad idea. Would need a property for this behavior for backward compatibility. Maybe even a user visible property "all text files are pages". 14 | 15 | 16 | Useful features when we implement an attachment manager 17 | * Rename, Move, Delete 18 | * Create from template (like filebrowser) 19 | * Open with application - would need vfs or check out + modify + checkin ? 20 | 21 | 22 | Another issue with attachments is that we can generate a lot of orphaned attachments, e.g. due to the equation editor. Tool to clean up all unlinked attachments could be useful. 23 | 24 | -------------------------------------------------------------------------------- /HACKING/Ideas/Export_OpenOffice.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Export OpenOffice ====== 5 | Created Wednesday 23 December 2009 6 | 7 | * just zip file with XML, could handle it with etree library - but even easier as plain text 8 | * use template, open zip file, look for template instructions, fill them in 9 | * Need OO specific XML output - see: http://books.evc-cit.info/odbook/book.html 10 | 11 | While at it create base class for import / export xml formats 12 | * have a map with 1-to-1 translations 13 | * allow methods for specific tags that need conversion logic 14 | * import can ignore unknown tags (optional ?) 15 | 16 | -------------------------------------------------------------------------------- /HACKING/Ideas/Forms.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Wed, 24 Jun 2009 23:45:10 +0200 4 | 5 | ====== Forms ====== 6 | Created Wednesday 24 June 2009 7 | 8 | Clearly we need per page templates. To be able to edit these from zim they should be valid wiki pages. This is possible because we can include template instructions without problem. 9 | 10 | Open issue: how to layout forms with gtk entries as input in wiki ? Maybe just consider these embedded widgets and use some kind of "insert form" menu item to create them ? 11 | 12 | Would be able to use definition lists like "author:: foo" or similar, but would not allow e.g. right aligned image next to fields. 13 | 14 | Open issue: how to set initial cursor position ? 15 | -------------------------------------------------------------------------------- /HACKING/Ideas/Inline_Latex.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Unknown 4 | 5 | ====== Inline latex ====== 6 | Created Tuesday 24 March 2009 7 | 8 | Need support for inline objects that render images on the fly 9 | 10 | Object contains latex code, takes MD5, does a lookup in .zim/images/ 11 | If the image does not exist it is generated by calling latex and 12 | dvi2png and saves under MD5 13 | 14 | Same can be done for equation edited with the equation editor 15 | 16 | Advantage is that copying an equation will do the copy on write for 17 | the image automatically. 18 | 19 | Define a cleaning action, e.g. when re-building the index, which 20 | removes all these cached images 21 | Also when editing with the editor it can clean up previous image (even 22 | if it is used elsewhere it will be re-created anyway when needed) 23 | 24 | Same appraoch can be used for e.g. for graphs and diagrams. 25 | Abstract the generator such that same editor dialog can serve for 26 | different inline formats 27 | Editor should use gtksourceview when available... 28 | 29 | Alternative the editor should allow saving as an external file by 30 | specifying a name, link as object, not as image. But allow image link 31 | for backward compatibility. 32 | 33 | Also for external files we can save the image by MD5 sum. 34 | 35 | 36 | * How to mark inline blocks in the wiki source ? 37 | * Support "$$ ... $$" for latex formulas ? 38 | * Support some block construct like "''{{{ latex\n ... \n}}}\n''" 39 | * distuinguise from block of latex for syntax highlighting ... 40 | * research wikipedia and creole syntax for such a block 41 | * How to trigger image generation when rendering the page ? 42 | * How to trigger image generation or copying when e.g. exporting to HTML ? 43 | 44 | 45 | -------------------------------------------------------------------------------- /HACKING/Ideas/Parse_Tree.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Parse Tree ====== 5 | Created Wednesday 23 December 2009 6 | 7 | Make our internal format more HTML like. Still want to keep whitespace within paragraphs - encoding every extra space, tab and newline with an extra tag seems silly. So make every paragraph like a
8 | 9 | However for spaces between paragraphs we maybe need to be more flexible - rendering html now gets too many additional
elements. Use hint for number of newlines like with perl version ? Have parsetree builder clean up redundant whitespace after heading etc. Wrap everything in para elements to make structure more clear. (and properly nest list elements) 10 | 11 | How about indented part within a paragraph? Probably should use generic block element for this. Now it could be seen as a separate para, what is not necessarily what we want. 12 | 13 | Also Use "i" and "b" instead of "emphasis" and "strong" ?? 14 | -------------------------------------------------------------------------------- /HACKING/Ideas/Profiles.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Thu, 06 Aug 2009 18:40:25 +0200 4 | 5 | ====== Profiles ====== 6 | Created Thursday 06 August 2009 7 | 8 | If we want preferences per notebook the right way to go would be by using profiles. This allows grouping notebooks which will share the same preferences set. Also different users can still have different preferences for the same notebook. 9 | 10 | * notebook has a "profile" name 11 | * each profiles has it's own preferences file 12 | * if the profiles doesn't exist, copy default 13 | -------------------------------------------------------------------------------- /HACKING/Ideas/SavedSearch.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Thu, 30 Jul 2009 21:37:25 +0200 4 | 5 | ====== SavedSearch ====== 6 | Created Thursday 30 July 2009 7 | 8 | Saved Search would be generic interface used for e.g. by [[Task List]] plugin or a [[Tags]] plugin. It would use a table in the index database to account which page matches what search. This table would be updated all the time by hooking the queries into updates of the database. 9 | 10 | Need a way to hook query objects to the index update routines and then get pages that matched the query from the index. 11 | 12 | As a seperate feature it would be nice to have special pages, which are read-only and have links to all matches. Or should this go into a special UI element, e.g. in the side pane ? 13 | 14 | ===== Implementation ===== 15 | * Add two tables 16 | * one joining page ids and property ids 17 | * one mapping property names to ids 18 | * Have a method to register queries versus 19 | * Each query determines the match for a single property name 20 | * Optimise search to use these properties 21 | * Special keyword 22 | 23 | E.g. the task list could register the "has_tasks" property, or even "has_tasks" and "has_open_tasks" 24 | And the tags plugin could register a property "tag_foo" for a tag "@foo". 25 | Special saved search pages would have a property name like "matches_search001" 26 | etc. 27 | 28 | In SQL we can query multiple properties at the same time using the "INTERSECT" operator. 29 | 30 | 31 | -------------------------------------------------------------------------------- /HACKING/Ideas/Search.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Thu, 30 Jul 2009 22:06:16 +0200 4 | 5 | ====== Search ====== 6 | Created Thursday 30 July 2009 7 | 8 | * search should be able to find orphaned pages 9 | * idem for non-existent pages (linked but non existing) 10 | * allow search query for all backlinks to a namespace recursively (tags plugin) 11 | 12 | Once we have support for complex search queries we should use this to define selections of pages. These are basically saved searches. E.g. "all pages linked by ":index" or "all pages linking to :tag:favourite". 13 | 14 | * We can use selections to define a group of pages for export. 15 | * We can use selections to filer in the TODOList dialog. 16 | 17 | Typical use cases: 18 | * Look for pages matching a word 19 | * Look for page matching a word in a certain namespace 20 | * Look for back links 21 | 22 | Advanced use cases 23 | * Look for pages that are not linked from anywhere 24 | * Look for dead links 25 | 26 | Since we also want to use search queries to collect pages for export it also makes sense to be able to list all pages linked by a certain page. 27 | 28 | ===== Syntax ===== 29 | 30 | See Usage:Searching for query syntax description. 31 | 32 | Inspiration for syntax from http://xesam.org/main/XesamUserSearchLanguage 33 | 34 | Main points are: 35 | * Be easy and simple to use 36 | * Any Google-like search should do the expected 37 | * Don't cater for complex queries (hence sub-queries/braces are left out) 38 | 39 | So just 3 logical ops: AND, OR and NOT and some aliases (and, &&, +, or, ||, -). No grouping or sub-queries and only one quoting style. Only difference is that we need a space after a field selector because page names can also contain ":". 40 | 41 | For the average user the complexity allow by the current syntax will be more than enough. 42 | 43 | ===== Suggestions ===== 44 | * Use proximity to set ranking (e.g. all terms less than 20 words apart and less than 50 words apart) 45 | 46 | -------------------------------------------------------------------------------- /HACKING/Ideas/Separate_Window.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Separate Window ====== 5 | Created Wednesday 23 December 2009 6 | 7 | * Need to be able to manage multiple pageviews 8 | * make sure we handle all by signals 9 | * ui needs to track open pages instead of single page attribute -> check who accesses ui.page 10 | * pageviews should coordinate to use the same model if they open the same page 11 | * Need class for secondairy window + own menubar / toolbar definition 12 | * Need option to split the window (horizontal / vertical) - once or multiple times ? 13 | * Need to decide up front how this combines with overloading pageview for special page types 14 | 15 | Quick hack would be to have separate windows that are strictly read-only and open links in the main window. 16 | -------------------------------------------------------------------------------- /HACKING/Ideas/Spell_Checking.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Spell Checking ====== 5 | Created Sunday 29 November 2009 6 | 7 | Problem: Getting language config per notebook / page / paragraph correct is difficult - most office suites this is still a sore point 8 | 9 | Solution: Instead of specifying the language determine it by heuristics 10 | 11 | * Installed dictionaries are probably the language the user is likely to use 12 | * gtkspell has access to both the dictionaries and the text buffer 13 | * Heuristics can determine language per paragraph or even per sentence. Just lookup in multiple dictionaries and take language with least errors... 14 | * Pango has function to detect begin & end of paragraph or sentence 15 | * As a further refinement e.g. quoted words can be supposed to be in an other language 16 | * Popup menu for spell suggestions should indicate the language it thinks we are using. 17 | 18 | This would properly belong in the gtkspell library, so all gtk application can benefit. Gtkspell3 is dead in the water (see mailing list archive / cvs history) - so gtkspell2 is the proper target. 19 | 20 | Gtkspell uses enchant, which manages the dictionary backends. So gtkspell is just the abstraction layer between gtktextbuffer and enchant. 21 | 22 | If we want to prototype without modifying gtkspell, we should re-implement the gtktextbuffer interaction and interface with enchant directly. Need to check if pyEnchant bindings are functional. If this works it would still be nice for the community to patch gtkspell itself as well, so others can benefit. 23 | 24 | Give Bert credits for the radical idea of getting rid of language as a document option. 25 | 26 | 27 | Note: the latest version of gtkspellcheck seems to add a menu to switch languages. This is a good idea as well, to be able to force a certain dictionary to be used. This in part removes the urgency of fixing detailed language settings in zim notebooks. 28 | -------------------------------------------------------------------------------- /HACKING/Ideas/Storage.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Thu, 30 Jul 2009 21:34:55 +0200 4 | 5 | ====== Storage ====== 6 | Created Thursday 30 July 2009 7 | 8 | Ideas for new storage formats. Also see [[Attachments]] 9 | 10 | Formatting 11 | * Markdown 12 | * Mediawiki 13 | * Dokuwiki 14 | 15 | Storage 16 | * IMap 17 | * Mediawiki remote interface ? 18 | * Dokuwiki RPC interface 19 | 20 | Alternatively any storage that can be mounted through e.g. a fuse layer will just work out of the box. But may need to adjust directory layout details for other wiki types. 21 | 22 | Pages are abstract enough that any remote storage will work. However we do not include a full file manager for attachments (yet). So to make a truly remote some work would be needed to manage remote attachments as well. 23 | 24 | So we need to be able to deal with conflicts anyway. In that case checking content is not a bad idea. Have a notebook property to flag for backward compatibility and have a user visible property "all text files are pages" so peopel can choose depending on their usage. Woudl also need a one time upgrade action for old notebooks. 25 | -------------------------------------------------------------------------------- /HACKING/Ideas/Synchronization.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Synchronization ====== 5 | Created Friday 18 December 2009 6 | 7 | Multiple ways to do synchronisation 8 | * Version control push / pull (bazaar, subversion, git ...) 9 | * rsync, unison, ... 10 | * email 11 | * webmail (e.g. gmail) 12 | * dedicated http / webdav server 13 | 14 | The first two options are preferred because we can leave all the hassle of doing the actual sync or merge to a specialized program. 15 | 16 | Would need a trigger to determine when to sync. Probably the same as for autosaving a version in version control. E.g. when leaving the program, daily, weekly, on an explicit user action. 17 | 18 | Would like a generic plugin for this similar to versioncontrol and probably integrated with it when both are loaded. THe synchronization plugin could handle various backends. 19 | 20 | Would be nice if we can syncronize by sending diffs to email. 21 | * You don't have to have a server online (and webmail accounts are cheap) 22 | * If you can send the email through HTTP including proxy settings you can work from any network without to much hassle 23 | I think bazaar can generate the diffs. 24 | -------------------------------------------------------------------------------- /HACKING/Ideas/Tags.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Tags ====== 5 | 6 | One way to work with tags is to link pages to a special tag page and use back links to track all pages that have this tag. The main thing a tag plugin would do is add UI elements for this way of working. 7 | 8 | * Autocomplete tags, e.g. drop down if you type "@" with known tags 9 | * Autolink tags when they are typed 10 | * Make tag pages really special and autogenerate them with a list of links 11 | * This could be build on top of [[SavedSearch]] 12 | * Tag based side pane view to replace hierarchy view 13 | * This would mean caching tags per page in the index database 14 | * Integrate tags better in the search dialog ? 15 | * special key word - register it somewhere and use property table from [[SavedSearch]] 16 | * Integrate tags better in the Task List dialog ? 17 | * apply page tag to all tasks in that page ?? might be confusing 18 | * Add a tag cloud somewhere ? 19 | 20 | Really need good interface to browse by tag - especially for photos 21 | 22 | 23 | --- 24 | As an alternative, how about adding an entry on the bottom of the page for listing tags ? 25 | Separate them from content, but add them as special links in properties / contents 26 | Have an "+" icon that shows a popup of known tags 27 | Might work nicer 28 | 29 | -> Disadvantage is that the tags are no longer part of the text. E.g. several sections in the same page can have their own tags. If the page later gets split up, the tags go with the text, not stay with the original page. 30 | -------------------------------------------------------------------------------- /HACKING/Ideas/Templates.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Thu, 30 Jul 2009 21:37:50 +0200 4 | 5 | ====== Templates ====== 6 | 7 | Store page templates in notebook _templates/wiki - can always extend later for global templates etc. 8 | 9 | Add drop down to "New page" dialog 10 | 11 | Add menu item "tools -> set template" which is only active when the 12 | page is not saved yet 13 | 14 | Add menu item "tools -> edit templates" just open directory - worry about UI control later 15 | -------------------------------------------------------------------------------- /HACKING/Ideas/Transclusion.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2010-02-01T21:44:14.249245 4 | 5 | ====== Transclusion ====== 6 | Created Monday 01 February 2010 7 | 8 | **Problem**: 9 | How to incorporate non-wiki text in a wiki page 10 | 11 | **Examples**: 12 | Embedded code snippets, with syntax highlighting 13 | Embedded views for external files, e.g. code or logs or .. 14 | 15 | **Concepts**: 16 | Embedded text: source is stored within the wiki page itself 17 | Embedded view: source is stored externally - transclusion 18 | Images are an example of external files that are viewed in the page, 19 | but are not stored in the wiki page. 20 | For the equation editor we also want embedded latex, but still render as image 21 | 22 | **Details**: 23 | Some code for including arbitrary source types, ''{{{mimetype\n...\n}}}'' 24 | Some code for including files ''{{file}}'' (like images, but for 25 | non-image mimetypes as well) 26 | Generic container for these parts in the parse tree - probably one 27 | container type for all mimetype, including images 28 | Pageview should support embedded widgets (not just pixbufs) (also wrap 29 | images in a widget ?) 30 | Any image file can be rendered by default as it is now 31 | Any text file can be rendered with a gtksourceview 32 | For included text add some methods to open the file with an external 33 | program (same as for images) 34 | Have a method to register mimetype handlers, e.g. for rendering equations 35 | Each object type also need some code for exporting, fallback to either 36 | text or image 37 | 38 | Bonus would be to detect changes in the source file and refresh the 39 | object in real time 40 | Could check on regular intervals, but maybe adds to much IO overhead 41 | 42 | **Other** 43 | Equation rendering handler would compute md5 of text and use that as 44 | basis for image name, put it in a cache directory 45 | Handler for equations should play nicely with latex export, but 46 | produce image for any other export type 47 | -------------------------------------------------------------------------------- /HACKING/Limitations.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Sat, 04 Apr 2009 10:58:28 +0200 4 | 5 | ====== LIMITATIONS ====== 6 | 7 | Main assumption about the whole file handling and page rendering is that files are small enough that we can load them into memory several times. This seems a valid assumption as notebooks are spread over many files. Having really huge files with contents is outside the scope of the design. If this is what you want to do, you probably need a more heavy duty text editor. 8 | -------------------------------------------------------------------------------- /HACKING/Release_checklist.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2010-03-24T21:47:03.883720 4 | 5 | ====== Release checklist ====== 6 | 7 | Preliminary: 8 | * Go over all bugs in the tracker to check if status is still correct, any new patches are attached 9 | * Also check bugs in the debian bug tracker 10 | * Announce to mailing list what day the release will be, so translaters can update their translations 11 | 12 | **Don't allow any last minute patches on the same day as the release -- stupid mistakes will happen and force a bug fix release the next day.** 13 | 14 | Merge translations: 15 | * Request download from launchpad 16 | * Merge it with ''tools/import-launchpad-translations.py'' 17 | 18 | Prepare the package: 19 | * Set version in ''zim/__init__.py'' 20 | * Update CHANGELOG.txt -- see `''bzr visualize''` for changes 21 | * Update debian changes -- run e.g. `''debchange -v 0.46''` 22 | * Optionally merge branch with website updates since previous release 23 | * Update version number in website downloads page 24 | 25 | Check the package: 26 | * `''./setup.py sdist''` (updates meta data etc.) 27 | * `make builddeb` and check `''lintian -Ivi ../zim_0.46_i386.changes''` 28 | * Test website with ./tools/test_website.py 29 | * Run `''make clean''` and check `''bzr st''` for any remaining build files 30 | 31 | Finalize the revision: 32 | * run ''./test.py'' for the last time 33 | 34 | * commit + tag + push 35 | 36 | Build release packages: 37 | * `''./setup.py sdist''` (updates meta data etc.) 38 | * `''make builddeb''` + `''make clean''` 39 | * ''./tools/build_website.sh'' 40 | 41 | ~~Publish to launchpad PPA:~~ 42 | * ~~debuild -S -kB3223C82~~ 43 | * ~~dput ppa:jaap.karssenberg/zim ../zim_XX_sources.changes~~ 44 | 45 | * Update build recipe for PPA with latest tag 46 | * Request build for PPA with releases 47 | 48 | Publish the release: 49 | * Upload website 50 | * Upload tar.gz and deb packages 51 | * Write release notes 52 | * Announce on freshmeat 53 | * Announce on launchpad 54 | * ~~Announce on gnome files~~ 55 | * Announce on mailing list 56 | 57 | 58 | ~~For snapshots~~ 59 | * ~~`./setup.py sdist` to update build meta data~~ 60 | * ~~debchange -v 0.50-SNASPSHOT-r359~~ 61 | * ~~debuild -S -kB3223C82~~ 62 | * ~~lintian -Ivi ../zim_0.46_i386.changes~~ 63 | * ~~dput ppa:jaap.karssenberg/zim-snapshots ../zim_XX_sources.changes~~ 64 | 65 | 66 | ~~To check version numbering is OK use: ~~ 67 | 68 | ~~dpkg --compare-versions "0.51" gt "0.50-SNAPSHOT-r345" && echo OK~~ 69 | -------------------------------------------------------------------------------- /HACKING/Signals.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-07-14T11:54:59+02:00 4 | 5 | ====== Signals ====== 6 | 7 | Keep in mind that with each "connect" an object reference is created. The reference is kept by the object that is being connected to and is only broken when that object is being destroyed. So if you do 8 | 9 | ''object_A.connect('some-signal', object_B.some_method)'' 10 | 11 | then object_B will not be destroyed as long as object_A is alive. On the other hand, if object_A is destroyed, object_B simply doesn't get any signals anymore. 12 | 13 | This seems not to be a problem when you e.g. connect a button signal within a dialog object. Reason is probably that the circular reference is broken when the dialog is destroyed. 14 | 15 | But it is a problem when e.g. a dialog connects to an external object, or a plugin connect to the main interface objects. In those cases signals need to be explicitly disconnected when you close the dialog or remove the plugin. See the ''ConnectorMixin'' class in ''zim.signals''. 16 | 17 | A special not about **connect_object**. In the Python API it looks like this method is only intended to swap the object argument when calling the callback, however in the C API it is mentioned that this method also results in an additional object reference and it has a bug in current versions with cleaning up those references. So it is better avoided. 18 | -------------------------------------------------------------------------------- /HACKING/Start.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Unknown 4 | 5 | ====== HACKING ====== 6 | These notes contains general development documentation on zim. 7 | 8 | ===== Contents ===== 9 | * [[Development tools]] 10 | * [[Coding Style & Guidelines]] 11 | * [[Signals]] 12 | * [[Writing plugins]] 13 | * [[Test Suite]] 14 | 15 | * [[Compatibility]] 16 | * [[Config Files]] 17 | * [[Limitations]] 18 | * [[Parse Tree]] 19 | 20 | * [[Release checklist]] 21 | 22 | ===== Other documentation ===== 23 | Detailed API documentation is part of the source code in the form of python doc strings. To generate a full set of API docs install "[[http://epydoc.sourceforge.net/|epydoc]]" and run "''make epydoc''" in the zim source dir 24 | 25 | And of course any information about the usage of the application can be found in the user manual which can be found in [[~/code/pyzim-trunk/data/manual|../../data/manual]]. 26 | 27 | To find information online check our website at http://zim-wiki.org 28 | -------------------------------------------------------------------------------- /HACKING/Store_modules.txt: -------------------------------------------------------------------------------- 1 | 2 | TODO: more info about writing format modules 3 | 4 | Each module in zim.stores should contains exactly one subclass of StoreClass. This includes imports, so do not import other classes that derive from this base class directly into the module. When zim loads the store it finds the correct store class by looking at the base class of each class object. 5 | 6 | -------------------------------------------------------------------------------- /HACKING/Test_Suite.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2011-05-13T23:18:07+02:00 4 | 5 | ====== Test Suite ====== 6 | 7 | Zim comes with a full test suite, it can be executed using the "''test.py''" script. See "''test.py --help''" for it's commandline options. 8 | 9 | It is good practice to run the full suite before committing to a development branch and especially before generating a merge request. This should ensures the new patch doesn't break any existing code. 10 | 11 | For any but the most trivial fixes test cases should be written to ensure the functionality works as designed and to avoid breaking it again at a later time. You'll surprise how often the same bug comes back after some time if there is now test case is in place to detect it. Some bugs are just waiting to happen again and again. 12 | 13 | For writing tests have a look at the existing test code or check the documentation for the "unittest" module in the python library. (For python versions < 2.7 we use the "unittest2" module, which backports some new features for older python versions.) 14 | 15 | A most useful tool for developing tests is looking at test **coverage**. When you run "''test.py''" with the "''--coverage''" option the "coverage" module will be loaded and a set of html pages will be generated in "''./coverage''". In these pages you can see line by line what code is called during the test run and what lines of code go untested. It is hard to really get to 100% coverage, but the target should be to get the coverage above at least 80% for each module. 16 | 17 | If you added e.g. a new class and wrote a test case for it have a look at the coverage to see what additional tests are needed to cover all code. 18 | 19 | Of course having full coverage is no guarantee we cover all possible inputs, but looking at coverage combined with writing tests for reported bugs makes a strong test suite. Even if the test suite only catches the most simple bugs that users would see when first using the application it is worth the effort. 20 | -------------------------------------------------------------------------------- /HACKING/Translation_Guidelines.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-09-30T13:08:38+02:00 4 | 5 | ====== Translation Guidelines ====== 6 | 7 | 8 | ===== Italian ===== 9 | A few remarks for Italian contributors. Please notice that these choices were made earlier and we should respect them in order to assure consistency. It doesn't mean that they're better than others. It's a just matter of stop discussing and choosing one option instead of another. :) 10 | 11 | plugin = estensione 12 | Please... = si elimina sempre 13 | pane = pannello (non riquadro) 14 | zim = lo mettiamo sempre in maiuscolo, Zim 15 | 16 | //Mailing list post by Marco Cevoli, Aug 29, 2012// 17 | -------------------------------------------------------------------------------- /HACKING/Unicode.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2013-04-08T20:55:50+02:00 4 | 5 | ====== Unicode ====== 6 | 7 | Zim uses unicode everywhere internally. 8 | 9 | ===== Encoding ===== 10 | 11 | Main interfaces where we need to encode / decode are: 12 | * File paths — platform and locale dependent — handled by ''zim/fs.py'' 13 | * File contents — default to utf-8 — handled by ''zim/fs.py'' 14 | * Gtk widgets — utf-8 — handle by ''zim/gui/widgets.py'' for standard widgets 15 | 16 | ===== Collation (sorting) ===== 17 | 18 | See ''zim/utils.py'' for unicode / locale aware sorting 19 | 20 | ===== Comparison ===== 21 | 22 | Some characters can be encoded either as a single character or as a combination of a base character with symbols above or below it. For example the Ü can be either the "U with umlaut" character, or a "U" followed by a "umlaut above previous character". While visually the same for the user these are different unicode strings that do not compare equally. 23 | 24 | There is a standard function to "normalize" unicode strings in the standard library "''unicodedata''" module. If we could standardize all strings after decoding, there would be less risk of comparisons failing. However strings identifying external resources, like file names, need to be in the same normalization as they are known to the outside world. Therefore we have to deal with normalization in specific places when comparing strings or looking up strings. 25 | 26 | Notable places to do this is: 27 | * When matching user input from a widget with a set of options 28 | * When looking up files from use input 29 | * ... ? 30 | -------------------------------------------------------------------------------- /HACKING/Usage/Document_Editing_and_Creative_Writing.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-12-11T19:21:55+01:00 4 | 5 | ====== Document Editing and Creative Writing ====== 6 | Created Tuesday 11 December 2012 7 | 8 | Manual snippet (Usage) 9 | 10 | If the same notebook contains both notes on the document and the polished text it is useful to be able to only export the polished text without the notes. In order to this one can either separate notes and final text in different namespaces or one can create an "index" page listing links to all the pages that are part of the final document. That way one can make the selection in the export dialog to only export the relevant sections. 11 | 12 | 13 | MISSING: export many pages to single document -- needed for latex export document 14 | MISSING: selection in export dialog based on index page as describe above -- needed for latex export document 15 | MISSING: custom ordering in a namespace -- MUST have 16 | -------------------------------------------------------------------------------- /HACKING/notebook.zim: -------------------------------------------------------------------------------- 1 | [Notebook] 2 | autosave_version=0 3 | document_root= 4 | home=:Start 5 | icon= 6 | name=HACKING 7 | slow_fs=False 8 | version=0.4 9 | 10 | -------------------------------------------------------------------------------- /HACKING/objects.dot: -------------------------------------------------------------------------------- 1 | digraph g { 2 | 3 | node [shape = box] 4 | 5 | main [shape = diamond] 6 | cgibin [label = "cgi-bin" shape = diamond] 7 | 8 | main -> GUIClient 9 | GUIClient -> GUIDeamon -> GtkInterface 10 | GtkInterface -> Notebook 11 | Notebook -> Page 12 | Notebook -> Namespace 13 | GtkInterface -> MainWindow 14 | MainWindow -> PageView 15 | MainWindow -> PageIndex 16 | 17 | main -> Server [label = "--server"] 18 | cgibin -> Handler -> WWWInterface 19 | Server -> WWWInterface 20 | WWWInterface -> Notebook 21 | Server -> ServerWindow [label ="--gui"] 22 | 23 | } 24 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | # Script and module files are included automatically 2 | # need to specify additional ditribution files here 3 | include *.py 4 | include *.txt 5 | include *.conf 6 | include Makefile 7 | graft translations 8 | graft data 9 | prune data/manual/.zim 10 | graft icons 11 | graft xdg 12 | prune xdg/hicolor 13 | graft cgi-bin 14 | graft contrib 15 | graft tests 16 | prune tests/tmp 17 | graft tools 18 | graft HACKING 19 | graft HACKING/.zim 20 | global-exclude *~ *.bak *.swp *.pyc 21 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | PYTHON=`which python` 2 | DESTDIR=/ 3 | BUILDIR=$(CURDIR)/debian/zim 4 | PROJECT=zim 5 | 6 | all: 7 | $(PYTHON) setup.py build 8 | 9 | help: 10 | @echo "make - Build sources" 11 | @echo "make test - Run test suite" 12 | @echo "make install - Install on local system" 13 | @echo "make source - Create source package" 14 | @echo "make buildrpm - Generate a rpm package" 15 | @echo "make builddeb - Generate a deb package" 16 | @echo "make epydoc - Generate API docs using 'epydoc'" 17 | @echo "make clean - Get rid of scratch and byte files" 18 | 19 | source: 20 | $(PYTHON) setup.py sdist $(COMPILE) 21 | 22 | test: 23 | $(PYTHON) test.py 24 | 25 | install: 26 | $(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE) 27 | 28 | buildrpm: 29 | $(PYTHON) setup.py bdist_rpm --post-install=rpm/postinstall --pre-uninstall=rpm/preuninstall 30 | 31 | builddeb: 32 | dpkg-buildpackage -i -I -rfakeroot 33 | $(MAKE) -f $(CURDIR)/debian/rules clean 34 | 35 | epydoc: 36 | epydoc --config ./epydoc.conf -v 37 | @echo -e '\nAPI docs are available in ./apidocs' 38 | 39 | clean: 40 | $(PYTHON) setup.py clean 41 | rm -rf build/ MANIFEST tests/tmp/ locale/ man/ xdg/hicolor test_report.html 42 | find . -name '*.pyc' -delete 43 | find . -name '*.pyo' -delete 44 | find . -name '*~' -delete 45 | rm -fr debian/zim* debian/files debian/python-module-stampdir/ 46 | -------------------------------------------------------------------------------- /cgi-bin/zim.cgi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright 2008 Jaap Karssenberg6 | # 7 | # This program is free software; you can redistribute it and/or modify 8 | # it under the terms of the GNU General Public License as published by 9 | # the Free Software Foundation; either version 2 of the License, or 10 | # (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program; if not, write to the Free Software 19 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | # MA 02110-1301, USA. 21 | 22 | '''Default cgi-bin script for zim. 23 | 24 | In order to use this you need to copy this script to your webserver's 25 | cgi-bin directory and edit the script to set the configuration. 26 | ''' 27 | 28 | from zim.config import data_dir 29 | 30 | config = { 31 | 'notebook': data_dir('manual'), 32 | #~ 'template': 'Default.html', 33 | } 34 | 35 | import logging 36 | 37 | logging.basicConfig(level=logging.INFO) 38 | 39 | from zim.www import WWWInterface 40 | from wsgiref.handlers import CGIHandler 41 | 42 | CGIHandler().run(WWWInterface(**config)) 43 | -------------------------------------------------------------------------------- /data/dates.list: -------------------------------------------------------------------------------- 1 | # List with date-time formats used for the 2 | # "Insert Date eand Time" dialog. 3 | # See man strftime a description of the format. 4 | %x 5 | %c 6 | %A %d/%m/%Y 7 | %A %d/%m/%Y %H:%M 8 | %A %d %B %Y 9 | [d: %Y-%m-%d] 10 | %Y-%m-%d 11 | -------------------------------------------------------------------------------- /data/globe_banner_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/globe_banner_small.png -------------------------------------------------------------------------------- /data/helpers/compare_files/meld.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Meld 3 | Exec=meld %F 4 | Terminal=false 5 | Type=Application 6 | Icon=meld 7 | MimeType=application/x-meld-comparison; 8 | StartupNotify=true 9 | Categories=GTK;Development; 10 | -------------------------------------------------------------------------------- /data/manual/Bugs.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Wed, 08 Jul 2009 23:26:35 +0200 4 | 5 | ====== Bugs ====== 6 | 7 | Bugs can be reported in the bug tracker at http://bugs.launchpad.net/zim. 8 | 9 | Please see the [[FAQ]] before filing a bug report. 10 | 11 | 12 | Bugs specific for maemo devices can be reported in the tracker on the maemo garage page at http://zim.garage.maemo.org 13 | -------------------------------------------------------------------------------- /data/manual/Help.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Wed, 08 Jul 2009 20:28:15 +0200 4 | 5 | ====== Help ====== 6 | 7 | Pages in this section contain help on using specific parts of the applications. 8 | 9 | **Contents:** 10 | 11 | Function by Menu Item 12 | * [[+Menu Items|Menu Items]] 13 | 14 | Organization 15 | * [[+Notebooks|Notebooks]] 16 | * [[+Pages|Pages]] 17 | * [[+Links|Links]] 18 | * [[+Tags|Tags]] 19 | 20 | Editing 21 | * [[+Key Bindings|Key Bindings]] 22 | * [[+Auto Formatting|Auto Formatting]] 23 | * [[+Check Boxes|Check Boxes]] 24 | 25 | Other functions 26 | * [[+Searching|Searching]] 27 | * [[+Export|Export]] 28 | 29 | Configuration 30 | * [[+Preferences|Preferences]] 31 | * [[+Properties|Properties]] 32 | * [[+Templates|Templates]] 33 | * [[+Automount|Automount]] 34 | * [[+Config Files|Config Files]] 35 | * [[+Default Applications|Default Applications]] 36 | 37 | Other topics 38 | * [[+Commandline Options|Commandline Options]] 39 | * [[+Wiki Syntax|Wiki Syntax]] 40 | * [[+Importing external files|Importing external files]] 41 | -------------------------------------------------------------------------------- /data/manual/Help/Attachments.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-07-18T23:27:53+02:00 4 | 5 | ====== Attachments ====== 6 | 7 | Pages can have attachments, these are e.g. image files for images that are part of the page, but can also be documents that are referred to in the page. 8 | 9 | Attachments are typically stored in the folder one level below the page with the text of the page. This folder can be opened with the menu item "//Tools → Open Attachments Folder//". To directly copy a file to the attachment folder and insert a link use the menu item "//Tools → Attach File//" 10 | 11 | Attachments can be created, modified, and deleted with regular applications. To link them in a zim page, just drag and drop from the window manager to the editor. 12 | 13 | **Note:** For images that are shown in the page, you may need to refresh the page before changes become visible. Use '' R'' or the menu item "//View → Reload//". 14 | 15 | **See also:** [[Plugins:Attachment Browser]] 16 | 17 | ===== File Templates ===== 18 | There is also a menu item "//Insert → New Attachment//". This item has a submenu that is based on a folder with file templates. Clicking any of the file templates will create a new attachment which is a copy of that file and insert a link to the new attachment, or, if it is an image, inserts it as an image. This is a convenient way to create new documents in the notebook and start editing them. The file is not opened directly, so to start editing you need to click the link or right click on the image. 19 | 20 | By default the folder where the templates are located is ''~/Templates'', but you can change it in the [[preferences]]. To manage the templates, click the last menu item ("//File Templates...//") to open the folder. Now create a new file that is a blank file of the file type that you would like to be able to insert into zim. Note that the file extension is removed in the menu, so give is a clear name, e.g an SVG file could be called "''SVG_Drawing.svg''". 21 | 22 | Be aware that in order to edit the file, it usually must be a valid file of the specific file type. If you just create an empty text file and rename it to "''Image.png''" most image editing applications will not consider it a valid PNG image. So it is better to start an image editor and save a real blank image as template. 23 | 24 | Of course it is perfectly fine to have multiple templates of the same file type. 25 | 26 | Note that this feature tries to be compatible with the "//Create new document//" menu in the Gnome file browser. 27 | -------------------------------------------------------------------------------- /data/manual/Help/Auto_Formatting.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Unknown 4 | 5 | ====== Auto Formatting ====== 6 | 7 | Auto-formatting means that zim parses text while you type. Be aware that the syntax for auto-formatting isn't the same as the [[Wiki Syntax|wiki syntax]] for the source formatting (the wiki format as it is saved to the files). If you typed in source syntax and you want to have it rendered you should reload the page (press ^R). 8 | 9 | If auto-formatting does something you didn't intend you can reverse it by pressing '' Z''. 10 | 11 | ===== Headings ===== 12 | Typing: 13 | 14 | ''' 15 | == Heading 1 16 | ''' 17 | 18 | gives you a heading 1 and typing: 19 | 20 | ''' 21 | === Heading 2 22 | ''' 23 | 24 | gives you a heading 2. But in the corresponding text file these headings are marked as follows: 25 | 26 | ''' 27 | ====== Heading 1 ====== 28 | ===== Heading 2 ===== 29 | ''' 30 | 31 | 32 | ===== Links ===== 33 | When you type a word in "CamelCase" it will be considered a link. Once again this auto-formatting is done by the editor, your source format does not have to support CamelCase. 34 | 35 | This feature can be turned off in the [[Preferences]]. 36 | 37 | Also when you type a internet url like http://perl.org it will automatically be identified as a link. 38 | 39 | ===== Bullets and Checkboxes ===== 40 | Another example of auto-formatting is that "* " at the beginning of a line gets converted to a bullet automatically. Typing either "[] ", "[*] ", "[x] " or "() ", "(*) ", "(x) " will give your different kinds of [[Check Boxes]]. 41 | -------------------------------------------------------------------------------- /data/manual/Help/Automount.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2011-12-11T19:15:27+01:00 4 | 5 | ====== Automount ====== 6 | 7 | As a special feature notebooks can be "mounted" automatically when opened. This can e.g. be used to connect with remote drives or unlock an encrypted drive when zim is trying to open a specific notebook. 8 | 9 | ===== Config file ===== 10 | The paths to be automounted and the commands to mount them are configured in a config file "''~/.config/zim/automount.conf''" (see [[Config Files]] for alternative locations). 11 | 12 | The config file has a group for each path, followed with options. Currently the only supported option is a "mount" command. For example if you have an Ubuntu setup to encrypt the "''~/Documents''" folder, you can create a config file with the following two lines: 13 | 14 | ''' 15 | [Path ~/Documents] 16 | mount=xterm -e /usr/bin/ecryptfs-mount-private 17 | ''' 18 | 19 | The result will be that whenever zim tries to access an notebook stored under the Documents folder while that folder is not decrypted, it will prompt a terminal window to ask for the password and then mount the folder. If it fails, you still get a "notebook not found" error. 20 | 21 | Similarly you can configure various scripts of your own design. 22 | -------------------------------------------------------------------------------- /data/manual/Help/Check_Boxes.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Sat, 08 Nov 2008 11:04:28 +0100 4 | 5 | ====== Checkboxes ====== 6 | 7 | Zim supports lists with checkboxes instead of bullets. These look like: 8 | 9 | [*] item 1 10 | [ ] item 2 11 | [*] item 2a 12 | [x] item 2b 13 | [*] item3 14 | 15 | As you can see in this example checkboxes can have 3 states: [ ] open, [*] checked as 'OK' and [x] checked as 'NOK'. States can be toggle by clicking the checkbox with either the left mouse button or using the keyboard with '' '' and '' '' respectively. 16 | 17 | To start a checkbox list type on an empty line '''[] ''' or '''() ''', this will automatically insert an open checkbox. Similarly you can type checked checkboxes using '''[*]''' or '''(*)''' and '''[x]''' or '''(x)''' respectively, followed by ''' ''' or ''' '''. Lines that start with a checkbox behave like bullet list items, so you can indent by typing '' '' after the checkbox and when you press '' '' the new line will start with an empty checkbox automatically. 18 | 19 | There is an option in the [[Preferences]] to have checkbox lists behave recursively. This means that the state of items with a sublist reflects the state of all child items. Checking the parent will check all child items, and checking the last child item will check the parent item automatically. 20 | 21 | The [[:Plugins:Task List|Task List plugin]] regards checkboxes as TODO items and can give an overview of all open checkboxes in a notebook. 22 | -------------------------------------------------------------------------------- /data/manual/Help/Commandline_Options.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2013-04-14T12:14:49+02:00 4 | 5 | ====== Commandline Options ====== 6 | 7 | **Output from "zim --help":** 8 | 9 | ''' 10 | usage: ./zim.py [OPTIONS] [NOTEBOOK [PAGE]] 11 | or: ./zim.py --server [OPTIONS] [NOTEBOOK] 12 | or: ./zim.py --export [OPTIONS] NOTEBOOK [PAGE] 13 | or: ./zim.py --search NOTEBOOK QUERY 14 | or: ./zim.py --index [OPTIONS] NOTEBOOK 15 | or: ./zim.py --plugin PLUGIN [ARGUMENTS] 16 | or: ./zim.py --manual [OPTIONS] [PAGE] 17 | or: ./zim.py --help 18 | 19 | General Options: 20 | --gui run the editor (this is the default) 21 | --server run the web server 22 | --export export to a different format 23 | --search run a search query on a notebook 24 | --index build an index for a notebook 25 | --plugin call a specific plugin function 26 | --manual open the user manual 27 | -V, --verbose print information to terminal 28 | -D, --debug print debug messages 29 | -v, --version print version and exit 30 | -h, --help print this text 31 | 32 | GUI Options: 33 | --list show the list with notebooks instead of 34 | opening the default notebook 35 | --geometry window size and position as WxH+X+Y 36 | --fullscreen start in fullscreen mode 37 | --standalone start a single instance, no background process 38 | 39 | Server Options: 40 | --port port to use (defaults to 8080) 41 | --template name of the template to use 42 | --gui run the gui wrapper for the server 43 | 44 | Export Options: 45 | --format format to use (defaults to 'html') 46 | --template name of the template to use 47 | -o, --output output directory 48 | --root-url url to use for the document root 49 | --index-page index page name 50 | 51 | You can use the export option to print a single page to stdout. 52 | When exporting a whole notebook you need to provide a directory. 53 | 54 | Search Options: 55 | None 56 | 57 | Index Options: 58 | -o, --output output file 59 | ''' 60 | 61 | -------------------------------------------------------------------------------- /data/manual/Help/Export.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Unknown 4 | 5 | ====== Exporting ====== 6 | 7 | Zim will be able to export content to various formats. At the moment exporting to [[Help:Export:HTML|HTML]] and [[Help:Export:LaTeX|LaTeX]] is supported, as well as the Markdown and RST text formats. 8 | 9 | ===== Export dialog ===== 10 | To open op the export dialog in zim use the "//File//->//Export//" menu item. This dialog asks for a number of input fields before you can start exporting. 11 | 12 | ==== Step1: Select the pages to export ==== 13 | The option **Complete Notebook** will export all pages in the current notebook. 14 | 15 | The option **Single page** allows to select you a single page to export. 16 | 17 | ==== Step 2: Select the export format ==== 18 | The **Format** allows the choice of the output format. 19 | 20 | The **Template** field asks you to select a template file (see below). When you select "''Other...''" in the combo box you can browse for another file in the input field below the combo box. 21 | 22 | If your notebook has a Document Root (see [[Properties]]) you can select what to do with links to files under that document root. Either **Link files under document root with full file path**, which means files will be linked by their absolute file path, or **Map document root to URL**, which will result in links with the given URL as prefix. This can be useful when you [[Usage:Publishing|publish]] pages as part of a larger website. 23 | 24 | ==== Step 3: Select the output file or folder ==== 25 | Here you can select the **output folder** (if you are exporting multiple pages) or the **output file** (if you export a single page). 26 | 27 | If you specify an **Index page** a page will be generated that contains a list with links to all pages that were exported. This can e.g. be used as a site map. 28 | 29 | 30 | ===== Attachments ===== 31 | Files and images that live inside the notebook directory ([[Help:Attachments|attachments]], equations etc.) will always be copied to the new output directory when you export a notebook. 32 | 33 | ===== Templates ===== 34 | The export code only produces the tags that represent the content of the page. [[Templates]] are used to create complete output. A few standard templates are packaged with zim, see the pages for the output formats for a list and descriptions. You can also make your own. 35 | 36 | ===== Exporting from the commandline ===== 37 | Try something like: 38 | 39 | ''' 40 | $ zim --export --output=./html \ 41 | --format=html --template=./foo.html ~/Notes 42 | ''' 43 | 44 | See "''zim --help''" for all options. 45 | 46 | -------------------------------------------------------------------------------- /data/manual/Help/Export/HTML.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2010-03-02T11:46:37.806083 4 | 5 | ====== HTML ====== 6 | 7 | ===== Dependencies ===== 8 | No dependencies. 9 | 10 | ===== Templates ===== 11 | 12 | **"Default"** 13 | This is a simple template intended as a base for custom styles. It has an inline style definition that is intended to match the (default) look of zim. 14 | 15 | **"Presentation"** 16 | Template with a little more color than "Default". It is intended to convert a set of pages in an online presentation quickly. Simple javascript included for some basic keybindings: 17 | 18 | ''' 19 | Enter next page 20 | Spacebar next page 21 | backspace previous page 22 | ''' 23 | 24 | **"Print"** 25 | This is a plain template intended for printing pages. It is use by the "Print to Browser" plugin. 26 | 27 | **"SlideShow (S5)"** 28 | Template based on S5. S5 is "A Simple Standards-Based Slide Show System", which mean a slide show system completely written in html and javascript. Therefor these slide shows can be presented using a browser and be put on a website. See [[http://meyerweb.com/eric/tools/s5/|the S5 website]] for more information. 29 | 30 | Note that in order to use the output from this template you need to download the S5 package and copy the "ui" directory from the package to the same directory where you export your slideshow to. 31 | 32 | ===== Template Options ===== 33 | 34 | No template options available. 35 | -------------------------------------------------------------------------------- /data/manual/Help/Export/LaTeX.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2010-03-02T11:46:43.066508 4 | 5 | ====== LaTeX ====== 6 | 7 | The [[Plugins:Equation Editor|Equation Editor]] plugin is supported, equations entered with this plugin are automatically placed inside math environments. Embedded Images of types that are not supported by the TeX Engine of your choice may lead to compilation errors. For ''pdflatex'' the supported types are PDF, JPG, JBIG2, and PNG, for ''latex'' it is EPS. Index creation is currently not working. 8 | 9 | ===== Dependencies ===== 10 | All templates depend on several LaTeX packages 11 | * ''inputenc'' package to use utf8 as input encoding. 12 | * ''hyperref'' to realize links (or another appropriate definition for ''\href)'' 13 | * ''graphicx'' for including images 14 | * ''amsmath, amssymb, color'' are needed for support of the equationeditor plugin 15 | * ''ulem'' is used for underlines and strikeouts 16 | 17 | ===== Templates ===== 18 | The following templates are supplied: 19 | 20 | **"Report"** 21 | 22 | This templates is based (and depends) on the KOMA-Script Report Class ''scrreprt''. It generates a title page and a table of contents and is therefore more suitable for longer pages. To display checkboxes it depends on the ''wasysym'' package. 23 | 24 | **"Article"** 25 | 26 | This templates is based (and depends) on the KOMA-Script Report Class ''scrartcl''. It omits the lowest heading and is therefore not suitable for deeply structured documents. To display checkboxes it depends on the ''wasysym'' package. 27 | 28 | **"Part"** 29 | 30 | The result from this template can not be compiled on its own, it is designed to be one part of a larger document and be included (''\include{}'') in a master document. 31 | 32 | ===== Template Options ===== 33 | 34 | === document_type === 35 | 36 | Possible values: 'report', 'article', 'book' 37 | Default: 'report' 38 | 39 | The exported LaTeX code will use only commands suitable for the given document class (e.g. sectioning commands). 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /data/manual/Help/Notebooks.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== NoteBooks ====== 5 | 6 | A **notebook** is a collection of [[pages]] that are linked to each other. Typically all pages within a notebook belong to the some project; although it is also very common to have a "dump" or "scratch" notebook were all odds and ends end up. 7 | 8 | You can have multiple notebooks, for example for separate projects. Or you can have a single notebook for all your stuff. In general when you have separate groups of pages that do not interlink, it is best to put these groups in separate notebooks. That way zim remembers the state and history of each of these groups independent of the others. 9 | 10 | See [[Usage]] for more tips on how to use notebooks for specific tasks. 11 | 12 | **When you run zim for the first time** you will get asked for a new folder to store the notebook. This will now become the default notebook, everytime you start zim this notebook is opened directly. If you wish to use more than one notebook you can create additional notebooks from the "Open notebook" dialog (see the "//File//->//Open Another Notebook//" menu item). 13 | 14 | See also the notebook properties in the [[Properties|Properties dialog.]] 15 | 16 | ===== Open Notebook Dialog ===== 17 | The "Open notebook" dialog allows you to select from multiple notebooks, or to add new notebooks. When you **add** a notebook you will be asked for the folder to store the notebook. This can either be an new (empty) folder or an existing notebook folder. 18 | 19 | If multiple notebooks are defined and there is no default notebook the "Open notebook" dialog will show everytime you start zim. 20 | 21 | If you don't want to see the "Open notebook" dialog each time you start zim, you can set a default using the "**Set Default**" button in this dialog. The default can either be a directory or the name of one of the notebooks in the list. 22 | 23 | ===== Notebook configuration file ===== 24 | In the notebook directory zim will write a configuration file called "''zim.notebook''". This file contains the settings and state that are notebook specific. You can open the notebook from your file browser by opening this config file with zim (which should be the default application). 25 | 26 | ===== Automount commands for notebooks ===== 27 | The config file ''automount.conf'' can be used to configure mount commands for specific notebook paths. See [[Automount]] for details. 28 | 29 | -------------------------------------------------------------------------------- /data/manual/Help/Properties.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Properties ====== 5 | 6 | The dialog with notebook properties can be accessed with the menu item "//File//" -> "//Properties//". The following notebook properties can be configured: 7 | 8 | The notebook **Name** is used in the "[[Notebooks|Open Notebook]]" dialog and e.g. in the menu for the [[Plugins:Tray Icon|Tray Icon]]. This name is also used for the window title. 9 | 10 | The notebook **Interwiki keyword** can be used to link to this notebook for other notebooks. See "Interwiki" in [[Links]] for more info. 11 | 12 | The **Home Page** is the first page to open in a notebook if you have no history yet. It can be accessed with the toolbar icon for the home page and the key binding. Typically the home page should be an index page linking to other pages. 13 | 14 | The notebook **Icon** is an image that is used together with the name to identify the notebook. 15 | 16 | The **Document Root** is a special folder which contains documents that can be linked from the notebook. To link files in this folder start the links with a "/" (see [[Links]] for more details). This folder is typically used for notebooks that are published as web page. When [[Export|exporting]] the notebook to html the document root can be mapped to a special URL. 17 | 18 | The **Profile** is an advanced property which allows having multiple sets of preferences. E.g. if you have two types of notebooks and each type you want different preferences, plugins, style, etc. you would assign notebooks different "profiles". Practically speaking this means that a separate set with config files is being used per profile. 19 | 20 | The **Shared Notebook** setting tells zim that the notebook is on a shared file system, or is located somewhere where file access is slow. In this case cache files will be written to the user home directory cache instead of the cache directory in the notebook folder itself. 21 | 22 | Disadvantage of storing information about the notebook outside the notebook folder is that for example for encrypted notebooks this cache data is not encrypted anymore. 23 | -------------------------------------------------------------------------------- /data/manual/Help/Tags.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2011-04-04T21:14:35+02:00 4 | 5 | ====== Tags ====== 6 | 7 | Zim supports the use of tags to organize pages. Tags are keywords or labels that are used to categorize pages. 8 | 9 | Tags can be used anywhere in a page using the "@" prefix. Like this: @example @tags 10 | 11 | To find context based on tags you can use the [[Searching|Search]] dialog. For example to find all pages tagged with "@example" you can search for "''Tag: example''" or just for "''@example''". Since tags are cached in the index, this search is much quicker than a full text search for random words. 12 | 13 | There is also a plugin that will add a tag cloud and a page index organized by tag in the side page, see also [[Plugins:Tags]] 14 | -------------------------------------------------------------------------------- /data/manual/Plugins.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Plugins ====== 5 | 6 | The following plugins are standard included with zim: 7 | 8 | * [[+Arithmetic|Arithmetic]] 9 | * [[+Attachment Browser|Attachment Browser]] 10 | * [[+BackLinks Pane|BackLinks Pane]] 11 | * [[+Diagram Editor|Diagram Editor]] 12 | * [[+Distraction Free Editing|Distraction Free Editing]] 13 | * [[+Ditaa Editor|Ditaa Editor]] 14 | * [[+Equation Editor|Equation Editor]] 15 | * [[+GNU R Plot Editor|GNU R Plot Editor]] 16 | * [[+Gnuplot Editor|Gnuplot Editor]] 17 | * [[+Insert Screenshot|Insert Screenshot]] 18 | * [[+Insert Symbol|Insert Symbol]] 19 | * [[+Inline Calculator|Inline Calculator]] 20 | * [[+Journal|Journal]] 21 | * [[+Link Map|Link Map]] 22 | * [[+Line Sorter|Line Sorter]] 23 | * [[+Log events with Zeitgeist|Log events with Zeitgeist]] 24 | * [[+Print to Browser|Print to Browser]] 25 | * [[+Quick Note|Quick Note]] 26 | * [[+Score Editor|Score Editor]] 27 | * [[+Sequence Diagram Editor|Sequence Diagram Editor]] 28 | * [[+Source View|Source View]] 29 | * [[+Spell Checker|Spell Checker]] 30 | * [[+Table Of Contents|Table Of Contents]] 31 | * [[+Tags|Tags]] 32 | * [[+Task List|Task List]] 33 | * [[+Tray Icon|Tray Icon]] 34 | * [[+Version Control|Version Control]] 35 | 36 | Plugins can be enabled and configured in the [[Help:Preferences|preferences dialog]]. A number of plugins have additional dependencies, like specific external programs, that are not required for the core functionality of zim. If one or more dependencies of a plugin are not fulfilled, these are marked red. 37 | 38 | ===== Installing Plugins ===== 39 | If a plugin is distributed as a separate python module, it should be installed such that zim can find it. For use specific plugins you can install them Python's "per user site-package directory". 40 | 41 | For example for python 2.6 this folder is: 42 | Unix (including Mac OS X): ''~/.local/lib/python2.6/site-packages'' 43 | Windows: ''%APPDATA%/Python/Python26/site-packages'' 44 | 45 | See http://www.python.org/dev/peps/pep-0370/ for details. 46 | 47 | ===== Writing Plugins ===== 48 | If you are looking for information on **writing plugins** please download the source package and have a look at the notes included in the "HACKING" folder. 49 | 50 | -------------------------------------------------------------------------------- /data/manual/Plugins/Arithmetic.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2011-08-13T13:44:14+02:00 4 | 5 | ====== Arithmetic ====== 6 | 7 | This plugin allows you to evaluate arithmetic expressions in a zim page. 8 | 9 | **Dependencies:** This plugin has no additional dependencies. 10 | 11 | **See also:** the [[Inline Calculator|Inline Calculator plugin]] which does something similar 12 | 13 | ===== Tutorial ===== 14 | You may do standard arithmetic operations in a document, 15 | ending the operation with an equals sign, for example: 16 | 17 | 5 x 3 + 1 = 18 | 19 | Single spaces may be used between the quantities and the 20 | operators for clarity. Two or more spaces, or a colon 21 | delimit an operation, like here: 100 + 1 = 22 | 23 | You may use 'x' as the multiplication symbol in most 24 | cases, or '*' if you want. 25 | 26 | Operations can be... (2+7)x5 = anywhere! 27 | 28 | Press now to obtain the results of all calculations 29 | in the document. If you go up and modify some number, 30 | press to recalculate. 31 | 32 | You may do standard arithmetic operations in a document, 33 | for example, assign values to two variables: 34 | 35 | height = 20 width = 30 36 | 37 | And define a formula: area = height x width 38 | 39 | To obtain the result of the formula, press : 40 | 41 | area = 42 | 43 | also updates the result of area below, 44 | after one of the values is modified: height = 25 45 | 46 | area = 47 | 48 | Other examples of formulas, try modifying the values of f 49 | and c will change after updating with : 50 | 51 | c = (f - 32) x 5 / 9 52 | 53 | f = 212 c = 54 | f = 100 c = 55 | f = 70 c = 56 | f = 32 c = 57 | f = -40 c = 58 | -------------------------------------------------------------------------------- /data/manual/Plugins/Attachment_Browser.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-07-18T23:31:03+02:00 4 | 5 | ====== Attachment Browser ====== 6 | 7 | This plugin adds an folder view at the bottom of the main window that shows the files attached to the current page. It allows for basic operations, like dragging a file from the folder view to the page to create a link to a specific attachment. 8 | 9 | **Dependencies:** This plugin has no additional dependencies. 10 | 11 | ===== Options ===== 12 | The option **Position in the window** determines in which side pane the browser is shown. 13 | -------------------------------------------------------------------------------- /data/manual/Plugins/BackLinks_Pane.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-12-11T19:29:39+01:00 4 | 5 | ====== BackLinks Pane ====== 6 | 7 | This plugin adds an extra widget showing a list of pages linking to the current page. 8 | 9 | **Dependencies:** This plugin has no additional dependencies. 10 | 11 | 12 | ===== Options ===== 13 | The option **Position in the window** determines in which side pane the browser is shown. 14 | -------------------------------------------------------------------------------- /data/manual/Plugins/Diagram_Editor.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Diagram Editor ====== 5 | 6 | The diagram editor allows you to insert and edit diagrams based on GraphViz. GraphViz (or "dot" as the program is also referred to) uses a basic script language to define diagrams. This plugin adds a dialog where one can define a diagram in this script. The dialog shows a preview of the rendered diagram and when the diagram is finished it can be inserted in a zim page as an image. You can always edit it later again by selecting "Edit Diagram" from the context menu (right-mouse-click on the diagram will show the context menu). 7 | 8 | **Dependencies:** This plugin requires GraphViz to be installed. In specific the "dot" command should be available in the system path. 9 | 10 | ===== Example ===== 11 | 12 | For example a diagram like: 13 | 14 | {{./diagram.png}} 15 | 16 | Can be created by entering the following definition in the dialog: 17 | 18 | ''' 19 | digraph G { 20 | foo -> bar 21 | bar -> baz 22 | baz -> foo 23 | } 24 | ''' 25 | 26 | For full documentation of the script language see: http://www.graphviz.org/ 27 | 28 | -------------------------------------------------------------------------------- /data/manual/Plugins/Diagram_Editor/diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/Diagram_Editor/diagram.png -------------------------------------------------------------------------------- /data/manual/Plugins/Distraction_Free_Editing.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-11-30T23:17:54+01:00 4 | 5 | ====== Distraction Free Editing ====== 6 | 7 | This plugin adds settings that help using zim as a distraction free editor. 8 | 9 | **Dependencies:** This plugin has no additional dependencies. 10 | 11 | See also: [[Usage:Creative Writing]] 12 | 13 | ===== Options ===== 14 | The options **Hide menubar in fullscreen mode**, **Hide toolbar in fullscreen mode**, **Hide pathbar in fullscreen mode** and **Hide statusbar in fullscreen mode** toggle the visibility of the various widgets in fullscreen mode. (If the the menubar is not hidden, you can also toggle these elements using the "View" menu.) 15 | 16 | The option **Maximum page width** sets the maximum width of the pageview in pixels and the option **Vertical margin** sets a margin in pixels along the top and bottom of the screen. 17 | 18 | The options **Text background color**, **Text foreground color** and **Screen background color** set the color scheme for the fullscreen mode. These setting affect the base colors, see also [[Help:Config Files|Config Files]] for more options to change the color of links, headings etc. 19 | 20 | ===== Usage ===== 21 | The effects of this plugin are only seen in fullscreen mode. The toolbar and menubar will be hidden and the pageview is layed out in the center of the screen with a fixed maximum width. To fully enter distraction free mode you should also hide any side panes, although you can choose what panes you need while editing. 22 | 23 | Useful keybindings to use in this mode: 24 | 25 | '' '' to toggle to full screen mode and back to normal window 26 | '' '' to toggle side pane visibility 27 | ''Shift '' to show all side panes 28 | '' '' optionally to temporarily access the index and hide it again 29 | 30 | Of course all other keybindings keep working, but less discoverable when the menubar is hidden. 31 | 32 | **Note:** by default zim already hides the toolbar, the statusbar and the pathbar in fullscreen mode, but you can toggle them on again. If they are visible in fullscreen mode and you want to hide them, you first will need to show the menubar and hide them from there. 33 | -------------------------------------------------------------------------------- /data/manual/Plugins/Ditaa_Editor.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-03-11T09:47:20+08:00 4 | 5 | ====== Ditaa Editor ====== 6 | 7 | ditaa is a small command-line utility written in Java, that can convert diagrams drawn using ascii art ('drawings' that contain characters that resemble lines like "''|" "/" "-"'' ), into proper bitmap graphics. This is best illustrated by the following example -- which also illustrates the benefits of using ditaa in comparison to other methods :) 8 | 9 | ===== Example ===== 10 | ''' 11 | +--------+ +-------+ +-------+ 12 | | | --+ ditaa +--> | | 13 | | Text | +-------+ |diagram| 14 | |Document| |!magic!| | | 15 | | {d}| | | | | 16 | +---+----+ +-------+ +-------+ 17 | : ^ 18 | | Lots of work | 19 | +-------------------------+ 20 | ''' 21 | 22 | 23 | After conversion using ditaa, the above file becomes: 24 | {{./ditaa.png?type=ditaa}} 25 | ditaa interprets ascci art as a series of open and closed shapes, but it also uses special markup syntax to increase the possibilities of shapes and symbols that can be rendered. 26 | ditaa is open source and free software (free as in free speech), since it is released under the GPL license. 27 | 28 | See http://ditaa.sourceforge.net/ for more information about ditaa 29 | -------------------------------------------------------------------------------- /data/manual/Plugins/Ditaa_Editor/ditaa.dia: -------------------------------------------------------------------------------- 1 | +--------+ +-------+ +-------+ 2 | | | --+ ditaa +--> | | 3 | | Text | +-------+ |diagram| 4 | |Document| |!magic!| | | 5 | | {d}| | | | | 6 | +---+----+ +-------+ +-------+ 7 | : ^ 8 | | Lots of work | 9 | +-------------------------+ -------------------------------------------------------------------------------- /data/manual/Plugins/Ditaa_Editor/ditaa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/Ditaa_Editor/ditaa.png -------------------------------------------------------------------------------- /data/manual/Plugins/Equation_Editor.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Equation Editor ====== 5 | 6 | The equation editor is a simple dialog that allows you to insert equations into a page using **latex**. 7 | 8 | In order to be able to use this plugin you must have latex installed and the following two commands must be available on your system: "''latex"'' and "''dvipng"''. You can control the look of the equations using the special template "''_Equation.tex"''. The only variable that can be used in this template is "''equation''", which will be replaced with the content from the dialog. 9 | 10 | **Dependencies:** This plugin requires a Latex suite to be installed as well as the "dvipng" application. In specific the "latex" and "dvipng" commands should be available in the system path. 11 | 12 | ===== Syntax ===== 13 | 14 | Some quick examples of the latex math syntax. For a complete reference see the links below: 15 | 16 | {{./equation_01.png}} 17 | 18 | 19 | ''' 20 | c = \sqrt{ a^2 + b^2 } 21 | 22 | \int_{-\infty}^{\infty} \frac{1}{x} \, dx 23 | 24 | f(x) = \sum_{n = 0}^{\infty} \alpha_n x^n 25 | 26 | x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a} 27 | 28 | \hat a \bar b \vec c x' \dot{x} \ddot{x} 29 | ''' 30 | 31 | 32 | ===== References ===== 33 | 34 | * Micheal Downes, //Short Math Guide for LaTeX//, American Mathematical Society, 2002 [1] 35 | * Tobias Oetiker e.a, //The Not So Short Introduction to LATEX2e//, 2007 [2] 36 | 37 | * [1] http://www.ams.org/tex/amslatex.html 38 | * [2] http://www.latex-project.org/guides/ 39 | * http://en.wikipedia.org/wiki/Help:Formula (latex parts only) 40 | -------------------------------------------------------------------------------- /data/manual/Plugins/Equation_Editor/equation_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/Equation_Editor/equation_01.png -------------------------------------------------------------------------------- /data/manual/Plugins/GNU_R_Plot_Editor.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== GNU R Plot Editor ====== 5 | 6 | The GNU R plot editor is, as its name suggests, a simple dialog that allows you to insert plotting scripts in GNU R's 'S' language. 7 | 8 | **Dependencies:** This plugin requires GNU R to be installed. For specific notebooks which others have created, bear in mind that they may have used GNU R with additional libraries installed. In this case, as well as GNU R, you will need the same libraries installed that others used. 9 | 10 | ===== Syntax ===== 11 | 12 | Some quick examples of the GNU R syntax. For a complete reference see the links below. 13 | 14 | 15 | {{./gnu_r_plot.png?type=gnu_r_plot}} 16 | 17 | ''' 18 | x = seq(-4,4,by=0.01) 19 | y = sin(x) + 1 20 | plot(x,y,type='l') 21 | ''' 22 | 23 | 24 | {{./gnu_r_plot001.png?type=gnu_r_plot}} 25 | 26 | ''' 27 | # Maunga Whau Volcano Example 28 | # Copyright (c) //R Development Core Team [5]// 29 | x <- 10*(1:nrow(volcano)); x.at <- seq(100, 800, by=100) 30 | y <- 10*(1:ncol(volcano)); y.at <- seq(100, 600, by=100) 31 | 32 | # Using Terrain Colors 33 | 34 | image(x, y, volcano, col=terrain.colors(100),axes=FALSE) 35 | contour(x, y, volcano, levels=seq(90, 200, by=5), add=TRUE, col="brown") 36 | axis(1, at=x.at) 37 | axis(2, at=y.at) 38 | box() 39 | title(main="Maunga Whau Volcano", sub = "col=terrain.colors(100)", font.main=4) 40 | ''' 41 | 42 | 43 | ===== Features Available ===== 44 | 45 | Be aware that this plugin pre-sets the png device to render graphics. For that reason, you should not try to use the other device commands (or to redefine the png device command). For example, the 3d plotting devices that render to OpenGL rather than png should not be used, nor should the jpg output. 46 | 47 | Aside from this, most of R's advanced plotting power should be available to you. 48 | 49 | ===== References ===== 50 | 51 | * An Introduction to R [1] 52 | * The R Website [2] 53 | * The R Wiki [3] 54 | 55 | * [1] http://cran.r-project.org/doc/manuals/R-intro.html 56 | * [2] http://www.r-project.org/index.html 57 | * [3] http://rwiki.sciviews.org/ 58 | * [4] http://cran.r-project.org/banner.shtml 59 | * [5] http://gallery.r-enthusiasts.com/ 60 | 61 | -------------------------------------------------------------------------------- /data/manual/Plugins/GNU_R_Plot_Editor/gnu_r_plot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/GNU_R_Plot_Editor/gnu_r_plot.png -------------------------------------------------------------------------------- /data/manual/Plugins/GNU_R_Plot_Editor/gnu_r_plot.r: -------------------------------------------------------------------------------- 1 | x = seq(-4,4,by=0.01) 2 | y = sin(x) + 1 3 | plot(x,y,type='l') -------------------------------------------------------------------------------- /data/manual/Plugins/GNU_R_Plot_Editor/gnu_r_plot001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/GNU_R_Plot_Editor/gnu_r_plot001.png -------------------------------------------------------------------------------- /data/manual/Plugins/GNU_R_Plot_Editor/gnu_r_plot001.r: -------------------------------------------------------------------------------- 1 | # Maunga Whau Volcano Example 2 | # Copyright (c) //R Development Core Team [5]// 3 | x <- 10*(1:nrow(volcano)); x.at <- seq(100, 800, by=100) 4 | y <- 10*(1:ncol(volcano)); y.at <- seq(100, 600, by=100) 5 | 6 | # Using Terrain Colors 7 | 8 | image(x, y, volcano, col=terrain.colors(100),axes=FALSE) 9 | contour(x, y, volcano, levels=seq(90, 200, by=5), add=TRUE, col="brown") 10 | axis(1, at=x.at) 11 | axis(2, at=y.at) 12 | box() 13 | title(main="Maunga Whau Volcano", sub = "col=terrain.colors(100)", font.main=4) -------------------------------------------------------------------------------- /data/manual/Plugins/Gnuplot_Editor.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2011-03-28T21:59:01+02:00 4 | 5 | ====== Gnuplot Editor ====== 6 | 7 | 8 | The Gnuplot editor is, as its name suggests, a simple dialog that allows you to insert plots rendered with gnuplot. 9 | 10 | **Dependencies:** The plugin requires gnuplot to be installed. 11 | 12 | ===== Syntax ===== 13 | 14 | {{./gnuplot.png?type=gnuplot}} 15 | ''' 16 | 17 | plot sin(x), cos(x) 18 | ''' 19 | 20 | 21 | See http://www.gnuplot.info/ for more information about gnuplot 22 | -------------------------------------------------------------------------------- /data/manual/Plugins/Gnuplot_Editor/gnuplot.gnu: -------------------------------------------------------------------------------- 1 | plot sin(x), cos(x) -------------------------------------------------------------------------------- /data/manual/Plugins/Gnuplot_Editor/gnuplot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/Gnuplot_Editor/gnuplot.png -------------------------------------------------------------------------------- /data/manual/Plugins/Inline_Calculator.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2010-08-31T22:25:42.585662 4 | 5 | ====== Inline Calculator ====== 6 | 7 | This plugin allows you to evaluate simple mathematical expressions in zim. 8 | 9 | **Dependencies:** This plugin has no additional dependencies. 10 | 11 | **See also:** the [[Arithmetic|Arithmetic plugin]] which does something similar 12 | 13 | ===== Examples ===== 14 | Simple expressions can be evaluated on a single line: 15 | 16 | 3 + 3 = 17 | 18 | When you press "Tools" -> "Evaluate Math" the result of the expression is automatically added behind the "=" sign. Note that the cursor needs to be behind the expression you want to evaluate. 19 | If there is text on the same line before the expression it should end with an ":". For example: 20 | 21 | Fuel: 30 + 27.5 = 22 | 23 | Other words in front of the formula can result in errors. 24 | 25 | Apart from single line expressions you can also do multi-line summations and subtractions. The syntax for this is like this: 26 | 27 | 7 28 | 3 29 | 5 30 | --- + 31 | 32 | In this case the cursor needs to be below the summation when you trigger the evaluation. 33 | 34 | ===== Functions ===== 35 | The following functions are available: 36 | 37 | From standard python functions 38 | ''' 39 | abs 40 | ord 41 | chr 42 | hex 43 | oct 44 | int 45 | ''' 46 | 47 | From math and cmath modules in standard python library: 48 | ''' 49 | atan2 50 | fmod 51 | frexp 52 | hypot 53 | ldexp 54 | modf 55 | acos 56 | asin 57 | atan 58 | cos 59 | cosh 60 | sin 61 | sinh 62 | tan 63 | tanh 64 | exp 65 | log10 66 | sqrt 67 | ''' 68 | 69 | Other: 70 | ''' 71 | degrees 72 | radians 73 | log 74 | real 75 | imag 76 | sign 77 | log2 78 | gcd 79 | lcm 80 | phase 81 | conj 82 | round 83 | floor 84 | ceil 85 | ''' 86 | 87 | Synonyms: 88 | ''' 89 | mag - same as abs() 90 | angle - same as phase() 91 | 92 | ''' 93 | ''Constants:'' 94 | ''' 95 | e 96 | pi 97 | j 98 | ''' 99 | -------------------------------------------------------------------------------- /data/manual/Plugins/Insert_Screenshot.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Insert Screenshot ====== 5 | 6 | This plugin adds a dialog that allows you to take a screenshot of the desktop or of a particular window and directly insert the image into the current zim page. 7 | 8 | **Dependencies:** This plugin requires the "scrot" application to be installed. In specific the "scrot" command should be available in the system path. 9 | 10 | On maemo devices "screenshot-tool" will be used as an alternative. 11 | -------------------------------------------------------------------------------- /data/manual/Plugins/Insert_Symbol.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2010-05-25T16:06:18.373201 4 | 5 | ====== Insert Symbol ====== 6 | 7 | This plugin adds a dialog to insert special symbols and characters. It also enables autoformatting for these symbols and characters. 8 | 9 | Shortcut codes for autoformatting are shown in the tooltip in the dialog. So for example the typing shortcut "\alpha" as a single word in the editor will replace this shortcut by the unicode character for the Greek letter alpha. Similar typing "-->" as a single word will be replaced with a unicode symbol for a right arrow. 10 | 11 | In some cases you want to be able to type a character without the trailing whitespace, e.g. when you want to type a formula with several greek letters. In this case the ";" can be used to close the sequence, so typing "\alpha;" will result in the greek letter alpha without any trailing whitespace. 12 | 13 | The list with shortcuts can be edited using the button in the dialog or by opening the config file "''symbols.list''" in a text editor. You may need to restart zim in order to load the edited file. 14 | 15 | **Dependencies:** This plugin has no additional dependencies. 16 | -------------------------------------------------------------------------------- /data/manual/Plugins/Line_Sorter.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-12-11T19:28:07+01:00 4 | 5 | ====== Line Sorter ====== 6 | 7 | This plugin adds a menu item to sort selected lines in alphabetical order. If the list is already sorted the order will be reversed (A-Z to Z-A). 8 | 9 | **Dependencies:** This plugin has no additional dependencies. 10 | -------------------------------------------------------------------------------- /data/manual/Plugins/Link_Map.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Fri, 13 Mar 2009 22:49:34 +0100 4 | 5 | ====== Link Map ====== 6 | 7 | Having a graph of linking relations allows an alternative view of the internal organization of a notebook. The use of this depends on your use of links. If you hardly use any links, the hierarchic index probably contains all the organization you do. But if you use link extensively there is a deeper structure than the one dimensional index. 8 | 9 | For example in a notebook with notes specific topics this link map shows the "landscape" around a specific subject by showing all pages linking to it. Because link relations are shown for a number of steps away from the current page you immediately notice if all pages linking here also all link to another page etc. 10 | 11 | Another example is the apply tags by linking pages to a special tag page or to a category page. Now the link map shows this link and also shows other pages linking to that tag as well as other tags where those pages are linking. Again, any oddities in the graph will stand out visually. 12 | 13 | Obvious future improvement would be to have a page "type" and apply different colors / shapes in the graph based on that. E.g. make a category page a different color from a normal page. 14 | 15 | Another future improvement would be the ability to directly add nodes to the link map. This would allow the map to be used in the style of a "mind map" basically drawing a graph of related nodes and then, per node fill in any extra information in the page for that node. 16 | 17 | **Dependencies:** This plugin requires GraphViz to be installed. In specific the "dot" command should be available in the system path. 18 | -------------------------------------------------------------------------------- /data/manual/Plugins/Log_events_with_Zeitgeist.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-06-05T20:52:03+02:00 4 | 5 | ====== Log events with Zeitgeist ====== 6 | 7 | When this plugin is activated, information about accessing, creating and modifying Zim Wiki pages is logged using the Zeitgeist framework. This allows applications like the Unity Dash to display recently used pages or the Activity Journal to give a timeline overview of your activities. 8 | 9 | **Dependencies:** This plugin requires the Python bindings for Zeitgeist. For Debian and Ubuntu, these bindings are available in the ''python-zeitgeist'' package. 10 | 11 | For more information about the Zeitgeist project see: http://zeitgeist-project.com 12 | -------------------------------------------------------------------------------- /data/manual/Plugins/Print_to_Browser.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-12-11T19:34:32+01:00 4 | 5 | ====== Print to Browser ====== 6 | 7 | This plugin provides a workaround for the lack of printing support in zim. It exports the current page 8 | to html and opens a browser. Assuming the browser does have printing support this will get your data to the printer in two steps. 9 | 10 | **Dependencies:** This plugin has no additional dependencies. 11 | 12 | 13 | ===== Template ===== 14 | The html template used is the template "Print.html". You can edit it if you want to change how a page is rendered by this plugin. To edit the template go to the "//Edit//" → "//Templates//" menu item. See [[Help:Templates]] for more info on templates. 15 | -------------------------------------------------------------------------------- /data/manual/Plugins/Quick_Note.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2010-04-24T13:49:51.331910 4 | 5 | ====== Quick Note ====== 6 | The "Quick Note" plugin offers a dialog for inserting quick notes into a notebook. It can be invoked from the commandline and can therefore easily be bound to keyboard shortcuts or used in scripts. 7 | 8 | **Dependencies:** This plugin has no additional dependencies. 9 | 10 | **Commandline: **''zim'' --plugin quicknote [OPTIONS] 11 | 12 | **Options:** 13 | * --notebook URI Select the notebook in the dialog 14 | * --page STRING Fill in full page name 15 | * --namespace STRING Fill in the namespace in the dialog 16 | * --basename STRING Fill in the page name in the dialog 17 | * --append [true|false] Set whether to append or create new page 18 | * --text TEXT Provide the text directly 19 | * --input stdin Provide the text on stdin 20 | * --input clipboard Take the text from the clipboard 21 | * --encoding base64 Text is encoded in base64 22 | * --encoding url Text is url encoded (In both cases expects UTF-8 after decoding) 23 | * --attachments FOLDER Import all files in FOLDER as attachments, wiki input can refer these files relatively 24 | * --option url=STRING Set template parameter 25 | -------------------------------------------------------------------------------- /data/manual/Plugins/Score_Editor/score.ly: -------------------------------------------------------------------------------- 1 | \relative c { 2 | \clef bass 3 | \key d \major 4 | \time 4/4 5 | 6 | d4 a b fis 7 | g4 d g a 8 | } -------------------------------------------------------------------------------- /data/manual/Plugins/Score_Editor/score.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/Score_Editor/score.png -------------------------------------------------------------------------------- /data/manual/Plugins/Score_Editor/score001.ly: -------------------------------------------------------------------------------- 1 | << 2 | \chords { 3 | c1:m7 f2:7 c2 4 | } 5 | \relative c'' { 6 | g2 es8( c4) es8 7 | f8 es d c~ c2 8 | } 9 | \addlyrics { 10 | You are 11 | the sky and my rain, 12 | } 13 | >> -------------------------------------------------------------------------------- /data/manual/Plugins/Score_Editor/score001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/Score_Editor/score001.png -------------------------------------------------------------------------------- /data/manual/Plugins/Score_Editor/score002.ly: -------------------------------------------------------------------------------- 1 | hornNotes = 2 | \relative c { 3 | \time 2/4 4 | R2*3 5 | r4 f8 a cis4 f e d 6 | } 7 | 8 | bassoonNotes = 9 | \relative c { 10 | \clef bass 11 | r4 d,8 f gis4 g b bes 12 | a8 e f4 g d gis f 13 | } 14 | 15 | 16 | << 17 | \new Staff \hornNotes 18 | \new Staff \bassoonNotes 19 | >> 20 | -------------------------------------------------------------------------------- /data/manual/Plugins/Score_Editor/score002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/Score_Editor/score002.png -------------------------------------------------------------------------------- /data/manual/Plugins/Score_Editor/score003.ly: -------------------------------------------------------------------------------- 1 | << 2 | \new ChordNames { 3 | \chordmode { 4 | c1 | f | g | c 5 | } 6 | } 7 | \new FretBoards { 8 | \chordmode { 9 | c1 | f | g | c 10 | } 11 | } 12 | \new Voice \with { 13 | \consists "Pitch_squash_engraver" 14 | } { 15 | \relative c'' { 16 | \improvisationOn 17 | c4 c8 c c4 c8 c 18 | f4 f8 f f4 f8 f 19 | g4 g8 g g4 g8 g 20 | c4 c8 c c4 c8 c 21 | } 22 | } 23 | \new Voice = "melody" { 24 | \relative c'' { 25 | c2 e4 e4 26 | f2. r4 27 | g2. a4 28 | e4 c2. 29 | } 30 | } 31 | \new Lyrics { 32 | \lyricsto "melody" { 33 | This is my song. 34 | I like to sing. 35 | } 36 | } 37 | >> -------------------------------------------------------------------------------- /data/manual/Plugins/Score_Editor/score003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/Score_Editor/score003.png -------------------------------------------------------------------------------- /data/manual/Plugins/Sequence_Diagram_Editor.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Sequence Diagram Editor ====== 5 | 6 | The sequence diagram editor allows you to insert and edit diagrams based on seqdiag. Seqdiag uses a basic script language to define diagrams. This plugin adds a dialog where one can define a diagram in this script. The dialog shows a preview of the rendered diagram and when the diagram is finished it can be inserted in a zim page as an image. You can always edit it later again by selecting "Edit Diagram" from the context menu (right-mouse-click on the diagram will show the context menu). 7 | 8 | **Dependencies:** This plugin requires "seqdiag" to be installed and available in the system path. 9 | 10 | To install the "seqdiag" tool, use ''easy_install'' or ''pip'': 11 | 12 | ''$ sudo easy_install seqdiag'' 13 | 14 | Or 15 | 16 | ''$ sudo pip seqdiag'' 17 | 18 | 19 | ===== Example ===== 20 | 21 | For example a diagram like: 22 | 23 | {{./diagram.png}} 24 | 25 | Can be created by entering the following definition in the dialog: 26 | 27 | ''' 28 | diagram { 29 | browser -> webserver [label = "GET /index.html"]; 30 | browser <-- webserver; 31 | browser -> webserver [label = "POST /blog/comment"]; 32 | webserver -> database [label = "INSERT comment"]; 33 | webserver <-- database; 34 | browser <-- webserver; 35 | } 36 | ''' 37 | 38 | For full documentation of the script language see: http://blockdiag.com/en/seqdiag/index.html 39 | 40 | -------------------------------------------------------------------------------- /data/manual/Plugins/Sequence_Diagram_Editor/diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Plugins/Sequence_Diagram_Editor/diagram.png -------------------------------------------------------------------------------- /data/manual/Plugins/Source_View.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Source View ====== 5 | 6 | This plugin allows inserting 'Code Blocks' in the page. These will be shown as emdedded widgets with syntax highlighting, line numbers etc. 7 | 8 | **Dependencies:** This plugin depends on the ''gtksourceview'' pakage. On Ubuntu this dependency can be satisfied by installing the ''python-gtksourceview2'' package. 9 | 10 | ===== Options ===== 11 | This plugin has the following options: 12 | 13 | If **Auto indenting** is enabled the widget will try to automatically set proper indenting while typing code. 14 | 15 | If **Smart Home key** is enabled the ''Home'' key will go to the start of the line taking into account indenting. 16 | 17 | If **Highlight current line** is enbabled the current line in the widget is highlighted. 18 | 19 | If **Show right margin** is enabled, there is a margin drawn on the right to guide maximum lenght of a line. Typically the margin is set at e.g. 72 or 80 characters. 20 | 21 | **Right margin position** gives the position of the right margin in characters. 22 | 23 | **Tab width** gives the width of a tab in spaces. 24 | -------------------------------------------------------------------------------- /data/manual/Plugins/Spell_Checker.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Spell Checker ====== 5 | 6 | This plugin adds inline spell checking for zim. It has a preference setting to determine the language used for spell checking. If this is not set, the system default is used. 7 | 8 | **Dependencies:** This plugin requires the "gtkspell" library to be installed as well as the Python language bindings for this library. 9 | 10 | * On Ubuntu or Debian systems installing the package "python-gtkspell" (or "python-gnome2-extras" on older releases) will meet these dependencies. 11 | * On Fedora systems, installing the package "gnome-python2-gtkspell" will meet these dependencies. 12 | 13 | ===== Options ===== 14 | The options **Default Language** specifies the language to use for the spell checking. Languages should be specified as language codes, e.g. for Dutch you would set "nl" or "nl_NL". If the option is not set, the system default will be used. 15 | 16 | ===== Dictionaries ===== 17 | The gtkspell library does not always come with all dictionaries installed. If no dictionary is found for your language zim will give an error when loading this plugin. For most Linux flavors the "aspell" dictionaries are used, so for example to install the English language dictionaries install the "aspell-en" package. If you can not find these packages, please refer to the documentation for your specific Linux flavor. 18 | -------------------------------------------------------------------------------- /data/manual/Plugins/Table_Of_Contents.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-01-10T19:24:49+01:00 4 | 5 | ====== Table Of Contents ====== 6 | 7 | This plugin adds a widget with a Table Of Contents for the current page. It can be either in the side pane or "floating" on top of the page. The Table Of Contents gives an outline of all headings in the page, and allows modifying this outline (try the context menu). 8 | 9 | **Dependencies:** This plugin has no additional dependencies. 10 | 11 | ===== Options ===== 12 | The option **Position in the window** determines in which side pane the table is shown. 13 | 14 | Alternatively if the option **Show ToC as floating widget instead of in sidepane** is enabled the table is shown on top of the page view. 15 | 16 | By default the page title is not show in the table of contents (unless there are multiple title headings in the page). If the option **Show the page title heading in the ToC** is enabled the page title will always been shown in the table of contents. 17 | -------------------------------------------------------------------------------- /data/manual/Plugins/Tags.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2011-04-04T21:14:50+02:00 4 | 5 | ====== Tags ====== 6 | 7 | This plugin adds a tag cloud and a page index organized by tags in the side pane. 8 | 9 | The tag cloud allows toggling the selection of tags that is shown in the page index. The page index can be switched between a flat view, showing all pages that match the filtering criteria, and an ordered view that shows known tags as the top level nodes with pages beneath them. 10 | 11 | **Dependencies:** This plugin has no additional dependencies. 12 | 13 | **See also: **[[Help:Tags]] 14 | 15 | ===== Options ===== 16 | The option **Position in the window** determines in which side pane the tag list is shown. 17 | -------------------------------------------------------------------------------- /data/manual/Plugins/Tray_Icon.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Tray Icon ====== 5 | 6 | The Tray Icon plugin adds an icon for zim in the system tray or status bar. This icon gives quick access to the zim notebooks. 7 | 8 | Clicking on the tray icon with the left mouse will popup the current notebook if only one notebook is open, or show a menu of notebooks to choose from. If any notebooks are open this menu only contains the open notebooks. 9 | 10 | Clicking in the tray icon with the right mouse button will open a menu with all known notebooks. Also there is an option to quit zim entirely. 11 | 12 | When this plugin is enabled windows are hidden when they are closed instead of closing them entirely. Quiting a notebook will really close it. However even when all the windows have quit there is still a zim process running in the background. Select "Quit" in the tray icon menu is the only way to completely exit zim. 13 | 14 | **Dependencies:** This plugin has no additional dependencies if you use gtk+ version 2.10 or newer. It is not available for older releases. 15 | 16 | **Commandline:** The following command will just start the trayicon without opening a zim notebook: ''zim --plugin trayicon'' 17 | 18 | ==== Options ==== 19 | For Ubuntu 10.4 and newer the new style "app-indicator" tray icon is supported. This tray icon is integrated with the Ubuntu system tray menu and always shows a menu on left mouse click. If you prefer the classic style instead you can select the "**Classic trayicon**" option in the plugin preferences. 20 | 21 | If the option "**Show a separate icon for each notebook**" is enabled each open notebook will have it's own trayicon instead of one trayicon for all notebooks. This option overrules the "classic trayicon" option. 22 | -------------------------------------------------------------------------------- /data/manual/Start.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Wed, 19 Nov 2008 22:58:54 +0100 4 | 5 | ====== Zim User Manual ====== 6 | 7 | This manual consists of two main part. The first part is the [[Help]] section, which documents all the functions in the program. The second part is the [[Usage]] section, which documents ways in which the program can be used. Have a look at this part if you want to understand how to combine the various functions. 8 | 9 | For development documentation please download the source package and have a look at the notes included in the "HACKING" folder and at the inline API documentation in the source code. 10 | 11 | For a quick introduction see [[Usage:Getting Started|Getting Started]] 12 | 13 | **Contents:** 14 | 15 | General information: 16 | * [[About]] 17 | * [[FAQ]] 18 | * [[Bugs]] 19 | 20 | Help section: 21 | * [[Help|Application Help]] 22 | * [[Plugins]] 23 | 24 | Usage tips and tricks: 25 | * [[Usage]] 26 | -------------------------------------------------------------------------------- /data/manual/Usage/Collaboration.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-09-30T15:25:13+02:00 4 | 5 | ====== Collaboration ====== 6 | 7 | Note that zim by design is a single user program. So even though you could put a notebook on a share drive and edit it with multiple people, this will not work very robust (e.g. two people can not edit the same page at the same time). 8 | 9 | Therefore the best way to collaborate on a notebook is to put it under version control. 10 | 11 | See [[http://doc.bazaar.canonical.com/bzr.dev/en/user-guide/index.html|the Bazaar user manual]] for some ways to use bazaar with different types of collaboration. Similar ways of working can be achieved with Git or Mercurial as well. 12 | 13 | See the [[Plugins:Version Control|Version Control plugin]] for support in zim to commit revisions to a version control system. 14 | -------------------------------------------------------------------------------- /data/manual/Usage/Creative_Writing.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-11-30T23:19:54+01:00 4 | 5 | ====== Creative Writing ====== 6 | 7 | First feature to gear zim towards usage for creative writing is the [[Plugins:Distraction Free Editing|Distraction Free Editing plugin.]] 8 | 9 | More description how to use zim for this use case to follow here. 10 | -------------------------------------------------------------------------------- /data/manual/Usage/Daily_Journal.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Fri, 24 Jul 2009 19:41:30 +0200 4 | 5 | ====== Daily Journal ====== 6 | 7 | You can use zim a journal notebook by using the [[Plugins:Journal|Journal plugin]]. 8 | 9 | If you want to mix the journal with other notes you can keep the journal pages in a separate namespace, like ':Journal'. Or you can configure the top level namespace as the place to keep journal pages. 10 | 11 | For a dedicated journal notebook you typically want to set the preference to have the calendar embedded in the side pane. 12 | 13 | -------------------------------------------------------------------------------- /data/manual/Usage/GTD_flowchart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/manual/Usage/GTD_flowchart.png -------------------------------------------------------------------------------- /data/manual/notebook.zim: -------------------------------------------------------------------------------- 1 | [Notebook] 2 | name=Zim Manual 3 | home=:Start 4 | icon= 5 | document_root= 6 | slow_fs=False 7 | version=0.4 8 | endofline=unix 9 | profile=None 10 | 11 | -------------------------------------------------------------------------------- /data/pixmaps/attachment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/pixmaps/attachment.png -------------------------------------------------------------------------------- /data/pixmaps/calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/pixmaps/calendar.png -------------------------------------------------------------------------------- /data/pixmaps/checked-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/pixmaps/checked-box.png -------------------------------------------------------------------------------- /data/pixmaps/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/pixmaps/favicon.ico -------------------------------------------------------------------------------- /data/pixmaps/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/pixmaps/link.png -------------------------------------------------------------------------------- /data/pixmaps/linkmap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/pixmaps/linkmap.png -------------------------------------------------------------------------------- /data/pixmaps/task-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/pixmaps/task-list.png -------------------------------------------------------------------------------- /data/pixmaps/unchecked-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/pixmaps/unchecked-box.png -------------------------------------------------------------------------------- /data/pixmaps/xchecked-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/pixmaps/xchecked-box.png -------------------------------------------------------------------------------- /data/style.conf: -------------------------------------------------------------------------------- 1 | [TextView] 2 | indent = 30 3 | tabs = 4 | font = 5 | justify = 6 | linespacing = 3 7 | 8 | [Tag strong] 9 | weight = PANGO_WEIGHT_BOLD 10 | 11 | [Tag emphasis] 12 | style = italic 13 | 14 | [Tag mark] 15 | #underline = single 16 | background = yellow 17 | 18 | [Tag strike] 19 | strikethrough = true 20 | foreground = grey 21 | 22 | # Verbatim gets a slightly different color to distinguise is easier 23 | # used the dark "aluminium" color from the Tango palette. 24 | 25 | [Tag code] 26 | foreground = #2e3436 27 | family = monospace 28 | #wrap-mode = none 29 | 30 | [Tag pre] 31 | # This style is used for multi-line verbatim blocks 32 | foreground = #2e3436 33 | family = monospace 34 | wrap-mode = none 35 | indent = 20 36 | 37 | [Tag link] 38 | foreground = blue 39 | #underline = single 40 | 41 | [Tag tag] 42 | foreground = #ce5c00 43 | 44 | 45 | # For the various headings we scale the size relative to the font size. 46 | # The color choosen is the dark green -or "Chameleon"- as defined in the 47 | # Tango color palette in order to fit with the default color scheme for 48 | # most desktops. 49 | 50 | [Tag h1] 51 | foreground = #4e9a06 52 | underline = single 53 | weight = PANGO_WEIGHT_BOLD 54 | scale = 1.75 55 | # 1.15**4 =~ 1.75 56 | 57 | [Tag h2] 58 | foreground = #4e9a06 59 | weight = PANGO_WEIGHT_BOLD 60 | scale = 1.52 61 | # 1.15**3 =~ 1.52 62 | 63 | [Tag h3] 64 | foreground = #4e9a06 65 | style=italic 66 | weight = PANGO_WEIGHT_BOLD 67 | scale = 1.32 68 | # 1.15**2 =~ 1.32 69 | 70 | [Tag h4] 71 | foreground=#4e9a06 72 | weight=PANGO_WEIGHT_BOLD 73 | scale=1.15 74 | 75 | [Tag h5] 76 | foreground=#4e9a06 77 | weight=PANGO_WEIGHT_BOLD 78 | 79 | [Tag h6] 80 | foreground=#4e9a06 81 | 82 | 83 | [Tag checked-checkbox] 84 | #foreground = grey 85 | 86 | [Tag xchecked-checkbox] 87 | #foreground = grey 88 | 89 | # vim: syntax=desktop 90 | -------------------------------------------------------------------------------- /data/templates/html/Default_with_index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | [% page.title %] 6 | 7 | 39 | 40 | 41 | 42 |43 |84 | 85 | 86 | -------------------------------------------------------------------------------- /data/templates/html/Print.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |44 | [% IF page.properties.type == 'namespace-index' -%] 45 |50 |Document Index
46 | [%- ELSE -%] 47 |[% page.heading %]
48 | [%- END %] 49 |
51 | 54 |55 | 56 | [% page.body %] 57 | 58 | 59 |60 |
61 | 62 | 83 |[% page.title %] 6 | 7 | 28 | 29 | 30 | 31 | 32 | 33 | [% page.content %] 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /data/templates/html/SlideShow_(S5).html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | [% SET mode = s5 %] 7 | 8 | 9 |[% page.title %] 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |30 | 31 | 32 | 33 |41 | 42 | 39 | 40 |43 | 44 | [% page.body %] 45 | 46 |47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /data/templates/latex/Article.tex: -------------------------------------------------------------------------------- 1 | \documentclass{scrartcl} 2 | \usepackage[mathletters]{ucs} 3 | \usepackage[utf8x]{inputenc} 4 | \usepackage{amssymb} 5 | \usepackage{amsmath} 6 | \usepackage[usenames]{color} 7 | \usepackage{hyperref} 8 | \usepackage{wasysym} 9 | \usepackage{graphicx} 10 | \usepackage[normalem]{ulem} 11 | \usepackage{enumerate} 12 | 13 | \usepackage{listings} 14 | 15 | \lstset{ % 16 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 17 | showspaces=false, % show spaces adding particular underscores 18 | showstringspaces=false, % underline spaces within strings 19 | showtabs=false, % show tabs within strings adding particular underscores 20 | frame=single, % adds a frame around the code 21 | tabsize=2, % sets default tabsize to 2 spaces 22 | breaklines=true, % sets automatic line breaking 23 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 24 | } 25 | 26 | 27 | [% options.document_type = 'article' %] 28 | 29 | \title{[% page.basename %]} 30 | \date{[% strftime("%A %d %B %Y") %]} 31 | \author{} 32 | 33 | \begin{document} 34 | 35 | \maketitle 36 | 37 | [% page.body %] 38 | 39 | \end{document} 40 | -------------------------------------------------------------------------------- /data/templates/latex/Part.tex: -------------------------------------------------------------------------------- 1 | [% options.document_type = 'report' %] 2 | \part{[% page.basename %]} 3 | 4 | [% page.body %] 5 | -------------------------------------------------------------------------------- /data/templates/latex/Report.tex: -------------------------------------------------------------------------------- 1 | \documentclass{scrreprt} 2 | \usepackage[mathletters]{ucs} 3 | \usepackage[utf8x]{inputenc} 4 | \usepackage{amssymb} 5 | \usepackage{amsmath} 6 | \usepackage[usenames]{color} 7 | \usepackage{hyperref} 8 | \usepackage{wasysym} 9 | \usepackage{graphicx} 10 | \usepackage[normalem]{ulem} 11 | \usepackage{enumerate} 12 | 13 | \usepackage{listings} 14 | 15 | \lstset{ % 16 | basicstyle=\footnotesize, % the size of the fonts that are used for the code 17 | showspaces=false, % show spaces adding particular underscores 18 | showstringspaces=false, % underline spaces within strings 19 | showtabs=false, % show tabs within strings adding particular underscores 20 | frame=single, % adds a frame around the code 21 | tabsize=2, % sets default tabsize to 2 spaces 22 | breaklines=true, % sets automatic line breaking 23 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace 24 | } 25 | 26 | 27 | [% options.document_type = 'report' %] 28 | 29 | \title{[% page.basename %]} 30 | \date{[% strftime("%A %d %B %Y") %]} 31 | \author{} 32 | 33 | \begin{document} 34 | 35 | \maketitle 36 | 37 | \tableofcontents 38 | 39 | [% page.body %] 40 | 41 | \end{document} 42 | -------------------------------------------------------------------------------- /data/templates/markdown/Default.markdown: -------------------------------------------------------------------------------- 1 | # [% page.title %] 2 | [% page.body %] 3 | -------------------------------------------------------------------------------- /data/templates/plugins/equationeditor.tex: -------------------------------------------------------------------------------- 1 | \documentclass[12pt]{article} 2 | \pagestyle{empty} 3 | 4 | \usepackage{amssymb} 5 | \usepackage{amsmath} 6 | \usepackage[usenames]{color} 7 | 8 | \begin{document} 9 | 10 | % No empty lines allowed in math block ! 11 | \begin{align*} 12 | [% equation -%] 13 | \end{align*} 14 | 15 | \end{document} 16 | 17 | -------------------------------------------------------------------------------- /data/templates/plugins/gnu_r_editor.r: -------------------------------------------------------------------------------- 1 | png("[% png_fname %]") 2 | [% gnu_r_plot_script %] 3 | dev.off() 4 | -------------------------------------------------------------------------------- /data/templates/plugins/gnuploteditor.gnu: -------------------------------------------------------------------------------- 1 | set term png 2 | set output '[% png_fname %]' 3 | 4 | [% IF attachment_folder %] 5 | cd '[% attachment_folder %]' 6 | [% END %] 7 | 8 | [% gnuplot_script %] 9 | -------------------------------------------------------------------------------- /data/templates/plugins/quicknote.txt: -------------------------------------------------------------------------------- 1 | [% text %] 2 | 3 | [% IF url -%] 4 | Source: [% url %] 5 | [% END -%] 6 | //[% strftime("%A %d %B %Y") %]// 7 | -------------------------------------------------------------------------------- /data/templates/plugins/scoreeditor.ly: -------------------------------------------------------------------------------- 1 | \header { 2 | tagline = ##f 3 | } 4 | [% version %] 5 | \paper { 6 | raggedright = ##t 7 | raggedbottom = ##t 8 | indent = 0\mm 9 | } 10 | 11 | [% include_header %] 12 | 13 | [% score %] 14 | 15 | [% include_footer %] 16 | 17 | \layout { } 18 | -------------------------------------------------------------------------------- /data/templates/rst/Default.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | [% page.title %] 3 | ================ 4 | [% page.body %] 5 | -------------------------------------------------------------------------------- /data/templates/wiki/Default.txt: -------------------------------------------------------------------------------- 1 | ======= [% page.basename %] ======= 2 | Created [% strftime("%A %d %B %Y") %] 3 | 4 | -------------------------------------------------------------------------------- /data/templates/wiki/Journal.txt: -------------------------------------------------------------------------------- 1 | [% IF calendar_plugin.page_type == 'day' -%] 2 | ======= [% strftime("%A %d %b %Y", calendar_plugin.date) %] ======= 3 | 4 | [%- ELSIF calendar_plugin.page_type == 'week' -%] 5 | ======= [% strfcal("Week %W %Y", calendar_plugin.date) %] ======= 6 | [% strftime("%d %B", calendar_plugin.date) %] to [% strftime("%d %B", calendar_plugin.end_date) %] 7 | 8 | [% FOREACH day IN calendar_plugin.days() %] 9 | === [% strftime("%A %d %B", day) %] === 10 | 11 | [% END %] 12 | 13 | 14 | [%- ELSIF calendar_plugin.page_type == 'month' -%] 15 | ======= [% strftime("%B %Y", calendar_plugin.date) %] ======= 16 | 17 | [%- ELSIF calendar_plugin.page_type == 'year' -%] 18 | ======= Year [% strftime("%Y", calendar_plugin.date) %] ======= 19 | 20 | [%- ELSE -%] 21 | ======= [% page.basename %] ======= 22 | Created [% strftime("%A %d %B %Y") %] 23 | 24 | [%- END %] 25 | -------------------------------------------------------------------------------- /data/zim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/data/zim.png -------------------------------------------------------------------------------- /debian/compat: -------------------------------------------------------------------------------- 1 | 7 2 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | Source: zim 2 | Section: utils 3 | Priority: optional 4 | Maintainer: Jaap Karssenberg5 | Standards-Version: 3.9.4 6 | Build-Depends: debhelper (>= 7.4.12), cdbs, python-support (>= 0.8), xdg-utils, python (>= 2.6), libgtk2.0-0 (>= 2.6), python-gtk2, python-xdg 7 | # For testing should also include "python-unittest2 | python (>= 2.7)" 8 | # but this prevents building the package for Ubuntu Lucid, due to missing 9 | # unittest2 - but zim runs just find on Lucid 10 | 11 | Package: zim 12 | Architecture: all 13 | Homepage: http://zim-wiki.org/ 14 | Depends: ${python:Depends}, ${misc:Depends}, python (>= 2.6), python-gtk2, python-xdg 15 | # python-gtkspell required for the spell checker plugin 16 | Recommends: python-gtkspell 17 | # graphviz required for the link map/diagram plugins 18 | # bzr required for the version control plugin 19 | # scrot required for the screenshot plugin 20 | # dvipng required for the "equation" plugin 21 | Suggests: bzr, graphviz, scrot, dvipng 22 | Description: Desktop Wiki Editor 23 | Zim is a graphical text editor used to maintain a collection of wiki pages. 24 | Each page can contain links to other pages, simple formatting and images. 25 | Pages are stored in a folder structure, like in an outliner, and can have 26 | attachments. Creating a new page is as easy as linking to a nonexistent page. 27 | All data is stored in plain text files with wiki formatting. Various plugins 28 | provide additional functionality, like a task list manager, an equation editor, 29 | a tray icon, and support for version control. 30 | . 31 | Zim can be used to: 32 | * Keep an archive of notes 33 | * Take notes during meetings or lectures 34 | * Organize task lists 35 | * Draft blog entries and emails 36 | * Do brainstorming 37 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | This package was debianized by Bart de Koning 2 | on Wed, 26 Aug 2009 15:03:33 +0200 3 | 4 | It was downloaded from: https://code.launchpad.net/~pardus-cpan/zim/pyzim 5 | 6 | Upstream Author: 7 | 8 | Jaap Karssenberg 9 | 10 | Copyright: 11 | 12 | Copyright (C) 2008, 2009 Jaap Karssenberg 13 | 14 | License: 15 | 16 | This program is free software; you can redistribute it and/or modify 17 | it under the terms of the GNU General Public License as published by 18 | the Free Software Foundation; either version 2 of the License, or 19 | (at your option) any later version. 20 | 21 | This program is distributed in the hope that it will be useful, 22 | but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | GNU General Public License for more details. 25 | 26 | You should have received a copy of the GNU General Public License 27 | along with this program; if not, write to the Free Software 28 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 29 | MA 02110-1301, USA. 30 | 31 | On Debian systems, the complete text of the GNU General 32 | Public License can be found in `/usr/share/common-licenses/GPL' 33 | 34 | Packaging: 35 | 36 | Copyright (C) 2009 by Bart de Koning 37 | released under the GNU General Public License as published by 38 | the Free Software Foundation; either version 2 of the License, or 39 | (at your option) any later version. 40 | -------------------------------------------------------------------------------- /debian/pyversions: -------------------------------------------------------------------------------- 1 | 2.5,2.6,2.7 2 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # -*- makefile -*- 3 | 4 | DEB_PYTHON_SYSTEM := pysupport 5 | 6 | include /usr/share/cdbs/1/rules/debhelper.mk 7 | include /usr/share/cdbs/1/class/python-distutils.mk 8 | 9 | DEB_PYTHON_INSTALL_ARGS_ALL += --skip-xdg-cmd 10 | # Do not trigger XDG update commands 11 | 12 | clean:: 13 | rm -rf build build-stamp configure-stamp build/ MANIFEST 14 | dh_clean 15 | 16 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /epydoc.conf: -------------------------------------------------------------------------------- 1 | [epydoc] 2 | # Information about the project. 3 | name: Zim Desktop Wiki 4 | url: http://zim-wiki.org 5 | 6 | modules: zim 7 | 8 | # Write html output to the directory "apidocs" 9 | output: html 10 | target: apidocs/ 11 | include-log: yes 12 | 13 | # Graph options 14 | graph: classtree 15 | 16 | # Code parsing options 17 | parse: yes 18 | introspect: no 19 | 20 | # Exclude private methods and signal handlers 21 | private: no 22 | exclude: zim\.inc\..* .*\.on_.* .*\.do_.* 23 | 24 | -------------------------------------------------------------------------------- /icons/zim.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/icons/zim.ico -------------------------------------------------------------------------------- /icons/zim16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/icons/zim16.png -------------------------------------------------------------------------------- /icons/zim22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/icons/zim22.png -------------------------------------------------------------------------------- /icons/zim24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/icons/zim24.png -------------------------------------------------------------------------------- /icons/zim32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/icons/zim32.png -------------------------------------------------------------------------------- /icons/zim48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/icons/zim48.png -------------------------------------------------------------------------------- /maemo/README-BUILD-Maemo.txt: -------------------------------------------------------------------------------- 1 | 2 | In order to include maemo specific files in the build the 'ZIM_BUILD_TARGET' 3 | environment variable need to be set to 'maemo' when running setup.py. 4 | 5 | So for cross compiling the package for maemo run: 6 | 7 | ZIM_BUILD_TARGET=maemo ./setup.py install --root /path/to/package/dir 8 | 9 | -------------------------------------------------------------------------------- /maemo/applications/fennec.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Name=Firefox (maemo) 4 | Exec=fennec %u 5 | TryExec=fennec 6 | Terminal=false 7 | Type=Application 8 | Icon=fennec 9 | X-Zim-AppType=web_browser 10 | -------------------------------------------------------------------------------- /maemo/applications/hildon-mime-summon.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Exec=hildon-mime-summon 5 | TryExec=hildon-mime-summon 6 | Icon=file-manager 7 | NoDisplay=true 8 | X-Zim-AppType=file_browser 9 | Name=hildon-mime-summon (maemo) 10 | -------------------------------------------------------------------------------- /maemo/applications/microb.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Exec=browser --url %u 5 | TryExec=browser 6 | Icon=qgn_list_browser 7 | NoDisplay=true 8 | X-Zim-AppType=web_browser 9 | Name=Microb (maemo) 10 | -------------------------------------------------------------------------------- /maemo/applications/modest.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Exec=modest-mailto.sh 5 | TryExec=modest-mailto.sh 6 | Icon=qgn_list_messagin 7 | NoDisplay=true 8 | X-Zim-AppType=email_client 9 | Name=Modest (maemo) 10 | -------------------------------------------------------------------------------- /maemo/applications/opera.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Name=Opera Web Browser 4 | Exec=opera %u 5 | Terminal=false 6 | Type=Application 7 | Icon=opera 8 | X-Zim-AppType=web_browser 9 | Name[ca]=Navegador web Opera 10 | Name[cs]=Opera Webový prohlížeč 11 | Name[es]=Navegador web Opera 12 | Name[fa]=مرورگر اینترنتی Opera 13 | Name[fi]=Opera-selain 14 | Name[fr]=Navigateur Web Opera 15 | Name[hu]=Opera webböngésző 16 | Name[it]=Opera Browser Web 17 | Name[ja]=Opera ウェブ・ブラウザ 18 | Name[ko]=Opera 웹 브라우저 19 | Name[nb]=Opera Nettleser 20 | Name[nl]=Opera webbrowser 21 | Name[nn]=Opera Nettlesar 22 | Name[no]=Opera Nettleser 23 | Name[pl]=Przeglądarka WWW Opera 24 | Name[pt]=Opera Navegador Web 25 | Name[pt_BR]=Navegador Web Opera 26 | Name[sk]=Internetový prehliadač Opera 27 | Name[sv]=Webbläsaren Opera 28 | -------------------------------------------------------------------------------- /maemo/applications/tear.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Name=Tear (maemo) 4 | Exec=tear %u 5 | TryExec=tear 6 | Terminal=false 7 | Type=Application 8 | Icon=tear 9 | X-Zim-AppType=web_browser 10 | -------------------------------------------------------------------------------- /maemo/hildon-mime-summon.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2007 Tuomas Kulve 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2, or (at your option) 7 | * any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 17 | * USA. 18 | 19 | gcc `pkg-config --cflags --libs libhildonmime glib-2.0 libosso` bz3688-loop.c -o with-loop 20 | 21 | 22 | */ 23 | 24 | #ifdef HAVE_CONFIG_H 25 | # include 26 | #endif 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | 34 | int main(int argc, char *argv[]) 35 | { 36 | DBusConnection *dbus; 37 | osso_context_t *osso; 38 | GMainLoop* mainloop = NULL; 39 | 40 | int retval; 41 | 42 | if (argc != 2 && argc != 3) { 43 | fprintf(stderr, "Usage: %s [mimetype] file\n", argv[0]); 44 | return -1; 45 | } 46 | 47 | /* Initialize libosso */ 48 | osso = osso_initialize("osso-mime-summon", "0.1", TRUE, NULL); 49 | if (osso == NULL) { 50 | fprintf(stderr, "Failed to initialize libosso\n"); 51 | return -1; 52 | } 53 | 54 | dbus = (DBusConnection *) osso_get_dbus_connection(osso); 55 | if (dbus == NULL) { 56 | fprintf(stderr, "Failed to get dbus connection from osso context\n"); 57 | return -1; 58 | } 59 | 60 | mainloop = g_main_loop_new(NULL, FALSE); 61 | if (mainloop == NULL) { 62 | /* Print error and terminate. */ 63 | g_print("Couldn't create GMainLoop"); 64 | return -1; 65 | } 66 | 67 | if (argc == 2) { 68 | /* launch the file with automatic mime type detection */ 69 | retval = hildon_mime_open_file(dbus, argv[1]); 70 | if (retval != 1) { 71 | fprintf(stderr, "Failed to launch hildon_mime_open_file: %d\n", retval); 72 | return -1; 73 | } 74 | } else { 75 | /* launch the file with given mime type */ 76 | retval = hildon_mime_open_file_with_mime_type(dbus, argv[2], argv[1]); 77 | if (retval != 1) { 78 | fprintf(stderr, 79 | "Failed to launch hildon_mime_open_file_with_mime_type: %d\n", 80 | retval); 81 | return -1; 82 | } 83 | } 84 | 85 | g_main_loop_run(mainloop); 86 | 87 | 88 | return 0; 89 | } 90 | -------------------------------------------------------------------------------- /maemo/modest-mailto.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dbus-send --session --type=method_call --dest=com.nokia.modest --print-reply /com/nokia/modest com.nokia.modest.MailTo string:"$1" 3 | -------------------------------------------------------------------------------- /maemo/zim-26x26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/maemo/zim-26x26.png -------------------------------------------------------------------------------- /makeman.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright 2009 Jaap Karssenberg 6 | 7 | import os 8 | 9 | from time import strftime 10 | 11 | from zim import __version__, __url__, \ 12 | __author__, __copyright__, __license__ 13 | from zim.main import HelpCommand 14 | 15 | 16 | def get_about(): 17 | '''Get the tagline and short description from the README''' 18 | readme = open('README.txt') 19 | lines = [] 20 | for line in readme: 21 | if line.startswith('===') and 'ABOUT' in line: 22 | for line in readme: 23 | if line.startswith('==='): 24 | break 25 | else: 26 | lines.append(line) 27 | break 28 | 29 | lines = ''.join(lines).strip().splitlines(True) 30 | assert lines and lines[0].startswith('Zim - ') 31 | tagline = lines[0][6:].strip() 32 | about = ''.join(lines[1:]).strip() 33 | 34 | return tagline, about 35 | 36 | 37 | def make(): 38 | '''Generate man page for zim''' 39 | 40 | tagline, about = get_about() 41 | try: 42 | os.mkdir('man') 43 | except OSError: 44 | pass # dir already exists 45 | manpage = open('man/zim.1', 'w') 46 | manpage.write('.TH ZIM "1" "%s" "zim %s" "User Commands"\n' % (strftime('%B %Y'), __version__)) 47 | manpage.write('.SH NAME\nzim \\- %s\n\n' % tagline) 48 | manpage.write('.SH SYNOPSIS\n%s\n' % HelpCommand.usagehelp.replace('-', r'\-')) 49 | manpage.write('.SH DESCRIPTION\n%s\n' % about) 50 | manpage.write('.SH OPTIONS\n%s\n' % HelpCommand.optionhelp.replace('-', r'\-')) 51 | manpage.write('.SH AUTHOR\n%s\n\n' % __author__) 52 | manpage.write( '''\ 53 | .SH "SEE ALSO" 54 | The full documentation for 55 | .B zim 56 | is maintained as a zim notebook. The command 57 | .IP 58 | .B zim --manual 59 | .PP 60 | should give you access to the complete manual. 61 | 62 | The website for 63 | .B zim 64 | can be found at 65 | .I %s 66 | ''' % __url__) 67 | manpage.close() 68 | 69 | 70 | if __name__ == '__main__': 71 | make() 72 | -------------------------------------------------------------------------------- /tests/data/byteordermark.txt: -------------------------------------------------------------------------------- 1 | foobar 2 | -------------------------------------------------------------------------------- /tests/data/formats/README.txt: -------------------------------------------------------------------------------- 1 | This folder contains an example page in various formats for testing 2 | the conversions from one format to another. 3 | 4 | In order to update the contents you typically make changes to 5 | "wiki.txt" and run update.sh to update the other files. 6 | 7 | MAKE SURE THE UPDATES ARE CORRECT by inspecting the diffs very 8 | carefully! 9 | -------------------------------------------------------------------------------- /tests/data/formats/equation001.tex: -------------------------------------------------------------------------------- 1 | \int \frac{1}{x} \, d x 2 | -------------------------------------------------------------------------------- /tests/data/formats/update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | P='tests/data/formats' 4 | 5 | cat $P/wiki.txt | python -m zim.formats wiki > $P/parsetree.xml 6 | cat $P/wiki.txt | python -m zim.formats wiki plain $P > $P/plain.txt 7 | cat $P/wiki.txt | python -m zim.formats wiki html $P > $P/export.html 8 | cat $P/wiki.txt | python -m zim.formats wiki latex $P > $P/export.tex 9 | cat $P/wiki.txt | python -m zim.formats wiki markdown $P > $P/export.markdown 10 | cat $P/wiki.txt | python -m zim.formats wiki rst $P > $P/export.rst 11 | -------------------------------------------------------------------------------- /tests/data/non-utf8.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/tests/data/non-utf8.txt -------------------------------------------------------------------------------- /tests/data/notebook-list-old-format.list: -------------------------------------------------------------------------------- 1 | _default_ debug 2 | Notes ~/Notes 3 | debug /home/user/code/zim.debug 4 | Foo\ Bar /home/user/Foo\ Bar 5 | -------------------------------------------------------------------------------- /tests/data/notebook.gjots: -------------------------------------------------------------------------------- 1 | Some test file in gjots format 2 | 3 | By me 4 | \NewEntry 5 | 6 | Front page without title 7 | \NewEntry 8 | Pages 9 | \NewFolder 10 | \NewEntry 11 | Foo 12 | 13 | FooBaR! 14 | \NewEntry 15 | Bar 16 | 17 | Dusss 18 | \EndFolder 19 | \NewEntry 20 | Some toplevel page 21 | \NewEntry 22 | More Pages 23 | \NewFolder 24 | level1 25 | \NewFolder 26 | level2 27 | \NewEntry 28 | Hmmm 29 | 30 | dus 31 | \EndFolder 32 | \EndFolder 33 | 34 | -------------------------------------------------------------------------------- /tests/data/templates/html/Default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | [% title %] 6 | 7 | 25 | 26 | 27 | 28 | 29 | 30 | [% IF pages.previous -%] 31 | [ Prev ] 32 | [%- ELSE -%] 33 | [ Prev ] 34 | [%- END %] 35 | 36 | [% IF page.properties.type == 'namespace-index' -%] 37 | [ Index ] 38 | [%- ELSE -%] 39 | [% IF pages.index -%] 40 | [ Index ] 41 | [%- ELSE -%] 42 | [ Index ] 43 | [%- END %] 44 | [%- END %] 45 | 46 | [% IF pages.next -%] 47 | [ Next ] 48 | [%- ELSE -%] 49 | [ Next ] 50 | [%- END %] 51 | 52 | 53 | 54 |
55 | 56 | 57 | 58 | [% IF page.properties.type == 'namespace-index' -%] 59 |Document Index
60 | [%- ELSE -%] 61 |[% page.heading %]
62 | [%- END %] 63 | 64 | [% page.body %] 65 | 66 | 67 | 68 |
69 | Powered by Zim [% zim.version %]70 | 71 | 72 | [% IF page.backlinks -%] 73 | Backlinks: 74 | [%- FOREACH link = page.backlinks -%] 75 | [% link.name %] 76 | [%- END -%] 77 | [%- ELSE -%] 78 | No backlinks to this page. 79 | [%- END %] 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /tests/data/templates/html/Default/checked-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/tests/data/templates/html/Default/checked-box.png -------------------------------------------------------------------------------- /tests/data/templates/html/Default/foo/bar.png: -------------------------------------------------------------------------------- 1 | FOO BAR 2 | -------------------------------------------------------------------------------- /tests/datetimetz.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2014 Jaap Karssenberg
4 | 5 | 6 | from __future__ import with_statement 7 | 8 | import tests 9 | 10 | import warnings 11 | 12 | import zim.datetimetz as datetime 13 | 14 | 15 | class TestDateTimeZ(tests.TestCase): 16 | 17 | # FIXME would be better to test correctness of results 18 | # but first check functions do not give errors 19 | 20 | def setUp(self): 21 | with warnings.catch_warnings(): 22 | warnings.simplefilter("ignore") 23 | try: 24 | import babel 25 | except ImportError: 26 | pass 27 | 28 | def runTest(self): 29 | # now() 30 | dt = datetime.now() 31 | s = dt.isoformat() 32 | self.assertTrue(isinstance(s, basestring) and len(s) > 0) 33 | 34 | s = dt.strftime("%z") 35 | self.assertTrue(isinstance(s, basestring) and len(s) > 0) 36 | 37 | s = dt.strftime("%Z") 38 | self.assertTrue(isinstance(s, basestring) and len(s) > 0) 39 | 40 | # strftime 41 | s = datetime.strftime('%a', dt) 42 | self.assertTrue(isinstance(s, basestring) and len(s) > 0) 43 | 44 | s = datetime.strftime('%%', dt) 45 | self.assertEqual(s, '%') 46 | 47 | s = datetime.strftime('%u', dt) 48 | self.assertTrue(isinstance(s, basestring) and len(s) > 0) 49 | 50 | s = datetime.strftime('%V', dt) 51 | self.assertTrue(isinstance(s, basestring) and len(s) > 0) 52 | 53 | # strfcal 54 | s = datetime.strfcal('%w', dt) 55 | self.assertTrue(isinstance(s, basestring) and len(s) > 0) 56 | 57 | s = datetime.strfcal('%W', dt) 58 | self.assertTrue(isinstance(s, basestring) and len(s) > 0) 59 | 60 | s = datetime.strfcal('%Y', dt) 61 | self.assertTrue(isinstance(s, basestring) and len(s) > 0) 62 | 63 | s = datetime.strfcal('%%', dt) 64 | self.assertEqual(s, '%') 65 | 66 | # weekcalendar 67 | year, week, weekday = datetime.weekcalendar(dt) 68 | self.assertTrue(isinstance(year, int) and 1900 < year and 3000 > year) 69 | self.assertTrue(isinstance(week, int) and 1 <= week and 53 >= week) 70 | self.assertTrue(isinstance(weekday, int) and 1 <= weekday and 7 >= weekday) 71 | 72 | # dates_for_week 73 | start, end = datetime.dates_for_week(year, week) 74 | self.assertTrue(isinstance(start, datetime.date)) 75 | self.assertTrue(isinstance(end, datetime.date)) 76 | self.assertTrue(start <= dt.date() and end >= dt.date()) 77 | -------------------------------------------------------------------------------- /tests/inlinecalculator.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2008 Jaap Karssenberg 4 | 5 | import tests 6 | 7 | import zim.plugins 8 | 9 | 10 | @tests.slowTest 11 | class TestPrintToBrowser(tests.TestCase): 12 | 13 | def runTest(self): 14 | 'Test InlineCalculator plugin' 15 | pluginklass = zim.plugins.get_plugin_class('inlinecalculator') 16 | plugin = pluginklass() 17 | 18 | for text, wanted in ( 19 | ('3 + 4 =', '3 + 4 = 7'), 20 | ('3 + 4 = 1', '3 + 4 = 7'), 21 | ('3 + 4 = 1 ', '3 + 4 = 7 '), 22 | ('10 / 3 =', '10 / 3 = 3.33333333333'), # divide integers to float ! 23 | ('milage: 3 + 4 =', 'milage: 3 + 4 = 7'), 24 | ('3 + 4 = 7 + 0.5 = ', '3 + 4 = 7 + 0.5 = 7.5'), 25 | ('''\ 26 | 5.5 27 | 4.3 28 | 3.1 29 | --- + 30 | ''', 31 | 32 | '''\ 33 | 5.5 34 | 4.3 35 | 3.1 36 | --- + 37 | 12.9 38 | ''' ), 39 | ): 40 | result = plugin.process_text(text) 41 | self.assertEqual(result, wanted) 42 | 43 | # Tests from clac.py self test 44 | for test in '''\ 45 | 1+2 == 3 46 | sqrt(-1) == j 47 | -2*asin(-1) == pi 48 | abs(sin(pi)) < 1e-9 49 | abs(1-cos(0)) < 1e-9 50 | round( 3.1 + -4.8j) == (3-5j) 51 | ceil( 3.1 + -4.8j) == (4-4j) 52 | abs( 3-4j) == 5 53 | degrees(pi) == 180 54 | radians(180) == pi 55 | abs( exp(j*pi) + 1 ) < 1e-9 56 | # pow(1.2,3.4) == 1.2**3.4 57 | ldexp(1.2,3) == 1.2 * 2 ** 3 58 | modf(1.2)[1] == 1 59 | log(81,3) == 4 60 | gcd(6,8) == 2 61 | lcm(6,8) == 24 62 | angle( exp( j*pi ) ) == pi 63 | # log(-1)**2 == -1*pow(pi,2) 64 | round( degrees(phase( e**(2j)))) == 115 65 | # sum( [ round(42 * exp(j*2*x*pi/4)) for x in range(4)] ) == 0 66 | oct(8) == '010' 67 | 0x42-042-42 == -10 68 | # 1k == 1024 69 | # 1m == 2**20 70 | # 1g == 2**30 71 | 2**10-1 == 1023 72 | # 2**1k == 2**1024 73 | '''.splitlines(): 74 | if test.startswith('#'): 75 | continue 76 | #~ print 'TESTING:', test 77 | self.assertTrue(plugin.safe_eval(test)) 78 | 79 | self.assertRaises(Exception, plugin.process_text, 'open("/etc/passwd")') # global 80 | self.assertRaises(Exception, plugin.process_text, 'self') # local 81 | 82 | -------------------------------------------------------------------------------- /tests/objectmanager.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2011 Jaap Karssenberg 4 | 5 | import tests 6 | 7 | from zim.objectmanager import * 8 | 9 | 10 | class TestObjectManager(tests.TestCase): 11 | 12 | def runTest(self): 13 | '''Test object manager for inline objects''' 14 | manager = ObjectManager 15 | 16 | # registering 17 | self.assertFalse(manager.is_registered('classa')) 18 | self.assertFalse(manager.is_registered('classb')) 19 | self.assertFalse(manager.is_registered('foo')) 20 | 21 | manager.register_object('classa', classafactory) 22 | manager.register_object('classb', ClassB) 23 | 24 | self.assertTrue(manager.is_registered('classa')) 25 | self.assertTrue(manager.is_registered('classb')) 26 | self.assertFalse(manager.is_registered('foo')) 27 | 28 | # get objects 29 | self.assertEqual(list(manager.get_active_objects('classa')), []) 30 | self.assertEqual(list(manager.get_active_objects('classb')), []) 31 | 32 | obj = manager.get_object('classa', {}, '') 33 | self.assertTrue(isinstance(obj, ClassA)) 34 | 35 | self.assertEqual(list(manager.get_active_objects('classa')), [obj]) 36 | self.assertEqual(list(manager.get_active_objects('classb')), []) 37 | 38 | self.assertTrue(isinstance(manager.get_object('classb', {}, ''), ClassB)) 39 | self.assertTrue(isinstance(manager.get_object('foo', {}, ''), FallbackObject)) 40 | 41 | # unregister 42 | self.assertTrue(manager.is_registered('classa')) 43 | self.assertTrue(manager.unregister_object('classa')) 44 | self.assertFalse(manager.is_registered('classa')) 45 | self.assertFalse(manager.unregister_object('classa')) 46 | 47 | # find plugin 48 | from zim.plugins.sourceview import SourceViewPlugin 49 | self.assertEqual( 50 | manager.find_plugin('code'), 51 | ('sourceview', 'Source View', True, SourceViewPlugin) 52 | ) 53 | 54 | 55 | def classafactory(attrib, text, ui): 56 | return ClassA(attrib, text, ui) 57 | 58 | 59 | class ClassA(CustomObjectClass): 60 | pass 61 | 62 | 63 | class ClassB(CustomObjectClass): 64 | pass 65 | 66 | 67 | class TestFallbackObject(tests.TestCase): 68 | 69 | def runTest(self): 70 | attrib = {'lang': 'text/html'} 71 | text = '''test 123\n''' 72 | obj = FallbackObject(attrib, text) 73 | 74 | self.assertEqual(obj.get_data(), text) 75 | -------------------------------------------------------------------------------- /tests/printtobrowser.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2008 Jaap Karssenberg 4 | 5 | import tests 6 | 7 | import zim.plugins 8 | from zim.notebook import Path 9 | 10 | 11 | @tests.slowTest 12 | class TestPrintToBrowser(tests.TestCase): 13 | 14 | def runTest(self): 15 | 'Test PrintToBrowser plugin' 16 | pluginklass = zim.plugins.get_plugin_class('printtobrowser') 17 | plugin = pluginklass() 18 | 19 | notebook = tests.new_notebook() 20 | page = notebook.get_page(Path('Test:foo')) 21 | file = plugin.print_to_file(notebook, page) 22 | self.assertTrue(file.exists()) 23 | content = file.read() 24 | self.assertTrue(' Foo
' in content) 25 | 26 | -------------------------------------------------------------------------------- /tests/signals.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2013 Jaap Karssenberg4 | 5 | 6 | from __future__ import with_statement 7 | 8 | import tests 9 | 10 | import time 11 | 12 | from zim.signals import * 13 | 14 | 15 | class TestEmitter(tests.TestCase): 16 | 17 | def runTest(self): 18 | 19 | # Test hook 20 | emitter = Emitter() 21 | self.assertIsNone(emitter.emit('foo', 'x')) 22 | 23 | emitter.connect('foo', lambda o, a: a * 3) 24 | emitter.connect('foo', lambda o, a: a * 5) 25 | self.assertEqual(emitter.emit('foo', 'x'), 'xxx') 26 | # pick first result 27 | 28 | 29 | # TODO test Connector, DelayedCallback 30 | 31 | class Emitter(SignalEmitter): 32 | 33 | __hooks__ = ('foo') 34 | 35 | 36 | 37 | class TestSignalHandler(tests.TestCase): 38 | 39 | def runTest(self): 40 | obj = ClassWithHandler() 41 | self.assertEqual(obj.count, 0) 42 | self.assertEqual(id(obj.add_one), id(obj.add_one)) # unique instance object 43 | 44 | obj.add_one() 45 | self.assertEqual(obj.count, 1) 46 | 47 | with obj.add_one.blocked(): 48 | obj.add_one() 49 | obj.add_one() 50 | obj.add_one() 51 | self.assertEqual(obj.count, 1) 52 | 53 | obj.add_one() 54 | obj.add_one() 55 | obj.add_one() 56 | self.assertEqual(obj.count, 4) 57 | 58 | 59 | class ClassWithHandler(object): 60 | 61 | def __init__(self): 62 | self.count = 0 63 | 64 | @SignalHandler 65 | def add_one(self): 66 | self.count += 1 67 | 68 | 69 | 70 | 71 | @tests.slowTest 72 | class TestDelayedCallback(tests.TestCase): 73 | 74 | def runTest(self): 75 | counter = tests.Counter() 76 | 77 | callback = DelayedCallback(500, lambda o: counter()) 78 | for i in range(3): 79 | callback('foo') 80 | 81 | for i in range(10): 82 | time.sleep(1) 83 | tests.gtk_process_events() 84 | if callback.timer_id is None: 85 | break 86 | 87 | self.assertEqual(counter.count, 1) 88 | -------------------------------------------------------------------------------- /tools/build_website.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | rm -fr './html' 4 | 5 | ./zim.py --export ./website/pages/ -V \ 6 | --template ./website/template.html \ 7 | --output ./html/ \ 8 | --root-url / 9 | 10 | ./zim.py --export ./data/manual/ -V \ 11 | --template ./website/template.html \ 12 | --output ./html/manual/ \ 13 | --root-url / 14 | 15 | cp -R website/files/* html/ 16 | 17 | # HACKs to include raw HTML 18 | perl -i -pe 's{INSERT_SCREENCAST_HERE}{}' html/screenshots.html 19 | 20 | perl -i -pe 's{INSERT_PAYPAL_BUTTON_HERE}{}' html/contribute.html 26 | 27 | perl -i -pe 's{http://www.zim-wiki.org/wiki/doku.php%3Fid%3D}{http://www.zim-wiki.org/wiki/doku.php?id=}' html/contribute.html 28 | 29 | -------------------------------------------------------------------------------- /tools/class_tree.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | 5 | class TextTree(object): 6 | 7 | def tostring(self, object): 8 | strings = self.tostrings(object) 9 | return ''.join(strings) 10 | 11 | def tostrings(self, object): 12 | strings = [object.name + '\n'] 13 | 14 | def add_item(item, ps1, ps2): 15 | if isinstance(item, basestring): 16 | strings.append(ps1 + item + '\n') 17 | else: 18 | substrings = self.tostrings(item) # recurs 19 | strings.append(ps1 + substrings.pop(0)) 20 | strings.extend([ps2 + s for s in substrings]) 21 | 22 | items = object.items() 23 | if items: 24 | for i in range(len(items)-1): 25 | add_item(items[i], '|-- ', '| ') 26 | add_item(items[-1], '`-- ', ' ') 27 | 28 | return strings 29 | 30 | 31 | 32 | class ModuleFile(object): 33 | 34 | def __init__(self, file): 35 | assert os.path.isfile(file), 'Could not find file: %s' % file 36 | self.file = file 37 | self.name = os.path.basename(file)[:-3] 38 | 39 | self.classes = [] 40 | for line in open(self.file): 41 | line = line.strip() 42 | if line.startswith('class') and line.endswith(':'): 43 | self.classes.append(line[5:-1].strip()) 44 | 45 | def items(self): 46 | return self.classes[:] 47 | 48 | 49 | class ModuleDir(ModuleFile): 50 | 51 | def __init__(self, dir): 52 | assert os.path.isdir(dir), 'Could not find dir: %s' % dir 53 | ModuleFile.__init__(self, dir+'/__init__.py') 54 | self.dir = dir 55 | self.name = os.path.basename(dir) 56 | self.modules = [] 57 | 58 | paths = [dir+'/'+p for p in os.listdir(dir) if not p.startswith('_')] 59 | for file in [f for f in paths if f.endswith('.py')]: 60 | self.modules.append(ModuleFile(file)) 61 | for subdir in [d for d in paths if os.path.isdir(d)]: 62 | self.modules.append(ModuleDir(subdir)) 63 | 64 | self.modules.sort(key=lambda m: m.name) 65 | 66 | def items(self): 67 | items = ModuleFile.items(self) 68 | items.extend(self.modules) 69 | return items 70 | 71 | 72 | if __name__ == '__main__': 73 | dir = ModuleDir('./zim') 74 | print TextTree().tostring(dir) 75 | -------------------------------------------------------------------------------- /tools/clean.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | '''Tool to cleanup the source directory''' 4 | 5 | import os 6 | import sys 7 | import shutil 8 | from subprocess import Popen, PIPE 9 | 10 | def main(remove=False): 11 | pipe = Popen('bzr ls --ignored', shell=True, stdout=PIPE).stdout 12 | print 'rm *.pyc' 13 | for line in pipe.readlines(): 14 | file = line.strip() 15 | if os.path.isfile(file): 16 | if not file.endswith('.pyc'): 17 | print 'rm %s' % file 18 | if remove: 19 | os.remove(file) 20 | elif os.path.isdir(file): 21 | print 'rmtree %s' % file 22 | if remove: 23 | shutil.rmtree(file) 24 | pipe.close() 25 | 26 | if __name__ == '__main__': 27 | warning = '\n### This is a test run, use --force to really delete\n' 28 | 29 | if len(sys.argv) == 2 and sys.argv[1] == '--force': 30 | main(remove=True) 31 | else: 32 | print warning 33 | main(remove=False) 34 | print warning 35 | -------------------------------------------------------------------------------- /tools/dump_clipboard.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | '''Interactively dumps clipboard contents to stdout''' 4 | 5 | import gtk 6 | import sys 7 | 8 | clipboard = gtk.Clipboard() 9 | targets = clipboard.wait_for_targets() 10 | 11 | print "="*80 12 | print "Enter a number to see a specific target, or to exit" 13 | print "Available targets:" 14 | for i in range(len(targets)): 15 | print i, targets[i] 16 | 17 | line = sys.stdin.readline().strip() 18 | while line: 19 | target = targets[int(line)] 20 | print '>>>>', target 21 | selection = clipboard.wait_for_contents(target) 22 | if selection: 23 | text = selection.get_text() 24 | if not text is None: 25 | print '== Text:', text 26 | else: 27 | print '== Data:', selection.data 28 | else: 29 | print '== No contents' 30 | print '<<<<' 31 | line = sys.stdin.readline().strip() 32 | -------------------------------------------------------------------------------- /tools/extract_dependencies.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | 5 | def extract_deps(file): 6 | #~ print 'Extracting from %s' % file 7 | deps = set() 8 | for line in open(file).readlines(): 9 | line = line.strip() 10 | if line.startswith('import') or line.startswith('from'): 11 | words = line.split() 12 | if words[0] == 'import' or (words[0] == 'from' and words[2] == 'import'): 13 | deps.add(words[1]) 14 | return deps 15 | 16 | def main(): 17 | deps = set() 18 | deps.update( extract_deps('zim.py') ) 19 | for dir, dirs, files in os.walk('zim/'): 20 | for file in filter(lambda f: f.endswith('.py'), files): 21 | deps.update( extract_deps(dir+'/'+file) ) 22 | deps = [d for d in deps if not d.startswith('zim')] 23 | deps.sort() 24 | 25 | for d in deps: 26 | print d 27 | 28 | if __name__ == '__main__': 29 | main() 30 | -------------------------------------------------------------------------------- /tools/extract_translator_comments.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import re 4 | 5 | source_files = {} 6 | 7 | comment_re = re.compile(r'\s+#\s+T:\s+(.+)\s*$') 8 | 9 | def get_file(file): 10 | if not file in source_files: 11 | #~ print 'Extracting comments from', file 12 | source_files[file] = open(file).readlines() 13 | source_files[file].append('') 14 | return source_files[file] 15 | 16 | def extract_comment(file, line): 17 | lines = get_file(file) 18 | line -= 1 # list is 0 based 19 | match = comment_re.search(lines[line]) 20 | if match: 21 | # comment on same line 22 | return match.group(1) 23 | else: 24 | # search next line(s) for a comment 25 | i = line+1 26 | while i < len(lines): 27 | if '_(' in lines[i] or 'gettext(' in lines[i]: 28 | break 29 | else: 30 | match = comment_re.search(lines[i]) 31 | if match: 32 | return match.group(1) 33 | i += 1 34 | return None 35 | 36 | def extract_comments(sources): 37 | sources = [s.split(':') for s in sources] 38 | comments = [] 39 | for file, line in sources: 40 | comment = extract_comment(file, int(line)) 41 | if comment and comment not in comments: 42 | comments.append(comment) 43 | if comments: 44 | return ' | \n'.join(['#. '+c for c in comments])+'\n' 45 | else: 46 | print 'No translator comment for:' 47 | for file, line in sources: 48 | print '\t%s line %s' % (file, line) 49 | return '' 50 | 51 | def add_comments(file): 52 | messages = open(file).readlines() 53 | fh = open(file, 'w') 54 | 55 | while messages: 56 | line = messages.pop(0) 57 | if line.startswith('#: '): 58 | lines = [line] 59 | sources = line[3:].strip().split() 60 | while messages[0].startswith('#: '): 61 | line = messages.pop(0) 62 | lines.append(line) 63 | sources += line[3:].strip().split() 64 | fh.write(extract_comments(sources)) 65 | fh.writelines(lines) 66 | elif line.startswith('#. '): 67 | pass 68 | else: 69 | fh.write(line) 70 | 71 | if __name__ == '__main__': 72 | add_comments('translations/zim.pot') 73 | -------------------------------------------------------------------------------- /tools/generate_test_notebook.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | import os 5 | 6 | if len(sys.argv) != 4: 7 | print 'Usage: %s directory with depth' % sys.argv[0] 8 | sys.exit(1) 9 | 10 | root, width, depth = sys.argv[1:] 11 | width = int(width) 12 | depth = int(depth) 13 | 14 | assert not os.path.exists(root), 'Need new directory' 15 | 16 | name = 'some_page_%i_%i' 17 | content = '''\ 18 | Content-Type: text/x-zim-wiki 19 | Wiki-Format: zim 0.26 20 | 21 | ====== Some Page ====== 22 | //Some test data// 23 | 24 | Foooo Bar! 25 | 26 | TODO: insert random links here 27 | ''' 28 | content += ('la la laaa'*20 + '\n') * 10 29 | 30 | def populate_level(path, j): 31 | path += os.path.sep 32 | os.mkdir(path) 33 | d = 1 34 | 35 | for i in range(width): 36 | myname = name % (j, i) 37 | 38 | file = path + myname + '.txt' 39 | print '>', file 40 | fh = open(file, 'w') 41 | fh.write(content) 42 | fh.close() 43 | 44 | if j < depth: 45 | d += populate_level(path + myname, j+1) 46 | 47 | return d 48 | 49 | d = populate_level(root, 0) 50 | f = d * width 51 | 52 | print 'Total %i files %i directories' % (f, d) 53 | print 'Done' 54 | -------------------------------------------------------------------------------- /tools/import-launchpad-translations.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | import tarfile 5 | import re 6 | 7 | MIN_TRANLATIONS = 300 8 | 9 | def count_messages(file): 10 | return count('msgid', file) + 1 11 | # The +1 is for the first message, which is empty and translates 12 | # with all meta data 13 | 14 | def count_translations(file): 15 | return count('msgstr', file) 16 | 17 | def count(prefix, file): 18 | count = 0 19 | l = len(prefix) 20 | check_multiline = False # track multiline messages 21 | for line in file: 22 | if line.startswith(prefix): 23 | string = line[l:].strip().strip('"') 24 | if string: 25 | count +=1 26 | check_multiline = False 27 | else: 28 | check_multiline = True 29 | # Can still be start of multiline block .. 30 | elif check_multiline \ 31 | and line.startswith('"'): 32 | count += 1 33 | check_multiline = False 34 | else: 35 | check_multiline = False 36 | return count 37 | 38 | def get_lang(name): 39 | match = re.search(r'(^|[-/])(\w+).po$', name) 40 | assert match, 'Could not parse LANG from %s !?' % name 41 | return match.group(2) 42 | 43 | def import_translations_from(archive): 44 | tfile = tarfile.open(archive, 'r:gz') 45 | names = tfile.getnames() 46 | #~ print names 47 | 48 | potfiles = [n for n in names if n.endswith('.pot')] 49 | assert len(potfiles) == 1, 'Multiple template files in this archive !?' 50 | total = count_messages(tfile.extractfile(potfiles[0])) 51 | print '%i messages in catalogue' % total 52 | 53 | pofiles = [] 54 | for name in [n for n in names if n.endswith('.po')]: 55 | lang = get_lang(name) 56 | file = tfile.extractfile(name).readlines() 57 | n = count_translations(file) 58 | pofiles.append((n, lang, file)) 59 | 60 | files = [] 61 | for n, lang, file in pofiles: 62 | perc = float(n) / total * 100 63 | if n >= MIN_TRANLATIONS: 64 | status = 'OK' 65 | files.append(('translations/%s.po' % lang, file)) 66 | else: 67 | status = '' 68 | print '%-6s %i translated (%i%%) %s' % (lang, n, perc, status) 69 | 70 | for path, file in files: 71 | print 'Writing %s' % path 72 | open(path, 'w').writelines(file) 73 | 74 | print '\nPlease check `bzr st` for newly added translations and update CHANGELOG' 75 | print 'You need to run `./setup.py build_trans` to use the newly imported po files' 76 | 77 | if __name__ == '__main__': 78 | assert len(sys.argv) == 2 and sys.argv[1].endswith('.tar.gz') 79 | import_translations_from(sys.argv[1]) 80 | 81 | import sys 82 | sys.path.insert(0, '.') 83 | from tests.translations import TestTranslations 84 | TestTranslations().runTest(verbose=True) 85 | -------------------------------------------------------------------------------- /tools/list_TODO_FIXME_tags.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | grep -Rc FIXME\\\|TODO zim tests | \ 3 | grep \\.py: | \ 4 | perl -pe 's/^(.*):(.*)/$2 $1/' | \ 5 | sort -n | \ 6 | grep -v ^0 7 | -------------------------------------------------------------------------------- /tools/package_test_data.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import sys 4 | 5 | sys.path.insert(0, '.') 6 | 7 | from zim.fs import * 8 | from zim.notebook import Path 9 | import zim.stores.files 10 | import zim.stores.xml 11 | 12 | 13 | def walk(store, path): 14 | for page in store.get_pagelist(path): 15 | yield page 16 | for child in walk(store, page): 17 | yield child 18 | 19 | 20 | def package(dir, file): 21 | if file.exists(): 22 | file.remove() 23 | fh = file.open('w') 24 | fh.write('\n') 25 | fh.write('\n') 26 | fh.write(' \n') 27 | source = zim.stores.files.Store(None, Path(':'), dir=dir) 28 | for page in walk(source, Path(':')): 29 | if not page.hascontent: 30 | continue 31 | text = page.source.read() 32 | text = text.replace('&', '&') 33 | text = text.replace('<', '<') 34 | text = text.replace('>', '>') 35 | fh.write(' \n') 39 | fh.close() 40 | 41 | 42 | def extract(file, dir): 43 | if dir.exists(): 44 | raise Exception, 'dir exists alread' 45 | assert False, 'TODO' 46 | 47 | 48 | if __name__ == '__main__': 49 | if len(sys.argv) == 4 and sys.argv[1] == '--package': 50 | package(Dir(sys.argv[2]), File(sys.argv[3])) 51 | elif len(sys.argv) == 4 and sys.argv[1] == '--extract': 52 | extract(File(sys.argv[2]), Dir(sys.argv[3])) 53 | else: 54 | print 'usage: %s --package DIR FILE\n' \ 55 | ' %s --extract FILE DIR' % (sys.argv[0], sys.argv[0]) 56 | -------------------------------------------------------------------------------- /tools/replace_in_all_files.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | '''Tool to replace a string in a whole bunch of files''' 4 | 5 | import os 6 | import sys 7 | 8 | def replace_in_dir(root, old, new): 9 | total = 0 10 | for dir, dirs, files in os.walk(root): 11 | for subdir in dirs[:]: 12 | if subdir.startswith('.'): 13 | dirs.remove(subdir) 14 | for file in files: 15 | total += replace_in_file(dir+'/'+file, old, new) 16 | print '%i total in %s' % (total, root) 17 | 18 | def replace_in_file(file, old, new): 19 | fh = open(file) 20 | content = fh.read() 21 | fh.close() 22 | i = content.count(old) 23 | if i > 0: 24 | print '%i in %s' % (i, file) 25 | content = content.replace(old, new) 26 | fh = open(file, 'w') 27 | fh.write(content) 28 | fh.close() 29 | return i 30 | 31 | 32 | if __name__ == '__main__': 33 | if len(sys.argv) == 4: 34 | replace_in_dir(*sys.argv[1:]) 35 | else: 36 | print 'Usage: replace.py dir oldstring newstring' 37 | -------------------------------------------------------------------------------- /tools/test_website.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import os 4 | import subprocess 5 | 6 | from BaseHTTPServer import HTTPServer 7 | from SimpleHTTPServer import SimpleHTTPRequestHandler 8 | 9 | subprocess.call('./tools/build_website.sh') 10 | 11 | os.chdir('./html') 12 | 13 | try: 14 | server = HTTPServer(('', 8080), SimpleHTTPRequestHandler) 15 | print 'server started at http://localhost:8080' 16 | server.serve_forever() 17 | except KeyboardInterrupt: 18 | server.socket.close() 19 | 20 | -------------------------------------------------------------------------------- /tools/time_parsing.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # -*- coding: utf-8 -*- 4 | 5 | # Copyright 2012 Jaap Karssenberg\n' % page.name) 36 | fh.write(text) 37 | fh.write(' \n') 38 | fh.write('6 | 7 | import sys 8 | sys.path.insert(0, '.') 9 | 10 | import zim.formats 11 | import zim.fs 12 | import tests 13 | 14 | def setup(): 15 | global parser, dumper 16 | parser = zim.formats.get_parser('wiki') 17 | dumper = zim.formats.get_dumper('wiki') 18 | 19 | global wikitext, parsetree 20 | wikitext = zim.fs.File('tests/data/formats/wiki.txt').read() 21 | xml = zim.fs.File('tests/data/formats/parsetree.xml').read().rstrip('\n') 22 | parsetree = tests.new_parsetree_from_xml(xml) 23 | 24 | global smalltext, smalltree 25 | smalltext = "foo **bar** baz\n" 26 | xml = " foo bar baz\n " 27 | smalltree = tests.new_parsetree_from_xml(xml) 28 | 29 | def timeParsing(): 30 | parser.parse(wikitext) 31 | 32 | 33 | def timeDumping(): 34 | dumper.dump(parsetree) 35 | 36 | 37 | def timeParsingSmall(): 38 | parser.parse(smalltext) 39 | 40 | 41 | def timeDumpingSmall(): 42 | dumper.dump(smalltree) 43 | 44 | 45 | if __name__ == '__main__': 46 | from timeit import Timer 47 | reps = 5 48 | passes = 1000 49 | funcs = [n for n in dir() if n.startswith('time')] 50 | funcs.sort() 51 | 52 | print "Rep: %i, Passes: %i" % (reps, passes) 53 | print "Plan: %s" % ', '.join(funcs) 54 | print '' 55 | print "Func\tMin\tMax\tAvg [msec/pass]" 56 | 57 | for func in funcs: 58 | setupcode = "from __main__ import setup, %s; setup()" % func 59 | testcode = "%s()" % func 60 | 61 | t = Timer(testcode, setupcode) 62 | try: 63 | result = t.repeat(reps, passes) 64 | except: 65 | print "FAILED running %s" % func 66 | t.print_exc() 67 | else: 68 | print "%s\t%.2f\t%.2f\t%.2f" % ( 69 | func, 70 | (1E+3 * min(result)/passes), 71 | (1E+3 * max(result)/passes), 72 | (1E+3 * sum(result)/(reps*passes)), 73 | ) 74 | -------------------------------------------------------------------------------- /tools/xdot_tree.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import gtk 4 | import sys 5 | 6 | sys.path.insert(0, '.') 7 | 8 | from class_tree import * 9 | from zim._lib import xdot 10 | 11 | 12 | class Graph(object): 13 | 14 | def __init__(self, dir): 15 | self.dir = dir 16 | 17 | def get_dotcode(self): 18 | text = self._code_for_module(self.dir) 19 | return 'digraph G { \n' \ 20 | 'graph [rankdir=LR]' \ 21 | 'node [shape=box fontsize=14]' \ 22 | '%s }' % text 23 | 24 | def _code_for_module(self, module): 25 | text = '"%s" [shape=ellips]' % module.name 26 | for item in module.items(): 27 | if isinstance(item, basestring): 28 | text += '\n"%s"' % item 29 | text +='\n"%s" -> "%s"' % (module.name, item) 30 | else: 31 | text += self._code_for_module(item) # recurs 32 | text +='\n"%s" -> "%s"' % (module.name, item.name) 33 | return text 34 | 35 | 36 | if __name__ == '__main__': 37 | graph = Graph(ModuleDir('./zim')) 38 | window = xdot.DotWindow() 39 | window.connect('destroy', lambda o: gtk.main_quit()) 40 | #print graph.get_dotcode() 41 | window.set_dotcode(graph.get_dotcode()) 42 | window.show_all() 43 | gtk.main() 44 | -------------------------------------------------------------------------------- /tools/xgettext.sh: -------------------------------------------------------------------------------- 1 | echo 'Extracting translatable strings ...' 2 | find zim -name '*.py' | sort | xgettext -f - -o translations/zim.pot 3 | echo 'Extracting comments ...' 4 | ./tools/extract_translator_comments.py 5 | -------------------------------------------------------------------------------- /website/files/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/favicon.ico -------------------------------------------------------------------------------- /website/files/images/bullet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/images/bullet.png -------------------------------------------------------------------------------- /website/files/images/globe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/images/globe.png -------------------------------------------------------------------------------- /website/files/images/invade_your_desktop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/images/invade_your_desktop.png -------------------------------------------------------------------------------- /website/files/images/os-ubuntu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/images/os-ubuntu.png -------------------------------------------------------------------------------- /website/files/images/os-windows.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/images/os-windows.gif -------------------------------------------------------------------------------- /website/files/images/package-x-generic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/images/package-x-generic.png -------------------------------------------------------------------------------- /website/files/images/zim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/images/zim.png -------------------------------------------------------------------------------- /website/files/images/zim32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/images/zim32.png -------------------------------------------------------------------------------- /website/files/images/zim64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/images/zim64.png -------------------------------------------------------------------------------- /website/files/screenshots/thumbs/zim-calendar-embedded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/thumbs/zim-calendar-embedded.png -------------------------------------------------------------------------------- /website/files/screenshots/thumbs/zim-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/thumbs/zim-calendar.png -------------------------------------------------------------------------------- /website/files/screenshots/thumbs/zim-equation-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/thumbs/zim-equation-editor.png -------------------------------------------------------------------------------- /website/files/screenshots/thumbs/zim-image-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/thumbs/zim-image-open.png -------------------------------------------------------------------------------- /website/files/screenshots/thumbs/zim-minimal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/thumbs/zim-minimal.png -------------------------------------------------------------------------------- /website/files/screenshots/thumbs/zim-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/thumbs/zim-normal.png -------------------------------------------------------------------------------- /website/files/screenshots/thumbs/zim-tasklist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/thumbs/zim-tasklist.png -------------------------------------------------------------------------------- /website/files/screenshots/thumbs/zim-versions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/thumbs/zim-versions.png -------------------------------------------------------------------------------- /website/files/screenshots/zim-calendar-embedded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/zim-calendar-embedded.png -------------------------------------------------------------------------------- /website/files/screenshots/zim-calendar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/zim-calendar.png -------------------------------------------------------------------------------- /website/files/screenshots/zim-equation-editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/zim-equation-editor.png -------------------------------------------------------------------------------- /website/files/screenshots/zim-image-open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/zim-image-open.png -------------------------------------------------------------------------------- /website/files/screenshots/zim-minimal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/zim-minimal.png -------------------------------------------------------------------------------- /website/files/screenshots/zim-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/zim-normal.png -------------------------------------------------------------------------------- /website/files/screenshots/zim-tasklist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/zim-tasklist.png -------------------------------------------------------------------------------- /website/files/screenshots/zim-versions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/website/files/screenshots/zim-versions.png -------------------------------------------------------------------------------- /website/files/zim.css: -------------------------------------------------------------------------------- 1 | body {background-color: #fff; color: #000; font-family: sans-serif} 2 | 3 | a {text-decoration: none;} 4 | a:link {color: #0a7e0a;} 5 | a:visited {color: #9d1313;} 6 | a:hover {text-decoration: underline} 7 | a:active {text-decoration: underline} 8 | a.empty {color: gray} 9 | a.private {color: black} 10 | 11 | u { text-decoration: none; 12 | background-color: yellow } 13 | 14 | ul.menu {list-style-image: url(/images/bullet.png);} 15 | ul {text-align: left} 16 | 17 | .error {color: #f00;} 18 | .header {color: #777;} 19 | .footer {color: #777;} 20 | 21 | textarea {width: 100%;} 22 | 23 | span.zim-tag {color: #ce5c00;} 24 | -------------------------------------------------------------------------------- /website/pages/contact.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2012-02-20T22:13:04+01:00 4 | 5 | ====== Contact ====== 6 | 7 | **For user questions and development discussion**, please join the mailing list. To join the zim mailing list you need to join the "[[https://launchpad.net/~zim-wiki|zim-wiki]]" team in launchpad. 8 | 9 | **To view bugs or report an issue** please go the the [[https://bugs.launchpad.net/zim|bug tracker on launchpad]] 10 | 11 | **For feature requests** please file a bug report as well. If you want some feedback on an idea before requesting it please use the mailing list. 12 | -------------------------------------------------------------------------------- /website/pages/development.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2010-02-26T20:57:10.169870 4 | 5 | **Page moved** 6 | 7 | This page moved, please see [[contribute]] 8 | -------------------------------------------------------------------------------- /website/pages/donations.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: 2010-02-26T20:39:44.389904 4 | 5 | **Page moved** 6 | 7 | This page moved, please see [[contribute]] 8 | -------------------------------------------------------------------------------- /website/pages/downloads.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Unknown 4 | 5 | ====== Downloads ====== 6 | 7 | ===== Latest release: 0.60 ===== 8 | 9 | **This program depends on a number of modules including the python, gtk and the python-gtk bindings.** Most linux distributions have standard packages for these bindings, if your distribution has these packages installing them will probably be much easier then compiling them manually . 10 | 11 | In order to compile and install the source run: 12 | 13 | ''' 14 | $ ./test.py 15 | $ ./setup.py install 16 | ''' 17 | 18 | More detailed instructions to build from source can be found [[install|here]]. 19 | 20 | === Source === 21 | 22 | [[/downloads/|Download here]] 23 | 24 | === Packages === 25 | 26 | {{/images/os-ubuntu.png?width=24}} **Ubuntu** 27 | 28 | Unofficial ubuntu package (.deb) can be found [[/downloads/|here]] 29 | 30 | There is also a PPA with updates for zim [[https://launchpad.net/~jaap.karssenberg/+archive/zim|here]] 31 | 32 | {{/images/os-windows.gif?width=24}} **Windows** 33 | 34 | A windows installer can be found [[http://www.glump.net/software/zim|here]]. 35 | 36 | {{/images/package-x-generic.png?width=24}} **Other Distributions** 37 | 38 | The following Linux distributions are known to include zim: 39 | * Archlinux (extra/zim) 40 | * [[http://packages.debian.org/unstable/x11/zim|Debian]] (x11/zim) 41 | * Gentoo (x11-misc/zim) 42 | * Sourcemage (zim) 43 | * Fedora Extras 44 | * Ubuntu (universe) 45 | 46 | BSD flavors with a zim port: 47 | * [[http://www.freshports.org/editors/zim|FreeBSD]] 48 | * [[http://www.openbsd.org/cgi-bin/cvsweb/ports/productivity/zim/|OpenBSD]] 49 | 50 | -------------------------------------------------------------------------------- /website/pages/index.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Home ====== 5 | 6 | **Zim** is a graphical text editor used to maintain a collection of wiki pages. Each page can contain links to other pages, simple formatting and images. Pages are stored in a folder structure, like in an outliner, and can have attachments. Creating a new page is as easy as linking to a nonexistent page. All data is stored in plain text files with wiki formatting. Various plugins provide additional functionality, like a task list manager, an equation editor, a tray icon, and support for version control. 7 | 8 | **Zim** can be used to: 9 | * Keep an archive of notes 10 | * Take notes during meetings or lectures 11 | * Organize task lists 12 | * Draft blog entries and emails 13 | * Do brainstorming 14 | 15 | **Zim** handles several types of markup, like headings, bullet lists and of course **bold**, //italic// and __highlighted__. This markup is saved as wiki text so you can easily edit it with other editors. Because of the autosave feature you can switch between pages and follow links while editing without worries. 16 | 17 | {{/screenshots/thumbs/zim-normal.png}} {{/screenshots/thumbs/zim-minimal.png}} 18 | 19 | Although **zim** now exists for over 3 years there is no "1.0" version yet. This does not mean that the application is particularly un-stable (although making backups is always good practice) or only usable for linux gurus. But it does mean that the feature set is not yet complete (of course everything described in the manual is implemented). New releases are announced through [[http://freshmeat.net/projects/zim/|freshmeat]], subscribe there to get the latest updates. 20 | -------------------------------------------------------------------------------- /website/pages/notebook.zim: -------------------------------------------------------------------------------- 1 | [Notebook] 2 | document_root=../files/ 3 | home=index 4 | icon= 5 | name=website 6 | read_only=0 7 | slow_fs=False 8 | version=0.4 9 | 10 | [GUI State] 11 | height=450 12 | pane_pos=120 13 | pane_vis=0 14 | width=600 15 | x=0 16 | y=0 17 | 18 | [Namespaces] 19 | :docs=Files,dir=../share/zim/doc 20 | 21 | -------------------------------------------------------------------------------- /website/pages/screenshots.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | Creation-Date: Unknown 4 | 5 | ====== Screenshots ====== 6 | 7 | On this page you find some screenshots of **zim** in action. Of course pictures only capture the look, not how it feels to use, see the screencast for see a bit more of the feeling. 8 | 9 | INSERT_SCREENCAST_HERE 10 | Screencast thanks to [[http://productivelinux.com/2009/05/23/video-post-my-favorite-things-about-zim-wiki/trackback/|ProductiveLinux]]. 11 | 12 | {{/screenshots/zim-normal.png}} 13 | //The editor window with all widgets visible// 14 | 15 | 16 | {{/screenshots/zim-minimal.png}} 17 | //Minimalistic editor window with a checkbox list and some links// 18 | 19 | 20 | {{/screenshots/zim-image-open.png}} 21 | //Showing "open with" item for embedded image// 22 | 23 | 24 | {{/screenshots/zim-calendar.png}} 25 | //Showing the calendar dialog// 26 | 27 | 28 | {{/screenshots/zim-calendar-embedded.png}} 29 | //Showing the alternative embedded calendar view// 30 | 31 | 32 | {{/screenshots/zim-tasklist.png}} 33 | //Showing the task list dialog// 34 | 35 | 36 | {{/screenshots/zim-versions.png}} 37 | //The version control dialog// 38 | 39 | 40 | {{/screenshots/zim-equation-editor.png}} 41 | //Showing the latex equation editor// 42 | 43 | 44 | -------------------------------------------------------------------------------- /website/pages/translations.txt: -------------------------------------------------------------------------------- 1 | Content-Type: text/x-zim-wiki 2 | Wiki-Format: zim 0.4 3 | 4 | ====== Translations ====== 5 | 6 | The easiest way to contribute translations is to go to the [[https://translations.launchpad.net/zim|launchpage website]]. Here you can colaborate with others to translate zim into your native language. 7 | 8 | If you rather use offline tools like [[http://www.poedit.net/|poedit]] you can either download the latest translation template or partial translation from launchpad or checkout the source repository for zim (see [[Contribute]]). To submit your updates upload the resulting ''.po'' file to the launchpad website again. 9 | 10 | ===== Testing translations ===== 11 | Zim using the [[http://www.gnu.org/software/gettext/|GNU gettext]] tool chain for translations. The source package contains a "''zim.pot''" file which is the template. The directory "''po/''" contains translations, which are named "''po/language.po''" or "''po/language_COUNTRY.po''" where "''language''" and "''COUNTRY''" are the respective language and country codes for the locale. 12 | 13 | To compile a new translation run: 14 | 15 | ''' 16 | $ ./setup.py build_trans 17 | ''' 18 | 19 | This will compile .mo files for all translations and put them in the directory "''locale''". 20 | Now run zim from the source directory using: 21 | 22 | ''' 23 | $ LANGUAGE=language_COUNTRY ./zim.py 24 | ''' 25 | 26 | or: 27 | 28 | ''' 29 | $ LANG=language_COUNTRY ./zim.py 30 | ''' 31 | -------------------------------------------------------------------------------- /website/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |Zim - a desktop wiki 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |Zim Desktop Wiki Portable 4 | 11 | 12 | 13 | 14 |15 |
18 | 19 | 20 | 21 |16 | Zim Desktop Wiki Portable 17 |
Zim is a graphical text editor used to maintain a collection of wiki pages. Each page can contain links to other pages, simple formatting and images. Pages are stored in a folder structure, like in an outliner, and can have attachments. Creating a new page is as easy as linking to a nonexistent page. All data is stored in plain text files with wiki formatting. Various plugins provide additional functionality, like a task list manager, an equation editor, a tray icon, and support for version control.
22 | 23 |Zim can be used to:
24 | 25 |26 |
32 | 33 |- Keep an archive of notes
27 |- Take notes during meetings or lectures
28 |- Organize task lists
29 |- Draft blog entries and emails
30 |- Do brainstorming
31 |How to Use Zim Desktop Wiki Portable
34 | 35 |To launch Zim Desktop Wiki Portable, run
ZimDesktopWikiPortable.exe
36 | 37 |Notebooks that you create in
38 | -------------------------------------------------------------------------------- /windows/src/registerExtension.nsh: -------------------------------------------------------------------------------- 1 | ; From http://nsis.sourceforge.net/File_Association 2 | ; Added a parameter to set icon for association -Brendan Kidwell 3 | 4 | !define registerExtension "!insertmacro registerExtension" 5 | !define unregisterExtension "!insertmacro unregisterExtension" 6 | 7 | !macro registerExtension executable extension description icon 8 | Push "${executable}" ; "full path to my.exe" 9 | Push "${extension}" ; ".mkv" 10 | Push "${description}" ; "MKV File" 11 | Push "${icon}" ; "name.ico" 12 | Call registerExtension 13 | !macroend 14 | 15 | ; back up old value of .opt 16 | Function registerExtension 17 | !define Index "Line${__LINE__}" 18 | pop $R3 ; icon path 19 | pop $R0 ; ext name 20 | pop $R1 21 | pop $R2 22 | push $1 23 | push $0 24 | ReadRegStr $1 HKCR $R1 "" 25 | StrCmp $1 "" "${Index}-NoBackup" 26 | StrCmp $1 "OptionsFile" "${Index}-NoBackup" 27 | WriteRegStr HKCR $R1 "backup_val" $1 28 | "${Index}-NoBackup:" 29 | WriteRegStr HKCR $R1 "" $R0 30 | ReadRegStr $0 HKCR $R0 "" 31 | StrCmp $0 "" 0 "${Index}-Skip" 32 | WriteRegStr HKCR $R0 "" $R0 33 | WriteRegStr HKCR "$R0\shell" "" "open" 34 | WriteRegStr HKCR "$R0\DefaultIcon" "" "$R3,0" 35 | "${Index}-Skip:" 36 | WriteRegStr HKCR "$R0\shell\open\command" "" '"$R2" "%1"' 37 | WriteRegStr HKCR "$R0\shell\edit" "" "Edit $R0" 38 | WriteRegStr HKCR "$R0\shell\edit\command" "" '"$R2" "%1"' 39 | pop $0 40 | pop $1 41 | !undef Index 42 | FunctionEnd 43 | 44 | !macro unregisterExtension extension description 45 | Push "${extension}" ; ".mkv" 46 | Push "${description}" ; "MKV File" 47 | Call un.unregisterExtension 48 | !macroend 49 | 50 | Function un.unregisterExtension 51 | pop $R1 ; description 52 | pop $R0 ; extension 53 | !define Index "Line${__LINE__}" 54 | ReadRegStr $1 HKCR $R0 "" 55 | StrCmp $1 $R1 0 "${Index}-NoOwn" ; only do this if we own it 56 | ReadRegStr $1 HKCR $R0 "backup_val" 57 | StrCmp $1 "" 0 "${Index}-Restore" ; if backup="" then delete the whole key 58 | DeleteRegKey HKCR $R0 59 | Goto "${Index}-NoOwn" 60 | "${Index}-Restore:" 61 | WriteRegStr HKCR $R0 "" $1 62 | DeleteRegValue HKCR $R0 "backup_val" 63 | DeleteRegKey HKCR $R1 ;Delete key with association name settings 64 | "${Index}-NoOwn:" 65 | !undef Index 66 | FunctionEnd -------------------------------------------------------------------------------- /windows/src/zim-logo-big.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/windows/src/zim-logo-big.bmp -------------------------------------------------------------------------------- /xdg/hildon/zim.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0.0 3 | Encoding=UTF-8 4 | Type=Application 5 | Name=Zim 6 | Comment=A desktop wiki and all purpose TODO and GTD application 7 | Exec=/usr/bin/zim --no-daemon 8 | Icon=zim 9 | -------------------------------------------------------------------------------- /xdg/zim.xml: -------------------------------------------------------------------------------- 1 | 2 |./Data/Notebooks
(and those you copy into this folder from elsewhere then open in Zim) will follow your Zim Desktop Wiki Portable installation as you move it from one host to another. Any additional notebooks you open in Zim from elsewhere in your filesystem will only be accessible from the host in which it resides.3 | 29 | -------------------------------------------------------------------------------- /zim.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | # This script is a wrapper around zim.main.main() for running zim as 4 | # an application. 5 | 6 | 7 | import sys 8 | import logging 9 | import os 10 | 11 | # Check if we run the correct python version 12 | try: 13 | version_info = sys.version_info 14 | assert version_info >= (2, 6) 15 | assert version_info < (3, 0) 16 | except: 17 | print >> sys.stderr, 'ERROR: zim needs python >= 2.6 (but < 3.0)' 18 | sys.exit(1) 19 | 20 | 21 | # Win32: must setup log file or it tries to write to $PROGRAMFILES 22 | # See http://www.py2exe.org/index.cgi/StderrLog 23 | if os.name == "nt" and sys.argv[0].endswith('.exe'): 24 | import tempfile 25 | dir = tempfile.gettempdir() 26 | if not os.path.isdir(dir): 27 | os.makedirs(dir) 28 | err_stream = open(dir + "\\zim.log", "w") 29 | sys.stdout = err_stream 30 | sys.stderr = err_stream 31 | 32 | # Preliminary initialization of logging because modules can throw warnings at import 33 | logging.basicConfig(level=logging.INFO, format='%(levelname)s: %(message)s') 34 | 35 | # Try importing our modules 36 | try: 37 | import zim 38 | import zim.main 39 | import zim.ipc 40 | except ImportError: 41 | sys.excepthook(*sys.exc_info()) 42 | print >>sys.stderr, 'ERROR: Could not find python module files in path:' 43 | print >>sys.stderr, ' '.join(map(str, sys.path)) 44 | print >>sys.stderr, '\nTry setting PYTHONPATH' 45 | sys.exit(1) 46 | 47 | 48 | # Run the application and handle some exceptions 49 | try: 50 | zim.ipc.handle_argv() 51 | encoding = sys.getfilesystemencoding() # not 100% sure this is correct 52 | argv = [arg.decode(encoding) for arg in sys.argv] 53 | exitcode = zim.main.main(*argv) 54 | sys.exit(exitcode) 55 | except zim.main.GetoptError, err: 56 | print >>sys.stderr, sys.argv[0]+':', err 57 | sys.exit(1) 58 | except zim.main.UsageError, err: 59 | print >>sys.stderr, err.msg 60 | sys.exit(1) 61 | except KeyboardInterrupt: # e.g.4 | 8 |5 | 6 | Zim notebook 7 |9 | 13 | 23 |14 | 15 | 17 | 21 |16 | Zim wiki page 22 |24 | 28 |25 | 26 | Gjots notebook 27 |C while --server 62 | print >>sys.stderr, 'Interrupt' 63 | sys.exit(1) 64 | else: 65 | sys.exit(0) 66 | -------------------------------------------------------------------------------- /zim/base.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2012 Jaap Karssenberg 4 | 5 | 6 | from .signals import ConnectorMixin, SignalEmitter 7 | 8 | 9 | class Object(ConnectorMixin, SignalEmitter): 10 | '''Base class for zim classes that want to use signals''' 11 | pass 12 | 13 | # TODO add some logic for properties, preferences, state 14 | -------------------------------------------------------------------------------- /zim/formats/__main__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2012 Jaap Karssenberg 4 | 5 | '''When this module is run as a script it allows conversion 6 | from one format to another 7 | Given two format names it will read the first format from stdin 8 | and write the second format to stdout:: 9 | 10 | cat foo.txt | python -m zim.formats wiki html > foo.html 11 | 12 | Given only one format name it will output the parsetree XML:: 13 | 14 | cat foo.txt | python -m zim.formats wiki > foo.xml 15 | 16 | Note that this can not replace "zim --export" because no effort is 17 | done here to resolve links. Main purpose is testing. 18 | ''' 19 | 20 | import sys 21 | import logging 22 | 23 | from zim.fs import Dir 24 | from zim.formats import * 25 | 26 | 27 | if __name__ == '__main__': 28 | if len(sys.argv) not in (2, 3, 4): 29 | print 'Usage: python -m zim.formats format [format] [basedir]' 30 | print '\tWill read from stdin and output to stdout' 31 | sys.exit(1) 32 | 33 | 34 | logging.basicConfig() 35 | 36 | inputformat = sys.argv[1] 37 | if len(sys.argv) == 4: 38 | outputformat = sys.argv[2] 39 | basedir = sys.argv[3] 40 | elif len(sys.argv) == 3: 41 | outputformat = sys.argv[2] 42 | basedir = None 43 | else: 44 | outputformat = '__XML__' 45 | basedir = None 46 | 47 | input = sys.stdin.read() 48 | 49 | parser = get_parser(inputformat) 50 | tree = parser.parse(input) 51 | 52 | if outputformat == '__XML__': 53 | sys.stdout.write(tree.tostring()) 54 | else: 55 | linker = StubLinker() 56 | if basedir: 57 | linker.set_base(Dir(basedir)) 58 | dumper = get_dumper(outputformat, linker=linker) 59 | lines = dumper.dump(tree) 60 | sys.stdout.write(''.join(lines).encode('utf-8')) 61 | -------------------------------------------------------------------------------- /zim/gui/propertiesdialog.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2008 Jaap Karssenberg 4 | 5 | import gtk 6 | from zim.gui.widgets import Dialog 7 | 8 | class PropertiesDialog(Dialog): 9 | 10 | def __init__(self, ui): 11 | Dialog.__init__(self, ui, _('Properties'), help='Help:Properties') # T: Dialog title 12 | label = gtk.Label() 13 | label.set_markup(''+_('Notebook Properties')+'') 14 | # T: Section in notebook dialog 15 | label.set_alignment(0.0, 0.5) 16 | self.vbox.pack_start(label, False) 17 | fields = [] 18 | config = self.ui.notebook.config['Notebook'] 19 | for item in self.ui.notebook.properties: 20 | fields.append(item) 21 | self.add_form(fields, values=config) 22 | self.form.widgets['icon'].set_use_relative_paths(self.ui.notebook) 23 | if self.ui.readonly: 24 | for widget in self.form.widgets.values(): 25 | widget.set_sensitive(False) 26 | 27 | def do_response_ok(self): 28 | if not self.ui.readonly: 29 | properties = self.form.copy() 30 | self.ui.notebook.save_properties(**properties) 31 | return True 32 | 33 | ## TODO: put a number of properties in an expander with a lable "Advanced" 34 | -------------------------------------------------------------------------------- /zim/inc/__init__.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | '''This package contains third party libraries to be packaged 4 | with zim. See the respective files for the copyright and license 5 | notices. 6 | ''' 7 | -------------------------------------------------------------------------------- /zim/plugins/arithmetic.py: -------------------------------------------------------------------------------- 1 | # Copyright 2011 Patricio Paez 2 | # 3 | # Plugin to use arithmetic in Zim wiki 4 | 5 | from zim.inc.arithmetic import ParserGTK 6 | 7 | from zim.plugins import PluginClass, WindowExtension, extends 8 | from zim.actions import action 9 | 10 | 11 | class ArithmeticPlugin(PluginClass): 12 | 13 | plugin_info = { 14 | 'name': _('Arithmetic'), # T: plugin name 15 | 'description': _('''\ 16 | This plugin allows you to embed arithmetic calculations in zim. 17 | It is based on the arithmetic module from 18 | http://pp.com.mx/python/arithmetic. 19 | '''), # T: plugin description 20 | 'author': 'Patricio Paez', 21 | 'help': 'Plugins:Arithmetic', 22 | } 23 | 24 | #~ plugin_preferences = ( 25 | # key, type, label, default 26 | #~ ) 27 | 28 | 29 | @extends('MainWindow') 30 | class MainWindowExtension(WindowExtension): 31 | 32 | uimanager_xml = ''' 33 | 34 | 42 | ''' 43 | 44 | @action(_('_Arithmetic'), accelerator='F5') # T: menu item 45 | def calculate(self): 46 | """Perform arithmetic operations""" 47 | 48 | # get the buffer 49 | buf = self.window.pageview.view.get_buffer() # XXX 50 | 51 | # parse and return modified text 52 | parser = ParserGTK() 53 | parser.parse( buf ) 54 | 55 | -------------------------------------------------------------------------------- /zim/plugins/base/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gdw2/zim/1ccc1c6c1ffb6cf116bf6bd28fbdd95101afa376/zim/plugins/base/__init__.py -------------------------------------------------------------------------------- /zim/plugins/diagrameditor.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2009 Jaap Karssenberg35 | 40 | 41 |4 | 5 | from zim.plugins.base.imagegenerator import ImageGeneratorPlugin, ImageGeneratorClass 6 | from zim.fs import File, TmpFile 7 | from zim.config import data_file 8 | from zim.applications import Application, ApplicationError 9 | 10 | 11 | # TODO put these commands in preferences 12 | dotcmd = ('dot', '-Tpng', '-o') 13 | 14 | 15 | class InsertDiagramPlugin(ImageGeneratorPlugin): 16 | 17 | plugin_info = { 18 | 'name': _('Insert Diagram'), # T: plugin name 19 | 'description': _('''\ 20 | This plugin provides a diagram editor for zim based on GraphViz. 21 | 22 | This is a core plugin shipping with zim. 23 | '''), # T: plugin description 24 | 'help': 'Plugins:Diagram Editor', 25 | 'author': 'Jaap Karssenberg', 26 | } 27 | 28 | object_type = 'diagram' 29 | short_label = _('Dia_gram...') 30 | insert_label = _('Insert diagram') 31 | edit_label = _('_Edit diagram') 32 | syntax = 'dot' 33 | 34 | @classmethod 35 | def check_dependencies(klass): 36 | has_dotcmd = Application(dotcmd).tryexec() 37 | return has_dotcmd, [("GraphViz", has_dotcmd, True)] 38 | 39 | 40 | class DiagramGenerator(ImageGeneratorClass): 41 | 42 | uses_log_file = False 43 | 44 | object_type = 'diagram' 45 | scriptname = 'diagram.dot' 46 | imagename = 'diagram.png' 47 | 48 | def __init__(self, plugin): 49 | ImageGeneratorClass.__init__(self, plugin) 50 | self.dotfile = TmpFile(self.scriptname) 51 | self.dotfile.touch() 52 | self.pngfile = File(self.dotfile.path[:-4] + '.png') # len('.dot') == 4 53 | 54 | def generate_image(self, text): 55 | if isinstance(text, basestring): 56 | text = text.splitlines(True) 57 | 58 | # Write to tmp file 59 | self.dotfile.writelines(text) 60 | 61 | # Call GraphViz 62 | try: 63 | dot = Application(dotcmd) 64 | dot.run((self.pngfile, self.dotfile)) 65 | except ApplicationError: 66 | return None, None # Sorry, no log 67 | else: 68 | if self.pngfile.exists(): 69 | return self.pngfile, None 70 | else: 71 | # When supplying a dot file with a syntax error, the dot command 72 | # doesn't return an error code (so we don't raise 73 | # ApplicationError), but we still don't have a png file to 74 | # return, so return None. 75 | return None, None 76 | 77 | def cleanup(self): 78 | self.dotfile.remove() 79 | self.pngfile.remove() 80 | -------------------------------------------------------------------------------- /zim/plugins/ditaaeditor.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | # ditaaeditor.py 4 | # 5 | # This is a plugin for Zim, which allows coverting ASCII art into proper bitmap 6 | # graphics. 7 | # 8 | # 9 | # Author: Yao-Po Wang 10 | # Date: 2012-03-11 11 | # Copyright (c) 2012, released under the GNU GPL v2 or higher 12 | # 13 | # 14 | 15 | from zim.plugins.base.imagegenerator import ImageGeneratorPlugin, ImageGeneratorClass 16 | from zim.fs import File, TmpFile 17 | from zim.config import data_file 18 | from zim.applications import Application, ApplicationError 19 | 20 | 21 | # TODO put these commands in preferences 22 | dotcmd = ('ditaa') 23 | 24 | 25 | class InsertDitaaPlugin(ImageGeneratorPlugin): 26 | 27 | plugin_info = { 28 | 'name': _('Insert Ditaa'), # T: plugin name 29 | 'description': _('''\ 30 | This plugin provides a diagram editor for zim based on Ditaa. 31 | 32 | This is a core plugin shipping with zim. 33 | '''), # T: plugin description 34 | 'help': 'Plugins:Ditaa Editor', 35 | 'author': 'Yao-Po Wang', 36 | } 37 | 38 | object_type = 'ditaa' 39 | short_label = _('Ditaa') 40 | insert_label = _('Insert Ditaa') 41 | edit_label = _('_Edit Ditaa') 42 | syntax = None 43 | 44 | @classmethod 45 | def check_dependencies(klass): 46 | has_dotcmd = Application(dotcmd).tryexec() 47 | return has_dotcmd, [("Ditaa", has_dotcmd, True)] 48 | 49 | 50 | class DitaaGenerator(ImageGeneratorClass): 51 | 52 | uses_log_file = False 53 | 54 | object_type = 'ditaa' 55 | scriptname = 'ditaa.dia' 56 | imagename = 'ditaa.png' 57 | 58 | def __init__(self, plugin): 59 | ImageGeneratorClass.__init__(self, plugin) 60 | self.dotfile = TmpFile(self.scriptname) 61 | self.dotfile.touch() 62 | self.pngfile = File(self.dotfile.path[:-4] + '.png') # len('.dot') == 4 63 | 64 | def generate_image(self, text): 65 | if isinstance(text, basestring): 66 | text = text.splitlines(True) 67 | 68 | # Write to tmp file 69 | self.dotfile.writelines(text) 70 | 71 | # Call GraphViz 72 | try: 73 | dot = Application(dotcmd) 74 | dot.run((self.dotfile, '-o', self.pngfile)) 75 | except ApplicationError: 76 | return None, None # Sorry, no log 77 | else: 78 | return self.pngfile, None 79 | 80 | def cleanup(self): 81 | self.dotfile.remove() 82 | self.pngfile.remove() 83 | -------------------------------------------------------------------------------- /zim/plugins/sequencediagrameditor.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | 3 | # Copyright 2011 Greg Warner 4 | # (Pretty much copied from diagrameditor.py) 5 | 6 | 7 | from zim.plugins import PluginClass 8 | from zim.plugins.base.imagegenerator import ImageGeneratorPlugin, ImageGeneratorClass 9 | 10 | from zim.fs import File, TmpFile 11 | from zim.applications import Application, ApplicationError 12 | 13 | 14 | # TODO put these commands in preferences 15 | diagcmd = ('seqdiag', '-o') 16 | 17 | 18 | class InsertSequenceDiagramPlugin(ImageGeneratorPlugin): 19 | 20 | plugin_info = { 21 | 'name': _('Insert Sequence Diagram'), # T: plugin name 22 | 'description': _('''\ 23 | This plugin provides a sequence diagram editor for zim based on seqdiag. 24 | It allows easy editing of sequence diagrams. 25 | '''), # T: plugin description 26 | 'help': 'Plugins:Sequence Diagram Editor', 27 | 'author': 'Greg Warner', 28 | } 29 | 30 | object_type = 'seqdiagram' 31 | short_label = _('Sequence Diagram') 32 | insert_label = _('Insert Sequence Diagram') 33 | edit_label = _('_Edit Sequence Diagram') 34 | syntax = None 35 | 36 | @classmethod 37 | def check_dependencies(klass): 38 | has_diagcmd = Application(diagcmd).tryexec() 39 | return has_diagcmd, [("seqdiag", has_diagcmd, True)] 40 | 41 | 42 | class SequenceDiagramGenerator(ImageGeneratorClass): 43 | 44 | uses_log_file = False 45 | 46 | object_type = 'seqdiagram' 47 | scriptname = 'seqdiagram.diag' 48 | imagename = 'seqdiagram.png' 49 | 50 | def __init__(self, plugin): 51 | ImageGeneratorClass.__init__(self, plugin) 52 | self.diagfile = TmpFile(self.scriptname) 53 | self.diagfile.touch() 54 | self.pngfile = File(self.diagfile.path[:-5] + '.png') # len('.diag') == 5 55 | 56 | def generate_image(self, text): 57 | if isinstance(text, basestring): 58 | text = text.splitlines(True) 59 | 60 | # Write to tmp file 61 | self.diagfile.writelines(text) 62 | 63 | # Call seqdiag 64 | try: 65 | diag = Application(diagcmd) 66 | diag.run((self.pngfile, self.diagfile)) 67 | except ApplicationError: 68 | return None, None # Sorry, no log 69 | else: 70 | return self.pngfile, None 71 | 72 | def cleanup(self): 73 | self.diagfile.remove() 74 | self.pngfile.remove() 75 | --------------------------------------------------------------------------------