Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-03-2014, 08:20 AM
|
#1
|
LQ Guru
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,944
|
Auto copy Firefox words in persdict.dat to other word files.
Hi.
I add custom words in Firefox to this file: ~/.mozilla/firefox/XXXXXXXX.default/persdict.dat
I'd like a command to auto copy those persdict.dat words to these 2 files:
~/.config/enchant/en.dic
~/.thunderbird/YYYYYYYY.default/persdict.dat'
Thanks.
|
|
|
07-04-2014, 01:09 AM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,417
|
What's the format of these files? Plain text, Mork, sqlite3 database or?..
|
|
|
07-04-2014, 04:05 AM
|
#3
|
LQ Guru
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,944
Original Poster
|
Quote:
Originally Posted by unSpawn
What's the format of these files? Plain text, Mork, sqlite3 database or?..
|
Hi unSpawn.
Using the file command:
.mozilla...persdict.dat: C++ source, UTF-8 Unicode text
.thunderbird...persdict.dat: ASCII text
.config/enchant/en.dic: C++ source, UTF-8 Unicode text
|
|
|
07-04-2014, 01:24 PM
|
#4
|
Moderator
Registered: May 2001
Posts: 29,417
|
No idea what char sequences make it say "C++ source" but for me (FF 30.0 here) the "persdict.dat" appears to be plain text. I don't have any .config/enchant/ dictionaries in use. http://www.abisource.com/enchant/ says enchant isn't a spell checking library at all but requires backends like aspell. Could you read one of your ~/.config/enchant/*.dic files to see what it contains?
|
|
|
07-05-2014, 08:55 AM
|
#5
|
LQ Guru
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,944
Original Poster
|
Quote:
Originally Posted by unSpawn
No idea what char sequences make it say "C++ source" but for me (FF 30.0 here) the "persdict.dat" appears to be plain text. I don't have any .config/enchant/ dictionaries in use. http://www.abisource.com/enchant/ says enchant isn't a spell checking library at all but requires backends like aspell. Could you read one of your ~/.config/enchant/*.dic files to see what it contains?
|
I ran this on a test Linux Mint 17 MATE VirtualBox VM in ~/.mozilla: file persdict.dat persdict.dat: ASCII text
The en.dic file in ~/.config/enchant/ contains words I've added manually overtime.
|
|
|
07-06-2014, 06:20 AM
|
#6
|
Moderator
Registered: May 2001
Posts: 29,417
|
OK, so basically both are ASCII text files. You could (should) make backups and $(sort -u $EACH_FILE) and create a central source from which to populate those three files (inotify CLOSE_WRITE trigger?) but I'm not sure if those changes will stick while the application is running. Only one way to find out ;-p
|
|
|
07-06-2014, 12:54 PM
|
#7
|
LQ Guru
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,944
Original Poster
|
Quote:
Originally Posted by unSpawn
OK, so basically both are ASCII text files. You could (should) make backups and $(sort -u $EACH_FILE) and create a central source from which to populate those three files (inotify CLOSE_WRITE trigger?) but I'm not sure if those changes will stick while the application is running. Only one way to find out ;-p
|
Could you elaborate on that? Giving a step by step process?
|
|
|
07-08-2014, 02:34 PM
|
#8
|
LQ Guru
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,944
Original Poster
|
The most important bit is to copy (with a single command to add to an alias) all the contents of the .mozilla persdict.dat file to the .thunderbird persdict.dat file. I can manually update the en.dic file.
|
|
|
07-08-2014, 04:52 PM
|
#9
|
Moderator
Registered: May 2001
Posts: 29,417
|
I think I'm making this too difficult ;-p If all three dictionaries are plain text files containing only the words you add one per line then why not simply symlink two to the one you always edit?
|
|
|
07-09-2014, 08:43 AM
|
#10
|
LQ Guru
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,944
Original Poster
|
Quote:
Originally Posted by unSpawn
I think I'm making this too difficult ;-p If all three dictionaries are plain text files containing only the words you add one per line then why not simply symlink two to the one you always edit?
|
The perfect solution. Cheers unSpawn.
I used the Firefox persdict.dat as the main file and linked from it with the same name to .thunderbird and changed link name to 'en.dic' for the file in .config/enchant/ which is used by Pluma, etc.
|
|
|
08-04-2014, 04:00 AM
|
#11
|
LQ Guru
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,944
Original Poster
|
Can I also use this with LibreOffice spellcheck?
|
|
|
All times are GMT -5. The time now is 06:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|