refspy
A Python package for working with biblical references in human-written text.
See the README.md for a more accessible introduction.
1"""A Python package for working with biblical references in human-written text. 2 3See the [README.md](https://github.com/eukras/refspy) for a more accessible 4introduction. 5""" 6 7from refspy.init import get_canon, get_language, get_syntax 8from refspy.manager import Manager 9 10 11def refspy( 12 canon_name: str = "protestant", 13 locale_name: str = "en_US", 14 syntax_name: str | None = None, 15 include_two_letter_aliases: bool = True, 16) -> Manager: 17 """Create a Manager object to access all common package functions. 18 19 See: `refspy.manager.Manager` 20 21 Args: 22 canon_name: A valid key for the `refspy.config.LIBRARIES` dict (3) 23 - `protestant` 24 - `catholic` (adds Deuterocanonicals) 25 - `orthodox` (adds Anagignoskomena) 26 locale_name: A valid key for the `refspy.config.LANGUAGES` dict (2). 27 - `en_US` 28 - `fr_FR` 29 syntax_name: A valid key for the `refspy.config.SYNTAX` dict (2). 30 - `intl` 31 - `euro` 32 include_two_letter_aliases: e.g. 'Ge', '1 Jn'. 33 34 Note: 35 Libraries and languages can be created outside the package, and 36 supplied to the Manager object directly. These can be contributed to 37 the library, but the point of the library is to read ordinary text 38 using ordinary referencing conventions. This will have to be confirmed 39 for each proposed library and language. 40 41 To Do: 42 Load languages and libraries only on demand when there are more of them. 43 """ 44 return Manager( 45 get_canon(canon_name, locale_name), 46 get_language(locale_name[:2]), 47 get_syntax(syntax_name) if syntax_name is not None else None, 48 include_two_letter_aliases=include_two_letter_aliases, 49 )
def
refspy( canon_name: str = 'protestant', locale_name: str = 'en_US', syntax_name: str | None = None, include_two_letter_aliases: bool = True) -> refspy.manager.Manager:
12def refspy( 13 canon_name: str = "protestant", 14 locale_name: str = "en_US", 15 syntax_name: str | None = None, 16 include_two_letter_aliases: bool = True, 17) -> Manager: 18 """Create a Manager object to access all common package functions. 19 20 See: `refspy.manager.Manager` 21 22 Args: 23 canon_name: A valid key for the `refspy.config.LIBRARIES` dict (3) 24 - `protestant` 25 - `catholic` (adds Deuterocanonicals) 26 - `orthodox` (adds Anagignoskomena) 27 locale_name: A valid key for the `refspy.config.LANGUAGES` dict (2). 28 - `en_US` 29 - `fr_FR` 30 syntax_name: A valid key for the `refspy.config.SYNTAX` dict (2). 31 - `intl` 32 - `euro` 33 include_two_letter_aliases: e.g. 'Ge', '1 Jn'. 34 35 Note: 36 Libraries and languages can be created outside the package, and 37 supplied to the Manager object directly. These can be contributed to 38 the library, but the point of the library is to read ordinary text 39 using ordinary referencing conventions. This will have to be confirmed 40 for each proposed library and language. 41 42 To Do: 43 Load languages and libraries only on demand when there are more of them. 44 """ 45 return Manager( 46 get_canon(canon_name, locale_name), 47 get_language(locale_name[:2]), 48 get_syntax(syntax_name) if syntax_name is not None else None, 49 include_two_letter_aliases=include_two_letter_aliases, 50 )
Create a Manager object to access all common package functions.
Arguments:
- canon_name: A valid key for the
refspy.config.LIBRARIESdict (3)protestantcatholic(adds Deuterocanonicals)orthodox(adds Anagignoskomena)
- locale_name: A valid key for the
refspy.config.LANGUAGESdict (2).en_USfr_FR
- syntax_name: A valid key for the
refspy.config.SYNTAXdict (2).intleuro
- include_two_letter_aliases: e.g. 'Ge', '1 Jn'.
Note:
Libraries and languages can be created outside the package, and supplied to the Manager object directly. These can be contributed to the library, but the point of the library is to read ordinary text using ordinary referencing conventions. This will have to be confirmed for each proposed library and language.
To Do:
Load languages and libraries only on demand when there are more of them.