f8002c85da
Do not search for templates recursivly
...
Since nested templates did not get an index in global wikicode object
searching for index of an nested template results in ValueError
Related Task: [FS#153](https://fs.golderweb.de/index.php?do=details&task_id=153 )
2017-09-02 14:23:25 +02:00
8a26b6d92a
Normalize article titles with anchors
...
In our db article titles with anchors are stored with underscores in
anchor string. Therefore we need to replace spaces in anchor string
given by pywikibot.Page.title().
Related Task: [FS#151](https://fs.golderweb.de/index.php?do=details&task_id=151 )
2017-08-25 18:11:41 +02:00
49a8230d76
Merge branch 'fs#141-place-notice-after-comment' into develop
2017-08-25 17:11:28 +02:00
31c10073a2
Prevent index errors searching for comments
...
Make sure not to exceed existing indexes of wikicode object while trying
to search for comments
Related Task: [FS#141](https://fs.golderweb.de/index.php?do=details&task_id=141 )
2017-08-25 17:09:38 +02:00
642a29b022
Improve regex for blank lines
...
Do not match consecutive linebreaks as one
Related Task: [FS#141](https://fs.golderweb.de/index.php?do=details&task_id=141 )
2017-08-24 18:47:18 +02:00
024be69fe1
Use famhash as generator
...
If famhash is defined, fetch explicitly that redfam from db and work
only on this
Related Task: [FS#146](https://fs.golderweb.de/index.php?do=details&task_id=146 )
2017-08-24 12:27:13 +02:00
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
41e5cc1a9d
Merge branch 'fs#141-place-notice-after-comment' into develop
2017-08-24 12:06:03 +02:00
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
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
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
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
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
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
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
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
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
e16925197c
Fix pep8.. compliance
...
To be concordant with the coding styles fix pep8 compliance
2017-03-09 00:12:31 +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
89b50e3312
Remove old status API
...
Now we use the methods of status object directly
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
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
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
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
2be0a8903d
Adjust constructor for wrapper-script
...
The new wrapper-script calls a standardized API
We need to be conform with that
Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=83 FS#83]
2016-08-27 17:02:51 +02:00
0ceb2e6e83
Add methods to build gen to DiscussionParser
...
With the new wrapper script the Bot gets a GenFactory and has to build
a generator out of it by its own
Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=83 FS#83]
2016-08-27 16:58:20 +02:00
b88efb6bdd
Reflect stucture changes in Code
...
Since bot class is moved to separate dir/file we need to do some changes
to rebuild functionality
Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=82 FS#82]
2016-08-27 15:40:09 +02:00
177a8f920f
Prepare new structure to use subtasks
...
To have only one entry point for the bot we want to have a single file
(red.py) which is calling the specfic task class from bots dir with a
standardized call
Related Task: [https://fs.golderweb.de/index.php?do=details&task_id=82 FS#82]
2016-08-27 15:40:09 +02:00