fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2903250
)
Improved some regexes.
author
Marek Stępniowski
<marek@stepniowski.com>
Mon, 15 Sep 2008 14:26:10 +0000
(16:26 +0200)
committer
Marek Stępniowski
<marek@stepniowski.com>
Mon, 15 Sep 2008 14:26:10 +0000
(16:26 +0200)
lib/librarian/bin/book2txt.py
patch
|
blob
|
history
diff --git
a/lib/librarian/bin/book2txt.py
b/lib/librarian/bin/book2txt.py
index
86f6f12
..
413ff67
100755
(executable)
--- a/
lib/librarian/bin/book2txt.py
+++ b/
lib/librarian/bin/book2txt.py
@@
-11,10
+11,10
@@
REGEXES = [
(r'<motyw[^>]*>(.|\n)*?</motyw>', ''),
('<(begin|end)\\sid=[\'|"][b|e]\\d+[\'|"]\\s/>', ''),
(r'<extra>((<!--<(elementy_poczatkowe|tekst_glowny)>-->)|(<!--</(elementy_poczatkowe|tekst_glowny)>-->))</extra>', ''),
- (r'<uwaga>
[^<]*
</uwaga>', ''),
- (r'<p[a|e|r|t]>(.|\n)*?</p>', ''),
+ (r'<uwaga>
(.|\n)*?
</uwaga>', ''),
+ (r'<p[a|e|r|t]>(.|\n)*?</p
[a|e|r|t]
>', ''),
(r'<[^>]+>', ''),
- (r'/
$
', ''),
+ (r'/
\n
', ''),
(r'---', u'—'),
(r'--', u'-'),
(r',,', u'„'),