A Whole Lot of Bollocks

Happy happy joy joy

27 notes

Scripting with Textexpander - fillins and Growl

I’ve been writing a few bash & perl scripts to use with Textexpander recently - for some of my network admin tasks. Some are pretty complicated so deserve their own post.

Anyhow some neato tips that may be of interest.

  • you can use the Textexpander fill-ins to enter in data;

  • you can use growlnotify from the script to send goodly info to Growl.

There are some seriously powerful uses for this! How exciting!

Here is a small perl script example to use in Textexpander - it gets the input from the user and sends it to Growl

#!/usr/bin/perl -w


# get some input from user
my $input = "%fill:name%";

# send something out via growl
`/usr/local/bin/growlnotify -m "Got this input from the user: $input" "Growltest"`;

Filed under perl textexpander

2 notes

Using Markedapp directly from Devonthink

Markedapp from Devonthink

Normally I use MacVim for anything lengthy markdown wise

But as my Markdown powers are increasing I’ve started looking at just using Devonthink and Marked.app only for some quick entries - I leave Vim for heavier lifting.

  • Tip - you can edit a text note in DT inline & have Marked.app open it
    • Assign a keyboard shortcut for Marked.app by adding one in your Keyboard preferences:
  • in System Preferences -> Keyboard -> Keyboard Shortcuts add an application shortcut for Devonthink where the Menu item is named ‘Marked’
  • set a keyboard shortcut for this and you are good to go.

Notes:

  • my default external text editor is MacVim - which opens up with a Shift-Command O

  • I set Control-Option-Command O for starting Marked.

You could do some fancy window placement to keep Marked out of the way using something like Divvy or Flexiglass

Acks

I dips me lid to @jgregjones with his devonthink forum post that got me a bit motivated to write this up.

Filed under marked.app devonthink vim

4 notes

Linking MacVim and Marked.app

Linking MacVim and Marked.app


You will need MacVim and Brett Terpstra’s Marked.app

Aim:

  • write markdown in macvim and easily invoke marked.app to render

How:

  • in your .vimrc file put:
:nnoremap <leader>m :silent !open -a Marked.app '%:p'<cr>
  • to use - in MacVim, write markdown happily, hit ‘\’m whenever you want to fire up Marked.app to view

got this hint from @tednaleid

How I use it:

  • I use Devonthink a lot.
    • In Devonthink - open up a note in an external editor via Shift-Cmd-O (open with) into MacVim
    • edit in MacVim and then preview in Marked.app
    • dump to pdf or html from Marked.app when I need it

Coming soon, I’ll put up a workflow for using Omnifocus, Devonthink, Vim and Marked.app

Filed under vim marked.app