zenrain
I've taken to using text files rather then anything else when writing. I've done this for several reasons, mainly to do with ease of working with them, the excellent text applications out there, and everything supports it, period.
An additional reason, I use WriteRoom for the iPhone. It stores the information as text, and syncs it with a website. This allows me to copy the text from my iPhone to my computer without any hassle.

The only problem with text files, is they don't support formatting. This is where Markdown and MultiMarkdown come into play.
Markdown is a text to html formatting conversion tool written by John Gruber. It's available here. What it allows you to do is "format" your text file by adding characters, or formatting it a certain way. You can then run it through dingus and it will convert it to an html formatted file. The basic syntax is covered here to get you started.

Enter MultiMarkdown. MultiMarkdown was written by Fletcher T Penney as Markdown that supported much more than .html. MultiMarkdown supports LaTeX, TeX, PDF, XHTML, XLST, RTF as well as other formats. It incorporates the majority of Markdown, and then adds much more. This uses perl to translate text files to the appropriate format. Perl is included in OSX, but you have to download and install for Windows. The examples below use Strawberry Perl.

So what the heck does this mean to you? Well, what you can do is type up your information in a text file, include MultiMarkdown formatting, and then run it through the Perl script, and paste it into your notes, with everything formatted as it needs to be.
You can either do this manually, or if you use AHK, introduce a little automation.

Manual (Windows):
1. Install Strawberry Perl. Both this and the AHK script assume you installed it to the standard location, the root of C:.
2. Install MultiMarkDown. Both this and the AHK script assume you installed it to your Documents and Settings\userid\Application Data folder. If you don't, you will have to modify some of the code below.
3. Create a shortcut on your desktop. In the properties enter the following:
        1. In Target: C:\strawberry\perl\bin\perl.exe "C:\Documents and Settings\user\Application Data\MultiMarkdown\bin\mmd2XHTML.pl" %1
        2. in Start in: C:\strawberry\perl\bin
4. Now, when you drag your text file to the shortcut, it will automatically create a .html version of the file, formatting included.
5. Open the .html file and view the source.
6. Copy the source after <body> and before </end body>.
7. In PersonalBrain, click on the Notes tab and choose **View > HTML View**.
8. Paste your code and go back to Normal view.

Automated (Windows & AHK):
I've included some code below that you can type into an existing AHK file. It will work as follows:
Copy all of the contents of your text file you wish to convert to your clipboard.
Now in PersonalBrain, go to the spot in your notes you wish to input the formatted text.
Type .mmd
Wait a few seconds...

Code is as follows:

-----

#IfWinActive ahk_class SunAwtFrame

:*:.mmd::
FileText = %Clipboard%
Perl = C:\strawberry\perl\bin\perl.exe
PerlPath = C:\strawberry\perl\bin
MMDDir = %A_AppData%\MultiMarkdown\
MMDPath = %A_AppData%\MultiMarkdown\bin\mmd2XHTML.pl
FilePath = %A_WorkingDir%\Clip.txt
HTMLPath = %A_WorkingDir%\Clip.html

FileAppend, %FileText%, %FilePath%
RunWait, %Perl% "%MMDPath%" "%FilePath%", %PerlPath%
FileDelete, %FilePath%
FileRead, HTMLContent, %HTMLPath%
FileDelete, %HTMLPath%
StringGetPos, ContentStart, HTMLContent, <body>
ContentStart += 10
StringTrimLeft NewStr, HTMLContent, %ContentStart%
StringGetPos, ContentEnd, NewStr, </body>
Length := StrLen(NewStr)
EnvSub , Length, %ContentEnd%
StringTrimRight NewStr, NewStr, %Length%
Clipboard = %NewStr%
ClipWait

Send !w
Sleep 100
Send m
Sleep 200
SendInput {Up}
Sleep 200
SendInput {End}
Sleep 200
Send {Ctrl Down}
Send {v}
Send {Ctrl Up}
Sleep 100
send !w
Sleep 100
Send g
sleep 100
send {Down}

FileText =
Perl =
PerlPath =
MMDDir =
MMDPath =
FilePath =
HTMLPath =
HTMLContent =
ContentStart =
ContentEnd =
Length =

Return
-----

Code ends here (I couldn't use the code forum function, it messes up <> characters.
Windows 7
J-1.6.0_22
--
OSX 10.6.3
Java SE 6
Quote
zenrain
Here's a bit more food for thought. I've found MultiMarkdown makes text files easier to read as well.

Here's an example, below are the first 5 paragraphs of the post above, in MultiMarkdown format. I added a title just as an example. When ran through the Perl script, it will be coded in HTML format, with the list showing as <ol><li>, bold as <strong></strong> and italics as <em></em>

# PersonalBrain Notes, and MultiMarkDown #

I've taken to using text files rather then anything else when writing. I've done this for several reasons, mainly to do with ease of working with them, the excellent text applications out there, and everything supports it, period.
An additional reason, I use WriteRoom for the iPhone. It stores the information as text, and syncs it with a website. This allows me to copy the text from my iPhone to my computer without any hassle.

The only problem with text files, is they don't support formatting. This is where Markdown and MultiMarkdown come into play.
Markdown is a text - to html formatting conversion tool written by John Gruber. It's available [here][grmmd]. What it allows you to do is "format" your text file by adding characters, or formatting it a certain way. You can then run it through [dingus][grmmdu] and it will convert it to an html formatted file. The basic syntax is covered [here][grmmds] to get you started.

Enter MultiMarkdown. MultiMarkdown was written by Fletcher T Penney as Markdown that supported much more than .html. [MultiMarkdown][mmd] supports LaTeX, TeX, PDF, XHTML, XLST, RTF as well as other formats. It incorporates the majority of Markdown, and then adds much more. This uses perl to translate text files to the appropriate format. Perl is included in OSX, but you have to download and install for Windows. The examples below use [Strawberry Perl][sp].

So what the heck does this mean to you? Well, what you can do is type up your information in a text file, include MultiMarkdown formatting, and then run it through the Perl script, and paste it into your notes in PersonalBrain. Everything will be formatted as you intend.
You can either do this manually, or if you use AHK, introduce a little automation.

**Manual (Windows)**:

1. Install Strawberry Perl. Both this and the AHK script assume you installed it to the standard location, the root of C:.
2. Install MMD. Both this and the AHK script assume you installed it to your Documents and Settings\[ *userid* ]\Application Data folder.
3. Create a shortcut on your desktop. In the properties enter the following:
        1. In Target: C:\strawberry\perl\bin\perl.exe "C:\Documents and Settings\[ *user* ]\Application Data\MultiMarkdown\bin\mmd2XHTML.pl" %1
        2. in Start in: C:\strawberry\perl\bin
4. Now, when you drag your text file to the shortcut, it will automatically create a .html version of the file, formatting included.
5. Open the .html file and view the source.
6. Copy the source after <body> and before </end body>.
7. In PersonalBrain, click on the Notes tab and choose **View > HTML View**.
8. Paste your code and go back to Normal view.

[grmmd]:http://daringfireball.net/projects/markdown/
[grmmdu]:http://daringfireball.net/projects/markdown/dingus
[grmmds]:http://daringfireball.net/projects/markdown/syntax
[mmd]:http://fletcher.github.com/MultiMarkdown/
[sp]:http://strawberryperl.com/
Windows 7
J-1.6.0_22
--
OSX 10.6.3
Java SE 6
Quote

Newsletter Signup  Newsletter        Visit TheBrain Blog   Blog       Follow us on Twitter   Twitter       Like Us on Facebook   Facebook         Watch Us on Youtube  YouTube       

TheBrain Mind Map & Mindmapping Software     Download TheBrain Mind Mapping Software