Created
October 6, 2009 06:38
-
-
Save dcbriccetti/202806 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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