Skip to content

Instantly share code, notes, and snippets.

@dcbriccetti
Created October 6, 2009 06:38
Show Gist options
  • Save dcbriccetti/202806 to your computer and use it in GitHub Desktop.
Save dcbriccetti/202806 to your computer and use it in GitHub Desktop.
package org.talkingpuffin.state
import net.lag.configgy.Configgy
object ConvertPrefs {
def convert {
val confName = "/Users/daveb/tpuf.conf"
val f = new java.io.File(confName)
if (! f.exists) f.createNewFile
Configgy.configure(confName)
val conf = Configgy.config
val global = java.util.prefs.Preferences.userRoot.node("/org/talkingpuffin/all")
global.keys.foreach(k => {
val value = global.get(k, "")
println("Writing " + k + " " + value)
conf(k) = value
})
}
def main(args: Array[String]): Unit = convert
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment