Commit Graph

144 Commits

Author SHA1 Message Date
c78480a75d Use mysql config from pywikibot user-config.py 2015-09-12 22:33:44 +02:00
6e0d3200c2 Change visibility of attributes changed and parsed in RED_PAGE to protected 2015-09-12 14:24:45 +02:00
f50f4b664f Add additional possibilities to detect wether a red_page is an archive or not 2015-09-12 13:48:01 +02:00
e70655f679 Catch sections with more then 8 articles 2015-09-12 12:42:23 +02:00
14e865c6e6 We need to save the red_fam section heading in database for generating section links since format is not consistent 2015-09-12 00:50:04 +02:00
a97e2cea5a Since some timestamps are broken we need to reconstruct them by regex match groups
Prevents ValueErrors of datetime.strptime in most cases
2015-09-11 23:47:35 +02:00
6e64d8448e Prevent RED_PAGE from resetting status if parser is not fired 2015-09-11 22:29:16 +02:00
deaa1d855b Fix bug which prevents detecting of red_fam sectionheading when there is whitespace after closing heading tags (===) 2015-09-11 22:27:25 +02:00
90da231712 Move the code for instanciating of RED_FAM_PARSER to the end of loop 2015-09-11 17:05:18 +02:00
529ed09702 Use pywikibot.output instead of print 2015-09-11 16:42:12 +02:00
1892c6d015 Fix wrong intendet line (RED_FAM_PARSER only was instantiated when ending-datetime workaround fired) 2015-09-11 16:41:04 +02:00
99f050acd3 Add workaround to detect ending datetime if there is no done notice 2015-09-11 16:22:19 +02:00
8b7dc5dbf2 Improve sectionheading regex to reduce false positives, require at least two links 2015-09-11 16:18:46 +02:00
5e39ea0b06 Correct use of pywikibot page.title() 2015-09-11 14:12:26 +02:00
f8dacb53e1 Add param to RED_PAGE for predefining page status archived when using cat of archives 2015-09-11 14:10:33 +02:00
ebf7a8fe0b Add alternative syntax for done_notice 2015-09-11 13:56:16 +02:00
47238f0f96 On archived red_fams do not delete possibly existing ending 2015-09-11 13:37:58 +02:00
907ccad63a Detect if red_fam is archived but has no detectable ending, set status 2 anyway 2015-09-11 13:12:29 +02:00
31ea512c41 Prevent overwriting of ending with None by only calling RED_FAM_PARSER if there was no ending before 2015-09-11 13:01:04 +02:00
4f7cfc65cc Catch ValueErrors caused by missing points after month abreviation in RED_PAGE_PARSER.__timestamp 2015-09-10 23:09:35 +02:00
a26b92082b Implement parsing process in RED_PAGE.parse() 2015-09-10 23:08:51 +02:00
984c269aa4 Implement classmethods for detecting sectionheading, beginning and ending in class RED_FAM_PARSER 2015-09-10 23:06:54 +02:00
0f4ce7c4c9 Add workaround to get mysql.data dictionary while adding new pages/fams 2015-09-10 23:02:38 +02:00
7535172d30 Update mysql db if anything of re_fam changes 2015-09-10 11:57:35 +02:00
9e865e1c2f Some clean ups 2015-09-10 11:57:10 +02:00
79e232d52b Add gitignore file 2015-09-10 11:46:05 +02:00
ea92415b37 Add dummy -method for parsing to RED_PAGE 2015-09-10 11:24:25 +02:00
30e1672557 Implement methods for parsing red_fams
Add Interfaces for RED_FAM
2015-09-10 11:23:15 +02:00
6d1ed33699 Add methods for MySQL actions while parsing RED_FAMs 2015-09-10 11:20:20 +02:00
45df354315 Prevent descendant classes of MYSQL_RED from deleting connection to db 2015-09-10 11:18:22 +02:00
73b5d87e8d Implemment handling of changed page meta data (rev_id, page_title, status) 2015-09-07 22:51:07 +02:00
cef90e4fac Handle building of MYSQL_RED_PAGE objects 2015-09-07 19:04:16 +02:00
c800a13f0c Change behavior of MYSQL_RED(_PAGE), handle save requested data in object for simple update handling 2015-09-07 19:00:04 +02:00
0beb97d67d Use qmark parametrization style for mysql query 2015-09-07 16:21:57 +02:00
773557a591 Use DictCursor ouf oursql to get better readability in MYSQL_RED_PAGE 2015-09-06 16:02:30 +02:00
d2dfa15ddf Implement a class RED_PAGE for handling redundance pages 2015-09-06 15:43:10 +02:00
28d9a26cf1 Always handle beginning and ending definitions via setter functions
Setter functions for beginning and ending decide wether it is a datetime object or a parseable timestamp string
2015-09-06 15:04:49 +02:00
122cc8b309 Set date attributes to none if nothing given, rather than don't set the attributes 2015-09-06 14:37:27 +02:00
72410d17b4 Expand __init__ Method of RED_FAM to catch beginning, end and status
Add a __repr__ Method to RED_FAM
2015-09-05 18:36:30 +02:00
10cfa79ee0 Implement a class/modul RED_FAM for handling redundance families 2015-09-05 18:06:17 +02:00
49def6f0f0 Implement a class MYSQL_RED_FAM as desecendant of MYSQL_RED for handling querys about red_families 2015-09-05 17:13:09 +02:00
f5ac6a06d3 Implement a class MYSQL_RED_PAGE as desecendant of MYSQL_RED for handling querys about red_pages 2015-09-05 17:10:55 +02:00
597df69275 Save mysqldb-connection as class atribute to make it usable for all decandant classes of MYSQL_RED 2015-09-05 17:09:01 +02:00
71b9d3301d Initial structure of MySQL-Module
Use class to use an object for all MySQL stuff
2015-09-04 22:19:06 +02:00