Jump to content

User:Seefooddiet/AWB explanation

From Wikipedia, the free encyclopedia

This page explains my Wikipedia:AutoWikiBrowser scripts. Note that I manually review every individual change, and often manually adjust each edit. I will sometimes make mistakes. If you have concerns please post on my talk page.

The script has several thousand lines of code, some of which are only rarely active, so I won't be able to explain everything it does. I also add code basically every time I use the program.

Reference formatting

[edit]
  • Tags Korea-related unreliable sources with {{Unreliable source?}} (WP:KO/RS)
  • Wikilink publications in references (limited to North Korean, South Korean, and Japanese sources for now)
  • If a |title= is in Korean, I change the parameter to |script-title=ko: (MOS:KO-REF)
    • Note that this affects how Korean text is rendered (Template:Citation Style documentation/title), so it's permissible to make with AWB. However, if there's only one or two of this type of change on a page I often just skip to avoid history bloat.
  • If an entire Hangul name is squeezed into the |last= parameter, it splits it into |last=... |first=...
  • Changes |language=kr (Kanuri language) to |language=ko
  • Deletes non-essential elements of titles and publication names, e.g. everything after "Article title" here: |title=Article title {{!}} 38 North: Informed Analysis of North Korea
  • Fixes if |last= and |first= parameters are flipped
  • Deletes non-people names in |last= and |first= parameters
    • E.g. |last=JoongAng |first=Ilbo; this is the name of a newspaper (JoongAng Ilbo)
    • E.g. |last=기자 |first=박정현|last=박 |first=정현 "기자" means "reporter"
  • If page range is placed incorrectly in |p=, replaces parameter with |pp=. Vice versa for single pages.

Article body adjustments

[edit]
  • Standardizes spelling of terminology to match guidelines in MOS:KO and WP:NCKO; standardized spelling is generally the most relevant current article title (WP:KO-CONSISTENT)
    • Have coded in around a thousand of these kinds of adjustments. E.g. "Rhee Syngman" → "Syngman Rhee"
  • Converts hyphens (-) and tildes (~) for number/date ranges to the endash (–) (MOS:DASH, MOS:KO-TILDE)
  • Converts curly quotes and apostrophes to straight variants (MOS:')
  • Changes many unnecessary redirects to direct links (MOS:NOPIPE)
    • As this is a non-visible change, I skip pages where this is the only change
  • Merges some place links when possible, discourages linking of "North Korea" and "South Korea" (MOS:GEOLINK)
  • Adjusts some frequent incorrect or poor prose
    • E.g. verbose phrases like "Seoul City" instead of just "Seoul"
  • Some invisible template formatting (avoiding the use of template redirects, deleting several common empty params, using named parameters instead of skipping positional ones, moving parameters around to more common ordering); skip if only change

Korean text formatting

[edit]
  • Wraps bare Korean text using {{Korean}} (MOS:NON-ENG, MOS:HANGULFORMAT)
    • E.g. [[Korean language|Korean]]: 식당{{Korean|hangul=식당}}
    • E.g. {{Korean|hangul=식당}} [[Hanja]]: 食堂{{Korean|hangul=식당|hanja=食堂}}
    • E.g. {{Korean|hangul=식당}}; {{literally|restaurant}}{{Korean|hangul=식당|lit=restaurant}}
  • Discourages the use of links to Wiktionary for Korean characters (MOS:KO-WIKT)
  • Converts direct links to the Korean Wikipedia to {{Interlanguage link}}, e.g. [[:ko:식당|sikdang]]{{ill|sikdang|ko|식당}} and sikdang ([[:ko:식당|식당]]){{ill|sikdang|ko|식당}}(MOS:KO-WIKILINK)
  • Discourages bolding or italicization of Korean characters (MOS:HANGULBOLD)

Infobox adjustments

[edit]

Talk banner page

[edit]

I have a simple script that adds {{WikiProject Korea}} to the talk page of articles if not already present.