Skip to content

Commit

Permalink
Adjust readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaneSutro committed Feb 9, 2021
1 parent 31ea885 commit 67e616d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,10 @@ import vestaboard

characters = [
[63, 64, 65, 66, 67, 68, 69, 63, 64, 65, 66, 67, 68, 69, 63, 64, 65, 66, 67, 68, 69, 63],
[64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64],
[65, 0, 0, 0, 8, 1, 16, 16, 25, 0, 2, 9 18, 20, 8, 4, 1, 25, 0, 0, 0, 65],
[66, 0, 0, 0, 0, 0, 0, 0, 13, 9, 14, 1, 20, 15, 37, 0, 0, 0, 0, 0, 0, 66],
[67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67],
[64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 64],
[65, 0, 0, 0, 8, 1, 16, 16, 25, 0, 2, 9, 18, 20, 8, 4, 1, 25, 0, 0, 0, 65],
[66, 0, 0, 0, 0, 0, 0, 0, 13, 9, 14, 1, 20, 15, 37, 0, 0, 0, 0, 0, 0, 66],
[67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 67],
[68, 69, 63, 64, 65, 66, 67, 68, 69, 63, 64, 65, 66, 67, 68, 69, 63, 64, 65, 66, 67, 68]
]

Expand All @@ -137,7 +137,7 @@ The `Formatter` has two public helper options:
- `.convert()`
- `.convertLine()`

#### Convert
### Convert
If converting a string, use the `.convert()` method. By default, `.convert()` will split by letter and return an array of character codes corresponding to the string you passed in:

```python
Expand All @@ -156,7 +156,7 @@ Formatter.convert('Oh hi!', byWord=True)
# Returns [[15, 8], [8, 9, 37]]
```

#### Convert Line
### Convert Line
If you'd like to convert an entire line at once, use the `.convertLine()` method. `.convertLine()` centers text by default. To left justify or right justify, pass `left=True` or `right=True`.

```python
Expand Down
2 changes: 1 addition & 1 deletion tests/test_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_convert_line_with_centering():
def test_convert_line_left_justified():
assert len(Formatter.convertLine('Oh hi!', left=True)) == 22, 'Should return a list with 22 elements'
assert Formatter.convertLine('Oh hi!', left=True) == [15, 8, 0, 8, 9, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 'Should left justify up to 22 characters'

def test_convert_line_right_justified():
assert len(Formatter.convertLine('Oh hi!', right=True)) == 22, 'Should return a list with 22 elements'
assert Formatter.convertLine('Oh hi!', right=True) == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 8, 0, 8, 9, 37], 'Should left justify up to 22 characters'

0 comments on commit 67e616d

Please sign in to comment.