Difference between revisions of "Addon:ExportRaw"

From Gramps
Jump to: navigation, search
(New page: Category:Plugins Category:Developers/General The Export Raw exporter will dump your BSDDB database into a raw Python representation format for low-level manipulation. This has bee...)
 
m (See also)
 
(19 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Plugins]]
+
{{Third-party plugin}}
[[Category:Developers/General]]
+
[[File:ExportRaw-option-addon-50.png|thumb|right|450px|The {{man label|[ ]Raw Export}} option checkbox on the {{man label|Choose the output format}} page]]
 +
 
 +
==Purpose==
 +
The {{man label|Raw Export}} adds an option to the Export Assistant feature. The option dumps your SQLite3 (''default'' database engine since Gramps 5.1) or BSDDB (Gramps database; into a raw Python object representation format for low-level manipulation.
 +
 
 +
This uses the object string conversion representation returned from Python's [https://docs.python.org/3/library/functions.html#repr <code>repr()</code>] built-in function. It is similar to the [https://docs.python.org/3/library/functions.html#func-str <code>str()</code>] function but intended for internal use rather than display. It can be useful for printing an element regardless of its type.
 +
 
 +
Raw output has been used for byte-wise comparisons to make sure that different import/export functions process the data correctly.
 +
 
 +
==Usage==
 +
Start an export via the menu {{man menu|Family Trees > Export...}} and on the {{man label|[[Gramps_{{man version}}_Wiki_Manual_-_Manage_Family_Trees#Export_Assistant_dialog|Export Assistant dialog]]}} select the {{man button|Next}} button to get to the {{man label|Choose the output format}} page where you can select the {{man label|[ ]Raw Export}} option checkbox.
 +
 
 +
==Example output==
 +
The output file <code>[filenamename].raw</code> can be opened and viewed in a text editor. Here is a sample using the [[Example.gramps]] family tree:
 +
 
 +
<pre>
 +
note: b39feeac1a202b44e76 ('b39feeac1a202b44e76', 'N0012', ('How did he die? We need to find out!\n\nPerhaps we find info in the new york library', [((5, ''), '#ff0909', [(16, 36)]), ((0, ''), None, [(62, 74)]), ((2, ''), None, [(0, 3)]), ((6, ''), '#fbd50a', [(62, 74)]), ((4, ''), 14, [(16, 36)])]), 0, (10, ''), 1234371783, [], False)
 +
note: ac380498bac48eedee8 ('ac380498bac48eedee8', 'N0001', ('Names can notes, too. This is a note for the alternate name of Louse Garner for Lewis Anderson Garner.', [((8, ''), 'gramps://Person/handle/GNUJQCL9MD64AM56OH', [(80, 101)])]), 0, (20, ''), 1185438865, [], False)
 +
.....
 +
citation: e73a40d955f403d3fafddcfc646 ('e73a40d955f403d3fafddcfc646', 'C2854', (0, 0, 0, (6, 6, 1841, False), '6 Jun 1841', 2393628, 0), 'House of Garner', 2, 'e73a3fdc8ce67c82dbf7485ba92', [], [], [], 1588983638, [], False)
 +
citation: e73a41d73a065efcf7ce001e9a8 ('e73a41d73a065efcf7ce001e9a8', 'C2855', (0, 0, 0, (6, 6, 1841, False), '6 Jun 1841', 2393628, 0), '', 2, 'e73a3fdc8ce67c82dbf7485ba92', [], [], [], 1588983742, [], False)
 +
tag: bb80c229eef1ee1a3ec ('bb80c229eef1ee1a3ec', 'complete', '#076780873bf0', 1, 1288512479)
 +
tag: bb80c2b235b0a1b3f49 ('bb80c2b235b0a1b3f49', 'ToDo', '#efb60c280c28', 0, 1288512442)
 +
</pre>
 +
==See also==
 +
Source code:
 +
* [https://github.com/gramps-project/addons-source/tree/master/ExportRaw ExportRaw] add-on
 +
* [https://github.com/gramps-project/gramps/tree/master/gramps/gen/lib gramps/gen/lib] (see type.py)
  
The Export Raw exporter will dump your BSDDB database into a raw Python representation format for low-level manipulation. This has been used for byte-wise comparisons to make sure that different import/export functions process the data correctly.
 
  
Future enhancements:
+
* [[Gramps_Data_Model|Gramps data model diagram]]
 +
* Discourse forum thread: "[https://gramps.discourse.group/t/does-anyone-have-a-list-of-the-raw-export-addon-event-type-codes/3546 Does anyone have a list of the Raw Export addon event type codes?]"
 +
* Developer documentation: [https://www.gramps-project.org/docs/gen/gen_lib.html#module-gramps.gen.lib.eventtype gen_lib.html#module-gramps.gen.lib.eventtype]
 +
* The [[Addon:Isotammi_addons#SuperTool|Supertool (Isotammi add-on tool)]] includes the ability to show repr() and str() data interactively
  
* Create an importer that will read this data
+
[[Category:Plugins]]
 +
[[Category:Developers/General]]

Latest revision as of 22:28, 23 April 2023

Gramps-notes.png

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
Unless otherwise stated on this page, you can download this addon by following these instructions.
Please note that some Addons have prerequisites that need to be installed before they can be used.
This Addon/Plugin system is controlled by the Plugin Manager.

The [ ]Raw Export option checkbox on the Choose the output format page

Purpose

The Raw Export adds an option to the Export Assistant feature. The option dumps your SQLite3 (default database engine since Gramps 5.1) or BSDDB (Gramps database; into a raw Python object representation format for low-level manipulation.

This uses the object string conversion representation returned from Python's repr() built-in function. It is similar to the str() function but intended for internal use rather than display. It can be useful for printing an element regardless of its type.

Raw output has been used for byte-wise comparisons to make sure that different import/export functions process the data correctly.

Usage

Start an export via the menu Family Trees > Export... and on the Export Assistant dialog select the Next button to get to the Choose the output format page where you can select the [ ]Raw Export option checkbox.

Example output

The output file [filenamename].raw can be opened and viewed in a text editor. Here is a sample using the Example.gramps family tree:

note: b39feeac1a202b44e76 ('b39feeac1a202b44e76', 'N0012', ('How did he die? We need to find out!\n\nPerhaps we find info in the new york library', [((5, ''), '#ff0909', [(16, 36)]), ((0, ''), None, [(62, 74)]), ((2, ''), None, [(0, 3)]), ((6, ''), '#fbd50a', [(62, 74)]), ((4, ''), 14, [(16, 36)])]), 0, (10, ''), 1234371783, [], False)
note: ac380498bac48eedee8 ('ac380498bac48eedee8', 'N0001', ('Names can notes, too. This is a note for the alternate name of Louse Garner for Lewis Anderson Garner.', [((8, ''), 'gramps://Person/handle/GNUJQCL9MD64AM56OH', [(80, 101)])]), 0, (20, ''), 1185438865, [], False)
.....
citation: e73a40d955f403d3fafddcfc646 ('e73a40d955f403d3fafddcfc646', 'C2854', (0, 0, 0, (6, 6, 1841, False), '6 Jun 1841', 2393628, 0), 'House of Garner', 2, 'e73a3fdc8ce67c82dbf7485ba92', [], [], [], 1588983638, [], False)
citation: e73a41d73a065efcf7ce001e9a8 ('e73a41d73a065efcf7ce001e9a8', 'C2855', (0, 0, 0, (6, 6, 1841, False), '6 Jun 1841', 2393628, 0), '', 2, 'e73a3fdc8ce67c82dbf7485ba92', [], [], [], 1588983742, [], False)
tag: bb80c229eef1ee1a3ec ('bb80c229eef1ee1a3ec', 'complete', '#076780873bf0', 1, 1288512479)
tag: bb80c2b235b0a1b3f49 ('bb80c2b235b0a1b3f49', 'ToDo', '#efb60c280c28', 0, 1288512442)

See also

Source code: