Fred Wright [Sun, 5 Jan 2020 23:25:23 +0000 (15:25 -0800)]
Tolerate inability to write settings file.
It's questionable that the unsolicited write of the settings is
reasonable at all, but at the very least it shouldn't crash if it
can't, e.g., when outputting to /dev/null for testing.
TESTED:
Now prints message and continues on failed attempt to write
/dev/null.settings. Writes settings successfully with real
output file specified.
changeling [Wed, 27 Mar 2019 00:05:56 +0000 (19:05 -0500)]
Update .settings file handling and defaults.
Handle non-argparse `username` and `password`.
Removed printing of settings to stdout.
Remove `redact_password = True` line.
Add `--redact-password` argument, defaulting to `False`.
Removed `.settings` file creation when output is directed to stdout.
changeling [Mon, 11 Mar 2019 06:28:54 +0000 (01:28 -0500)]
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.
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"
* 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"