Difference between revisions of "Addon:PlaceUpdate Gramplet"
(→Setting enclosing place) |
m (minor language issue) |
||
(13 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Third-party plugin}} | {{Third-party plugin}} | ||
[[File:PlaceUpdate-Gramplet-Addon-103.png|right|thumb|450px|PlaceUpdate Gramplet - Data entry - detached view]] | [[File:PlaceUpdate-Gramplet-Addon-103.png|right|thumb|450px|PlaceUpdate Gramplet - Data entry - detached view]] | ||
− | The {{man label|PlaceUpdate}} Gramplet | + | The {{man label|PlaceUpdate}} Gramplet allows you to manipulate and change properties of multiple places at the same time. |
The properties that can be changed are: | The properties that can be changed are: | ||
Line 8: | Line 8: | ||
* Enclosing Place | * Enclosing Place | ||
− | Place names can be edited by substituting | + | Place names can be edited by substituting sub-strings with new values. |
The gramplet can also generate a place hierarchy from place names or titles. | The gramplet can also generate a place hierarchy from place names or titles. | ||
Line 19: | Line 19: | ||
=== Setting enclosing place === | === Setting enclosing place === | ||
− | For the enclosing place first select the place that should enclose the other places and click the {{man button|Select enclosing place}} button. The | + | For the enclosing place first select the place that should enclose the other places and click the {{man button|Select enclosing place}} button. The {{man label|Select Place}} selector will be displayed and you can select your place. Then select any number of places that should be enclosed by the first one and click the {{man button|Apply to selected places}} button. |
− | A place might already have an enclosing place. In that case the new place will be added and the place will end up being enclosed by multiple places. This is quite | + | A place might already have an enclosing place. In that case the new place will be added and the place will end up being enclosed by multiple places. This is quite ok but you can also remove the previous enclosing places by checking the box {{man label|Clear original enclosing places}}. This can e.g. be used to "move" the places under another place. |
Attempts to set a duplicate enclosing place or a loop (so that a place contains itself) are quietly bypassed. | Attempts to set a duplicate enclosing place or a loop (so that a place contains itself) are quietly bypassed. | ||
Line 29: | Line 29: | ||
[[File:PlaceUpdateGramplet-Addon-example-51.png|right|Thumb|450px]]You can also set the type of the selected places or assign any tag if needed. The operations can be combined so that e.g. the place type and enclosing place can be set at the same time. Type and tag can be selected from pre-existing ones or you can type a new name if needed. | [[File:PlaceUpdateGramplet-Addon-example-51.png|right|Thumb|450px]]You can also set the type of the selected places or assign any tag if needed. The operations can be combined so that e.g. the place type and enclosing place can be set at the same time. Type and tag can be selected from pre-existing ones or you can type a new name if needed. | ||
− | Any existing tags can also be first removed if the | + | Any existing tags can also be first removed if the {{man label|Clear tags}} checkbox is marked. Otherwise the new tag is added to the set of the tags for the places. |
If the enclosing place, type or tag is not specified, then the corresponding setting is not changed. | If the enclosing place, type or tag is not specified, then the corresponding setting is not changed. | ||
Line 47: | Line 47: | ||
=== Editing place names === | === Editing place names === | ||
− | The | + | The {{man label|Replace text}} function allows substituting a specified text string in the place names with another. Regular expressions can also be used. |
Example | Example | ||
− | Select "United States" as the new enclosing places and select the three states. Set the | + | Select "United States" as the new enclosing places and select the three states. Set the {{man label|Place type:}} to "State": |
Setting enclosing place | Setting enclosing place | ||
− | Click | + | Click {{man button|Apply to selected places}}. The result is: |
Setting enclosing place | Setting enclosing place | ||
Line 61: | Line 61: | ||
== Notes == | == Notes == | ||
− | The | + | The {{man button|Clear selections}} button will clear the form. |
− | All changes are done under a transaction and they can be undone from the Gramps menu | + | All changes are done under a transaction and they can be undone from the Gramps menu {{man menu|Edit > Undo Setting place properties}}. |
This gramplet does not have direct support for filters. The "Filter" gramplet can be used to search for the places that need changes. | This gramplet does not have direct support for filters. The "Filter" gramplet can be used to search for the places that need changes. | ||
Line 70: | Line 70: | ||
Author: [email protected] (19 Jan 2020) | Author: [email protected] (19 Jan 2020) | ||
+ | |||
+ | ==Issues== | ||
+ | * Help button goes to https://gramps-project.org/wiki/index.php?title=Gramps_5.1_Wiki_Manual_-_Gramplets#PlaceUpdate | ||
[[Category:Plugins]] | [[Category:Plugins]] | ||
[[Category:Developers/General]] | [[Category:Developers/General]] | ||
[[Category:Gramplets]] | [[Category:Gramplets]] |
Latest revision as of 20:08, 28 June 2022
![]() |
This is a Third-party Addon. Please use carefully on data that is backed up, and help make it better by reporting any comments or problems to the author, or issues to the bug tracker |
The PlaceUpdate Gramplet allows you to manipulate and change properties of multiple places at the same time.
The properties that can be changed are:
- Place Type
- Tag
- Enclosing Place
Place names can be edited by substituting sub-strings with new values.
The gramplet can also generate a place hierarchy from place names or titles.
Contents
Usage
The gramplet should be installed on the sidebar gramplet pane of the Places Category view.
The Place list is then used to select which places are affected.
Setting enclosing place
For the enclosing place first select the place that should enclose the other places and click the Select enclosing place button. The Select Place selector will be displayed and you can select your place. Then select any number of places that should be enclosed by the first one and click the Apply to selected places button.
A place might already have an enclosing place. In that case the new place will be added and the place will end up being enclosed by multiple places. This is quite ok but you can also remove the previous enclosing places by checking the box Clear original enclosing places. This can e.g. be used to "move" the places under another place.
Attempts to set a duplicate enclosing place or a loop (so that a place contains itself) are quietly bypassed.
Setting place type or tag
You can also set the type of the selected places or assign any tag if needed. The operations can be combined so that e.g. the place type and enclosing place can be set at the same time. Type and tag can be selected from pre-existing ones or you can type a new name if needed.
Any existing tags can also be first removed if the Clear tags checkbox is marked. Otherwise the new tag is added to the set of the tags for the places.
If the enclosing place, type or tag is not specified, then the corresponding setting is not changed.
Generating a place hierarchy
If a place name contains comma separated names then the gramplet can change this to a place hierarchy. For example if the name is of the form "place1, place2, place3" then two new places, place2 and place3 (with type "Unknown") are created, the name of the original place is changed to place1 and the places are put in the hierarchy "place1 < place2 < place3".
Duplicate place names at the same level are automatically merged. The original names can also be separated by spaces instead of commas - but then you must be careful that the names do not contain spaces.
The hierarchy can also be generated in reverse, e.g. the result can also be "place3 < place2 < place1" if the corresponding checkbox is marked.
The place type and tag setting affects only the original place.
If the original place is under another place or a new enclosing place is specified then the new hierarchy is placed under the enclosing place.
Editing place names
The Replace text function allows substituting a specified text string in the place names with another. Regular expressions can also be used.
Example
Select "United States" as the new enclosing places and select the three states. Set the Place type: to "State":
Setting enclosing place
Click Apply to selected places. The result is:
Setting enclosing place
Notes
The Clear selections button will clear the form.
All changes are done under a transaction and they can be undone from the Gramps menu Edit > Undo Setting place properties.
This gramplet does not have direct support for filters. The "Filter" gramplet can be used to search for the places that need changes.
This gramplet can only be added on the Places view and it requires Gramps 5.x.
Author: [email protected] (19 Jan 2020)