Archive for April 2007

 
 

SignatureProfiler 1.4.3 Released.

This simply fixes a couple of small bugs found in the previous version.

  • Fixed two problems relating to the script feature that could crash mail or just return an empty selection from a script.

For more information, visit the site or download it directly. Also please see the tutorials on the blog for how to use the plugin.

Calling Scripts from Signatures

Many users will find this new feature of SignatureProfiler very exciting. It allows you to interject any data that you can get in text form from any command line into a signature. You could easily incorporate iChat status, uptime count, random quote from a database, etc into you signatures. In addition any standard SignatureProfiler placeholders will be replaced after the script contents are inserted into the signature, so in truth a single signature calling a script can be as dynamic as you are inside that script.

Adding a script to a signature is quite simple. Go into the Signature preference pane and select the signature that you want to change. Form there, you can either right-click (or control-click) choose SigPro Replacements and then at the bottom, you’ll see Add Script…. Selecting this will bring up an open dialog box, from which you can choose any type of file. Find your script and select it. It will be added to the signature in the form:

  • {script:’/Path/to/my/script.scpt’}

As usual, you can enter this entire text yourself without using the menu, but it makes it a little easier. You should use some sort of delimiters around the path though, where the open and close are the same. Any of these characters can be used (as long as the same character is not in the path) [\"'|!@#$%^&*-=_+,.?/\ ]. In addition, any formatting applied to the placeholder will be applied to the resulting string as well.

You can use any scripting language that you like. If the file is a .scpt or .applescript file, then it will be interpreted and run as an applescript. In all other cases the script will be run as an executable shell file, so you must ensure that it can be run this way or you will get errors in your results. So you can easily use perl, shell, or even ruby if you wish.

As mentioned above, any of the normal placeholders that you can use in signatures can be put inside the script and they should be replaced as normal. The only exception to this is a script placeholder for obvious problems of recursion.

The results of the script are always inserted as html, so you should use </br> as line breaks. A simple carriage return will not do anything. But this also gives you the ability to control the output pretty well.

To all those who contributed this idea, thanks very much. Let me know what you think and if there are parts that are not implemented how you would like.

SignatureProfiler 1.4.2 Released

This release to adds a feature that has been much requested, so I am hoping that you find it useful. As usual there is no change to the Panther version and there probably won’t ever be. These are the changes made:

  • Fixed a problem with the Configure Mail Settings and Uninstall SignatureProfiler scripts.
  • Added the ability to call scripts from within a signature, allowing you to incorporate any text output from a script into the signature. This is the most requested feature that I have had, so it need to be implemented.
  • Added a random quotation feature in directly, so that users who are not very familiar with scripting can also take advantage of this capability.

For more information, visit the site or download it directly. Also please see the tutorials on the blog for how to use these new features.

Using the New Random Quote Feature

With the release of version 1.4.2, you now have the ability to create a simple text file that can be used as a source of random quotations to be incorporated into your signatures. Once you have created this file you can simply insert a simple {random.quote} placeholder into your signature to have it pick one for you. In addition, you can associate an author and a citation/source to that quote to be inserted separately. Read on for more details and some examples.

The main emphasis of this update of SignatureProfiler is to include access directly from a signature to scripts so that users who have a built up set of quotations in a database or who want to include some information about the status of their machine could do this. However, since I know that not all users are adapt at writing applescripts or perl scripts or some other kind, I thought I would also provide a simple capability to create a simple list of quotations, with authors and citations, that anyone could create and use. To see more about the script access capabilities in this version, see the post Calling Scripts from Signatures.

Ok, so how does a user create and add her quotation list file? Simple. In the iTunes & Quotes (previously just iTunes) tab in the SignatureProfiler preferences pane, the bottom half allows you to designate the file that you would like to use as your quote list file. One the file has been chosen, it will display the quotations in the bottom table, but you cannot yet edit them here. They are just for display to so that you can verify that it actually read the file correctly.

MailScreenSnapz007

So then, now you just have to create a text file. Each quotation should be on a single line, but it can also have an author and a citation or source to go along with it. The author and citation should be separated from the quote by a semi- colon (:). If your quotation, author or citation has a semi- colon within it you must delimit that piece with some kind of character from this list ( \”‘|!@#$%^&*-=_+,.?/\ ) (the last one is a space!). You can always use these characters for delimiters, but you must if your text has a semi- colon.

Create you file as a simple text file in program like TextEdit or BBEdit and save it wherever you like. Then from with the above mentioned iTunes & Quotes tab of the preferences pane, select that file.

So, here are a couple of examples of what some lines from this file might look like. These examples are from the same file as you see in the image above. (Note that each of these is on a single line in the text file)

  • Quick to judge, quick to anger, slow to understand, ignorance and prejudice and fear walk hand in hand:Neil Peart:Witch Hunt
  • “Life is like a box of chocolates, you never know what you’ll get”::Forrest Gump
  • Where’s the beef!?
  • Life, liberty and the pursuit of happiness::Declaration of Independence|Are we ‘green’?|:Ruby Rhod:The 5th Element

So now how can this information be used inside of a signature? Three new placeholders have been added, which you can also access from the placeholder menu in the Signature’s preference pane. They are:

  • {random.quote}
  • {random.quote.author}
  • {random.quote.citation}

The first will be replaced by the actual quotation, the second, by the author, if one was indicated for that quote and the last is the citation or source, also if one was indicated. So if you have a signature that looks like this:

Signature with random quote

You would get these three as possible outcomes from the file listed above:
Random Example 1
Random Example 2
Random Example 3
One thing to note in the last example, the text ” – in ” is placed into the signature as well, despite not having any author or citation. This is because it is in the actual signature above. So you might want to consider this when creating your signature and signature file. If the signature itself was something like this instead:

  • {random.quote} {random.quote.author} {random.quote.citation}

Then I could put the relevant text into the file list, maybe like this:

  • ‘”Quick to judge, quick to anger, slow to understand, ignorance and prejudice and fear walk hand in hand”‘:by Neil Peart:from the song <i>Witch Hunt</i>
  • |”Life is like a box of chocolates, you never know what you’ll get”|::in Forrest Gump
  • Where’s the beef!?
  • Life, liberty and the pursuit of happiness::’- Declaration of Independence’|Are we ‘green’?|:Ruby Rhod:The 5th Element

When you do this though, be sure to use some delimiters to ensure that the full string is interpreted correctly. For example since the dash (-) is normally seen as a delimiter, if you start a citation or author with that, you should use some other delimiter character around the entire part.

I hope that this was helpful.