Commit Graph
209 Commits
Author SHA1 Message Date
golderweb 526184c1e1 Merge branch 'fs#148-articles-mixed-up' into develop 2017-08-24 12:26:53 +02:00
golderweb 3aa6c5fb1c Disable PreloadingGenerator temporarily
PreloadingGenerator mixes up yielded Pages. This is very unconvenient
for semi-automatic workflow with manual checks as the articles of the
RedFams were not following each other.

Related Task: [FS#148](https://fs.golderweb.de/index.php?do=details&task_id=148)
2017-08-24 12:23:17 +02:00
golderweb ec8f459db5 Merge branch 'fs#138-marked-articles-shown-again' into develop 2017-08-24 12:19:24 +02:00
golderweb 3b2cb95f36 Do not fetch marked redfams from db
Exclude marked Redfams from DB-Query to prevent marking them again

Related Task: [FS#138](https://fs.golderweb.de/index.php?do=details&task_id=138)
2017-08-24 12:09:43 +02:00
golderweb 41e5cc1a9d Merge branch 'fs#141-place-notice-after-comment' into develop 2017-08-24 12:06:03 +02:00
golderweb 9b9d50c4d2 Improve detection of empty lines
Search with RegEx as empty lines could also contain spaces

Related Task: [FS#141](https://fs.golderweb.de/index.php?do=details&task_id=141)
2017-08-24 12:04:45 +02:00
golderweb a755288700 Merge branch 'fs#147-templates-in-heading' into develop 2017-08-23 14:55:43 +02:00
golderweb 14ec71dd09 Rewrite get_disc_link to handle special cases
Use methods of pywikibot site-object and mwparser to get rid of any
special elements like templates or links in headings for construction
of our disc link.
Replace   by hand as it otherwise will occur as normal space and
wont work

Related Task: [FS#147](https://fs.golderweb.de/index.php?do=details&task_id=147)
2017-08-23 14:53:22 +02:00
golderweb e283eb78ac Merge branch 'fs#140-also-mark-redirects' into develop 2017-08-22 21:59:22 +02:00
golderweb cc02006fd2 Do not exclude redirects from beeing marked
In accordance with Zulu55 redirect discussion pages should also get
a notice, therefore do not exclude redirects.

Related Task: [FS#140](https://fs.golderweb.de/index.php?do=details&task_id=140)
2017-08-22 21:59:07 +02:00
golderweb 37b0cbef08 Merge branch 'fs#138-marked-articles-shown-again' into develop 2017-08-22 21:58:22 +02:00
golderweb 4137d72468 Look for existing notice by simple in-check
To detect maybe uncommented notices already present, check for them
using just a simple python x in y check over whole wikicode

Related Task: [FS#138](https://fs.golderweb.de/index.php?do=details&task_id=138)
2017-08-22 21:56:43 +02:00
golderweb cd87d1c2bb Fix already marked articles was reshown bug
Since we search for matching states for articles to include or exclude
in a loop, we could not control the outer loop via default break/
continue. Python docs recommend using Exceptions and try/except
structures to realise that most conveniently.

https://docs.python.org/3/faq/design.html#why-is-there-no-goto

Related Task: [FS#138](https://fs.golderweb.de/index.php?do=details&task_id=138)
2017-08-22 21:45:58 +02:00
golderweb 456b2ba3d4 Merge branch 'fs#141-place-notice-after-comment' into develop 2017-08-21 22:11:51 +02:00
golderweb 47b85a0b5e Add missing line break if there is no template
To make sure our notice template resides in its own line in every case

Related Task: [FS#141](https://fs.golderweb.de/index.php?do=details&task_id=141)
2017-08-21 22:09:59 +02:00
golderweb a6fdc974bd Merge branch 'fs#144-PyMySQL-instead-oursql' into develop 2017-08-21 13:58:34 +02:00
golderweb 30de2a2e12 Replace oursql with PyMySQL
Since this is prefered on toolsforge and works out of the box after
installing via pip, replace oursql which caused some problems.
Especially oursql was not able to connect to db via ssh tunnel.

Related Task: [FS#144](https://fs.golderweb.de/index.php?do=details&task_id=144)
2017-08-21 13:55:33 +02:00
golderweb 4a6855cf7b Merge branch 'fs#141-place-notice-after-comment' into develop 2017-08-21 13:51:32 +02:00
golderweb 8422d08cb6 Keep comments and leading templates together
Prevent spliting up existing comments and templates as often those are
documenting archiv templates behaviour

Related Task: [FS#141](https://fs.golderweb.de/index.php?do=details&task_id=141)
2017-08-21 13:49:34 +02:00
golderweb ed78501821 Merge branch 'fs#115-lsec-no-template' into test-v3 test-v3 2017-08-21 13:16:28 +02:00
golderweb 34e7e0d3be Prevent index Error if no template in leadsec
Check if there is a template in leadsec before accessing list item to
prevent IndexErrors

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=115 FS#115]
2017-03-11 12:22:10 +01:00
golderweb f9f081d072 Merge branch 'fs#114-remove-underscores-in-articles' into test-v3 2017-03-11 11:43:49 +01:00
golderweb 0f930082b4 Also canonicalise anchor parts of articles
Replace spaces in anchors with underscores as spaces are not correct
there

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=114 FS#114]
2017-03-11 11:40:41 +01:00
golderweb 80c94ccf4f Replace underscores in article titles
Remove underscores in article titles and replace with spaces to have
canonical state for all articles
Therefore we need to split title and posible anchors in heading parser

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=114 FS#114]
2017-03-11 11:30:19 +01:00
golderweb 37704c6661 Replace pywikibot.showDiff with patched version
Pywikibot.bot.userPut does not support setting the value of diff context
so it is always zero. Therefore we need to patch either userPut or
showDiff to get some context.

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=113 FS#113]
2017-03-11 10:39:31 +01:00
golderweb 4e4be1c6d0 Merge branch 'fs#110-markpages-status-problems' into test-v3 2017-03-11 00:06:00 +01:00
golderweb 3e69a1c77e Remove problem indicating stati when set marked
Remove states which are indicating problems in previous runs if
successfully marked article and also whole RedFam

[https://fs.golderweb.de/index.php?do=details&task_id=112 FS#112]

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=110 FS#110]
2017-03-11 00:03:42 +01:00
golderweb 56f326b568 Fix error all current redfams marked when quit
Restructure update_status to make sure, marked is only set when all
articles are marked or gone (means deleted or redirect)

[https://fs.golderweb.de/index.php?do=details&task_id=111 FS#111]

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=110 FS#110]
2017-03-10 23:45:48 +01:00
golderweb 868894a38b Format fixes
Set locale to de_DE.utf-8 for whole Task

Make sure Template is added in own source line
2017-03-10 23:28:24 +01:00
golderweb 65de6decb2 markpages: Filter redirects
Do not mark redirects discussion pages
2017-03-10 21:51:59 +01:00
golderweb 889be30a47 Merge branch 'fs#109-redpage-redfam-join-type' into test-v3 2017-03-09 15:33:05 +01:00
golderweb 147e96d388 Add Wrapperclass for Parser to RedPage
Add a wrapper class to overwrite type of Items returned by
RedPage.redfams relationship

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=109 FS#109]
2017-03-09 15:30:51 +01:00
golderweb 76666aa294 Merge branch 'fs#25-mark-done' into test-v3 2017-03-09 10:50:14 +01:00
golderweb db39bb5ff4 Merge branch 'fs#88-mark-pages-bot' into fs#25-mark-done 2017-03-09 10:49:16 +01:00
golderweb ec7880207b Merge branch 'fs#95-sqlalchemy' into fs#88-mark-pages-bot 2017-03-09 10:48:10 +01:00
golderweb 4aaacf1443 Add redfams to redpage-obj after parsing
To have redfams available for updates immediately after parsing. Double
redfams then will be seen as Update.

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=108 FS#108]
2017-03-09 10:25:52 +01:00
golderweb 281f1c49a8 mysqlred: Set family via pywikibot
Get family/language part of table names from PyWikiBot Site
2017-03-09 00:12:41 +01:00
golderweb 3fe47e666f Fix polymorphism problem with relationships
Since we are using subclasses of the ORM mapped classes, disable
typechecks for ORM relations
2017-03-09 00:12:41 +01:00
golderweb e16925197c Fix pep8.. compliance
To be concordant with the coding styles fix pep8 compliance
2017-03-09 00:12:31 +01:00
golderweb 9ba7d2e517 Change redfam generator filters
Change and clear up the filters in redfam generator to keep track of
article status and use positive conditionals
2017-03-09 00:10:51 +01:00
golderweb 844fee52ae Make markpages using new DB/Class structure
Update markpages and RedFamWorker-Code to use the new sqlalchemy based
DB ORM Interface
2017-03-09 00:10:51 +01:00
golderweb 43e31c108a Working RedFamWorker query
Modify RedfamWorker class to work with new DB API
2017-03-09 00:10:50 +01:00
golderweb 89b50e3312 Remove old status API
Now we use the methods of status object directly
2017-03-09 00:10:50 +01:00
golderweb bf8e47f916 Improve new status API
Make sure state changes are only detected as such by sqlalchemy if they
are real changes
2017-03-09 00:10:50 +01:00
golderweb 467f829af2 Some cleanups
Remove old commented out code from manual mysql solution
2017-03-09 00:10:50 +01:00
golderweb 6e973369cd sqlalchemy working for parser
Needs some testing, presumably contains some bugs
2017-03-09 00:08:48 +01:00
golderweb 0ebf307bb8 Add markpages as subtask
Markpages is a subtask of our Red-Bot

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=89 FS#89]

# The following line will be added automatically
# Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=88 FS#88]
2016-11-05 19:41:22 +01:00
golderweb 4e4d5005fd Merge branch 'fs#89-article-status' into fs#88-mark-pages-bot 2016-11-05 19:39:30 +01:00
golderweb 65fb2ecb28 Generate Fam status based on article status
Some article states should be reflected in the RedFam status

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=89 FS#89]
2016-11-05 19:27:56 +01:00
golderweb d55c81c97b Set article status when worked on talkpage
To detect whole redfam status after run over all articles

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=89 FS#89]
2016-08-30 18:05:51 +02:00