Skip to content

Commit

Permalink
Perbaiki fitur tanpa contoh
Browse files Browse the repository at this point in the history
Untuk entri yang memiliki bentuk tidak baku
  • Loading branch information
laymonage committed Apr 17, 2019
1 parent bf475d8 commit 295423f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ cin.ta
2. (a) kasih sekali; terpikat (antara laki-laki dan perempuan): sebenarnya dia tidak -- kepada lelaki itu, tetapi hanya menginginkan hartanya
3. (a) ingin sekali; berharap sekali; rindu: makin ditindas makin terasa betapa --nya akan kemerdekaan
4. (a) (kl) susah hati (khawatir); risau: tiada terperikan lagi --nya ditinggalkan ayahnya itu
>>> print(cinta.__str__(contoh=False))
cin.ta
1. (a) suka sekali; sayang benar
2. (a) kasih sekali; terpikat (antara laki-laki dan perempuan)
3. (a) ingin sekali; berharap sekali; rindu
4. (a) (kl) susah hati (khawatir); risau
```

```python
Expand Down
2 changes: 1 addition & 1 deletion kbbi/kbbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def serialisasi(self):
def __str__(self, contoh=True):
result = '\n\n'.join(str(entri) for entri in self.entri)
if not contoh:
result = sub(':.*', '', result)
result = sub(':.*--.*', '', result)
return result

def __repr__(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='kbbi',
version='0.3.1',
version='0.3.2',
description=(
"A module that scraps a page in the online Indonesian dictionary (KBBI)"
),
Expand Down

0 comments on commit 295423f

Please sign in to comment.