Hitchwiki / hitchwiki

The Hitchhiker's Guide to Hitchhiking the World
https://hitchwiki.org
32 stars 9 forks source link

Migrating old contents #69

Closed simison closed 4 years ago

simison commented 9 years ago

We'll need to migrate current wiki articles into a new format (semantic stuff) and merge hitchwiki maps into the wiki.

{{Infobox Country
|in = 
|map =
|language = 
|capital = 
|pop = 
|currency = 
|hitch = 
|hitchbase = 
|avp = 
|links =
|paved = 
|BW =
}}

And this stuff in Template:Infobox_Location:

{{Infobox Location
|name = 
|name_native = 
|symbol = 
|country = 
|state = 
|state_symbol = 
|subdivision_type = 
|subdivision_name = 
|subdivision_symbol = 
|region = 
|region_symbol = 
|subdivision2_type = 
|subdivision2_name = 
|subdivision2_symbol = 
|map = 
|pop = 
|plate = 
|roads = 
|hitchbase = 
|links = 
}}

...most of it we can get for Geonames anyway, though.

omelnyk commented 9 years ago

https://gist.github.com/anonymous/478d83dddd6c780e9e34 Latest version. At this point every bug becomes a feature ;)

omelnyk commented 7 years ago

Necessary article migration script improvements for each processed article:

See also #78 #121

omelnyk commented 7 years ago

Ideas to keep bot fail-proof:

omelnyk commented 7 years ago

Idea: possibly use OrderedDict to preserve logical order of the fields in the generated templates.

omelnyk commented 7 years ago

Spot migration necessary improvements:

simison commented 7 years ago

not trivial as our country names sometimes differ from Geodata's

Perhaps that iso-code added to countries would help at that point, though?

I'd just keep it simple. Get countryname from the geodata -> check if article exists with that name -> add it to point. Otherwise leave empty? A few "USA/Russian federation" if/elses to capture most common weirdos.

omelnyk commented 7 years ago

To do (based on on last night's beta deployment issues):

omelnyk commented 7 years ago

Use {{City}} template


+++ @@ -1,10 +1,16 @@ -{{Infobox Location -|country = Morocco -|state = Meknès-Tafilalet -|pop = 95 265 -}} +{{City +|MajorRoads= +|Countries=Morocco +|Introduction=

''Errachidia''' is a very relaxed city in the southeast of [[Morocco]]. Many tourists pass by here on their way to Merzouga, but Errachidia itself is not very touristy. + +|LicencePlate= +|Location=31.9314,-4.42663 +|Population=0 +|AdministrativeDivision=Drâa-Tafilalet +|Bbox=-4.4768859,31.9077638,-4.3753052,31.9623573 +}}

== Hitchhiking out ==

Page [[Errachidia]] saved

omelnyk commented 7 years ago

aka "the neverending task" :)

simison commented 7 years ago

remove tables created by extensions we don't use anymore

We can do this manually.