Jonathan Golder
0c135ef1bb
Describe version test-v5
7 years ago
Jonathan Golder
8b8221cfcd
Merge branch 'fs#152-respect-always-flag' into develop
7 years ago
Jonathan Golder
bdccc8417c
Set always in Pywikibot.Basebot
If cmdline param -always is set, set the related option in
Pywikibot.Basebot Object for automatic edits with out further requests
Related Task: [FS#152](https://fs.golderweb.de/index.php?do=details&task_id=152 )
7 years ago
Jonathan Golder
a70835c58a
Merge back branch 'test-v4' into develop
7 years ago
Jonathan Golder
ec2b84df2a
Add requirements
To make setup of environment for this module easier
7 years ago
Jonathan Golder
88848cb084
Prepare Version test-v4 for release
Add a README.md file for this project
7 years ago
Jonathan Golder
5057aed0d3
Merge branch 'fs#157-lowercase-title' into develop
7 years ago
Jonathan Golder
02e53475f1
Prevent lowercase article titles in Parser
Since real lowercase article titles are not allowed, make sure to
convert all first letters of article titles to uppercase. This is
neccessary since pywikibot will return article titles like this.
Related Task: [FS#157](https://fs.golderweb.de/index.php?do=details&task_id=157 )
7 years ago
Jonathan Golder
d6f9b460c9
Merge branch 'fs#156-dbapi-charset' into develop
7 years ago
Jonathan Golder
ff03ca8f13
Explicitly set charset for PyMySQL-Connection
Since PyMySQL-Connection otherwise uses charset 'latin-1', explicitly
set connection charset to 'utf8'
http://docs.sqlalchemy.org/en/rel_1_0/dialects/mysql.html#charset-selection
http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html?highlight=url#sqlalchemy.engine.url.URL
Related Task: [FS#156](https://fs.golderweb.de/index.php?do=details&task_id=156 )
7 years ago
Jonathan Golder
88692ca678
Merge branch 'fs#155-article-surouding-space' into develop
7 years ago
Jonathan Golder
d9b4fcc0bd
Strip spaces before adding articles to redfam
Some article links have surounding spaces in their linktext. Remove them
before adding article to RedFam to have a cannonical title
Related Task: [FS#155](https://fs.golderweb.de/index.php?do=details&task_id=155 )
7 years ago
Jonathan Golder
22ff78ea98
Merge branch 'fs#154-categorie-colons-missing' into develop
7 years ago
Jonathan Golder
b3cfcdc259
Improve title detection to get correct behaviour
Make sure that categorie links are starting with colon and non article
pages are returned with namespace.
Related Task: [FS#154](https://fs.golderweb.de/index.php?do=details&task_id=154 )
7 years ago
Jonathan Golder
b3e0ace2f4
Merge branch 'fs#153-nested-templates' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
49bc05d29b
Merge branch 'fs#151-normalize-article-titles-anchor' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
49a8230d76
Merge branch 'fs#141-place-notice-after-comment' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
2f90751dc2
Merge branch 'fs#146-famhash-generator' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
b6d7268a7f
select by famhash: Add methods to get param in bot
We need a method as callback to get bot specific params passed through
to our bot class.
Introduce -famhash parameter to work on specific famhash
Related Task:[FS#146](https://fs.golderweb.de/index.php?do=details&task_id=146 )
7 years ago
Jonathan Golder
526184c1e1
Merge branch 'fs#148-articles-mixed-up' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
ec8f459db5
Merge branch 'fs#138-marked-articles-shown-again' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
41e5cc1a9d
Merge branch 'fs#141-place-notice-after-comment' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
a755288700
Merge branch 'fs#147-templates-in-heading' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
e283eb78ac
Merge branch 'fs#140-also-mark-redirects' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
37b0cbef08
Merge branch 'fs#138-marked-articles-shown-again' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
456b2ba3d4
Merge branch 'fs#141-place-notice-after-comment' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
a6fdc974bd
Merge branch 'fs#144-PyMySQL-instead-oursql' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
4a6855cf7b
Merge branch 'fs#141-place-notice-after-comment' into develop
7 years ago
Jonathan Golder
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 )
7 years ago
Jonathan Golder
ed78501821
Merge branch 'fs#115-lsec-no-template' into test-v3
7 years ago
Jonathan Golder
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]
7 years ago
Jonathan Golder
f9f081d072
Merge branch 'fs#114-remove-underscores-in-articles' into test-v3
7 years ago
Jonathan Golder
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]
7 years ago
Jonathan Golder
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]
7 years ago
Jonathan Golder
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]
7 years ago
Jonathan Golder
4e4be1c6d0
Merge branch 'fs#110-markpages-status-problems' into test-v3
7 years ago