Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
and some descriptions
  • Loading branch information
ENDrain committed Apr 18, 2021
1 parent 0cd336f commit 7f81a47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# cu-numbers

A program for numbers conversion between Church Slavonic script (*further CU*) and Arabic numerals.
A program for numbers conversion between Arabic and Cyrillic (*further CU*) numeral systems.

## Background

See [Introduction](./INTRODUCTION.md) to learn about Cyrillic numeral system.
See [Introduction](./INTRODUCTION.md) to learn about CU numeral system.

## Requirements

Expand All @@ -23,7 +23,7 @@ See [Introduction](./INTRODUCTION.md) to learn about Cyrillic numeral system.

a = cunumbers.to_cu(1)

# Convert a CU number to an Arabic
# Convert a CU number to Arabic
# Requires str, returns int

b = cunumbers.to_arab("а҃")
Expand Down Expand Up @@ -53,4 +53,4 @@ See [Changelog](./CHANGELOG.md).

## License

See [LICENSE](./LICENSE).
See [LICENSE](./LICENSE).
12 changes: 6 additions & 6 deletions cunumbers/cunumbers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# For licensing information see LICENSE file included in the project's root directory.
# To learn about numbers in Church Slavonic script, see INTRODUCTION.md
# To learn about Cyrillic numeral system (further CU), see INTRODUCTION.md
"""
Module for number conversion between Church Slavonic script and Arabic.
Module for number conversion between Arabic and Cyrillic numeral systems.
"""

import re
Expand Down Expand Up @@ -104,7 +104,7 @@ def _to_cu_number(input, *, flags):


def _digits_to_arab(input, group = 0):
"""Process CU digits."""
"""Process CU numerals."""
# DELIM MODE: @group is current hundred group

# Swap digits in numbers 11-19
Expand Down Expand Up @@ -161,13 +161,13 @@ def _prepare(input):
elif re.fullmatch("%s+" % _cu_delim_regex, input):
return _to_arab_number(input, flags = CU_DELIM)
else:
raise ValueError("String does not match any pattern for Church Slavonic script number")
raise ValueError("String does not match any pattern for Cyrillic numeral system number")



def to_cu(input, flags = 0):
"""
Convert an Arabic number into Church Slavonic script.
Convert a number into Cyrillic numeral system.
Requires a non-zero integer.
"""
Expand All @@ -182,7 +182,7 @@ def to_cu(input, flags = 0):

def to_arab(input, flags = 0):
"""
Convert a Church Slavonic script number into Arabic.
Convert a number into Arabic numeral system .
Requires a non-empty string.
"""
Expand Down

0 comments on commit 7f81a47

Please sign in to comment.