Archive

Posts Tagged ‘Mac Os X’

Managing Downloaded TV Shows By Folder With Applescript

March 8th, 2010 Greg Smith No comments

I’m using the TV Shows Mac application to pull torrent files of TV shows and stream them to my PS3 using the PS3 Media Server application. The flow is something like this:

  • TV Shows looks for torrent files and places them in the Media Temp directory.
  • Transmission looks torrent files in the Media Temp directory, it deletes the torrent files and puts the in-process and incomplete torrent files in the Media Temp directory.
  • When Transmission is done downloading, it moves the file to the TV Shows directory.

What neither TV Shows or Transmission does is to organize shows into separate folders by show name. To achieve this I created a folder action Applescript that parses out the TV show name from the file name and creates a folder. The folder action will then move the file into the appropriate folder.

Here is the folder action that I attach to the TV Show folder. It runs every time a file is placed into the TV Shows folder. (note: This is used on Mac OS X 10.6)

–Organize TV shows by folder

–By Gregory J. Smith http://greginthedesert.net

on adding folder items to this_folder after receiving these_items

tell application “Finder”

try

set tvshowsfolder to this_folder

set thefilelist to these_items

repeat with i from 1 to number of items in thefilelist

set thefilename to name of (item i of thefilelist)

set OldDelims to AppleScript’s text item delimiters

set AppleScript’s text item delimiters to “.”

set Pasrsedfilename to text items of thefilename

set AppleScript’s text item delimiters to OldDelims

–Hopefullug there is never a TV show named SxxExx.

set LastPartOfShowName to (count of Pasrsedfilename) – 1

repeat with x from 2 to number of items in Pasrsedfilename

if (item 1 of (item x of Pasrsedfilename) is “S” and item 4 of (item x of Pasrsedfilename) is “E”) or (item x of Pasrsedfilename) is “REPACK” then

set LastPartOfShowName to x – 1

exit repeat

end if

end repeat

set OldDelims to AppleScript’s text item delimiters

set AppleScript’s text item delimiters to ” “

set TVShowName to (items 1 through LastPartOfShowName of Pasrsedfilename) as text

set AppleScript’s text item delimiters to OldDelims

log TVShowName

if not (exists folder TVShowName of tvshowsfolder) then

make new folder at tvshowsfolder with properties {name:TVShowName}

end if

move (item i of thefilelist) to ((tvshowsfolder & TVShowName) as string)

end repeat

on error theerror

display dialog “There was an error moving TV shows: ” & theerror

end try

end tell

end adding folder items to

The applescript seems to work pretty well when there is only one show that lands in the TV Shows directory. When I have manually added several files to the TV show directory, sometimes the folder actions just stop working or give a weird error.

My next project will be to automatically delete the TV shows based the last time they were viewed. The challenge here will be that the PS3 Media Server doesn’t do anything to mark a file as read and I don’t want to delete a file unless it has been watched.

MacWorld Reviews Online Backup Services

September 9th, 2009 Greg Smith No comments

How convenient that MacWorld reviewed 8 online backup services for Mac. Perfect timing for me since I just dumped Mozy, my online backup service since fall of 2007.

Since using Mozy, I rarely have had to restore files. When I have it hasn’t been an issue, until recently. It was the end of July 2009 that I needed to restore a file. It took until the end of August 2009 that I was finally able to restore the file from their web based interface but could never get the native Mac restore application to work properly.

MacWorld’s review of Mozy mostly agrees with me.

PROS
Terrific initial backup selection set; simple approach for basic use.
CONS
Controls and status windows are split into too many pieces; restore software failed on one computer; backup halted due to bugs for four weeks on one computer (fixed in a subsequent release).

My next pick, which I have been testing locally for several months, is CrashPlan. It’s also MacWorld’s pick. I like it when MacWorld agrees with me.

What I like about CrashPlan is it lets you back up to your own server for free and has an inexpensive family plan.

CrashPlan has worked great until I upgraded to Mac OS X 10.6. The non Mac OS X 10.6 version of CrashPlan caused my Mac to freeze. Reasonable enough I tried to upgrade to the Snow Leopard approved version. The CrashPlan installer fails to install the application citing errors of an unknown kind: “There were errors with the installation. You may want to try installing again” and “The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance”.

InstallerScreenSnapz001.jpg

At the moment I am without a offsite backup option. Hopefully CrashPlan responds to my support issues.

Mac OS X 10.6 Snow Leopard Available For Preorder

August 1st, 2009 Greg Smith No comments

Mac OS X 10.6 Snow Leopard is available from Amazon for preorder. It is due to be released in September.

14C43263-82C7-4BEB-B5BD-E3AE4747E0A3.jpgThe single user version of Mac OS X 10.6 Snow Leopard is 29.99 and the Mac OS X Snow Leopard Family Pack (5-User) is 49.99

There are also box sets available that include iLife and iWorks and Snow Lepoard. The Single user Mac Box Set is 169.99 and the Mac Box Set Family Pack (5-User) is 229.99.

Finally for the really special Mac OS X Server 10.6 is 499.99.

10 Interesting Links From May 31st

June 1st, 2009 Greg Smith No comments
  • Movie Awards Story | Exclusive: Shia LaBeouf Reveals ‘Transformers’ Villain The Fallen – Show Story | Headlines | MTV – "He is the king bee," LaBeouf told us recently as he discussed the Fallen, unveiling him to "Transformers" fans for the first time anywhere. "He's the patriarchal figure, he's the main dude. He's what all of this came from."
  • North Korean Economy Watch » North Korea Uncovered – (Google Earth) – This Google Earth project offers an extensive mapping of North Korea’s economic, cultural, political, and military infrastructures. Through the topic menu, users of this program have easy access to geographical information on North Korea’s agriculture projects, aviation facilities, communications, hospitals, hotels, energy infrastructure, financial services, leisure destinations, manufacturing facilities, markets, mines, religious locations, restaurants, schools, and transportation infrastructure. In addition to locations of economic interest, this map also displays anti-aircraft locations, the Demilitarized Zone (DMZ) and Northern Line Limit Line (NLL), incarceration facilities, political monuments, political residencies, military bases, and nuclear facilities.
  • Jeremy Clarkson Honda Insight 1.3 IMA SE Hybrid review | Driving – Times Online – It’s terrible. Biblically terrible. Possibly the worst new car money can buy. It’s the first car I’ve ever considered crashing into a tree, on purpose, so I didn’t have to drive it any more.
  • Are high ceilings a sign of wretched architectural excess or just good taste? – By Witold Rybczynski – Slate Magazine – Certain features are taken for granted in today's residential market: granite countertops, glass-walled showers, and, judging from this recent ad for a new Upper West Side condo, very tall ceilings. Not so long ago, 8-foot ceilings were the norm. What changed?
  • News : Rio Rancho police answer call to protect President – Rio Rancho Observer – Hosting the President of the United States is no light matter. There’s much work involved preparing for his arrival and ensuring his safety.

    The Rio Rancho Police Department feels it rose to the occasion last week as President Obama’s historic visit to Rio Rancho went off without a hitch.

  • Why our ‘amazing’ science fiction future fizzled – CNN.com – Forty years later, we're still waiting for those congestion-free highways — along with the jet pack, the paperless office and all those "Star Trek"-like gadgets that were supposed to make 21st-century life so easy.
  • Tempe-based Syntax-Brillian Corp. rises, falls fast – What each box really contained – and where the shipment was headed – is unclear to accountants, attorneys, investors and creditors looking into Syntax-Brillian's practices since the company filed for bankruptcy in July 2008. They say the peculiarity raises yet another red flag about how the company did business in its last years, when revenue soared.
  • Automating Twitter | Mac OS X | Macworld – Jason Snell recently explained how to use Applescript to automate the popular Twitter client Twitterific. But, with the help of some simple shell scripting, you can also send quick status updates directly to Twitter from within an Automator workflow.
  • The Evolution of House Cats: Scientific American – The findings suggest that cats started making themselves at home around people to take advantage of the mice and food scraps found in their settlements.
  • No. 2 Albuquerque, New Mexico – Kiplinger.com – Population: 819,576
    Income Growth: 7.8%
    Cost of Living Index: 98
    Median Household Income: $45,634
    Percentage of Workforce in Creative Class: 30%

    What Albuquerque wants, Albuquerque gets — and the city and state crave high-tech jobs, especially in the renewable-energy industry. So when Schott North America made overtures to many cities about hosting its flagship solar-panel plant, Albuquerque and New Mexico pounced.

I’m Going To Learn iPhone Programming

October 10th, 2008 Greg Smith 2 comments

With the current financial catastrophe going on, I’ve decided to invest in myself. I have signed up for Pragmatic Studio’s IPhone Development Studio, 10 November through 13 November in Denver.

The $1800 early bird registration certainly wasn’t cheap, and it isn’t being paid for by my company. I’m tried of this “teach myself programming” that I’ve done most of my life. I want some real instructed programming-on-the-Mac training. I can’t seem to get that anywhere in New Mexico, the local colleges don’t seem to offer it.

I’m mostly a VBA guy (and some RealBasic) so I need to brush up on my Objective-C. I started going back through Beginning Mac OS X Programming and should be able to get through it by the time the class starts. Only problem with this particular title is it covers Xcode 2 and there’s some pretty big changes with Xcode 3.

iTunes 8.0: Error -15000 When Using Apple TV As Remote Speakers

August 12th, 2008 Greg Smith No comments

iTuneserror-15000.jpgYet another new iTunes update and yet another broken feature. It was over a year ago that iTunes 7.3 came out and had problems with podcasts and saving the library which eventually resulted in iTunes 7.3.1. Now with iTunes 8.0 released it’s broken the ability to stream music to a Apple TV. I get the error “A error occurred while connecting to the remote speaker “Apple TV”. An unknown error occurred (-15000).”

There’s a discussion on the Apple message boards but so far no fix.

Update 10/16/08: Apple support article TS2278 suggests making changes to your Mac OS X firewall. So far it’s working for me. I’ve had a little stuttering but no error messages and hours of streaming.

Mac OS X 10.5.1 or later:

  1. From the Apple menu, choose System Preferences.
  2. From the View menu, choose Network.
  3.  

  4. Select the network interface you use to connect to your Express base station – either AirPort or Ethernet.
  5. Click the Advanced button and select TCP/IP in the new window.
  6.  

  7. Confirm that the pulldown menu next to Configure IPv6: is set to Automatically or Manually depending on your network.
  8. Click OK.
  9. Click the Show All button at the top of the window.
  10. From the View menu, choose Security.
  11. Select the Firewall tab.
  12. Choose the radio button “Set access for specific services and applications.”
  13. Close the Security window.

A Real Mac OS X Virus On The Loose

June 20th, 2008 Greg Smith No comments

OK, technically it’s a Trojan but I think the term “virus” is better to get attention. The Unofficial Apple Weblog states:

In the wake of the ARDAgent vulnerability discovered yesterday, we all have something new to look out for: OSX.Trojan.PokerStealer is the official name of a trojan horse masquerading as a poker game. The trojan is distributed in a 65K .zip archive.

According to security company Intego, running the trojan activates SSH, and transmits the username, password hash, and IP address of the computer to a server. It asks for an administrator’s password after displaying a message about a corrupt preference file that needs to be repaired.

The “PokerGame” application is 159,843 bytes, and includes the text “Copyright 2008 Andrew” in the version information (visible in Get Info).

Don’t be a fool. Don’t download stuff from non-reputable sites and don’t open attachments you don’t know what they are.

Good Bye CompUSA, I Wont Miss You

December 8th, 2007 Greg Smith No comments

CompUSA is going out of business. I’m not sure what it is, too much competition, high prices, they can’t figure out what it is they sell? Back in the day (early 1990’s), they were one of the few places one could find Apple computers and accessories. My second Mac, a Centris 610, was purchased from a CompUSA in Arizona. I recall writing on a AMUG BBS about this computer’s 20MHz 68LC040 being “blazing fast”.

The actual purchase of the computer was not so blazing fast. I went to the salesman and said I want to buy that computer. The salesman goes to his little WYSE dumb terminal type machine and comes back with paperwork for me to fill out. I fill out the rather long form then wait like an hour to actually get the computer brought to me. Then i take it up front to pay for it.

Once in New Mexico, CompUSA was the only computer store to sell Apple products. Despite it being on the other side of town, sometimes taking a hour to get there, I used to visit frequently. I actually bought Mac OS X 10.4 “Tiger” there when it came out since there was no Apple store in town at the time. It’s probably been a good year since I’ve been there, prices are too high and their selection was poor.

MacOSaiX 2.0 Offically Released

November 19th, 2007 Greg Smith No comments

MacOSaiX lets you build mosaic images from various photo libraries, including your, google images or videos. It’s been in alpha state for ages, but glad to see it’s finally updated and Leopard compatable.

Version: 2.0
Released: Nov. 19, 2007
New features:
Now compatible with Leopard.
Newly found images now “zoom” into place.
Image sources can now be designated as “filler”.
Saving mosaics as very large images is now handled more gracefully.
Handling of EPS images is improved.
Bugs Fixed:
Folder image sources no longer reset when a mosaic project is re-opened.
Symbolic links are now handled correctly by Folder image sources.
Searching for flickr photos that match all of the given tags now works correctly.
Google images sources are working again when running on Mac OS X 10.3 (Panther).
Google images sources now load correctly when a mosaic project is re-opened.
QuickTime image sources now behave better.
No longer crashing when using red-, green- or bluescale colors with a Glyphs image source.
No longer crashing when getting the count of matching photos from flickr.
No longer crashing when an invalid image is chosen as the original.
No longer crashing when double-clicking the hand-picked image source.
No longer crashing at some point after editing an image source.
No longer crashing on quit when there is an unsaved Glyphs image source.
No longer crashing when clicking in the menu bar when no windows are open.
Many memory leaks were fixed.
Known issues:
Hiding the status bar is not working.
Zooming the window causes it to jump around.

Make Mac OS X 10.5 Menu Bar Opaque With Leopaque

November 18th, 2007 Greg Smith No comments

Unlike the previous program I posted about, that didn’t work, this one does. Leopaque makes your menu bar opaque. It’s essentially a terminal command that changes a setting in Mac OS X 10.5 wrapped in a windowed interface.

It works perfectly.