topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday December 13, 2024, 10:38 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: WikidPad - an IDE for your thoughts  (Read 69520 times)

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #25 on: April 03, 2008, 07:03 AM »
Hey guys: what great ideas  :Thmbsup:

I really liked the day page idea:
Second, I do not use scratch pad at all. I have daily record wikipage I use to put random bits

Thanks Kartal: it's a great way to organise stuff that's not necessarily organised so that it can be organised later...

And thanks Justice for your kick start... I've never done anything in AHK before (always used AutoIT myself), but nearly everyone here uses AHK so I'd always thought of getting started (but never really starting  :-[).

So I've combined Kartal's idea of a day page into your script and bingo: wonderful  :Thmbsup:

My Attempt at an AHK Script
Code: Autohotkey [Select]
  1. ; WikidJot
  2. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5.  
  6. #j::  ; Win+j hotkey
  7. Gui, Add, Text,, Enter note:
  8. Gui, Add, Edit, r9 w400 vClip
  9. Gui, Add, Button,gButtonOK, &Copy to Clipboard  ; The label ButtonOK (if it exists) will be run when the button is pressed.
  10. Gui, Show,, ClipJotter
  11. return  ; End of auto-execute section. The script is idle until the user does something.
  12. return
  13.  
  14. ButtonOK:
  15. Gui, Submit  ; Save the input from the user to each control's associated variable.
  16.  
  17. ; run wikidpad or switch to it
  18. IfWinNotExist, MyWiki.wiki - WikidPad       ; Look for a specific Wiki ("MyWiki.wiki")
  19. {
  20.   Run, G:\Programmes\WikidPad\Wikidpad.exe  -w G:\Documents\MyWiki\MyWiki.wiki  ; comment this line with correct paths
  21.   WinWait, MyWiki.wiki - WikidPad, , 5
  22. }
  23.  
  24. ; ThisDay is the page where all "today's" notes will go: it's date based and will appear in the ParentLess View
  25. ThisDay := A_DD . "-" . A_MM . "-" . A_YYYY    ' eg: 04-04-2008
  26.  
  27. WinActivate, MyWiki.wiki - WikidPad         ; Use filename just in case other windows are open
  28.  
  29. Send, {CTRLDOWN}o{CTRLUP}                   ; Open WikiPage
  30. WinWait, Open Wiki Word                     ; Wait for the window
  31. IfWinNotActive, Open Wiki Word, WinActivate, Open Wiki Word
  32. WinWaitActive, Open Wiki Word
  33. Send, %ThisDay%                             ; Enter the PageName
  34.  
  35. WinWaitActive, Open Wiki Word
  36. Send, {ENTER}                               ; Close the Open Wiki Page window
  37.  
  38. WinWaitActive, Create , , 1                 ; Wait to see if the Create Dialog is displayed
  39. IfWinActive, Create
  40. {
  41.   Send, {ALTDOWN}y{ALTUP}                   ; Of course we want to create a new page!
  42. }
  43.  
  44. WinWait, MyWiki.wiki - WikidPad
  45. IfWinNotActive, MyWiki.wiki - WikidPad, WinActivate, MyWiki.wiki - WikidPad
  46. WinWaitActive, MyWiki.wiki - WikidPad
  47.  
  48. ControlFocus, wxWindowClassNR2              ; Set the focus on the editor in case it's not
  49.  
  50. {
  51.   ; The 3rd section of the Status Bar displays where the cursor is, use this to show when we've reached the end of the page
  52.   StatusBarGetText, BeforeText , 3 , MyWiki.wiki - WikidPad
  53.   Send, {PgDn}
  54.   StatusBarGetText, AfterText , 3 , MyWiki.wiki - WikidPad
  55.  
  56.   if AfterText = %BeforeText%
  57.     break
  58. }
  59.  
  60. IfWinNotActive, MyWiki.wiki - WikidPad, WinActivate, MyWiki.wiki - WikidPad
  61. WinWaitActive, MyWiki.wiki - WikidPad
  62.  
  63. ControlFocus, wxWindowClassNR2              ; Set the focus on the editor in case it's not
  64.  
  65. Send, {ENTER}{ENTER}                        ; Add a couple of lines
  66. Send, %Clip%                                ; Insert our text
  67.  



kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #26 on: April 03, 2008, 10:12 AM »
Perry Mowbray

thansk for the script, I will try it today.

One more method I use is through "launchy" . I made launcy command "todo" which uses my default notepad and sends my path\to\mytodo.wiki as argument to notepad. What I do is press "capslock" to activate launcy and type "todo". This will open "mytodo.wiki" in my default notepad and then I will type the stuff, for example todo:read the book. Since "todo:" is a special keyword in wikipad it will show in special view. In wikipad mytodo wiki page will be activated with the new stuff I just have typed. It works great. And you can use this for any wiki page since all are text based

What I am looking for is actually a way to append text to any file via command line. This way I can just pass any text line to any wiki page without opening any text editor via launcy or farr. Probably there is a way but I have not searched for a solution seriously yet.




justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #27 on: April 03, 2008, 01:08 PM »
echo Your text here >> todo.wiki

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #28 on: April 03, 2008, 02:28 PM »
Justice that adds to bottom of the text, is there a way to add to beginning of the text file?

brotherS

  • Master of Good Ideas
  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 2,261
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #29 on: April 03, 2008, 02:58 PM »
Thanks for the review!

I thought about using/trying TiddlyWiki a few times - but didn't yet - and won't use/test WikidPad any time soon, but it's great to know what to expect.

For the time being, I'm using .txt files that I can easily find with Locate (https://www.donation...dex.php?topic=1385.0) and MindMaps for developing connected thoughts.

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #30 on: April 03, 2008, 09:40 PM »
Justice that adds to bottom of the text, is there a way to add to beginning of the text file?

You'd have to (using a batch):
1. write your line of text to a new file
2. write the old file to the new file
3. delete the old file
4. rename the new file to the old file

Or easy enough using a script (VBS,JS,AiT,AHK, etc) to use concatenate the two (in the correct order) and overwrite the original file.

But reading your original question I thought you were wanting to write to a specific Wiki page? If you use the Original Gadfly Database Type then each Page/Word is saved as a different file. Then you'd be able to add text to the end of the file.

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #31 on: April 03, 2008, 09:48 PM »
Perry I use txt based database so yes I can edit the text files. Also Mouser told me in another topic that he had wrote a text appender for FARR, it can add to beginning or ending of a file. I had tested it works great

justice

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,898
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #32 on: April 04, 2008, 03:28 AM »
echo your text here >> temp.txt
type todo.wiki >> temp.txt
move temp.txt todo.wiki /-y

or create a batch file add.bat:
@echo off
echo %2 >> temp.txt
type %1 >> temp.txt
move temp.txt %1 /-y
and then call it like: add.bat todo.wiki "your text here"

edit: oops it's /-y to confirm overwriting if the destination file exists.
« Last Edit: April 04, 2008, 03:41 AM by justice »

kartal

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 1,529
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #33 on: July 28, 2008, 12:33 AM »
Here is a nice Wikidpad trick.

You can clone wikidpad with current page (view-clone window)
Now one window will be in edit mode and the other one will be in html preview mode.
When you change your content in edit mode, the next preview window(clone) will also update the content.

Ampa

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 592
  • I am cute ;)
    • View Profile
    • MonkeyDash - 2 Player strategy boardgame
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #34 on: July 28, 2008, 06:00 AM »
First new beta since January released last weekend...

Jul. 27, 2008 (1.9beta16)

  • Option to set color of editor margin.
    See OptionsDialog#*Margin# color*
  • Option to set color of tree background.
    See OptionsDialog#++++# Tree# options
  • Option to set length of recent wikis list.
    See OptionsDialog#*Recent# wikis# list# length*
  • Option to store relative pathes to recent wikis.
    See OptionsDialog#*Store# relative# pathes# to# wikis*
  • Bug fixed: "Open Wiki Word" dialog was sometimes closed
    when keeping it open makes more sense
  • Bug reduced(?): Linux: Handling of local file URLs to start
    applications works better
  • Support for all uppercase and lowercase letters in the
    Unicode set for creating camel-case wiki words independent of OS language
-change log

Wish development was a little faster - I am using Wikidpad a lot, but there are a few shortcomings that I'd like to see resolved.

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #35 on: July 28, 2008, 06:24 AM »
First new beta since January released last weekend...

Thanks Ampa! Yes, I'm using WikidPad more and more, and it is somewhat slow, but if it stays slow and steady I'll be happy...


oversky

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 19
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #36 on: October 10, 2008, 04:48 PM »
How can I copy a table from excel into Wikidpad?

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #37 on: October 16, 2008, 05:17 AM »
How can I copy a table from excel into Wikidpad?

Of course the table structure is quite different, eh?

In WikidPad I generally do:
<<|
Cell One:One | Cell One:Two
Cell Two:One | Cell Two:Two
>>

So all you'd need to do is to write some VBA to put your Excel cells into that format and put it on the clipboard ready for pasting into WikidPad.

At my last job I wrote a macro to do the same thing but formatted for Confluence, I'll see if I can dig it up...

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: WikidPad - an IDE for your thoughts
« Reply #38 on: October 16, 2008, 06:04 AM »
OK, found it and made the few changes for WikidPad...

1. Copy the following code into the WorkBook Code.

Code: Visual Basic [Select]
  1. Sub SelectionToWiki()
  2.     Dim specialChars As String
  3.     specialChars = Chr(7) & Chr(10) & Chr(13) & "\"
  4.    
  5.     result = ""
  6.     For i = 1 To Selection.Rows.Count
  7.         'result = result & "| "
  8.        For j = 1 To Selection.Columns.Count
  9.             Dim cell As Range
  10.             Set cell = Selection.Cells(i, j)
  11.             cellStr = cell.Value
  12.            
  13.             ' New Lines don't work in WikidPad Cells so
  14.            cellStr = Replace(cellStr, Chr(10), " / ")
  15.            
  16.             If cell.Font.Bold Then cellStr = "*" & cellStr & "*"
  17.             If cell.Font.Italic Then cellStr = "_" & cellStr & "_"
  18.             result = result & cellStr & " | "
  19.         Next
  20.         ' remove the last pipe
  21.        result = Left(result, Len(result) - 3)
  22.         ' add a line feed
  23.        result = result & Chr(13)
  24.     Next
  25.     ' wrap the table formatting
  26.    result = "<<|" & Chr(13) & result & ">>"
  27.    
  28.     Dim MyDataObj As New DataObject
  29.     MyDataObj.SetText result
  30.     MyDataObj.putinclipboard
  31.    
  32.     MsgBox "WikidPad table copied to clipboard: " & Chr(13) & Chr(13) & result
  33. End Sub

2. Add a table to the WorkSheet:
Screenshot - 16_10_2008 , 9_54_19 PM.png

3. Select the Range to copy

4. Run the Macro: Alt+F8 and select the Macro and click "Run"

5. Paste the clipboard into a WikidPad Page. It should look like this:
Code: HTML [Select]
  1. <<|
  2. *Heading Two* | *Heading Two* | *Heading Three*
  3. _Two :: Two_ | Two :: Two | Two :: Three
  4. Two :: Two | Two :: Two | Two :: Three
  5. Three :: Two | Three :: Two | _Three :: Three_
  6. Four :: Two / Four :: Two: Line Two | Four :: Two / Four :: Two: Line Two | Four :: Three / Four :: Three: Line Two
  7. >>

6. Preview the page. It should look like this:
Screenshot - 16_10_2008 , 9_55_16 PM.png