Welcome Guest.   Make a donation to an author on the site August 22, 2014, 10:44:52 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2010! Download 24 custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: PlainTextWiki Toolkit - GOE Challenge 2007 Entry  (Read 14319 times)
Arjen
Charter Member
***
Posts: 93



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: November 29, 2007, 04:09:53 PM »

Here's my entry:

PlainTextWiki Toolkit 0.1 PREVIEW

Introduction

I was inspired for this program by the PlainTextWiki bundle by Matt Webb for the MacOS editor Textmate. I've never used it but liked the idea very much.

The idea of a PlainTextWiki is to bring (some) wiki functionality to your text editor. The most important function is that you can include wiki links in your text file. When you move your cursor to that link and press a keyboard shortcut, that link will be opened in your editor.

The PlainTextWiki bundle works only in TextMate. My intention with the PlainTextWiki Toolkit is to make a small program that gives you this function in any text editor that has decent support for external tools. (See what I mean by "decent" below!)

I've called this version a "preview version" because it has only basic functionality: it only allows you to "follow a wiki link" in a text file. In my opinion should have some more functions for a "real" release.

How to install

The program is a command line utility that you can just copy anywhere on your harddrive. It requires the .NET Framework 2.0 to run.

You plug it into your editor by defining it as an external tool. How to do this depends on your editor. Below, I have described how to do this for EditPlus and TextPad.

How to use

In your text editor, you define a wiki link as follows: [[My document]]. Essentially, the link is the name of another text file enclosed by double square brackets. Now, when you "follow this link" (i.e. put your cursor on it and call the PlainTextWiki tool), your editor should open the document "My document.txt". (Note that the extension is always .txt and is not included in the link.)

Command line options

The PlainTextWiki tool should be called as follows:

  plaintextwiki -f <filename> -L <line> -C <column> -e <editor-path> -p <editor-parameters>

Where:

  <filename>: name of the file you're currently editing.
  <line>, <column>: position in the file.
  <editor-path>: path to your editor.
  <editor-parameters>: command line paramaters for your editor to open a new file (in the same instance). The string "$f" in this path will be replaced by the filename to open (the file the wiki link points to).

As you can see, this imposes the following requirements on your editor (at least for this version):

  • It has to be able to pass the filename and the current line and column of the cursor to an external tool.
  • It has to support opening a file from the command line in the same instance of the editor.

Installation details

EditPlus



Open the menu Tools > Preferences and go to Tools > User Tools.

Define a new tool with the following options:

  • Command: path to plaintextwiki.exe
  • Argument: -f "$(FilePath)" -L $(CurLine) -C $(CurCol) -e "C:\Program Files\EditPlus 3\editplus.exe" -p "-e $f" (Adjust path to editor as needed.)
  • Check the following options: Capture output, save open files.

TextPad



Open the menu Configure > Preferences and go to Tools.

Define a new tool with the following options:

  • Command: path to plaintextwiki.exe
  • Parameters: -f $File -L $Line -C $Col -e "C:\Program Files\TextPad 5\TextPad.exe" -p "$f" (Adjust path to editor as needed.)
  • Check the following options: Run minimized, Close DOS window on exit.

Make sure you have the option "Allow multiple instances to run" turned OFF under Configure > Preferences > General, otherwise files will be opened in a new instance of TextPad.

Your Favorite Editor

If you've configured your editor for the PlainTextWiki Toolkit, please share with others by posting below!

Video demo

Here's a short video where you can see how to configure and use the PlainTextWiki Toolkit.



Some ideas for the future

  • Add more features. :-) E.g. wiki search.
  • Rewrite in e.g. Ruby so the program will be platform independent.

Have fun and please let me know your comments and suggestions!

Download: * plaintextwiki-toolkit-0.1-preview.zip (4.66 KB - downloaded 609 times.)
« Last Edit: December 02, 2007, 10:54:52 AM by Arjen » Logged
mouser
First Author
Administrator
*****
Posts: 33,256



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: December 02, 2007, 09:08:32 AM »

great work app and tinjaw!!
Arjen, plaintextwiki looks really cool!
blaster and tpreal -- great to see you guys in this  thumbs up

arjen a suggestion (actually this suggestion might be useful for everyone):
grab a screencasting tool (camtasia old v3 -- free, wink -- free, bb flashback express -- cheap), and make a screencast showing how to use it.  I suggest it for plaintextwiki mainly just because its a cool idea that people might need to see in action to understand.
Logged
Arjen
Charter Member
***
Posts: 93



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #2 on: December 02, 2007, 10:58:51 AM »

arjen a suggestion (actually this suggestion might be useful for everyone):
grab a screencasting tool (camtasia old v3 -- free, wink -- free, bb flashback express -- cheap), and make a screencast showing how to use it.  I suggest it for plaintextwiki mainly just because its a cool idea that people might need to see in action to understand.

Video added! Simple and without audio, but hopefully makes things clearer!
Logged
mouser
First Author
Administrator
*****
Posts: 33,256



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: December 02, 2007, 11:15:17 AM »

go for it urlwolf, there's still time for your entry.

Excellent work arjen!
i think it could have used a few more examples of it being triggered, to jump between files -- but it's great, one gets the idea.
very useful tool too!
« Last Edit: December 02, 2007, 11:18:02 AM by mouser » Logged
Armando
Charter Member
***
Posts: 2,674



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #4 on: December 05, 2007, 09:04:56 PM »

Arjen : could MS Word or another word processor use such a script ?  embarassed sorry if it's a stupid question...
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
Arjen
Charter Member
***
Posts: 93



see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: December 06, 2007, 02:18:09 AM »

Hi Armando,

The short answer: no.

The long answer:

The PlainTextWiki tool is a simple command line program that searches for a wiki link in your text file and opens it in your editor.

As such, you need a text editor that supports external tools and can pass the required parameters to PlainTextWiki. (See the readme file for more info.)

MS Word or most other word processors won't be able to use this tool, because:

  • They don't use regular text files.
  • They don't support external tools.

Sorry!
Logged
urlwolf
Charter Member
***
Posts: 1,784



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #6 on: December 06, 2007, 05:56:43 AM »

I used a plain text wiki for a while. It was vim-specific (the name is viki).
It was fun while I was using a big arse text file for diary/todos... then I moved to onenote.
Logged
Armando
Charter Member
***
Posts: 2,674



see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #7 on: December 06, 2007, 06:19:09 PM »

Thanks for the short and long answers, Arjen.  smiley
Having a "wikiword script" for Word is one of these little things that I keep hoping will appear... ( http://www.donationcoder....um/index.php?topic=9502.0 ). It's not an obsession though... just something that looks like it would make a positive difference in my work flow.
Logged

"I suppose it can be said that I'm an absent-minded driver. It's true that I've driven through a number of red lights on occasion, but on the other hand, I've stopped at a lot of green ones but never gotten credit for it."
Glenn Gould
mucksen
Participant
*
Posts: 2


View Profile Give some DonationCredits to this forum member
« Reply #8 on: December 08, 2007, 08:15:50 AM »

If you like this you should have a look at http://www.jhorman.org/wikidPad/
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.041s | Server load: 0.02 ]