Commit Graph

192 Commits

Author SHA1 Message Date
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
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
ed78501821 Merge branch 'fs#115-lsec-no-template' into test-v3 test-v3 2017-08-21 13:16:28 +02:00
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
f9f081d072 Merge branch 'fs#114-remove-underscores-in-articles' into test-v3 2017-03-11 11:43:49 +01:00
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
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
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
4e4be1c6d0 Merge branch 'fs#110-markpages-status-problems' into test-v3 2017-03-11 00:06:00 +01:00
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
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
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
65de6decb2 markpages: Filter redirects
Do not mark redirects discussion pages
2017-03-10 21:51:59 +01:00
889be30a47 Merge branch 'fs#109-redpage-redfam-join-type' into test-v3 2017-03-09 15:33:05 +01:00
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
76666aa294 Merge branch 'fs#25-mark-done' into test-v3 2017-03-09 10:50:14 +01:00
db39bb5ff4 Merge branch 'fs#88-mark-pages-bot' into fs#25-mark-done 2017-03-09 10:49:16 +01:00
ec7880207b Merge branch 'fs#95-sqlalchemy' into fs#88-mark-pages-bot 2017-03-09 10:48:10 +01:00
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
281f1c49a8 mysqlred: Set family via pywikibot
Get family/language part of table names from PyWikiBot Site
2017-03-09 00:12:41 +01:00
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
e16925197c Fix pep8.. compliance
To be concordant with the coding styles fix pep8 compliance
2017-03-09 00:12:31 +01:00
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
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
43e31c108a Working RedFamWorker query
Modify RedfamWorker class to work with new DB API
2017-03-09 00:10:50 +01:00
89b50e3312 Remove old status API
Now we use the methods of status object directly
2017-03-09 00:10:50 +01:00
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
467f829af2 Some cleanups
Remove old commented out code from manual mysql solution
2017-03-09 00:10:50 +01:00
6e973369cd sqlalchemy working for parser
Needs some testing, presumably contains some bugs
2017-03-09 00:08:48 +01:00
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
4e4d5005fd Merge branch 'fs#89-article-status' into fs#88-mark-pages-bot 2016-11-05 19:39:30 +01:00
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
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
870ed4bf25 Update redfam.article_generator use article status
To be able to filter articles by status of that article

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=89 FS#89]
2016-08-30 17:47:02 +02:00
e13320820c Add API to manage status per article
To be able to track changes to articles to update redfam status

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=89 FS#89]
2016-08-30 17:45:18 +02:00
4ae562590e Merge branch 'fs#94-data-structure' into fs#88-mark-pages-bot 2016-08-30 17:37:31 +02:00
6149dcdb8b Apply changes to data structure
See related ticket

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=94 FS#94]
2016-08-30 14:28:28 +02:00
f021f2ea60 Merge branch 'fs#93-update-talkpage-template' into fs#88-mark-pages-bot 2016-08-30 12:08:57 +02:00
8c56125a7b Update talkpage notice template
Exact date is not necessary and end could be ommited if of the same
month

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=93 FS#93]
2016-08-30 12:07:11 +02:00
c19f642d11 Merge branch 'fs#92-mark-done-edit-summary' into fs#88-mark-pages-bot 2016-08-30 11:51:07 +02:00
20b811bc2a Make sure edit summary starts with bot
Due to bot policy all edit summaries of bot edits have to start with
"Bot:"

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=92 FS#92]
2016-08-30 11:48:07 +02:00
59d4d23c83 Set edit summary for each edit
Each edit of bot needs a edit summary

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=92 FS#92]
2016-08-30 11:33:54 +02:00
2b93e4cf16 Check if notice is present before add
To prevent duplications we need to check wether notice is already
present on talkpage

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=88 FS#88]
2016-08-28 21:39:54 +02:00
9beca7f6c9 Implement method to add notice to disk page
Adds the generated notice to the talkpage and starts the saving of
the page

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

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=88 FS#88]
2016-08-28 21:33:36 +02:00
c4d8a95672 Implement build_generator-method
Build_generator will add the redfam_talkpages_generator to the
genFactory, build a generator of the genFactory and sets self.gen
which is used as generator for run()

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=88 FS#88]
2016-08-28 18:13:27 +02:00
da4f9b5d6b Add wrapper-generator to redfam.article_generator
We need a wrapper around redfam.article_generator to pass it to
pagegenerators.PageWithTalkPageGenerator and to add a reference to
related redfam to each pywikibot.page-object before yielding it

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=88 FS#88]
2016-08-28 18:09:04 +02:00
ecc78bef96 Import needed modules and add redfams-generator
We will need a couple of modules to build the needed generator
Also we will need a generator with redfams to work with

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=88 FS#88]
2016-08-28 18:01:02 +02:00
efa919ff27 Add new bot with basic structure
We need a bot to work on pages which are subjects of redfams and on the
belonging talk page

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=88 FS#88]
2016-08-28 16:39:32 +02:00
72c6165de8 Merge branch 'fs#87-redfam-article-generator' into fs#25-mark-done 2016-08-28 16:20:53 +02:00
c0b18f88e5 Add filter options to redfam.article_generator
To give the posibility to filter not existing pages or redirect pages or
vice versa.

Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=87 FS#87]
2016-08-28 15:06:17 +02:00