[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  userdict.txt not being written to

userdict.txt not being written to

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Gwilliams   Canada  (1 post)  [Biography] bio
Date Sat 14 Jul 2012 08:10 PM (UTC)
Message
I'm using MUSHclient 4.73 with the spell checker enabled in global preferences. As I run MUSHclient on several machines, each one is slowly developing its own custom spelling dictionary. I wanted to merge all these custom dictionaries, but found that spell\userdict.txt is empty on all machines. Where are the custom dictionaries being written?

I've looked into %appdata% but don't see anything MUSHclient-specific in there.
[Go to top] top

Posted by Worstje   Netherlands  (899 posts)  [Biography] bio
Date Reply #1 on Sun 15 Jul 2012 05:59 AM (UTC)
Message
It's in spell.db or spell.sqlite, whatever it is called. Use a SQLite managing program to export them, or you can write a script in MUSHclient to do it.

I've suggested before that the user dictionary stuff needs more UI, but I don't think Nick has found the time to work on that yet. :)
[Go to top] top

Posted by Nick Gammon   Australia  (22,990 posts)  [Biography] bio   Forum Administrator
Date Reply #2 on Tue 17 Jul 2012 09:54 PM (UTC)
Message
The file userdict.txt was for backwards compatibility. It is only read when the database is initially created. After that, user words are added to the main database (spell.sqlite) on the fly.

Here's how you can merge them.

Grab the sqlite3.exe program from the SQLite site. ie.

http://www.sqlite.org/download.html/

Look for "A command-line shell for accessing and modifying SQLite databases." a little way down the page.

Plonk that somewhere on your disk and execute it from a "command" window. Open your MUSHclient spell database, eg.


sqlite3 "C:\Program Files\MUSHclient\spell\spell.sqlite"


Type in this SQL to get a list of your user-added words:


SELECT name FROM words WHERE user = 1;


Copy them and paste into userdict.txt.

Exit the program, ie.


.quit


Repeat this process for each machine on which you had added words. You should now have a file per machine with the user-added words.

Using some suitable program (text editor) merge these together and remove duplicates.

Now on your target machine (one which you want these words inserted into):


  • Close MUSHclient.
  • Delete the database: spell.sqlite (or rename it, for safety)
  • Put your new userdict.txt in the spell directory, replacing the empty one if necessary.
  • Restart MUSHclient. The spell database will be rebuilt, including the user words.


The caveat here is that the user words will now be in the database as "normal" words (they were added at startup time). So if you repeat the process later on, only newly-added words will be found by the SELECT statement above. So you need to add to the userdict.txt file next time, not replace it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Seril1   (1 post)  [Biography] bio
Date Reply #3 on Sat 25 Aug 2012 01:24 AM (UTC)
Message
Hi. I have a problem somewhat similar. In my case, however, I've accidentally added a misspelled word, and would like to remove it. Could someone please help me with how to do that?

(Gosh I wish the spell correct the browsers use, with the underlined words in red worked in all applications!)
[Go to top] top

Posted by Nick Gammon   Australia  (22,990 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Sat 25 Aug 2012 07:08 AM (UTC)
Message
See reply further up about getting sqlite3.exe from their web site.

In a command window start that up using the appropriate directory, eg.


sqlite3 "C:\Program Files\MUSHclient\spell\spell.sqlite"


Then enter:


delete from words where name = 'foobar';


Where "foobar" is the misspelt word. That will delete it from the dictionary.

Then to leave the program, type:


.exit


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


14,705 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]