Mostrando entradas con la etiqueta tiddlywiki. Mostrar todas las entradas
Mostrando entradas con la etiqueta tiddlywiki. Mostrar todas las entradas

2009/01/19

A button to make it simpler to paste notes: urls

I often paste links to Lotus Notes documents (mostly mail messages) in my tiddlywikis. Creating a toolbar button that puts the notes: url in a field makes it simpler. Unfortunately, LotusScript does not provide a way to access the clipboard, so you have to manually select the text and copy it there.
Create a new toolbar button and paste this code inside:


dn := @Subset(@DbName; 1);
linkType:= "Document";
nsfPath := @WebDbName;
qualifiedHost := @If(@Length(dn) = 0; ""; @DbLookup("":""; dn:"names.nsf"; "($ServersLookup)"; dn; "SMTPFullHostDomain"));
dbUrl := "Notes://" + qualifiedHost+ "/" + nsfPath;
viewUrl := dbUrl + "/";
docUrl := viewUrl + "/" + @Text(@DocumentUniqueID);
docTitle := @If(@IsAvailable(Subject);Subject;@IsAvailable(Title);Title;@IsAvailable(FullName);FullName;@Name([CN];@Author));
clipboardTxt := "[[" + docTitle + "|" + docUrl + "]]";
@Prompt([OkCancelEdit]; "TiddlyWiki link"; "Copy the text below to the clipboard."; clipboardTxt)

I posted this long ago in my intranet blog, and looks that can also be useful outside. The code was adapted from something that Jonathan Feinberg, of Wordle fame, wrote for a then young and great Dogear, a bookmarking service that ended up being one of the key components of Lotus Connections.

2008/04/15

A simple way to manage Firefox privileges

If you are familiar with the 'enhanced abilities' Firefox security prompt, and you ever clicked on the 'Remember this decision' check box

you may want to check http://firefoxprivileges.tiddlyspot.com.

When this prompt appears as a result of loading a file from your hard drive, you may not be aware of the exact meaning of the 'Remember this decision' check box. While you probably mean "I trust this file and I don't want you to annoy me anymore", Firefox understands "I trust every html file loaded from the hard drive". This broad trust is not a good idea from the security point of view.

This tool allows to easily cancel that effects of "remember this", and tell Firefox that you only trust some specific files (per-file permissions). Before hacking it, I used to have to mess with the user.js file, much less convenient.

The tool is implemented as a TiddlyWiki plugin. If you are not familiar with TiddlyWikis (super cool wikis in a single file), this is a good chance to get to know them.

Edit:
Some strings to make this post googleable for the right people:
UniversalXPConnect UniversalBrowserRead UniversalBrowserWrite UniversalFileRead CapabilityPreferencesAccess UniversalPreferencesRead UniversalPreferencesWrite
netscape.security.PrivilegeManager.enablePrivilege signed.applets.codebase_principal_support

2007/12/14

Social Note Taking


I just played a bit with Ripplerap, a tool to take and share notes during conferences. Brilliant. If downloading and unziping is too much for you to get an impression, take a look at Phil Whitehouse's ripplerap-is-about-to-be-born post.

It is in its infancy, and there are several things that need some ironing, but I believe that its simplicity gives it a huge potential. Good news for us compulsive note takers and/or conference-life-blogging addicts.

And I must confess that I did not see much of a point in one of Ripplerap bulding blocks, TiddlyChatter...

Update: It is a funny coincidence that the very same day that I played with Ripplerap for the first time, fellow IBMer Sacha Chua - tech evangelist, storyteller, geek - made me aware of this collecton of tips for conference bloggers.

2007/11/02

Introducing... TiddlyWiki!

Dave Gifford created a very nice intro to TiddlyWiki. Going over the 20 first slides will take you less than a minute and will give you good reasons to read further and start using tiddlywiks.

2007/08/04

SendTo Clipboard coolness (TiddlyWiki links to your files)

The SendTo folder is a simple and powerful tool to customize Windows Explorer to simplify some recurring tasks. If you often want to link to files in your PC from your TiddlyWikis, you'll like this hack. It creates two new items in the "Send To" menu:

  • clipboard - file url: Copies to the clipboard the file: url of the file or folder that was showing the "Send To" menu
  • clipboard - new tiddler javascript url: Copies to the clipboard a javascript: url that, when pasted into the address bar of a Firefox tab showing a TiddlyWiki, will create a tiddler with the contents of the file that was showing the "Send To" menu

You can jump and just download and run the thing, a small .hta file, or take less than three minutes watching it in action in one of the lamest screencasts ever:

SendTo Clipboard Screencast from Xavier Vergés and Vimeo

Using it
  • Just download the .hta file and open it. No, wait! Never open .hta files unless you trust its author or you have taken a look at the code.
  • Provided that you trust me or that you have checked the code, you can now open it. Maybe a double click will be enough (your Windows associates .hta files to mshta.exe, a version of IE with high security privileges in your machine). Maybe you need to use the command line and type mshta path2twlink.hta.
  • Follow the simple steps described in the .hta file, and you can start using your new shinny Send To menu items.
  • You are expected to edit the file to customize what gets copied into the clipboard. It should be easy. You may get ideas to push the sendto+clipboard+javascript urls concept further; adding them to the tool should not be too hard.
  • You are also expected to do some dancing, since this is DanceLikeMattHardingWare.
Lessons learned while hacking
  • I initially wanted to use just a .js file. Getting access to the clipboard from a .js file is hard, so I went for an .hta. It turned out to be a good thing, because it ended up providing a way to avoid to the users the trouble of creating the shortcuts by hand and to me the trouble of documenting the recipe.
  • The problem of using an .hta file is that I found no way to keep it invisible, that it has an unusual way to receive its params, and that I had to warn you about its dangerousness.
  • I think that I've spent more time recording the lousy screencast and comparing video hosting services that coding. The number of times that I rerecorded the #@%! thing will remain undisclosed; I have my pride. Regarding the hosting services, after reading about them, I posted the video to google, blip.tv and vimeo.
    I still have no winner, but google's video quality was awfull, so I had to drop it despite its super cool feature of letting you link to a specific point of the video.
    Update: looks like the winner is http://viddler.com: links, comments and tags on specific points of the video, plus the best player of all (in full screen mode, showing the original size, the quality was just perfect): http://www.viddler.com/explore/xdexavier/videos/1

2007/05/27

Bookmarking things within gmail

Restoring a Firefox session accidentally told me that, when you open messages/chats in a new window, you get an url that you can bookmark/copy to another file. Nice.

Exploring things a bit further showed that gmail uses frames, so you can use the url of the inner frame to bookmark contacts, labels, filters, searches or any other thing that does not have the "New Window" link. In Firefox, use the popup menu, and "This Frame > Open frame in new tab".

Very handy for those of us that run our lifes in tiddlywikis.

Of course, Google is perfectly free to change these misterious urls not likely intended for public consumption...

2007/05/11

Tiddlywiki YourSearch bookmarklet

Want to use the terrific YourSearch plugin even when visiting a TiddlyWiki that does not have it installed?
A bookmarklet will make it simple.

2007/04/11

Tiddlywiki YourSearch plugin

If you are a tiddlywiki user and you have not installed the YourSearch plugin, you don't know what you are missing. Serious.

2007/01/09

My browser, my rules, my chrome

Summary: there are times when Firefox security gets in your way. Having a directory where you can place xul, html and scripts to run with chrome privileges enables you to shoot yourself in the foot and to create nice and handy hacks.

The itch that called for scratching: I wanted to hack something to let me upload several files at once to googlepages [1]. The problem is that, for very good reasons, you can not use JavaScript to change the value of input fields of type file: you usualy don't want scripts reading files in your disk. So, a bookmarklet, that to the browser looks as if it were part of the page, wouldn't cut it. Greasemonkey userscripts do run sandboxed, but not under chrome privilege [2], so I did not try that. I tried to give the page UniversalFileRead privilege [3][4], but failed.

A chrome folder. From Under chrome's influence, slightly modified,


In the browser's installation directory, create a new file chrome/mychrome.manifest and put a single line into it:
content mychrome file:///D:/whatever/mychrome/
Note that the trailing slash is significant. Then create the file D:\whatever\mychrome\hello.txt and add some text:
hello world!
After a complete restart of your browser, you can open that file using chrome://mychrome/content/hello.txt.
You need to keep in mind that chrome is catched, so you may not see the changes you make immediately. Setting nglayout.debug.disable_xul_cache to true [5] or the Extension Developer's Extension ability to reload chrome without restarting the browser are helpful here.

Future plans:
  • the bulk upload to googlepages is working nicely; needs some docu before uploading it.
  • I want to have a browser window with chrome privileges so that I can have more freedom of what I can do with some file: urls. Specifically
    • have known tiddlywikis granted UniversalXPConnect privilege without having to grant it to everything from file: and without having to mess with the capability.principal.codebase annoyance.
    • have local files use a script loaded from the web, or have a remote file load a script from my disk, so that I don't have to upload files while writing/debugging javascript.
Footnotes:
[1] googlepages: yeah, I know, I'm cheap!
[2] Mark Pilgrim's slides on sandboxing greasemonkey have a wonderful "how to become an expert" detour. Don't miss it.
And, just in case you are a powerpoint author, consider S5 (a Simple Standards-Based Slide Show System), the tool used for Mark's slides.
[3] UniversalFileRead: I added to my user.js
user_pref("capability.principal.codebase.googlepages1.granted", "UniversalFileRead");
user_pref("capability.principal.codebase.googlepages1.id", "http://pages.google.com/");
but still got a security exception.
[4] Highlighted link thanks to http://citebite.com.
[5] nglayout.debug.disable_xul_cache: I haven't tried it. As I write this,I realize that my user.js sets it to true while my prefs.js ignores it and keeps it to false. I'm clueless here. Update: A ";" was missing at the end of its user_pref line. Life is much better with this setting enabled!

2006/12/15

Exporting to plain html from a TiddlyWiki

TiddlyWikis are my main note taking device. But what happens when I want to share my notes on some topic with someone?
TiddlyTools' NewDocumentPlugin can do lots of things, but one of them is to export to a simple html file the tiddlers that you are viewing at any time, without the side bars or the header. So, in my SideBarOptions tiddler, I have added <<newDocument ask snap tiddlerDisplay>> and it shows as a "create a snapshot" button. tiddlerDisplay is the id of the div that displays the main tiddlers; it could be any other id if you wanted to have a different snapshot.

2006/12/11

Tab Mix Plus + TiddlyWiki = [productivity | guilt]

  • I'm a big fan of the Tab Mix Plus Firefox extension. I have a hard time when using a browser without it and I cannot duplicate tabs, undo tab closing, store several browsing sessions, list all the opened tabs in a dropdown menu...
  • I'm an even bigger fan of TiddlyWikis(*), personal wikis that are self-contained in a single html file that can be in your hard drive or usb stick, or hosted in the terrific and free tiddlyspot service. I use them to record personal knowledge, to write docs and "microtag" at the paragraph level, to write checklists, to keep my to-do lists...

I just changed a Tab Mix Plus preference to switch to my left tab whenever I close a tab. And my left tab always hosts my to-do list in the shape of a MonkeyGTD tiddlywiki.

Will this change mean that my browsing parties will end up being shorter and I'll be pushed to Get Thing Done instead of following yet another interesting link?

Or am I just adding guilty feeling drops to some future pointless browsing?

(*) aside: It was the former IBM Rational Doug Landauer that pointed me to TiddlyWikis (among the endless list of interesting links that he always posted in his intranet blog(**)). It was the magic of seeing a wiki run in my browser that changed my perception of JavaScript and got me interested in it.

(**) See? I just checked Doug's delicious bookmarks and see a link to the Atomisator, some Python scripts that I'd like to check closer to help me avoid drowning in the rss tide... (***)

(***) The pattern of me getting lost following links should be quite obvious at this point :-)