Friday 5 October 2012

Convert MomentoApp to HTML Using Powershell

Lately I've been using the iPhone app Momento as a photo food diary which has been working well:


The problem with the Momento app is that the file export is just a flat text file with the image file names which is kind of depressing:



The lack lacklustre export functionality has been discussed in this thread on the Momento website and there doesn't seem any plans to improve it.


I've started writing a powershell script to parse the Momento text file, the script uses regular expression and creates a powershell object which can then be used to export the data into different formats.


Clear-Host
 
$strContent = Get-Content "D:\Temp\momento\momento\Momento Export 2012.10.01 at 12.52.55\2012.10.01 - Momento Export.txt"
 
$List = @()
 
ForEach($line in $strContent)
{
      IF ($line -match "((Mon)|(Tues)|(Wednes)|(Thurs)|(Fri)|(Satur)|(Sun))day (\d|\d\d) .* \d\d\d\d")
      {
            $txtEntryDate = $line
      }
     
      IF ($line -match "(\d|\d\d):\d\d (AM|PM)")
      {
            $Entry = new-object PSObject | select-object EntryDate, EntryTime, EntryDesc,EntryImage
            $Entry.EntryDate = $txtEntryDate
            $Entry.EntryTime = $line.Substring(0,8).Trim() 
            $Entry.EntryDesc = $line.Substring(8).Trim()
      }
     
      IF ($line -match "Photos:")
      {
            $Image = $line.Replace("Photos: ","")
            $Entry.EntryImage = ""
      }
     
      IF ($line -match "---")
      {
            #$Entry
            $List += $Entry
            $Entry = $null
      }
      #return $Entry
     
}
 
$a = ""
 
$List | ConvertTo-HTML -Head $a |foreach {$_.replace("<","<").replace(">",">").replace(""","`"")}


Just edit this line in the script to point to your unzipped Momento text file :

$strContent = Get-Content "D:\Temp\Momento Export 2012.10.01 at 12.52.55\2012.10.01 - Momento Export.txt"

and then run the script which will give you some outputted html.

Monday 3 September 2012

How To Automatically Install Software on your Computer

If you've rebuilt your computer and have a fresh Operating System installation with no software it can take hours to reinstall all of the software on your computer you used to have, one way to speed this process up is by using a website called Ninite.com. Ninite is a service that lets users automatically install popular applications for their operating system. It allows users to make a selection from a list of applications and bundles the selection into a single installer package. There are currently two versions of the service, for Windows and Linux, unfortunately it is not available for Mac.

 

Green Screen Effect using a GoPro and Adobe Premiere Pro CS6

This is my first attempt at using a green screen effect, filmed using a GoPro and edited in Adobe Premiere Pro CS6 using the Ultra Key effect. Looks pretty good but I need to figure out how to feather the edges as it's a bit jagged on the shoulders.