LITTLE HELPER Dennis Cox, Fotolia
Total Page:16
File Type:pdf, Size:1020Kb
COVER STORY TiddlyWiki Exploring the TiddlyWiki personal wiki LITTLE HELPER Dennis Cox, Fotolia Cox, Dennis TiddlyWiki brings the spirit of the new Internet to a tiny scale. We’ll show you how to get organized with this wiki for one. BY DMITRI POPOV ometimes you come across a for web-based collaboration, TiddlyWiki rely on a database back-end like MySQL. piece of software that is so sim- is a personal tool designed as a single- In any case, a typical wiki consists of Sple and useful that you can’t un- user application. Most traditional wikis hundreds of files, which you have to in- derstand how you managed without it. are server-based software written in stall and run on a server. TiddlyWiki is one such application. On PHP, Perl, or another scripting language. The entire TiddlyWiki consists of just the face of it, TiddlyWiki looks and be- Some wikis store data in text files; other one HTML file, which includes CSS and haves like a conventional wiki, but if you dig deeper, you will discover that it is a rather ingenious application. One of the most powerful things about wikis is that they let you create and edit web pages on the fly. Most Wikis start with a single page; you can add new pages using what are called wiki words (often wiki words are written in camel case like this: WikiWord). When you add a wiki word to the text, the wiki turns it into a link, and once you click the link, the system creates a new page. The beauty of a wiki is that it frees you from the most tedious task: managing your website’s structure. Moreover, since most wikis use a simple markup lan- guage, they are perfectly suited for ca- sual users with no knowledge of HTML. What is TiddlyWiki? What makes TiddlyWiki so unique? Un- like traditional wikis, which are intended Figure 1: TiddlyWiki looks like an ordinary wiki. 34 ISSUE 73 DECEMBER 2006 WWW.LINUX - MAGAZINE.COM Advertisement JavaScript codes, and every- point your browser to http:// thing you enter in the wiki is www. tiddlywiki. com/, and stored inside this file. Tiddly- download the latest empty. Wiki also does away with html file. Rename it to some- separate pages, and instead it thing more meaningful, and uses what are called tiddlers. your TiddlyWiki is ready to Each tiddler is a text fragment go. that is stored in the wiki file, The first thing you might and you can show and hide want to do is reconfigure it. To understand this con- some of the default settings. cept, imagine a book consist- Open your TiddlyWiki in a ing of one page with an un- browser, and use the Getting- limited number of paragraphs Started section to change (corresponding to tiddlers in your TiddlyWiki’s title and TiddlyWiki); you can show customize the main menu and hide paragraphs individ- and default tiddlers. To ually. You can also add new change the title, click the Site- paragraphs, delete and mod- Title link, press the Edit but- ify existing paragraphs, and ton, and enter the name of shuffle paragraphs as you see your TiddlyWiki into the it fit. This makes TiddlyWiki main text area. Close the sec- a useful tool for managing tion by pressing the Done your text fragments (or using button, and the new title ap- a more fashionable word, mi- pears in your wiki’s header. crocontent) in a non-linear In a similar way, adjust other manner. settings, and when you are There is, however, a tiny fly satisfied with the result, press in the ointment. Due to Tid- the Save changes link. Using dlyWiki’s design, you can’t the Options section, you can move it to a server and work tweak the wiki’s more ad- with it remotely using your vanced settings. Tick the browser: in order to save SaveBackups check box if you changes in your TiddlyWiki, want TiddlyWiki to create a it must reside on your com- backup file each time you puter. You can, of course, up- save the changes. If you use load TiddlyWiki to your TiddlyWiki on an older ma- server and use it in read-only chine, you might want to dis- mode. This makes Tiddly- able the EnableAnimations Wiki better suited for use as a option, and if you want to personal local wiki. You can, perform searches using regu- for example, install it onto a lar expressions, tick Reg- USB key and use it to keep ExpSearch. To tweak Tiddly- tabs on your notes. There are Wiki even further, click the TiddlyWiki variants that AdvancedOptions link. allow you to install and use Once you have configured them on a remote server (for your TiddlyWiki, you are example, TiddlyWikiRemote ready to create your first tid- http:// phiffer. org/ tiddly/), but dler. To add a new tiddler, since these expanded tools simply click the New tiddler consist of multiple files, and link. Like traditional wikis, some of them require a data- TiddlyWiki uses special base back-end, they tend to markup for formatting the defeat the whole idea of Tid- contents of the tiddler. For ex- dlyWiki. ample, to format a text frag- ment as bold, use the // Installing and Using markup like this: //this is TiddlyWiki bold text//. To add a subhead- Actually, you don’t have to ing, put ! in the beginning of install anything at all. Simply the line: !This is a subheader. COVER STORY TiddlyWiki go to the FurtherReading section” is au- tomatically converted into a link to a tid- dler with the same name. If you don’t want a camel case word to appear as a WikiWord, place a tilde in front of it like this: ~NotAWikiWord. Before you close and save your first tiddler, it is a good idea to add some tags to it, which will allow you to quickly lo- cate the tiddler using TiddlyWiki's Tags tab. You can add multiple tags to each tiddler. Using Macros and Plugins TiddlyWiki includes several default mac- ros that allow you to add some nifty fea- tures to your wiki; for example the Tool- barMacro adds toolbar buttons that ap- pear when the mouse hovers over a tid- dler. To add, for example, Close, Edit, and Delete buttons to a tiddler, add the Figure 2: Use the GettingStarted tiddler to customize your TiddlyWiki. following code to its body: <<toolbar -closeTiddler +editTiddler deleteTid- TiddlyWiki also supports more advanced code produces a simple table, as pic- dler>>. formatting, like strikeout, subscript, su- tured in Figure 4: Commands that are preceded by a + perscript, and bold. You can also high- are executed when you press the light text segments using the following |!Table Heading 1 | U Ctrl+Enter keyboard shortcut or when code: @@color(red):Text highlighted in !Table Hading 2 | U you double-click the tiddler. Commands red@@. !Table Hading 3 | preceded by a - are executed when you Want to add a list? No problem: Tid- |Row 1 Column 1 | U press the Esc key. The list of TiddlyWi- dlyWiki supports both numbered and Row 1 Column 2 | U ki's ToolbarMacro commands is available unnumbered lists. Here is an example Row 1 Column 3 | at http:// www. tiddlywiki. com/ #tag:com- of an unnumbered list (you can see the |Row 2 Column 1 | U mands. result of this code in Figure 3): Row 2 Column 2 | U Using third-party plugins, you can Row 2 Column 3 | extend TiddlyWiki’s functionality be- *Level One yond the functions provided by the de- **Level A You can also include images in your fault macros. Although installing plugins ***Level I tiddler using a simple code like this: in TiddlyWiki consists of several steps, ***Level II [img[alternate text|filename or the entire procedure is straightforward **Level B URL][link]]. Keep in mind, however, that enough even for non-technical users. *Level Two linking to external files makes Tiddly- Let’s say you want to install the excel- *Level Three Wiki less portable. TiddlyWiki also sup- lent TiddlerStatsPlugin that provides sta- ports WikiWords, and it converts all tistics on how many tiddlers there are in Tables are also supported; using simple camel case words into links to other tid- your TiddlyWiki, how big they are, and formatting, you can create rather com- dlers. For example, the word Further- other useful info. Point your browser to plex tables in TiddlyWiki. The following Reading in the sentence “To learn more, http:// thepettersons. org/ PaulsNotepad. Figure 3: An example of a TiddlyWiki list. Figure 4: An example of a TiddlyWiki table. 36 ISSUE 73 DECEMBER 2006 WWW.LINUX - MAGAZINE.COM TiddlyWiki COVER STORY Tip: Firefox Error If you are using Firefox, you might expe- rience the Unresponsive script error message. To fix the problem, type about: config in Firefox’s address bar, locate the dom.max_script_run_time parameter, and change its value to something higher than the default (which is 5). html#TiddlerStats. Double-click the tid- dler or press the view button. Copy the entire text of the tiddler, open your Tid- dlyWiki in a new browser window, and create a new tiddler. Paste the contents of the clipboard into the tiddler body, name the title TiddlerStatsPlugin, add the tag systemConfig, and then press Done. Click the Save changes link and reload your TiddlyWiki into the browser to en- able the plugin. To view the statistics, Figure 5: To install a plugin, you have to copy it from the source and paste it into a new tiddler. add the <<tiddlerStats>> code to a tiddler.