CLI import file then return to the $ prompt?

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

CLI import file then return to the $ prompt?

Ron Johnson
Hi,

Is that currently possible?  The goal is to automate some processes without
having lots of open Gramps windows.

--
"Salads are only for murderers, cole slaw's a fascist regime!"


------------------------------------------------------------------------------
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

Ross Gammon
On 08/08/2015 09:45 PM, Ron Johnson wrote:
> Hi,
>
> Is that currently possible?  The goal is to automate some processes without
> having lots of open Gramps windows.
>

Yes - it is possible to import and export to different file formats from
the commandline.

In Linux, do:
$ gramps -h

or

$ man gramps

for more information.

Regards,

Ross


------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

Ron Johnson
In reply to this post by Ron Johnson
On 08/10/2015 10:18 AM, Ross Gammon wrote:
On 08/08/2015 09:45 PM, Ron Johnson wrote:
Hi,

Is that currently possible?  The goal is to automate some processes without 
having lots of open Gramps windows.

Yes - it is possible to import and export to different file formats from
the commandline.

Right.  I do it all the time.  In fact, I do it from cron every morning at 05:20.  But that's export.

Every import always fires up the GUI.

-- 
"Salads are only for murderers, cole slaw's a fascist regime!"

------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

DS Blank
On Mon, Aug 10, 2015 at 11:58 AM, Ron Johnson <[hidden email]> wrote:
On 08/10/2015 10:18 AM, Ross Gammon wrote:
On 08/08/2015 09:45 PM, Ron Johnson wrote:
Hi,

Is that currently possible?  The goal is to automate some processes without 
having lots of open Gramps windows.

Yes - it is possible to import and export to different file formats from
the commandline.

Right.  I do it all the time.  In fact, I do it from cron every morning at 05:20.  But that's export.

Every import always fires up the GUI.

That shouldn't happen (and doesn't when one uses the -C flag). Can you file an issue for this? Thanks for reporting.

-Doug
 


-- 
"Salads are only for murderers, cole slaw's a fascist regime!"

------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

Ron Johnson
In reply to this post by Ron Johnson
On 08/10/2015 11:02 AM, Doug Blank wrote:
On Mon, Aug 10, 2015 at 11:58 AM, Ron Johnson <[hidden email]> wrote:
On 08/10/2015 10:18 AM, Ross Gammon wrote:
On 08/08/2015 09:45 PM, Ron Johnson wrote:
Hi,

Is that currently possible?  The goal is to automate some processes without 
having lots of open Gramps windows.

Yes - it is possible to import and export to different file formats from
the commandline.

Right.  I do it all the time.  In fact, I do it from cron every morning at 05:20.  But that's export.

Every import always fires up the GUI.

That shouldn't happen (and doesn't when one uses the -C flag). Can you file an issue for this? Thanks for reporting.

The -C option appears not to be in the man page...

It's also a bit out-dated, with statements like:
In addition to generating direct printer output, report generators also target  other  systems,  such  as
OpenOffice.org, AbiWord, HTML, or LaTeX to allow the users to modify the format to suit their needs.

It does work as you say, but "gramps --help" does not make clear that it doesn't return to the $ prompt.

-- 
"Salads are only for murderers, cole slaw's a fascist regime!"

------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

DS Blank
On Mon, Aug 10, 2015 at 3:15 PM, Ron Johnson <[hidden email]> wrote:
On 08/10/2015 11:02 AM, Doug Blank wrote:
On Mon, Aug 10, 2015 at 11:58 AM, Ron Johnson <[hidden email]> wrote:
On 08/10/2015 10:18 AM, Ross Gammon wrote:
On 08/08/2015 09:45 PM, Ron Johnson wrote:
Hi,

Is that currently possible?  The goal is to automate some processes without 
having lots of open Gramps windows.

Yes - it is possible to import and export to different file formats from
the commandline.

Right.  I do it all the time.  In fact, I do it from cron every morning at 05:20.  But that's export.

Every import always fires up the GUI.

That shouldn't happen (and doesn't when one uses the -C flag). Can you file an issue for this? Thanks for reporting.

The -C option appears not to be in the man page...

It's also a bit out-dated, with statements like:
In addition to generating direct printer output, report generators also target  other  systems,  such  as
OpenOffice.org, AbiWord, HTML, or LaTeX to allow the users to modify the format to suit their needs.

It does work as you say, but "gramps --help" does not make clear that it doesn't return to the $ prompt.

Maybe it was never clear when the GUI should open after doing a CLI command. It seems that any action other than just an "open" should immediately exit, don't you think?

-Doug
 


-- 
"Salads are only for murderers, cole slaw's a fascist regime!"


------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

Ron Johnson
In reply to this post by Ron Johnson
On 08/10/2015 02:58 PM, Doug Blank wrote:
[snip]
> Maybe it was never clear when the GUI should open after doing a CLI
> command. It seems that any action other than just an "open" should
> immediately exit, don't you think?

Since not every instance of "gramps -O" opens the GUI (exports and reports),
my answer is "no".

--
"Salads are only for murderers, cole slaw's a fascist regime!"


------------------------------------------------------------------------------
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

DS Blank
On Mon, Aug 10, 2015 at 7:23 PM, Ron Johnson <[hidden email]> wrote:
On 08/10/2015 02:58 PM, Doug Blank wrote:
[snip]
> Maybe it was never clear when the GUI should open after doing a CLI
> command. It seems that any action other than just an "open" should
> immediately exit, don't you think?

Since not every instance of "gramps -O" opens the GUI (exports and reports),
my answer is "no".

Those would continue to not open the GUI. I am proposing that all options (except an -O by itself) would exit back to the CLI. Is there any combination that this misses, and you would want to continue on into the GUI?

-Doug
 

--
"Salads are only for murderers, cole slaw's a fascist regime!"


------------------------------------------------------------------------------
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users


------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

Ron Johnson
In reply to this post by Ron Johnson
On 08/10/2015 07:11 PM, Doug Blank wrote:
On Mon, Aug 10, 2015 at 7:23 PM, Ron Johnson <[hidden email]> wrote:
On 08/10/2015 02:58 PM, Doug Blank wrote:
[snip]
> Maybe it was never clear when the GUI should open after doing a CLI
> command. It seems that any action other than just an "open" should
> immediately exit, don't you think?

Since not every instance of "gramps -O" opens the GUI (exports and reports),
my answer is "no".

Those would continue to not open the GUI. I am proposing that all options (except an -O by itself) would exit back to the CLI. Is there any combination that this misses, and you would want to continue on into the GUI?

Yes.  How does one import into an existing database without opening the GUI?

(But honestly, "-C" satisfies the requirement that prompted me to start this thread.

-- 
"Salads are only for murderers, cole slaw's a fascist regime!"

------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

Ron Johnson
In reply to this post by Ron Johnson
On 08/10/2015 02:15 PM, Ron Johnson wrote:
[snip]
The -C option appears not to be in the man page...

It's also a bit out-dated, with statements like:
In addition to generating direct printer output, report generators also target  other  systems,  such  as
OpenOffice.org, AbiWord, HTML, or LaTeX to allow the users to modify the format to suit their needs.

It does work as you say, but "gramps --help" does not make clear that it doesn't return to the $ prompt.

Is there a bug open to update the man page?
-- 
"Salads are only for murderers, cole slaw's a fascist regime!"

------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

DS Blank
On Mon, Aug 10, 2015 at 10:06 PM, Ron Johnson <[hidden email]> wrote:
On 08/10/2015 02:15 PM, Ron Johnson wrote:
[snip]
The -C option appears not to be in the man page...

It's also a bit out-dated, with statements like:
In addition to generating direct printer output, report generators also target  other  systems,  such  as
OpenOffice.org, AbiWord, HTML, or LaTeX to allow the users to modify the format to suit their needs.

It does work as you say, but "gramps --help" does not make clear that it doesn't return to the $ prompt.

Is there a bug open to update the man page?

Don't know, but you can just edit the file (or any other gramps file) directly from the web:

1. Get an account  at http://github.com
2. Click the "Fork" button at https://github.com/gramps-project/gramps
3. Edit your copy of https://github.com/gramps-project/gramps/blob/master/data/man/gramps.1.in (replace "gramps-project" with your github id)
4. When done editing, select "Create a new branch for this commit and start a pull request." and click "Commit Changes"

The requested changes will appear over at https://github.com/gramps-project/gramps and someone will review and apply the fixes.

-Doug

 

-- 
"Salads are only for murderers, cole slaw's a fascist regime!"

------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users



------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: CLI import file then return to the $ prompt?

Ron Johnson
In reply to this post by Ron Johnson
On 08/11/2015 09:41 AM, Doug Blank wrote:
On Mon, Aug 10, 2015 at 10:06 PM, Ron Johnson <[hidden email]> wrote:

[snip]
Is there a bug open to update the man page?

Don't know, but you can just edit the file (or any other gramps file) directly from the web:

1. Get an account  at http://github.com
2. Click the "Fork" button at https://github.com/gramps-project/gramps
3. Edit your copy of https://github.com/gramps-project/gramps/blob/master/data/man/gramps.1.in (replace "gramps-project" with your github id)
4. When done editing, select "Create a new branch for this commit and start a pull request." and click "Commit Changes"

The requested changes will appear over at https://github.com/gramps-project/gramps and someone will review and apply the fixes.


Thanks.

-- 
"Salads are only for murderers, cole slaw's a fascist regime!"

------------------------------------------------------------------------------

_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users