Update GEDCOM Header in getmyancestors.py for 5.5.1 compliance. (#11)
authorchangeling <cklarson@gmail.com>
Mon, 11 Mar 2019 06:28:54 +0000 (01:28 -0500)
committerLinekio <benoitfontaine.ba@gmail.com>
Mon, 11 Mar 2019 06:28:54 +0000 (07:28 +0100)
commit136798468247795defb3d410f61f7293b1a96243
tree7dc522c20db84bde53cac41508985fef1532324c
parentfba21403753589d16feb714360e46220826ee50b
Update GEDCOM Header in getmyancestors.py for 5.5.1 compliance. (#11)

* Update GEDCOM Header in getmyancestors.py for 5.5.1 compliance.

getmyancestors.py: Add SOUR, SUBM ref and SUBM entry. Update VERS to 5.5.1.
(UTF-8 is only in GEDCOM 5.5.1 and not 5.5, but getmyancestors creates header with VERS 5.5 and encoding UTF-8.)

* Fix Notes: set the text attribute before adding to Tree

* Updated to render correct ordinals in Download progress counts.

fstogedcom.py:
Lines 34-45: Implemented ordinal() function.
Line 441: Yield correct ordinal for ancestor generations.
Line 450: Yield correct ordinal for descendant generations.

getmyancestors.py
Lines 107-118: Implemented ordinal() function.
Line: 960: Yield correct ordinal for ancestor generations.
Line 970: Yield correct ordinal for descendant generations.

translation.py
Lines 104-115: Translate ordinal suffixes.
Lines 116-120: Translate updated ancestor and descendant generation strings.

Fixed string slice in ordinal() to correctly handle 11, 12, 13.

Fixed string slice in ordinal() to correctly handle 11, 12, 13 in fstogedcom.py and getmyancestors.py.

* Replaced ordinal() function and calls with num2word module and calls.

Replaced ordinal() function and calls with num2word module and calls in fstogedcom.py and getmyancestors.py.

Removed ordinal suffixes from translation.py.

* Update README.md to reference num2words and github repository.

Added num2words requirement to README.md.
Add references for github repository to README.md.

* Update getmyancestors.py to add more 5.5.1 HEAD entries.

Add display_name to Session().
Assign display_name from current.json ['users'][0]['displayName'].
Add 'getmyancestors' value for HEAD.SOUR, HEAD.SOUR.NAME, HEAD.DEST. See:
https://www.tamurajones.net/GEDCOMSOURandDEST.xhtml for discussion.
Add HEAD.SOUR.VERS with placeholder value for version.
Add HEAD.DATE and HEAD.TIME.
Add SUBM.NAME from Family Search displayName for current user.
Add SUBM.LANG from Family Search displayName for current user. NOTE: This value is invalid.
TODO: Fix 2-char lang value to full language name for legal GEDCOM.

* Update getmyancestors.py to correct SUBM.LANG format.

Added import of babelfish to handle language formats.
Added babelfish conversion to SUBM.LANG to convert alpha2 language code (i.e. `en`) from Family Search to legal GEDCOM language code (i.e. `ENGLISH`).
Updated README.md to include reference to babelfish module.

* Revert "Merge pull request #9 from changeling/handle_ordinals"

This reverts commit 88e724d1b6d590af7dd4f7d91dbe4997bfd6a0a6, reversing
changes made to 0a0a1035f9f4c4a985069f2a914851e630e84b50.

* Change information text about downloading generations

* Update GEDCOM Header in getmyancestors.py for 5.5.1 compliance.

getmyancestors.py: Add SOUR, SUBM ref and SUBM entry. Update VERS to 5.5.1.
(UTF-8 is only in GEDCOM 5.5.1 and not 5.5, but getmyancestors creates header with VERS 5.5 and encoding UTF-8.)

* Update getmyancestors.py to add more 5.5.1 HEAD entries.

Add display_name to Session().
Assign display_name from current.json ['users'][0]['displayName'].
Add 'getmyancestors' value for HEAD.SOUR, HEAD.SOUR.NAME, HEAD.DEST. See:
https://www.tamurajones.net/GEDCOMSOURandDEST.xhtml for discussion.
Add HEAD.SOUR.VERS with placeholder value for version.
Add HEAD.DATE and HEAD.TIME.
Add SUBM.NAME from Family Search displayName for current user.
Add SUBM.LANG from Family Search displayName for current user. NOTE: This value is invalid.
TODO: Fix 2-char lang value to full language name for legal GEDCOM.

* Update getmyancestors.py to correct SUBM.LANG format.

Added import of babelfish to handle language formats.
Added babelfish conversion to SUBM.LANG to convert alpha2 language code (i.e. `en`) from Family Search to legal GEDCOM language code (i.e. `ENGLISH`).
Updated README.md to include reference to babelfish module.

* Updated `README.md` and `getmyancestors.py` re  5.5.1.

`getmyancestors.py`:
Remove `DEST` tag.
Set `SOUR.VERS` to 1.0.
Implement `babelfish` module to correct FamilySearch `LANG` to match iso639 full language for 5.5.1 compliance.
`README.md`.:
Add babelfish.
Modify requirement install instruction for readability and line length re PEP 8.
Add github Issues link.

* Revert "Merge branch '551_compliance' of https://github.com/changeling/getmyancestors into 551_compliance"

This reverts commit 94b9fda218fdb316e1479c1661a1956f9ef4f2fb, reversing
changes made to ec42301fcbbef74d60a3c79f6e13885215ac47c8.
README.md
getmyancestors.py