Where is the Syntax-Autocorrect data stored in Squirrel-SQL snapshot 20190612_2127? - squirrel-sql

In older versions of Squirrel-SQL, autocorrect data was stored in an XML file as documented in Where does Squirrel SQL store its auto correct entries?. After updating to a more recent version, this file no longer exists in the same "syntax" folder (C:\Program Files\SQuirreL SQL Client\plugins\syntax). Does anyone know where I might be able to locate this file?
Since there wasn't much to work with in the old "syntax" folder, I dug into the syntax.jar file in the "plugins" parent folder and found a bunch of .class files in the zipped folder "syntax\net\sourceforge\squirrel_sql\plugins\syntax" (peaking into the .jar file as it were). There were a few files that looked promising, such as
AutoCorrectData.class
AutoCorrectDataItem.class
AutoCorrectProviderImpl.class
But none of them contained autocorrect entries I have added to the client - although the last .class file listed above references an "autocorrectdata.xml" file, which is what I could not find in the first place.
Any help I can get on this would be much appreciated!

Doh! Turns out newer versions of Squirrel-SQL store user-defined autocorrect data in local user folders. Makes a lot of sense actually! Found my autocorrectdata.xml file in the following folder:
C:\Users\[My Username]\.squirrel-sql\plugins\syntax

Related

Need to search the recently modified file in SSIS and rename it

I have a requirement of finding the recently modified/created file from a directory and rename it to a standard name run that file and then rename it back to previous name. How can this be achieved?
Steps needed to be achieved:
finding the recently modified/created file
rename that file to a standard name.
run that file
rename it back to previous name.
I used a script task to find the recent file, but i could not move forward. I tried many things. Any solution on how to implement this?
I used this blog to find the recently modified/created file - https://www.techbrothersit.com/2013/12/ssis-how-to-get-most-recent-file-from.html

Recompile CHM file

I'm working on a script that should be able to add additional information to a .chm file.
After decompiling it with hh.exe -decompile outputFolder fileName.chm command, I get the html files, and other 2 files with .hhc and .hhk extension.
After editing the html files, I'd like to recompile the files into a single .chm file. I read that that I also need a .hhp file in order to do that, but that's not generated in the decompilation process.
How can I solve this?
This is a problem of Compiled Help Modules (CHM). And yes - you need a *.hhp for compiling again by HTMLHelp Workshop or e.g. FAR HTML.
You know, you can use 7Zip or just open a command prompt window on a Windows PC and type the following:
hh.exe -decompile <target_directory> <path>\<filename>.chm
The only decompiler with any additional features is KeyTools as this can try to rebuild the project (.hhp) file. You'll need this file if you want to recompile the help project.
One thing to note is that the decompile/recompile process isn't a "round-trip" process. Certain features that the help author added to the original help file can't be recovered when you decompile it, so these may no longer work properly after you've recompiled.
This is especially true in the area of context-sensitive help, which may be broken in the new version of the file.
It can be useful, to include the .hhp file itself - after regenerating is done - into the section [FILES] of the project file (.HHP). Thus, this is included in the Compiled Help Module (CHM) when compiling. The appropriate *.HHP file then is decompiled in addition to the other files for future use.

renaming html file to have parent directory name

I have a directory tree in which each folder contains (at this point) a single html file, all with the same name.
I would like to rename each file so that it has the name of its parent directory.
For example, change
A\B\file1.html
A\C\file1.html
A\C\D\file1.html
E\file1.html
to
A\B\B.html
A\C\C.html
A\C\D\D.html
E\E.html
I did see another similar post on a similar problem for mp3 files, but was unable to adapt it.
I am pretty much a novice at this - been trying to find a way using Notepad++ and the Windows Command Prompt window, but no real idea so far.
Any suggestions greatly appreciated.
Do you need to do this via code or do you just need an utility?
For bulk renaming of files I've been having a lot of luck using Bulk Rename Utility.
http://www.bulkrenameutility.co.uk/

CHM file unreadble if saved to hdd

I've just downloaded JSon.Net for framework 4.0 as a zip file.
Opening zip (using WinRar) I'm able to open Documentation.chm file by double-clicking over the name listed and the help file is well done.
Anyway if I extract this file to hdd and I open it, help is unreadable.
Sounds silly, but it's happening.
Thanks for your help!!!
EDITED:
Another tip: unreadble chm file is located in D:\.... (second NTFS partition of first hdd); if I save it on my desktop, chm file becomes readable !!! Crazy...
------------------------------------
---------- SOLUTION ----------
------------------------------------
I answer my question to close it and to help someone who finds in my same trouble.
Using tip suggested by #Marco van de Voort I searched Google for "chm unblock" and found this link:
Your CHM files are stored in the folder with '#' (hash) character in
the path Many C# developers discovered that their documentation
and e-books in CHM format cannot be read because they were storing
their CHM files in the directories like 'C:\E-books\C#\'. The hash
character signifies an anchor in HTML so the CHM viewer fails to
resolve the path properly and to retrieve the content.
That was my problem: I had path with a #... and I'd never thought this could be a great mess for CHM files!!!
Thanks to SO mates for the help given !!
Windows keeps track of downloaded files on NTFS systems, and puts certain restrictions on them. If you extract with windows explorer, this status propagates from archive to file. Using a third party tool (winrar in your case, I use INFO zip) can circumvent this.
Some descriptions and other links can be found
http://wiki.lazarus.freepascal.org/chm_backend_for_fpdoc#Troubleshooting
Free Pascal (2.4.4) has some tool to unlock them. (chmls unblock). It is done by truncating an alternate filestream (therefore it only works with NTFS). I found this info somewhere on stackoverflow, but can't quickly find the link.
It might be that virtual folders like desktop don't fully support this.
maybe the references to some content is to web or no chm file. maybe if you can disassamble in CHM editor and change paths can fix it.
maybe this can help you
There are security permissions applied to this file type by a recent patch.
you need to unblock the file:
http://www.helpscribble.com/chmnetwork.html
instead of thinking many possibilities of "windows security permission", get a CHM reader or wrap your CHM using winrar, and doubleclick to view it like you did.
It's save your time a lot!!
So, two simple solutions are:
have a CHM reader: https://blog.kowalczyk.info/articles/chm-reader-viewer-for-windows.html
OR right click CHM file/s, > Add to RAR Archive.
If you want to read it, double click RAR file > double click CHM file. BINGO!!

How to extract hhp file from a chm file

I have an A.chm file for my windows application which runs as expected.
When I decompile it using HTML workshop I get set of html files, .hhc file, .hhk file. When I compile another file B.chm from these extracted files without changing any of the files.((I want to add more html contents to this file but looks like I am losing some information after decompiling)) The output file I get is 72K where as the original file was 75K. B.chm's contents look all file when viewed in the chm viewer but the behavior is lost when when used with the application.
After reading around I found that if .hhp can be extracted from a .chm file then it can be re-constructed as it is without losing any mapping or aliases. Is that true?
How can I extract .hhp file from a .chm file?
Thanks,
Sam
No, Yes , and no.
The original hhp can't be guaranteed extracted
however since chm is an archive type, the project could have added all project files to the archive. I assume you already would have found them if that were the case.
If the decompile process does its administration, it can regenerate the .hhp to a certain degree.
Comments and #define names will probably be lost though, maybe more, but that should not result in problems when recompiling.
But of course it could be that the decompiler is limited. You could try some other (search for something from "keytools").
If not, then take "chmlib" and start drilling down into the format.