![]() ![]() GeekTool is a great way to display the results of little scripts on your desktop. Here’s a simple AppleScript to use with GeekTool to put your inbox on the Desktop. Here’s how to do it with Python and GeekTool. But sometimes you just want to know if the time is today, or yesterday, or two days ago. There are a lot of desktop clocks that show the absolute time. Put a relative clock on your Desktop with GeekTool Rather than “tomorrow at time” use “time tomorrow”. Use GeekTool, or crontab or launchd and notifications, to know when your bluetooth batteries need recharging.Īli Rantakari’s icalBuddy has an error in the documentation for the “eventsFrom/to” command-line option. More GeekTool Bluetooth battery early warning system Put this above the “if options.xml” so that the script can print out the pruned tree as XML: That’s easy enough with getElementsByTagName. The next step is to get only the tasks with the desired tag(s). You can run the above script just make sure you add “-xml” as an option so that it displays the resulting XML. It fixes the minidom’s toprettyxml so that it doesn’t add unwanted whitespace to textnodes. The “prettyXML” function is based on a regular expression by BrendanM. When a parent has a child appended to it at a lower recursion level, there’s no need to pass the parent back up the chain: XML nodes in Python are objects, and objects are passed by reference.When the first item is popped out of the list at any recursion level, all other recursion levels immediately “get” the new version of the list.This function makes heavy use of the fact that in Python, lists and objects are passed through functions by reference rather than by copy. And if the indentation level drops below the current recursion level, it returns to the caller. It steps through each line in the TaskPaper file(s) and either adds it to the parent element as a project, task, or note or, if the indentation level has increased, it recursively calls itself again with the latest item as the new parent. The meat of this section of the script is parseTasks. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |