How to change Custom Dictionary Location?

Asked by Randal J. Hoffner

I'm using the Windows 1.71 "portable" version of RedNotebook.

Is there any way to change the default location of the Custom Dictionary files. I would sure like to be able to move these files into the same folder as my journal so that they are backed up and always remain with my daily journal notes.

All of my linked pictures and linked documents are placed in folders in the same directory as my journal notes which makes backing up and transferring my journal very easy -- except for the "Custom Dictionary" files.

Love the program,

Randy

Question information

Language:
English Edit question
Status:
Answered
For:
RedNotebook Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#1

Sorry currently there is no way of doing so with the standard version. You
should be able to achieve it however with the portableapps version.
Am 06.12.2013 20:21 schrieb "Randal J. Hoffner" <
<email address hidden>>:

> New question #240406 on RedNotebook:
> https://answers.launchpad.net/rednotebook/+question/240406
>
> I'm using the Windows 1.71 "portable" version of RedNotebook.
>
> Is there any way to change the default location of the Custom Dictionary
> files. I would sure like to be able to move these files into the same
> folder as my journal so that they are backed up and always remain with my
> daily journal notes.
>
> All of my linked pictures and linked documents are placed in folders in
> the same directory as my journal notes which makes backing up and
> transferring my journal very easy -- except for the "Custom Dictionary"
> files.
>
> Love the program,
>
> Randy
>
> --
> You received this question notification because you are an answer
> contact for RedNotebook.
>

Revision history for this message
Randal J. Hoffner (rhoffner) said :
#2

I'm using the Windows 1.71 "portable" version of RedNotebook.

Jendrik,

As you can see if you will re-read my question the very first thing that I said is that I am using the """"portable"""" version.

I have reviewed all of the configuration files in the portable version that I know of and I can not find any reference to the location of the Custom Dictionary.

Can you tell me how to do this with the "portable" version.

Thanks,

Randy

Revision history for this message
VF2NSR (vf2nsr) said :
#3

Hi When you say Portable version are you referring to running it natively portable or did you get hte version from Portablapss.cob web site? I am the packager/developer of the portable apps version adn will look into the situation but I am unsure of hte set up yoou have now. as by default the PA version should be saving it in the Data folder. Where are you seeing it saving hte Dictionary folder?

Revision history for this message
Randal J. Hoffner (rhoffner) said :
#4

About RedNotebook:
RedNotebook 1.7.1

From "PA-Build.rtf"
This version of Rednotebook has been modified for PortableApps.com.

Installation location:
G:\Portables\Word Processors\RedNotebook Journal\RedNotebookPortable\RedNotebookPortable.exe

Custom Dictionary location:
C:\Documents and Settings\Randy\Local Settings\Application Data\Enchant\en_US.dic

All my RedNotebook Journal personal data files are located here (except for the Custom Dictionary):
D:\THE JOURNAL

The above is the info on my RedNotebook install. At one point I did have both the Standard version and the PortableApps.com version installed at the same time, and if I remember correctly they both used the same "Custom Dictionary" file that is listed above in my Windows "Documents and Settings" location. I have since uninstalled the Standard version, but this may be the reason that the portable version uses this Custom Dictionary file that is on the Windows partition.

My goal is to be able to move the Custom Dictionary "Enchant" folder from the Windows partition to a location of my choosing.

Thanks,
Randy

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#5

OK, I see what you mean now, you want to change the location of the
ditionary entries you created yourself inside RedNotebook I had a look
at the underlying spellchecking library and see no way of changing the
default location however. Maybe Patrick, the maintainer of the
portableapps version can use some magic to copy the files to their
location when the app is started and save them back when it is closed.
It seems that pidgin also uses the enchant spell checking library so it
might be worth to have a look at how they do it.

Revision history for this message
Randal J. Hoffner (rhoffner) said :
#6

Jendrik,

Exactly.

I multi-boot three different Windows setups and I run the portable version of RedNotebook from all of them. With the PortableApps.com version of RedNotebook I am able to setup RedNotebook so that it does not matter which Windows version I boot up to -- my RedNotebook program and personal data are always the same and up to date -- except for the "Custom Dictionary" files.

Basically this means that I have "one" RedNotebook installation no matter which Windows setup I boot up with, but "three" differeent Custom Dictionaries that I have to backup and sync if I want them to be the same.

Recently it was stated that RedNotebook only writes to "two" locations on the hard drive and I just want to make mention that this in not true if you count the Custom Dictionary.

I want to say again that I really love the program and appreciate your help in this.

Randy Hoffner

Revision history for this message
VF2NSR (vf2nsr) said :
#7

I will see what I can do this weekend time permitting, The modifications I had done to the base app wee in the font file management to speed it up a bit.

Revision history for this message
VF2NSR (vf2nsr) said :
#8

I think I see how to make it work in the portable version to save the custom Dictionary and move it between OS, I will write up some code tonight and do some testing on it. Once it passes muster will get back to you on it. Also What I may do is release it when the new Rednotebook is released on the site, which should be soon as there is now abeta test going on for a version 1.8 for Windows.

Revision history for this message
Randal J. Hoffner (rhoffner) said :
#9

Thanks for checking this out.

For me, waiting for the next release is fine.

Other than this issue, version 1.71 has been very stable for me, and I can easily keep doing the manual backups as I have been.

Revision history for this message
VF2NSR (vf2nsr) said :
#10

ok will figure it out for you and then also implement into the program

At this point I need to verify a few things BUt I see where it should go

The issue for the program is that in the Portable version I wil need to make it save during an update it would delete so I need to do a bit of programming to get it to work properly, unfortunately I am at work now and can not do the actual coding.

Revision history for this message
VF2NSR (vf2nsr) said :
#11

OK Temp solution which will keep it is to go to the appdata directory on c drive then copy the myspell foler from there into the Data folder located in the hive of the file structure in the portable folder Copy entire folder not just the files.

THe go to the App Appinfo directory Launcher directory open RedNotebookPortable.ini with notepad or wordpad

Delte contents then copy and paste

[Launch]
ProgramExecutable=RedNotebook\Rednotebook.exe
DirectoryMoveOK=yes
SupportsUNC=yes

[FilesMove]
fonts.conf=%PAL:APPDIR%\Rednotebook\etc\fonts
gtkfilechooser.ini=%LOCALAPPDATA%\gtk-2.0
.gtk-bookmarks=%USERPROFILE%
.recently-used.xbel=%USERPROFILE%
WebpageIcons.db=%LOCALAPPDATA%\webkit\icondatabase

; test new code
[DirectoriesMove]
enchant=%LOCALAPPDATA%\enchant
;end test

[DirectoriesCleanupIfEmpty]
1=%%LOCALAPPDATA%\gtk-2.0
2=%LOCALAPPDATA%\webkit\icondatabase
3=%LOCALAPPDATA%\webkit
;test new code
4=%LOCALAPPDATA%\enchant\myspell
5=%LOCALAPPDATA%\enchant
;end test

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\fonts.conf
Find=(INITIALFONTSPATH)
Replace=%PAL:AppDir%\Rednotebook\etc\fonts

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\fonts.conf
Find=(CACHEPATH)
Replace=%PAL:DataDir%\cache

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\fonts.conf
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%
Replace=%PAL:Drive%%PAL:PackagePartialDir%

save file back to original file name

This will keep the custom dictionary resident in the Data folder and allow you to access it on any system

This is tem fix as at this time if hte program is update the custom Diction would remain but if any users installed the dictionary into correct location per Jendris instructions then they would lose the dictionaries. That I am trying to work out now. So both your fix as well as future issue with dictionaries will be resolve. Hope this helps

Revision history for this message
VF2NSR (vf2nsr) said :
#12

OK Further update I have now worked out code to save the normal dictionares as well.

This and the fix I gave you will be implemented in the next PortableApps Build which should ASAP when Jendrikapprve the releae of the 1.8 beta.

Revision history for this message
Randal J. Hoffner (rhoffner) said :
#13

Thanks for the work on this. I tried out the fix that is above in #11 and it did not work for me unless I did something wrong. It allowed me to add a new word to the dictionary and it seemed to be working fine, but when I closed RN and re-opened it the same word had to added to the dictionary again. I went through this cycle a couple of times and the same thing happened each time. The instructions above do mention a "myspell" folder which I assumed to be the "enchant" folder, so the "enchant" folder is the one that I copied into the RN directory.

I would also like to add a thought about the new location that you have chosen for the Custom Dictionary. Moving the Custom Dictionary into the RedNotebook program directory is not the best choice for me. When I backup, copy, or sync my RN data to my laptop (not the program files, but my user data that I have created with the program) it means that I still have to drill down into the RN program directory to get some of "my user data" that is buried in with the software program.

Putting the Custom Dictionary into the RN Portable program folder is better than having it in the AppData folder for someone who only runs RN portable from a single pen drive, but I run the portable version from the hard drive on both my desktop and my laptop and also from a pen drive. For me, because I multi-boot and also run the portable version from the hard drive I go from having 5 Custom Dictionary files to having 3 Custom Dictionary files. I hate to see all of the work go into this for so little gain.

The goal that I had in mind was to have "one" common folder that contained all of my RN user data, which makes it easy to backup and sync. If I'm the only one who sees it this way and it's easier to leave it as it is I understand.

Thanks again.
Randy

Revision history for this message
VF2NSR (vf2nsr) said :
#14

Well here is the situation if you save the journal to the default location Portable apps it goes to the data folder well
this allows it to be totaly transferred and used on any computer or os thart we support. The data folder is never over written on updates. so in reality housing it all in one place the data folder makes it easier to just back it up there. THe reason why it is moved to the data folder is because that is where the program looks for it it on a normal instal and that is where it is located. So by doing as susuggested it puts just th emyspell in data folder, then my code in the launcher takes care of moving it too app data while program is iin use then returning it to data for safe keeping until it is needed again.
This way the program is truly portable. DO as you wish but that is how the netire version is cded. BTW I just happened to see the portable comment above, the reason why we ask what portablle version is that there are 3 one from Portableapps which I support, the one form another website and the built in ortable from Jendrik. when using the PortableApss version we try to prevent things like you are havng, frankly I was not awatre of the appdata entry since I did not have any dictionaries

THat is why I have alway suggested on the PortableApps page to post questions baout our version there. But as you can see I do follow this thread and help when I can.

Revision history for this message
Randal J. Hoffner (rhoffner) said :
#15

Thanks for the reply. I reported earlier that the fix in #11 didn't work for me, but I went back and repeated the instructions and it is working as you say it is supposed to.

I have read and understand your reasoning for re-coding the Custom Dictionary location the way that you have. I can see that if the main goal is to make the RN program "more" portable then the way that you have chosen is certainly a better choice then my suggestion which follows.

I always keep all of my user data on a dedicated partition that is completely separated from any software programs, and my goal was to make my RN user data easier to backup and more easily portable, and for this I would do the following:

In my RedNotebook Configuration File, "configuration.cfg", is a the following line:

dataDir=D:\The Journal

This line is where RN will look for the data folder when the program is started, and it is easily changed by simply browsing to any other RN data folder using the file menu. (or manually editing the config file)

Since my goal is to keep my RN user data in "one" complete directory outside of the RN program, I would automatically create an "enchant" folder in every RN data folder such as:

enchantDir=D:\The Journal\Enchant

The only coding that would need to be done is that whenever the "dataDir" changed to a new directory, the "enchantDir" would need to be automatically changed to match the new location.

Even though this would create multiple Custom Dictionary files if a person had several different Journals, each dictionary would always match the Journal that it was in, regardless whether RN was being run from a pen drive or the hard drive, or in my case, my laptop.

I'm obviously not a programmer, and I realize that my thoughts on this may not work at all or be practical for others. I do appreciate your work on the portable version and the way you've come up with your improvements so quickly.

Revision history for this message
VF2NSR (vf2nsr) said :
#16

Hi I understand what you are asking for and will look into it in the upcoming week. I will say thanks as you have brought up areas that I had not thought of nor considered . However AS I see it the way you run the program is acceptable, yet has never been presented before. Generally the idea of a portable app is to be able to carry it on a portable drive and then use it on various computers. What you are doing if I understand correctly is run various OS on various partitions. I am mot trying to brag or say I am grat, all I can say is since becoming an official app in PortableApp we have had over 1/2 million downloads and your is the first to request the feature. That being saif you have definitely brought up alternative way sto use hte program. I will see what I can do to create some sort of custom code, but I am restricted to the base apps I have and the mechanism the PortableApps program uses. In the meantime I sort have have to think of the masses and not the few. As I use tools built into the Portables format that may or may not be usable in your specific use. As for the Config file that is Jendriks ball to play with as I do none of the actual python programming, just the file manipulation to make it truly portable and to leave no traces on the host system.

Thanks and will gt back to you if I can come up with something specific for you.

Revision history for this message
Randal J. Hoffner (rhoffner) said :
#17

Thank you so much for understanding. I really don’t even care if you create the code or not, just the fact that you were able to see the issue is a relief to me.

Somewhere in the early formation of commercial software, the software itself became the goal – not the user data that the software allowed one to create. If I could give one example of this it would be the following:

If you were a photographer and had just taken the pictures of a very important wedding, and then on the way home from the wedding your new and wonderful high-tech camera was accidentally run over and smashed to pieces – what would you scramble to recover?

1) Your camera (which you can readily buy anywhere and replace that very afternoon)
2) The memory card in your camera (which has data on it that can never be replaced)

For me, it’s all about the memory card. For software writers unfortunately, it’s usually about the “camera”.

RedNotebook is great program and I can’t say enough good about it, and because of this I really don’t care if any changes are made to how the Custom Dictionary files are maintained – I can live with this small nuisance. Having said this, I do feel that allowing the user to choose where and how to store the Custom Dictionary files is something that should be addressed in the main program and not in the PortableApps version.

Again, thanks for listening!

Revision history for this message
Jendrik Seipp (jendrikseipp) said :
#18

I agree that this should be an option in the main program. However, the
underlying spellchecking library does not support changing this location
as far as I can tell. Therefore we need Patrick's magic :)

Can you help with this problem?

Provide an answer of your own, or ask Randal J. Hoffner for more information if necessary.

To post a message you must log in.