Skip to content
Browse files

Stub out the code for the afc comment cleaner and add the logic for the

submissions cleaning
  • Loading branch information...
1 parent c04d583 commit 02430a42c903eb2135a63a43fd952b9d8e42f64b @hasteur committed Dec 23, 2013
Showing with 16 additions and 0 deletions.
  1. +16 −0 afc_cleaner.py
View
16 afc_cleaner.py
@@ -197,9 +197,25 @@ def clean_submission(page):
page_text = line_1188_replacements(page_text)
page_text = line_1200_replacements(page_text)
page_text = relocate_stubs(page_text)
+ page_text = adjust_afc_comments(page_text)
+ page_text = adjust_submissions(page_text)
print '-'*20
print page_text
+def adjust_submissions(page_text):
+ global logger
+ imp_text = page_text
+ submissions_list = re.findall('\{\{\s*afc submission\s*\|\s*(?:[t|r|d]?)\|(?:[\s\w\|=]*)\|\s*ts\s*=\s*(?:[0-9]{14}|\{\{REVISIONTIMESTAMP\}\})(?:[\s\w\|=]*)\}\}',page_text,re.I)
+ if len(submissions_list) >= 0:
+ print "Adjusting at least 1 stubmission"
+ for sub_item in submissions_list:
+ print sub_item
+ return imp_text
+
+def adjust_afc_comments(page_text):
+ imp_text = page_text
+ return imp_text
+
def relocate_stubs(page_text):
global logger
stub_list = re.findall('\{\{\s*-*[Ss]tub\}\}',page_text)

0 comments on commit 02430a4

Please sign in to comment.
Something went wrong with that request. Please try again.