* Mac/Linux-compatible version of Backup & Restore FH Settings via Windows plugin

Writing and using plugins for Version 5 and above.
User avatar
tatewise
Megastar
Posts: 24395
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Mac/Linux-compatible version of Backup & Restore FH Settings via Windows plugin

Post by tatewise » 20 May 2022 21:22

Jane wrote:
20 May 2022 20:33
It is very disappointing that you both seem to think they are no good. You could always simply work with the windows APIs directly rather than using the modules.
I don't believe either of us said the fhFileUtils module, in general, is no good. We focused only on a substitute for Directory Tree.
However, I do think there is much room for improvement. I believe that I am not alone.
Where necessary I have used the Windows 'File System Object' API directly but then get chided for a DIY approach.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

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

Re: Mac/Linux-compatible version of Backup & Restore FH Settings via Windows plugin

Post by Mark1834 » 20 May 2022 21:35

You sound offended, Jane. I didn’t know who wrote fhFileUtils, and TBH, I don’t particularly care. We’re discussing the issue, not the personalities. Now that I check (and I’d not looked at the library source code before, why should I?), it doesn’t actually say that. It lists CP as the author and you and Helen as contributors (i.e. secondary contributing authors, not the primary creators). I know there is a lot of smoke and mirrors around who actually does what (Simon himself, CP staffers, genuine volunteers, contractors, etc), so who’s fingerprints are on which bits doesn’t really matter.

Having said that, back to the actual issue under discussion. Did I say fhFileUtils was “no good”? I must admit, I thought we had arrived at a consensus last time this came up that it needed a bit of tidying up. It duplicates the UTF text read/write functions of FH itself (but with different options), while not offering the complete range of file and directory management that would be expected of an “lfs for UTF” replacement. I thought the whole point of fhFileUtils was that it provided easy tools for new authors. “If you don’t like it, just work with the Windows API directly” doesn’t exactly encourage newcomers...
Mark Draper

User avatar
ColeValleyGirl
Megastar
Posts: 3687
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Mac/Linux-compatible version of Backup & Restore FH Settings via Windows plugin

Post by ColeValleyGirl » 21 May 2022 07:09

I have always assumed experienced programmers would access the windows APIs via luacom to get exactly the details they need and would never chide anyone for a DIY approach. Admittedly the luacom and windows documentation can be hard to find your way around but I doubt that's anything an experienced programmer hasn't had to deal with before.

IIRC FhFileutils was conceived as a way of letting new/infrequent plugin coders work with utf file names where standard lua etc. would let them down without explanation. I'll admit, I wouldn't expect that sort of user to need the epoch dates; but then I've never needed them.

I expect it will evolve a little further in parallel with the FH API - for example we got better coverage of file text content types in the last release of the Api which will simplify some things.

But I would always encourage those who can to write exactly the code they need. I've highlighted the information about luacom date formats, and elsewhere about better techniques for error handling within luacom, both of which might make it into a later version of the library, time and other commitments allowing. (And of course the CP release schedule which is as opaque to us volunteers as to others).

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

Re: Mac/Linux-compatible version of Backup & Restore FH Settings via Windows plugin

Post by Mark1834 » 21 May 2022 08:14

To bring us back to what this thread was originally about, I've made the simple mods required to extend the scope of the new plugin. The draft is getting a few downloads, so I will leave it until next week before submitting to the store in case any issues arise over the weekend, but that will be a universal version (FH5/6/7, Mac, Linux, restores own and old backups).
Mark Draper

User avatar
ColeValleyGirl
Megastar
Posts: 3687
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Mac/Linux-compatible version of Backup & Restore FH Settings via Windows plugin

Post by ColeValleyGirl » 21 May 2022 08:49

Sounds good, Mark

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

Re: Mac/Linux-compatible version of Backup & Restore FH Settings via Windows plugin

Post by Mark1834 » 23 May 2022 08:26

Update is now in the Store.

Could I ask a forum admin to delete the draft plugins from earlier in this thread please (here and here)? Thanks.
Mark Draper

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

Re: Mac/Linux-compatible version of Backup & Restore FH Settings via Windows plugin

Post by Mark1834 » 23 May 2022 10:59

Thanks Mike. In a now-deleted post, you suggested that I might be able to do it myself through the User Control Panel. I wasn’t aware of that option, so have been experimenting.

As a standard user, I can delete attachments at any time, but they simply disappear from the posting with no indication that they ever existed, or that the post has been edited. I can’t edit the post to say why the attachment is no longer there once the initial grace period has lapsed.

That’s confusing for readers, but if in future I say something like “draft plugin attached (if the attachment is no longer there, it has been replaced by an updated version later in this thread)” that will make me self-sufficient and still keep the context.
Mark Draper

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

Re: Mac/Linux-compatible version of Backup & Restore FH Settings via Windows plugin

Post by tatewise » 23 May 2022 11:45

OK. That is why I deleted my posting because I realised you would not be able to edit the posting to explain the disappearance of the Attachment. But if you remember to word it correctly then, as you say, you can manage them yourself.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry

Post Reply