Tag Archive: “yojimbo”

Yojimbo Scripts on GitHub

My Yojimbo Scripts repository contains a bunch of old scripts (sans documentation, unfortunately) for use with Yojimbo. Most but not all have previously been posted here. I am posting them now as a single collection on GitHub in order to make it easier for others to find and make use of the code.

Posted on Wednesday, August 28th, 2013.

Yojimbo to Password Safe

I’ve written a script called yj2pwsafe which adds passwords exported from Yojimbo to Password Safe format database files. Password Safe is an open source password manager developed in part by Bruce Schneier. Many programs are compatible with Password Safe files. My script relies on code from Password Gorilla, a compatible application written in Tcl/Tk.

Downloads, details, and instructions on Github.

yj2pwsafe screenshot

I’ve updated yj2pwsafe to be more user-friendly since I first posted this announcement; it is now packaged as an Applescript app that presents a series of dialogs like the one pictured above.

Additionally, I’ve updated yj2pwsafe so that it can import serial number items exported from Yojimbo as well as password items.

Posted on Tuesday, August 20th, 2013.

Safari, NetNewsWire, Yojimbo, and Pinboard

Bookmark Page in Yojimbo

This is a script for Safari. It’s a variation on my Bookmark in Yojimbo script. The original “Bookmark & Edit” option has been replaced with “Bookmark & Post to Pinboard”. I rarely want to edit a bookmark or its properties, but soon I might start sharing some links on Pinboard.

Bookmark News in Yojimbo

This is a script for NetNewsWire, a free feed reader for Mac OS X. It works just like the above script for Safari. It saves a bookmark to the current news item, and provides an option to spread the news by posting the bookmark to Pinboard. This is what I’m going to do instead of sharing items in Google Reader.

Post Bookmark to Pinboard

This is a script for Yojimbo, the program I use to save bookmarks and other bits of information. It posts the selected bookmark items to Pinboard. This script is invoked [and thus required] by the “Bookmark & Post to Pinboard” option in both scripts listed above.

Before posting a bookmark, the script prompts you to enter a description. The initial value of the description is based on the Yojimbo item comments. If you click “Post”, the bookmark will be posted with the given description but the Yojimbo item comments will not be changed; “Post & Update Comments” will change the item comments to match the entered description.

To help you keep track of what you’ve shared, items posted to Pinboard are added to a “Pinboard” collection, which will be created if it doesn’t already exist. As an example, here’s what my collection looks like at the moment:

And here’s how it looks on Pinboard:

Limitations

These scripts don’t deal with tags, labels, stars, or other features offered by Yojimbo or Pinboard. These scripts aren’t likely to be very useful if you’re not me. I don’t know exactly what happens if you post the same bookmark to Pinboard twice; I think it’s updated automatically.

There are bugs.

Download

Download all three scripts here (24 KB)

Configuration

Some assembly is required. I recommend installing the scripts in the following locations (create the directories if they don’t already exist). Run them with FastScripts or the regular script menu.

~/Library/Scripts/Applications/Safari/Bookmark Page in Yojimbo.scpt
~/Library/Scripts/Applications/NetNewsWire/Bookmark News in Yojimbo.scpt
~/Library/Scripts/Applications/Yojimbo/Post Bookmark to Pinboard.scpt

Edit the _pinboard_script_path property at the top of both “Bookmark in Yojimbo” scripts to identify the full path to your copy of the Pinboard script. In my case, this reads:

property _pinboard_script_path : "/Users/anoved/Library/Scripts/Applications/Yojimbo/Post Bookmark to Pinboard.scpt"

Lastly, edit the _API_username and _API_password properties at the top of the Pinboard script to reflect your Pinboard login information. Since the Pinboard API is essentially a clone of the Delicious API, it should be straightforward to modify this script to work with Delicious – but unfortunately I haven’t quite got it working. Don’t hold your breath for an update, but please do share any fixes or improvements.

Acknowledgements

The code to post to Pinboard is derived from this NetNewsWire to Delicious script by Larry and Andrew. My sketchy URL encoding code is lifted from this example at Mac OS X Automation.

Posted on Monday, February 15th, 2010.

yjnote

yjnote is a Mac OS X command-line tool for creating note items in Yojimbo. You can use it to pipe the output or usage notes of other programs into Yojimbo for reference or logging purposes.

Download

Download yjnote.zip (1.7 KB)

Tested, minimally, with Yojimbo 2.1 on Mac OS X 10.6.2. yjnote is written in Perl with a pinch of AppleScript. Further testing, bug fixes, and improvements are welcome (and likely necessary).

Usage

You can display this documentation at any time with yjnote -help.

NAME
       yjnote − Create Yojimbo notes from the command line.

SYNOPSIS
         yjnote [options] [FILE...]

DESCRIPTION
       yjnote creates a Yojimbo note by concatenating the contents of the
       given files (or by reading standard input, if no files are given).

OPTIONS
       −title TEXT
           Sets the note item title.

       −comments TEXT
           Sets the note item comments.

       −label TEXT
           Sets the note item label. Ignored if the label does not exist.

       −tags TAG[,TAG,...]
           Sets the note item tags. Separate tags with commas.

       −flagged
           Flags the note item.

       −reveal
           Reveals the newly created note in Yojimbo. By default, the new note
           is not displayed.

Posted on Sunday, December 13th, 2009.

Bookmark in Yojimbo compatible with Yojimbo 2.0

The current version of my Bookmark in Yojimbo script is compatible with the recently-released Yojimbo 2.0.

Posted on Wednesday, September 2nd, 2009.

Expanded Comments Fields for Yojimbo 2.0

Bare Bones Software has released Yojimbo 2.0, which I heartily recommend. However, Yojimbo 2.0 still comes out of the box with fixed-height comment fields. Here is an updated version of my hack to display comment fields that expand to fill the available space:

Download Expanded Comments Fields for Yojimbo 2.0 (32k)

Posted on Wednesday, September 2nd, 2009.

Note Poster

Here’s a script to create a new post in MarsEdit from a note selected in Yojimbo. Why use a script when it’s already as easy as copy and paste? Well, maybe your computer is running out of paste.

tell application "Yojimbo"
	set _items to selected items of browser window 1
	if (_items is {}) or (_items is missing value) then return
	set _note to item 1 of _items
	if class of _note is not note item then return
end tell

tell application "MarsEdit"
	set _post to make new document
	set body of _post to contents of contents of _note
	set title of _post to name of _note
	activate
end tell

Click here to open the script directly in Script Editor. Save it in ~/Library/Scripts/Applications/Yojimbo and you’re ready to run.

Posted on Sunday, May 11th, 2008.

Bookmark in Yojimbo for Camino

I’ve posted a Camino-compatible version of my venerable Bookmark in Yojimbo script.

Update: Revised for Camino 1.6. New in Camino 1.6 is the ability to add any script in ~/Library/Scripts/Applications/Camino to the toolbar, so you don’t even need to use a separate script runner.

Posted on Tuesday, March 4th, 2008.

Yojimbo Tag Companions

I use this little script when I want to ensure that every Yojimbo item with a certain tag also has some other tags. For instance, to ensure that every leoben item is also tagged cylon, I run the script, select leoben from the first list of tags that appears, and cylon from the second list.

Download Tag Companions (4k)

Posted on Thursday, January 17th, 2008.

Yojimbo 1.5 Script Compatibility

Today Bare Bones Software released Yojimbo 1.5, a significant update to the all-purpose desktop database. Since I’ve written quite a few little scripts for the program, I gave them each a quick test to check whether they worked with Yojimbo 1.5 and Mac OS X 10.4.11. Happily, most of them do.

Compatible

Updated

I haven’t tried the indispensable widescreen hack yet.

Posted on Wednesday, December 5th, 2007.