* Running reports from lua

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
shoshk
Superstar
Posts: 280
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Running reports from lua

Post by shoshk »

I've tried looking for this and think that it probably doesn't exist, but I'll ask anyway...

Is it possible to run a report from a plugin?

I would like to be able to specify a list of individuals, in a named list, and generate a report for each individual, saving each separately.

Thanks,
Shoshana
Shosh Kalson
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Running reports from lua

Post by tatewise »

You are correct; that is not possible from a Plugin, or in FH.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
shoshk
Superstar
Posts: 280
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Running reports from lua

Post by shoshk »

Thanks Mike
Shosh Kalson
User avatar
Jane
Site Admin
Posts: 8507
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Running reports from lua

Post by Jane »

If you don't mind having the reports in HTML format you could use the CD/Web tool to create all the reports.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Running reports from lua

Post by tatewise »

Jane, do you mean the Plugin has to construct all the details required in the Report, or that somehow a standard FH Report can be produced that way?
I think the OP was hoping for the latter.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Running reports from lua

Post by ColeValleyGirl »

I think Jane meant that you can define a website including the report wanted, and will end up with one html file per individual. No plugins involved. And if you have the right software, you can create pdf files in bulk from html files... (I won't recommend the programme I use because ti wasn't cheap).
User avatar
Jane
Site Admin
Posts: 8507
Joined: 01 Nov 2002 15:00
Family Historian: V7
Location: Somerset, England
Contact:

Re: Running reports from lua

Post by Jane »

As Helen says my suggestion does not need any plugin code. Calibre can convert between most formats and comes at my favourite price . . . free.
Jane
My Family History : My Photography "Knowledge is knowing that a tomato is a fruit. Wisdom is not putting it in a fruit salad."
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Running reports from lua

Post by ColeValleyGirl »

Hadn't though of using Calibre -- it's an excellent suggestion.
avatar
shoshk
Superstar
Posts: 280
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Running reports from lua

Post by shoshk »

Thanks for everybody's input. I need to use a plugin to generate at least part of my reports because they are non-standard and require logic.

I plan on generating my output as a MS Word file. I've done this in the past and, while not trivial, gives me fine control over all aspects of content and formatting.

I was hoping that I could generate parts of each report from the plugin (e.g. a standard descendant report), save them in rtf format and plunk them into my word doc. It would save development time.

But, hey, I'm retired and no longer have to work according to somebody else's schedule. So it'll just take a bit longer to do.

BTW, for a while I was considering using John Cardinal's GedcomPublisher and converting the epub output to docx via Calibre but that didn't give me a solution for the sections which require logic.

Regards,
Shoshana
Shosh Kalson
User avatar
ColeValleyGirl
Megastar
Posts: 5464
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Running reports from lua

Post by ColeValleyGirl »

Some years ago, I wrote some code to splice elements from two different website generators into a set of output files organised/reordered in a way that made sense to me (also with some logic about including and excluding elements). It was a three-pass process: generate website A; generate website B; generate final website using elements from A and B and some custom content.

It wasn't done in Lua (predated plugins) but I did find it easier that writing everything from scratch; and I would do it in Lua today.

I then moved on to use John Cardinal's Gedsite, but have concluded its drawbacks outweigh its merits. So, on my ever expanding to-do list (luckily I'm retired as well) I shall be developing a plugin to generate my website but will probably take the cut-and-splice approach again. Or maybe not... Need to think about it a bit. Lua patterns aren't as powerful as Regexes, which is what I used to do the cut and splice.
User avatar
tatewise
Megastar
Posts: 28333
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Running reports from lua

Post by tatewise »

To create MS Word documents from a Plugin see plugins:code_snippets:word_load_data_direct_into|> Word Load Data Direct Into (code snippet) but it is not straightforward.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
shoshk
Superstar
Posts: 280
Joined: 13 May 2015 16:28
Family Historian: V7
Location: Mitzpe Jericho, Israel

Re: Running reports from lua

Post by shoshk »

Thank you Mike.

I've done this before. As you say, not straight-forward, but the results are worth the effort (in my opinion).

Shosh
Shosh Kalson
Post Reply