This repository has been archived by the owner on Apr 25, 2023. It is now read-only.
forked from ofri/Open-Knesset
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #735 from alonisser/master
Missing django-mailer MessageLog cleanup management command added to cron
- Loading branch information
Showing
3 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# -*- coding: utf-8 -* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -* | ||
import re | ||
|
||
|
||
def normalize_correction_title_dashes(raw_title): | ||
"""returns s with normalized spaces before and after the dash""" | ||
if not raw_title: | ||
return None | ||
m = re.match(r'(תיקון)( ?)(-)( ?)(.*)'.decode('utf8'), raw_title) | ||
if not m: | ||
return raw_title | ||
return ' '.join(m.groups()[0:5:2]) | ||
|
||
|
||
def parse_title(unparsed_title): | ||
return re.match(u'הצעת ([^\(,]*)(.*?\((.*?)\))?(.*?\((.*?)\))?(.*?,(.*))?', unparsed_title) | ||
|
||
|
||
def clean_line(a_line_str): | ||
return a_line_str.strip().replace('\n', '').replace(' ', ' ') |