Skip to content

Commit 1de88d6

Browse files
committed
Squashed 'beta_code/vendor/beta-code-json/' changes from 1bdcf3e..74cca8a
74cca8a Merge pull request #6 from perseids-tools/diaeresis-accent 546f1c5 add alternative diaeresis order git-subtree-dir: beta_code/vendor/beta-code-json git-subtree-split: 74cca8a56b84670c7cc50fcff286684584a7d651
1 parent ec39516 commit 1de88d6

File tree

15 files changed

+28
-436
lines changed

15 files changed

+28
-436
lines changed

.github/funding.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/test.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 135 deletions
This file was deleted.

.tool-versions

Lines changed: 0 additions & 1 deletion
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2018
3+
Copyright (c) 2017
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 15 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,22 @@
1-
# Beta Code Converter for Python
1+
# Beta Code JSON
22

3-
Converts Greek Beta Code to Greek characters and vice versa.
3+
Map of Greek Beta Code characters to Unicode and from Unicode to Beta Code.
44

5-
## Installation
5+
## Standard
66

7-
`pip install beta-code`
7+
The mappings in this repository aim mostly to conform to the TLG standard
8+
specified [here](http://stephanus.tlg.uci.edu/encoding.php).
89

9-
(See project on [PyPI](https://pypi.org/project/beta-code/))
10+
Not every application that uses Greek Beta Code follows the TLG standard exactly.
11+
The mappings try to capture these nonstandard uses without breaking Beta Code encoded
12+
according to the standard in the following ways:
1013

11-
## Usage
14+
* Lowercase Latin letters can be used in the Beta Code (e.g. `a`, `w=`)
15+
* Uppercase Greek letters can be keyed 1. asterisk, 2. breathing, 3. accent, 4. iota subscript, 5. letter (e.g. `*(=|W`)
16+
* Uppercase Greek letters can be keyed 1. asterisk, 2. letter, 3. breathing, 4. accent, 5. iota subscript (e.g. `*W(=|`)
1217

13-
```python
14-
import beta_code
18+
## Example uses
1519

16-
beta_code.greek_to_beta_code(u'χαῖρε ὦ κόσμε')
17-
# => 'xai=re w)= ko/sme'
18-
19-
beta_code.beta_code_to_greek(u'mh=nin a)/eide qea\\ *phlhi+a/dew *)axilh=os')
20-
# => 'μῆνιν ἄειδε θεὰ Πηληϊάδεω Ἀχιλῆος'
21-
```
22-
23-
### With additional mappings
24-
25-
```python
26-
beta_code.beta_code_to_greek(u'f2a/nac', custom_map={ u'f2': u'ϝ' })
27-
# => 'ϝάναξ'
28-
```
29-
30-
## Tests
31-
32-
`python -m unittest tests/test_beta_code.py`
33-
34-
### In Python 2
35-
36-
`cd tests/ && python -m unittest test_beta_code`
37-
38-
## Updating JSON
39-
40-
```bash
41-
git subtree pull --prefix beta_code/vendor/beta-code-json/ https://github.com/perseids-tools/beta-code-json master --squash
42-
```
43-
44-
In the case of a merge conflict:
45-
46-
```bash
47-
git checkout --theirs vendor/beta-code-json/
48-
git add vendor/beta-code-json
49-
git commit
50-
```
51-
52-
## Publishing
53-
54-
* Install dependencies:
55-
56-
```bash
57-
python3 -m venv venv
58-
. ./venv/bin/activate
59-
pip3 install -r requirements.txt
60-
```
61-
62-
* Bump version in `setup.py`
63-
* Commit and push to GitHub
64-
* On GitHub, create a new release
65-
* Run `python3 setup.py sdist bdist_wheel`
66-
* Run `python3 -m twine upload dist/*`
67-
68-
## Notes
69-
70-
For the mappings between Beta Code and Unicode, see [https://github.com/perseids-tools/beta-code-json](https://github.com/perseids-tools/beta-code-json).
20+
* [https://github.com/perseids-tools/beta-code-js](https://github.com/perseids-tools/beta-code-js)
21+
* [https://github.com/perseids-tools/beta-code-rb](https://github.com/perseids-tools/beta-code-rb)
22+
* [https://github.com/perseids-tools/beta-code-py](https://github.com/perseids-tools/beta-code-py)

beta_code/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

beta_code/beta_code.py

Lines changed: 0 additions & 64 deletions
This file was deleted.

beta_code/vendor/beta-code-json/LICENSE

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)