* Sharing Queries

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Sharing Queries

Post by shoshk » 21 Dec 2020 05:12

My husband and I are both using FH and (mostly) working on the same project. Note: we never open the main project file at the same time. I generally work on a copy of the project.

I would like to automate sharing queries, using an external program which automates backups/mirroring on our computers.

Can I bypass the import query function of fh and simply copy files into the ProgramData->Calico Pie->Family Historian->Queries directory?

Also, can I rename queries by renaming the filename in the Queries directory?

Obviously, this would all be done with the greatest of caution. :)

Thanks,
Shosh
Shosh Kalson

User avatar
Mark1834
Megastar
Posts: 2146
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Sharing Queries

Post by Mark1834 » 21 Dec 2020 08:22

Yes, both queries and plugins can be copied between PCs, and the lists that come up in FH are simply listings of files in the relevant folder. There is no internal registration process.
Mark Draper

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Sharing Queries

Post by shoshk » 21 Dec 2020 09:20

Thank you Mark.
Shosh Kalson

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Sharing Queries

Post by tatewise » 21 Dec 2020 11:37

See KB Synchronising Family Historian between 2 PCs at the bottom under Synchronising Your Configuration and Other Data where it suggests Link Shell Extension or Windows Directory Junctions for ways to include customised Queries, Text Schemes, or any other folders within the Dropbox/Google Drive/OneDrive folder.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Sharing Queries

Post by shoshk » 23 Dec 2020 14:54

Mike,

I think I finally understand how to use links.

If I understand correctly, I can copy the contents of the program data folder to, say, dropbox. Then delete the original program data folder and create a symbolic link to the dropbox folder. I could choose to do that for individual folders (say queries) as well.

Is that right?

Are there any potential gotchas?

Shosh
Shosh Kalson

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Sharing Queries

Post by tatewise » 23 Dec 2020 15:10

The gotchas are the ones mentioned in Link Shell Extension and Windows Directory Junctions namely re-installing FH may require the links to be recreated and some cloud storage utilities do not fully support the links.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

User avatar
mjashby
Megastar
Posts: 692
Joined: 23 Oct 2004 10:45
Family Historian: V7
Location: Yorkshire

Re: Sharing Queries

Post by mjashby » 27 Dec 2020 14:53

There's a small utility program here - https://github.com/imDema/FreeMove - which has been designed to help with moving existing user data folders to a new location and auto-creating folder links to avoid problems with software which expects (and continues to expect) files to be stored in specific locations. It's only designed (currently) to manage the movement of complete folders.

I've done some limited testing and it seems to work exactly as described and any changes can be easily reversed

Mervyn

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Sharing Queries

Post by shoshk » 27 Dec 2020 15:33

Mervyn, that looks interesting.

However, since I'm only setting up one directory at the moment, I think I'll stick with the tried and true manual method. I'm a little afraid of using and unknown person's code and taking a security risk.
Shosh Kalson

User avatar
Mark1834
Megastar
Posts: 2146
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Sharing Queries

Post by Mark1834 » 29 Dec 2020 20:39

I’ve now got this set up to sync custom queries, plugins and fact types between desktop and laptop. The master copies are in a dedicated OneDrive folder, with hard links (directory junctions) set up in the two ProgramData folders.

With it this way round, syncing is immediate and fully automatic.
Mark Draper

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Sharing Queries

Post by shoshk » 29 Dec 2020 20:54

Mark,

I got my custom queries set up today using symbolic links. My husband are now sharing the same queries on our desktop systems. Seems to be working so far.

I haven't yet upgraded our laptops to v7, but will set things up there as well once I'm certain that there's no reason to keep v6 around any longer. I discovered one problem already that was easily solvable because I was able to refer to my v6 installation. I'm in no hurry to upgrade the laptops. We're not planning any trips these days that would necessitate using them. :lol:

Plugins are a bit more problematic, since we can't share the same directory. I don't want him to "see" plugins that I'm working on until I'm sure they work. I'll probably set up a directory on dropbox which will contain stable versions of plugins to which he can link. That will make it easy to update when I release new versions.

Hadn't thought about sharing fact sets. Now that you mention it, it seems like another good candidate for sharing.

Shosh
Shosh Kalson

User avatar
tatewise
Megastar
Posts: 27078
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Sharing Queries

Post by tatewise » 29 Dec 2020 22:08

You can share any useful customisations using that technique, and here are some ideas to ponder.

Whereas Standard Queries cannot be customised, the Standard Fact Set and Standard Diagrams, Reports, etc, can :!:
So maybe need to include some Standard folders as well as Custom folders?

What about Diagram Text Schemes and Icons?

Regarding development Plugins, I'm sure you could lookup fhGetContextInfo("CI_PROJECT_FILE") and test the username after C:\Users\... which if his then abort the Plugin. Alternatively, use Lua os.getenv (varname) where varname could be COMPUTERNAME or USERNAME etc. i.e. standard Windows SET variables.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

avatar
shoshk
Famous
Posts: 242
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Sharing Queries

Post by shoshk » 30 Dec 2020 05:36

Regarding plugins...

The main problem for plugin sharing is the case where I am working on an existing plugin. In some cases (say, I'm fixing a bug), I can take the plugin "out of use" for him (which is your suggestion), but in others, there's no reason why he can't continue to use the plugin. This would be the case where I'm adding a new feature. I believe that it will be easiest to have a development/testing environment (my ProgramData->Plugins directory) and a production environment (a shared directory on dropbox). My husband's desktop and our laptops will link to the shared directory.

Sharing reports... That's definitely another candidate for a share folder.
Shosh Kalson

Post Reply