_UID in Reports

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

_UID in Reports

Elvin Birth
How can I suppress the printing of _UID in Complete Individual Report and in Family Sheet? Can records be marked globally to suppress printing _UID?

Thanks for any help, Elvin Birth, 
GRAMPS: 4.0.2 
Python: 2.7.3 (default, Nov  8 2013, 10:09:51) [... 
BSDDB: 4.8.4.2 (4, 8, 30) 
LANG: en_US.UTF-8
OS: Darwin
Distribution: 10.8.0

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

Robby
Hi Elvin,

I also share your dislike of the UID attribute in reports and have already removed the UID from my Narrated Website reports.

It would be nice to have a global switch to remove it but I don't know if there is one.

It is possible to customise some parts of the program yourself - quite easy to do with a simple text editor.

But I had a brief look and I don't get _UID in the "Complete Individual Report" or "Family Group report" on GRAMPS 3.4.6 and GRAMPS 4.0.3 on Windows 7  
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

Nick Hall-6
On 02/02/14 13:50, Robby wrote:

> I also share your dislike of the UID attribute in reports and have already
> removed the UID from my Narrated Website reports.
>
> It would be nice to have a global switch to remove it but I don't know if
> there is one.
>
> It is possible to customise some parts of the program yourself - quite easy
> to do with a simple text editor.
>
> But I had a brief look and I don't get _UID in the "Complete Individual
> Report" or "Family Group report" on GRAMPS 3.4.6 and GRAMPS 4.0.3 on Windows
> 7

Have you tried marking the attribute as private?

Perhaps we should provide an option to hide all attributes with a
leading underscore.


Nick.


------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

Robby
Hi Nick,

I've noticed that there have been some changes.

Old GRAMPS automatically added _UID attribute when you added a new person. Latest GRAMPS don't.

So if you start a new family database from scratch then UID will not be output in the reports unless you start adding it.
If you import from an old database version then you have the problem.

"Have you tried marking the attribute as private? "
Not easy for large databases unless you have a shortcut ?

I don't know if users actually use this UID attribute. For me it is useless and best option would be to delete the UID attribute from each person's record rather than continuing to customise the program. But again not easy for large databases.

So is there a way to easily delete UIDs ?

For users that want UID but don't want it in some/all reports then a selection box similar to "Supress GRAMPS ID" would be useful. For all leading underscore attributes or all attributes ??

Robby


Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

Robby
This post was updated on .
In reply to this post by Elvin Birth
I think I may have found a way of removing UIDs.

1 Export "test.gpkg" file with media from GRAMPS (4.0.3)
2 open  "test.gpkg" with 7-Zip  - get new "test.gpkg" file  (open = click it)
3 open "test.gpkg" inside 7-Zip  - get a directory containing media and "data.gramps" file
4 open "data.gramps" inside 7-Zip - get "data" file
5 extract "data" file to a suitable folder and leave 7-zip open at this point
6 open extracted "data" file with notepad++  it's XML format
7 use find and replace with this regular expression "<attribute type="_UID" value=".+"/>\n[ ]+"  
    to delete all lines with attribute lines of type=UID (exclude the inverted commas at start & end)
8 save the file back to the folder
9 pick the file up and drop it into 7-Zip on the window at step 5
10 click OK to accept update.
11 click up a folder in 7-Zip (the button under the + button) and click OK to accept update.
12 click up a folder and click OK to accept update.
13 click up a folder and click OK to accept update.
14 Import back into GRAMPS

Not very pretty but actually quite easy and does seem to work with no errors. Could also be used for other problem data.

I'm not recommending this method just putting it up for discussion.

Robby
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

Elvin Birth
In reply to this post by Elvin Birth
On 02/02/14 13:50, Robby wrote:
> I also share your dislike of the UID attribute in reports and have already
> removed the UID from my Narrated Website reports.
>
> It would be nice to have a global switch to remove it but I don't know if
> there is one.
>
> It is possible to customise some parts of the program yourself - quite easy
> to do with a simple text editor.
>
> But I had a brief look and I don't get _UID in the "Complete Individual
> Report" or "Family Group report" on GRAMPS 3.4.6 and GRAMPS 4.0.3 on Windows
> 7

Have you tried marking the attribute as private?

Perhaps we should provide an option to hide all attributes with a
leading underscore.


Nick.


On a second look, the problem is only in the Family Sheet report.

An option to hide attributes with a leading underscore would be great!

Elvin

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

Nick Hall-6
On 03/02/14 15:55, Elvin Birth wrote:
On a second look, the problem is only in the Family Sheet report.

An option to hide attributes with a leading underscore would be great!

Please create a feature request for this.


Nick.


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

Nick Hall-6
In reply to this post by Robby
Robby,

Yes, this is a perfectly good way to remove unwanted attributes. It may
be slightly easier to export to a .gramps file which is simply a zipped
xml file.

The alternative would be to write a tool.

Nick.


On 03/02/14 14:16, Robby wrote:

> I think I may have found a way of removing UIDs.
>
> 1 Export "test.gpkg" file with media from GRAMPS
> 2 open  "test.gpkg" with 7-Zip  - get new "test.gpkg" file  (open = click
> it)
> 3 open "test.gpkg" inside 7-Zip  - get a directory containing media and
> "data.gramps" file
> 4 open "data.gramps" inside 7-Zip - get "data" file
> 5 extract "data" file to a suitable folder and leave 7-zip open at this
> point
> 6 open extracted "data" file with notepad++  it's XML format
> 7 use find and replace with this regular expression "<attribute type="_UID"
> value=".+"/>\n      "
>      to delete all lines with attribute lines with type=UID (exclude the
> inverted commas at start & end)
> 8 save the file back to the folder
> 9 pick the file up and drop it into 7-Zip on the window at step 5
> 10 click OK to accept update.
> 11 click up a folder in 7-Zip (the button under the + button) and click OK
> to accept update.
> 12 click up a folder and click OK to accept update.
> 13 click up a folder and click OK to accept update.
> 14 Import back into GRAMPS
>
> Not very pretty but actually quite easy and does seem to work with no
> errors. Could also be used for other problem data.
>
> I'm not recommending this method just putting it up for discussion.
>
> Robby


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

enno
Nick,
> Yes, this is a perfectly good way to remove unwanted attributes. It may
> be slightly easier to export to a .gramps file which is simply a zipped
> xml file.
>
> The alternative would be to write a tool.
Yes, next to a global search and replace.

regards,

Enno


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
NdK
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

NdK
Il 03/02/2014 21:20, Enno Borgsteede ha scritto:

>> The alternative would be to write a tool.
> Yes, next to a global search and replace.
Like 'sed' ? :)

BYtE,
 Diego

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

Robby
In reply to this post by Nick Hall-6
Nick Hall-6 wrote
The alternative would be to write a tool.

Seems like we all missed this one - cos the good news is there already is a tool.

Called "SET ATTRIBUTE" gramplet - need to install then select via Tools/Family Tree Processing menu.

The bad news is that, even tho there is a remove option, it doesn't seem to work. (GRAMPS 3.4.6-1)

It does add new attributes OK.

Unsure what the problem is and whether to do a bug report.
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

enno
Robby,

> Seems like we all missed this one - cos the good news is there already is a
> tool.
>
> Called "SET ATTRIBUTE" gramplet - need to install then select via
> Tools/Family Tree Processing menu.
>
> The bad news is that, even tho there is a remove option, it doesn't seem to
> work. (GRAMPS 3.4.6-1)
>
> It does add new attributes OK.
>
> Unsure what the problem is and whether to do a bug report.
I know what the problem is, and have the tool working here. I'll file a
bug report, and attach my version of the gramplet to it, so that the
author can check that, and take care of the update.

regards,

Enno


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users
Reply | Threaded
Open this post in threaded view
|

Re: _UID in Reports

enno
In reply to this post by Robby
Robby,

> Seems like we all missed this one - cos the good news is there already is a
> tool.
>
> Called "SET ATTRIBUTE" gramplet - need to install then select via
> Tools/Family Tree Processing menu.
>
> The bad news is that, even tho there is a remove option, it doesn't seem to
> work. (GRAMPS 3.4.6-1)
>
> It does add new attributes OK.
>
> Unsure what the problem is and whether to do a bug report.
There is an old bug report here:

https://gramps-project.org/bugs/view.php?id=5799

I attached my solution to it as enno-SetAttributeTool.py because there
was another file attached there, which only removes attributes when they
have the same value as typed. That makes no sense for _UID.

To test copy enno-SetAttributeTool.py to
~/.gramps/gramps34/plugins/SetAttributeTool/SetAttributeTool.py

regards,

Enno


------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
Gramps-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-users