(→‎Suggested bot tasks: done; modify)
(Replace {{tl|lit}} with {{tl|MOST lit}})
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{shortcut|[[A:BT]]}}
{{shortcut|A:BT}}
==Agreed bot tasks==
==Agreed bot tasks==
Uncontroversial or agreed-upon tasks should be listed here:
Uncontroversial or agreed-upon tasks should be listed here:
* Replace {{tl|lit}} with {{tl|MOST lit}} - should just be in [[:Category:MOST_literature_reviews]].


===Routine bot tasks===
===Routine bot tasks===
Line 9: Line 11:
Most are currently performed by [[User:ChriswaterguyBot|ChriswaterguyBot]], but may be performed by any bot. Use appropriate care.
Most are currently performed by [[User:ChriswaterguyBot|ChriswaterguyBot]], but may be performed by any bot. Use appropriate care.


* fix [[Special:DoubleRedirects|double-redirects]]: '''python redirect.py double''' (brovse the outputs for anything odd, and manually fix anything that needs fixing.)
* fix [[Special:DoubleRedirects|double-redirects]]: '''python redirect.py double''' (browse the outputs for anything odd, and manually fix anything that needs fixing.)
* delete broken redirects: '''python redirect.py broken''' (Requires adminship. Be extra careful)
* delete broken redirects: '''python redirect.py broken''' (Requires adminship. Be extra careful)
* fix format of redirects to categories:
* fix format of redirects to categories:
Line 19: Line 21:


* Correcting capitalization of headers, e.g. See Also to See also:
* Correcting capitalization of headers, e.g. See Also to See also:
** '''python replace.py -xml:currentdump.xml "== See Also" "== See also"'''
** '''python replace.py -regex -xml:currentdump.xml "(== ?See )Also" "\\1also"'''
** '''python replace.py -xml:currentdump.xml "==See Also" "== See also"'''
** '''python replace.py -regex -xml:currentdump.xml "(== ?External )Links" "\\1links"  
** '''python replace.py -xml:currentdump.xml "== External Links" "== External links"
 
** '''python replace.py -xml:currentdump.xml "==External Links" "== External links"
[check that this new regex version works]
 
See if this works instead - \l to create  lower case of first character in a string
** '''python replace.py -regex -xml:currentdump.xml "(== ?External |== ?See )(Links|Also)" "\\1\l\\2"


==Suggested bot tasks==
==Suggested bot tasks==
* ''Hold on''' - I'm working on new templates... --[[User:Chriswaterguy|Chriswaterguy]] 04:43, 15 November 2009 (UTC). place these templates on every topic page, if not there already:
 
:*{{tl|Browsetopic}}
* Wikilinking
:*{{tl|Createnewpage}}
* Adding categories - look for text strings, to help identify pages for categorization.
:*{{tl|Putinthiscategory}}
* common spelling errors
*Look for text strings in articles which are the same as topic and location category names. The first occurrence of this string in each article should generally be wikilinked. (I suggest a policy of using simple links, which will then be redirected, e.g. <nowiki>[[Cambodia]], not [[:Category:Cambodia|Cambodia]]</nowiki>. This makes it less confusing for newbies wanting to learn from the editing. It also makes updating simpler if a category name is ever changed. --[[User:Chriswaterguy|Chriswaterguy]] &middot; <small>[[User talk:Chriswaterguy|talk]]</small> 19:26, 28 February 2007 (PST))
*As above, but look for text strings, to help identify pages for categorization. E.g. Look for articles about cohousing, and add <nowiki>[[Category:Cohousing]] (or replace [[Category:Intentional communities]] with [[Category:Cohousing]], as appropriate - this is better but requires more thought & work for each category.)</nowiki>
*common spelling errorserrors
** Adapt a bot from Wikipedia?
** Adapt a bot from Wikipedia?
** Be sensitive to variations in spelling - some people don't like it if their spellings are "corrected" from American to British forms, or vice-versa. - (Can we use a dictionary that accepts both/all regional spellings?)
* Tagging pages with apparent non-compliant capitalization
*<s>replace '''<nowiki>[[User:Singkong2005|Singkong2005]] (now known as [[User:Chriswaterguy| Chriswaterguy]])</nowiki>''' with '''<nowiki>[[User:Singkong2005|Singkong2005]] (now known as [[User:Chriswaterguy| Chriswaterguy]])  ''<small>a.k.a. [[User:Chriswaterguy| Chriswaterguy]]''</nowiki>'''</s> Done.
** Maintain a list (possibly a hidden category) of checked pages that have good reasons for not complying,
*Tagging pages with apparent non-compliant capitalization
* Cancel this task, or replace these with updated templates? --[[User:Chriswaterguy|Chriswaterguy]] 05:46, 26 December 2010 (UTC)''place these templates on every topic page, if not there already:''
**Maintain a list (possibly a category) of checked non-compliers.
:*''{{tl|Browsetopic}}''
*Change header ==Footnotes and references== to ==Notes==. (==References== is a different kind of section - see WP links at the bottom of {{tl|notes}}.)
:*''{{tl|Createnewpage}}''
*Move the following categories, changing tags in all articles in the category. (Note to bot owner(s): Perhaps it's easier to let the list build up, or else just do it at regular intervals):
:*''{{tl|Putinthiscategory}}''
*Fix improperly closed ref tags, which cause the bottom part of pages not to display. Is it possible to detect when a <nowiki><ref> is followed by another <ref>, rather than by a </ref></nowiki>, or by neither? (Maybe [[Wikipedia:User:SmackBot]] does this - it fixes certain ref errors.)
* Change header ==Footnotes and references== to ==Notes==. (==References== is a different kind of section - see Wikipedia links at the bottom of [[Template:Notes]].)
*Bots could help with one aspect of our topic/category dilemma:
* Move categories to a new category name. A bot owner will run the changes periodically. (If you need it done soon, leave a message at [[User talk:ChriswaterguyBot]]). List categories below with links (from... to...) :
** If we go with topic categories, having category redirects will often be essential (due to old links from various places on the internet). However, we don't want people to put anything in these categories. The desired long term solution is that MediaWiki displays these in a way to indicate that they are not appropriate categories (like redlinks) while still allowing the pages to function as redirects.
**
** A medium term solution, which we're using, is  to the redirect issue is that we allow category redirects, using a special template. This would include <s>a regular redirect tag, as well as </s>an explanatory note for those who view it directly. A bot could be run as a [[#Routine bot tasks|routine bot task]] <s>at least once a week on every page displaying this template. It detects whether there are pages in the category, and goes to those pages and fixes the category tag to display the target category. (It will output a log file of changes, so these moves can be checked by a human.)</s> Every few months the old category redirect pages can be deleted. However, they are only deleted if they are quite old in case people follow old links. This fixes the single main problem with category redirects.
* Every page with [[:Category:Green living]] but without [[:Category:Sustainability]] should be added to [[:Category:Sustainability]] (but checked one-by-one. This is assuming that [[green living]] should be treated differently from other subcategories of sustainability, that it overlaps a lot. (Sustainability is more serious, perhaps - green living suggests a more specific readership.) Don't know if that makes sense... --[[User:Chriswaterguy|Chriswaterguy]] 14:05, 20 November 2009 (UTC)
* Fix improperly closed ref tags, which cause the bottom part of pages not to display. Is it possible to detect when a <nowiki><ref> is followed by another <ref>, rather than by a </ref></nowiki>, or by neither? (Maybe [[Wikipedia:User:SmackBot]] does this - it fixes certain ref errors.)
* Replace <nowiki>{{tl|Wp sup}} with {{tl|W}}</nowiki>  - use "-exceptinside:nowiki"
* Merge Category {{cl|Derived content}} to {{cl|Ported content}}


*Check if page title is a Wikipedia page title and add the <nowiki>{{Wikipedia}}</nowiki> template automatically. - (Note: This would have the downside of linking to a lot of Wikipedia disambiguation pages, or to pages which are wrong for our purposes. - We might want to make the bot write to a listing of "Pages tagged by Wikipedia bot", so that a human could check its recent work and disambiguate or correct links as desired.)


* Replace <nowiki>{{Wikipedia}} with {{Wikipedia|page name}}</nowiki> - to prevent the target changing when a page or text is moved. However, the ''subst:'' doesn't work in <nowiki>{{wikipedia|subst:{{PAGENAME}}}}</nowiki> so 2 or more replacement steps are needed.  
Bigger jobs with a bot component:
** This might work:
* Merge <nowiki>{{Browsetopic}}\n{{Newpageresource}}</nowiki> into <nowiki>{{cat header\|.*?}}</nowiki> ''Note'': instead of \n use a more general space & newline term - maybe <nowiki>[[:space:]]</nowiki>?
**#<nowiki>{{Wikipedia}} -->  WikipediaTemplateTag|{{subst:PAGENAME}}WikipediaTemplateEndTag</nowiki> ''Note that outside mainspace this has to be modified to <nowiki>{{subst:NAMESPACE}}:{{subst:PAGENAME}}</nowiki>''
* change <nowiki>{{Newpageresource}}\n{{Putinthiscategory}}</nowiki> to <nowiki>{{Newpageresource}}</nowiki>, then manually merge those templates
**#<nowiki>WikipediaTemplateTag --> {{Wikipedia</nowiki>
 
**#<nowiki>WikipediaTemplateEndTag  --> }}</nowiki>
'''Notes''':
**Then {{tl|Wikipedia}} can be deleted & {{tl|Wikipedia p}} can be moved to {{tl|Wikipedia}}
* Be sensitive to variations in spelling - some people don't like it if their spellings are "corrected" from American to British forms, or vice-versa. - (Can we use a dictionary that accepts both/all regional spellings?)
**Replace <nowiki>[[Category:Foo]] with [[Category:Foo|{{PAGENAME}}]]</nowiki> in namespaces other than mainspace.


== Simple search and replace ==
== Simple search and replace ==
Line 63: Line 66:
* [[AutoWikiBrowser]]
* [[AutoWikiBrowser]]


[[Category:Appropedia bots|{{PAGENAME}}]]
 
[[Category:Appropedia tasks|{{PAGENAME}}]]
[[Category:Green living]]
[[Category:Sustainability]]
[[Category:Sustainability]]
[[Category:Appropedia bots]]
[[Category:Appropedia tasks]]

Revision as of 02:28, 31 January 2013

Template:Shortcut

Agreed bot tasks

Uncontroversial or agreed-upon tasks should be listed here:

Routine bot tasks

Actual commands are in bold.

Most are currently performed by ChriswaterguyBot, but may be performed by any bot. Use appropriate care.

  • fix double-redirects: python redirect.py double (browse the outputs for anything odd, and manually fix anything that needs fixing.)
  • delete broken redirects: python redirect.py broken (Requires adminship. Be extra careful)
  • fix format of redirects to categories:
    • python replace.py -xml:currentdump.xml -nocase "#REDIRECT [[Category:" "#REDIRECT [[:Category:"
    • python replace.py -xml:currentdump.xml -nocase "#REDIRECT[[Category:" "#REDIRECT [[:Category:"
  • add "|{{PAGENAME}}" to category tags, for pages not in the main or category namespaces.

Occasional

  • Correcting capitalization of headers, e.g. See Also to See also:
    • python replace.py -regex -xml:currentdump.xml "(== ?See )Also" "\\1also"
    • python replace.py -regex -xml:currentdump.xml "(== ?External )Links" "\\1links"

[check that this new regex version works]

See if this works instead - \l to create lower case of first character in a string

    • python replace.py -regex -xml:currentdump.xml "(== ?External |== ?See )(Links|Also)" "\\1\l\\2"

Suggested bot tasks

  • Wikilinking
  • Adding categories - look for text strings, to help identify pages for categorization.
  • common spelling errors
    • Adapt a bot from Wikipedia?
  • Tagging pages with apparent non-compliant capitalization
    • Maintain a list (possibly a hidden category) of checked pages that have good reasons for not complying,
  • Cancel this task, or replace these with updated templates? --Chriswaterguy 05:46, 26 December 2010 (UTC)place these templates on every topic page, if not there already:Reply[reply]
  • Change header ==Footnotes and references== to ==Notes==. (==References== is a different kind of section - see Wikipedia links at the bottom of Template:Notes.)
  • Move categories to a new category name. A bot owner will run the changes periodically. (If you need it done soon, leave a message at User talk:ChriswaterguyBot). List categories below with links (from... to...) :
  • Every page with Category:Green living but without Category:Sustainability should be added to Category:Sustainability (but checked one-by-one. This is assuming that green living should be treated differently from other subcategories of sustainability, that it overlaps a lot. (Sustainability is more serious, perhaps - green living suggests a more specific readership.) Don't know if that makes sense... --Chriswaterguy 14:05, 20 November 2009 (UTC)Reply[reply]
  • Fix improperly closed ref tags, which cause the bottom part of pages not to display. Is it possible to detect when a <ref> is followed by another <ref>, rather than by a </ref>, or by neither? (Maybe Wikipedia:User:SmackBot does this - it fixes certain ref errors.)
  • Replace {{tl|Wp sup}} with {{tl|W}} - use "-exceptinside:nowiki"
  • Merge Category Category:Derived content to Category:Ported content


Bigger jobs with a bot component:

  • Merge {{Browsetopic}}\n{{Newpageresource}} into {{cat header\|.*?}} Note: instead of \n use a more general space & newline term - maybe [[:space:]]?
  • change {{Newpageresource}}\n{{Putinthiscategory}} to {{Newpageresource}}, then manually merge those templates

Notes:

  • Be sensitive to variations in spelling - some people don't like it if their spellings are "corrected" from American to British forms, or vice-versa. - (Can we use a dictionary that accepts both/all regional spellings?)

Simple search and replace

Replace:

  • [[laptop: with [[OLPC:

Useful bots

Other bots we could use:

Cookies help us deliver our services. By using our services, you agree to our use of cookies.