Export Text Assist learned words and shortcuts [webOS 2.x] (homebrew) | webOS Nation
 
 

Export Text Assist learned words and shortcuts [webOS 2.x] (homebrew) 14

by Adam Marks Mon, 27 Jun 2011 9:08 pm EDT

This tip is only for devices running webOS 2.0 and higher

While there currently is no method to backup and restore the entries you have added to the Text Assist app for either "Learned Words" or "Text Shortcuts," rcmarvin in our forums has provided a way to at least view your entries using a command line command. Add in a few tweaks and you have some code that you can use to create a text file on your device so you can back up your manual Text Assist entries. Using the command line (either by using an app like Terminus on the device or using the recently re-added Linux Commandline feature in webOS Quick Install), enter the following commands:

Export Learned Words:

luna-send -n 1 palm://com.palm.smartKey/listUserWords '{"offset": 0, "limit": 1000}' > /media/internal/learned.txt

This will create a file called "learned.txt" on the USB drive on your device, with a list of your learned words. The text file will contain something that looks like this (with pre2, pre3, precentral, touchpad, and veer as the learned words):

{ "returnValue": true, "words": [ "pre2", "pre3", "precentral", "touchpad", "veer" ] }

Export Text Shortcuts:

luna-send -n 1 palm://com.palm.smartKey/listAutoReplace '{"offset": 0, "limit": 1000}' > /media/internal/shortcuts.txt

This will create a file called "shortcuts.txt" on the USB drive on your device, with a list of your shortcuts. It will look something like this:

{ "returnValue": true, "entries": [ { "shortcut": "i", "sub": "I" }, { "shortcut": "ill", "sub": "I'll" }, { "shortcut": "im", "sub": "I'm" }, { "shortcut": "pc", "sub": "precentral" }, { "shortcut": "r", "sub": "are" }, { "shortcut": "u", "sub": "you" } ] }

Note that the "limit" of 1000 entries in the code above is an arbitrary limit. If you need more, just update the code.

Manually add entries to Text Assist

rcmarvin also provided a method to add "learned words" or "text shortcuts" to your Text Assist app via command line. Using the code

luna-send -n 1 palm://com.palm.smartKey/addUserWord '{"word": "PreCentral"}'

or

luna-send -n 1 palm://com.palm.smartKey/addAutoReplace '{"shortcut": "pc", "substitution": "PreCentral"}'

you can add the word "PreCentral" to your Text Assist learned words or shortcuts. Therefore, to replace your Text Assist entries after a webOS Doctor or device swap, you can always create a script to restore multiple words at once.

Hopefully, HP will add Text Assist words to the Palm Profile backup in the future, but at least this provides you a method to manually backup your entries. In the meantime look for a script to be added to the Save/Restore app shortly (it's already in the testing feeds) that will automatically create and backup the text files for you, although not restore them.

Thanks to rcmarvin in the forums for the code

 

5
Your rating: None Average: 5 (1 vote)

14 Comments

Article "content" + Save/Restore app = True?

not sure i understand the question

I think autoaddict is saying that Save/Restore just added support for saving text assist databases, and that you should update the article.

that last lines of the article: "In the meantime look for a script to be added to the Save/Restore app shortly (it's already in the testing feeds) that will automatically create and backup the text files for you, although not restore them." Rod and I worked to get that published this morning!

Awesome. Hopefully the TouchPad will accept the same commands. It'll be one of the first things I'll do if that's the case.

My Text Assist does not seem to work, at least I do not get any corrections when I type, as mentioned in the article.

I have a Palm Pre with webOS v 1.4.5.

Is there something I need to do to 'activate' it?

Thanks in advance for any help.

Please see the first line of the tip: This tip is only for devices running webOS 2.0 and higher

when are they going to fix the mobile site so that i can post from my pre- running 1.4.5????????????????????????????????????

But what if HP kept their promise and gave pre-'s 2.1. Then we could use text assist!

No where nearly as easy as with 1.4.5 where you can download, edit and replace the autoreplace text file using WOSQI. That's too bad.

backup of txt assist is now supported in save+restore.

yup! last lines of the article: "In the meantime look for a script to be added to the Save/Restore app shortly (it's already in the testing feeds) that will automatically create and backup the text files for you, although not restore them." Rod and I worked to get that published this morning in conjunction with the tip

Hopefully, in addition to adding the user dictionary to backup, HP will also expand the built-in dictionary so we don't need to teach it so many words.

How to create a script to restore multiple words at once!!!??? I don't know how to do this!!! Help, please!!!