Skip to content

Commit 9d21f76

Browse files
author
Sven Siegmund
committed
Better paths in readme, commented Bytes_Regex
1 parent 57d1ad5 commit 9d21f76

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Install rtfparse from your local repository with pip:
1616

1717
pip install rtfparse
1818

19-
Installation creates an executable file `rtfparse` in your python scripts folder which should be in your $PATH.
19+
Installation creates an executable file `rtfparse` in your python scripts folder which should be in your `$PATH`.
2020

2121
# First Run
2222

@@ -68,8 +68,8 @@ from rtfparse.parser import Rtf_Parser
6868
from rtfparse.renderers import de_encapsulate_html
6969
7070
71-
source_path = pathlib.Path(r"D:\trace\email\test_mail_sw_release.rtf")
72-
target_path = pathlib.Path(r"D:\trace\email\extracted_with_rtfparse.html")
71+
source_path = pathlib.Path(r"path/to/your/rtf/document.rtf")
72+
target_path = pathlib.Path(r"path/to/your/html/de_encapsulated.html")
7373
7474
7575
parser = Rtf_Parser(rtf_path=source_path)

release.cmd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
python setup.py sdist bdist_wheel
2+
twine upload --repository pypi dist/*

src/rtfparse/re_patterns.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ def no_capture(content: bytes) -> bytes:
7070

7171

7272
class Bytes_Regex():
73+
"""
74+
This wraps `re.pattern` objects and gives them a method `regex101` which
75+
prints out the pattern in such a manner that it can be copy-pasted
76+
to regex101.com.
77+
"""
7378
def __init__(self, Bytes: bytes, flags:re.RegexFlag=0) -> None:
7479
self.pattern_bytes = Bytes
7580
self.pattern = re.compile(Bytes, flags)

src/rtfparse/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/usr/bin/env python
22

33

4-
version = "0.7.6"
4+
version = "0.7.7"

0 commit comments

Comments
 (0)