Help Wikitravel grow by contributing to an article! Learn how.

Difference between revisions of "User talk:Mark"

From Wikitravel
Jump to: navigation, search
(Map generating error)
(Map generating error)
Line 118: Line 118:
  
 
:First, are you using the newest version from Gitorious?  In any case I can certainly run my copy for you against the config in the Image tag if you like.  -- [[User:Mark|Mark]] 14:38, 27 September 2009 (EDT)
 
:First, are you using the newest version from Gitorious?  In any case I can certainly run my copy for you against the config in the Image tag if you like.  -- [[User:Mark|Mark]] 14:38, 27 September 2009 (EDT)
 +
 +
:OK, here's my run with the most current version:
 +
 +
<code>
 +
mark@trane:~/share/WTP                                                                                                                                     
 +
$ make Config.mk ARTICLE=Copenhagen/Østerbro
 +
echo ARTICLE = Copenhagen/Østerbro > Config.mk
 +
make: `Config.mk' is up to date.             
 +
mark@trane:~/share/WTP                       
 +
$ cat Config.mk                                                                                                                                             
 +
ARTICLE = Copenhagen/Østerbro                                                                                                                               
 +
mark@trane:~/share/WTP                                                                                                                                     
 +
$ make
 +
wget -q -O - http://wikitravel.org/en/Special:Export?pages=Copenhagen/Østerbro > article.xml
 +
xmlstarlet sel -N mw=http://www.mediawiki.org/xml/export-0.3/ -t -v "/mw:mediawiki/mw:page/mw:revision/mw:text" article.xml | xmlstarlet unesc > article.wiki
 +
echo '<listings>' > listings-all.xml                                                                                                                       
 +
sed 's/&/\&amp;/g' < article.wiki >> listings-all.xml                                                                                                       
 +
echo '</listings>' >> listings-all.xml                                                                                                                     
 +
echo > rels.xml                                                                                                                                             
 +
wget -q -O - "http://openstreetmap.org/api/0.6/relation/270363/full" > relation.xml                                                                         
 +
wget -q -O - "http://www.openstreetmap.org/api/0.6/map?bbox=12.5412851700452,55.68520668,12.608961044,55.71842802" > data.osm                               
 +
xmlstarlet sel -T -t -m "//node/tag[@k='name']"  -v @v -n data.osm > namednodes.txt                                                                         
 +
xmlstarlet sel -T -t -m "//way/tag[@k='name']"  -v @v -n data.osm >> namednodes.txt                                                                         
 +
xmlstarlet sel -T -t -m "//node/tag[@k='name:en']"  -v @v -n data.osm >> namednodes.txt                                                                     
 +
xmlstarlet sel -T -t -m "//way/tag[@k='name:en']"  -v @v -n data.osm >> namednodes.txt                                                                     
 +
xmlstarlet sel -T -t -m '/listings' -m 'see|do|buy|eat|drink|sleep' -v @name -n listings-all.xml > listings.txt                                             
 +
grep -vx -f namednodes.txt listings.txt > unmatched.txt || /bin/true                                                                                       
 +
xmlstarlet ed -d "`sh listfilter.sh | sed -e 's/_/ /g' -e 's/\"/\\\"/g'`" listings-all.xml > listings.xml                                                   
 +
xmlstarlet tr icon_rules.xsl \                                                                                                                             
 +
                -s border="Copenhagen/Østerbro" \                                                                                                           
 +
                -s listingsPlacement="auto" \                                                                                                               
 +
                -s expandForListings="yes" \                                                                                                               
 +
                -s minOffset="65" \                                                                                                                         
 +
                -s orientation="landscape" \                                                                                                               
 +
                -s size="two-page" \                                                                                                                       
 +
                listings.xml > wikitravel-print-rules.xml 2> icon_rules.log                                                                                 
 +
xmlstarlet tr --net osmarender.xsl wikitravel-print-rules.xml > map.svg 2> osmarender.log                                                                   
 +
wget -q -O - http://wikitravel.org/shared/Image:Copenhagen_Østerbro_overlay.svg > overlay_page.html                                                         
 +
cp overlay_base.svg overlay.svg                                                                                                                             
 +
echo '<listings>' > unmatched.xml                                                                                                                           
 +
sed 's/.*/<listing>&<\/listing>/' unmatched.txt >> unmatched.xml                                                                                           
 +
echo '</listings>' >> unmatched.xml                                                                                                                         
 +
xmlstarlet tr unmatched.xsl map.svg > unmatched.svg                                                                                                         
 +
xmlstarlet tr listings_box.xsl \                                                                                                                           
 +
                -s orientation="landscape" \                                                                                                               
 +
                -s size="two-page" \                                                                                                                       
 +
                -s rulesfile="wikitravel-print-rules.xml" \                                                                                                 
 +
                -s listingsPlacement="auto" \                                                                                                               
 +
                -s boxWidth="70" \                                                                                                                         
 +
                -s box1X="" \                                                                                                                               
 +
                -s box1Y="" \                                                                                                                               
 +
                -s box1Height="" \                                                                                                                         
 +
                -s box2X="" \                                                                                                                               
 +
                -s box2Y="" \                                                                                                                               
 +
                -s box2Height="" \                                                                                                                         
 +
                -s box3X="" \                                                                                                                               
 +
                -s box3Y="" \                                                                                                                               
 +
                -s box3Height="" \                                                                                                                         
 +
                -s box4X="" \                                                                                                                               
 +
                -s box4Y="" \                                                                                                                               
 +
                -s box4Height="" \                                                                                                                         
 +
                listings.xml > listings.svg 2> listings_box.log                                                                                             
 +
cat listings.svg | gzip > Copenhagen_Østerbro_map_with_listings.svgz                                                                                       
 +
# For some reason Make clobbers inkscape's memory footprint so background this                                                                             
 +
killall inkscape || /bin/true # sorry, one inkscape at a time                                                                                               
 +
inkscape: no process killed                                                                                                                                 
 +
echo "cd /home/mark/share/WTP && "/usr/bin/inkscape -z --export-png=listings.png -w 3460 -h 3008 listings.svg"" | at now                                   
 +
warning: commands will be executed using /bin/sh                                                                                                           
 +
job 48 at Sun Sep 27 20:47:00 2009                                                                                                                         
 +
sleep 15                                                                                                                                                   
 +
while pidof inkscape ; do sleep 15 ; done                                                                                                                   
 +
5824                                                                                                                                                       
 +
5824                                                                                                                                                       
 +
5824                                                                                                                                                       
 +
5824                                                                                                                                                       
 +
echo -n > index.scm                                                                                                                                         
 +
echo '(define filename "listings.png" )' >> index.scm                                                                                                       
 +
echo '(define outfile "Copenhagen_Østerbro_map_with_listings.png" )' >> index.scm                                                                           
 +
echo '(define img (car (file-png-load 1 filename filename ) ) )' >> index.scm                                                                               
 +
echo '(gimp-image-convert-indexed img 0 0 64 0 1 "none" )' >> index.scm                                                                                     
 +
echo '(file-png-save-defaults 1 img 2 outfile outfile )' >> index.scm                                                                                       
 +
echo '(gimp-quit 1 )' >> index.scm                                                                                                                         
 +
gimp -i -c -d -b - < index.scm >/dev/null 2>&1                                                                                                             
 +
!!! WARNING !!! There are unmatched listings in this article!                                                                                               
 +
Den Lille Havfrue
 +
Nyboder
 +
Trekroner Fortet
 +
Park bio
 +
Parken Stadium
 +
Østre Gasværk
 +
Casablanca
 +
Langelinie outlet
 +
Moshi Moshi
 +
Normann Copenhagen
 +
Paustian
 +
Rambow
 +
Charlottehaven Cafe
 +
Crazy Chicken
 +
Sundet
 +
Restauranten, Sejlklubben Frem
 +
Den Franske Café
 +
Hos Fischer
 +
Romarin
 +
Wokshop
 +
Øbro Spisehus
 +
No 1
 +
Auberge
 +
Le Saint Jacques
 +
Restaurant Paustian
 +
Café Bopa
 +
Café Pixie
 +
Dag H
 +
Docken
 +
Figaro Bistrot Vinbar
 +
Kruts Karport
 +
Park café
 +
Hotel Rye
 +
Østerport Hotel
 +
Rent my Home
 +
The Laundromat Café
 +
play -q bell.ogg
 +
</code>
 +
 +
So it looks like we're in pretty good shape.  You'll want to add the listings to OSM, but that's just busy-work the rest is good -- ~~~~

Revision as of 18:55, 27 September 2009

Contents

This edit is probably a spambot

Silly spambot... -- Mark 08:16, 20 April 2006 (EDT)

Archive

I've bumped most of the older conversations which were here to User:Mark/Archive.


Manual for administrators

For once Wikitravel actually does have somewhat of an interwiki policy discussion, on the topic of administrator "guidelines" for dealing with unwanted edits; while we have pretty clear consensus exists here, it is lacking across language versions. I think you are a bit of an expert on this issue, and would appreciate it if you would have a look at the discussion. Thanks! --Peter Talk 22:40, 1 August 2007 (EDT)

Thanks for the heads-up! -- Mark 16:03, 3 August 2007 (EDT)
Opps, that link doesn't seem to go to a discussion. -- Mark 16:19, 3 August 2007 (EDT)
Whoops, I think I've got it right now. --Peter Talk 19:10, 3 August 2007 (EDT)

Chicago/West Side

I'd like to split the West Side - I'm thinking about moving Wicker Park, Ukrainian Village, Logan Square, and Bucktown to their own article. Any recommendations for what such an article might be called? I've seen "West Town" used as a designation before, but I'm not sure what that's supposed to cover. (Thought I'd ask your opinion because of the Innertown/Tuman's reference on the Talk page.) Gorilla Jones 17:20, 12 August 2007 (EDT)

West Town works, or at least it used to. Thing is that West Town would also include everything north of Grand avenue and everything east of Humbolt Park (the park), so it's a slightly bigger chunk. I think it could be argued that it's a better chunk to cut out though, since you can include the small Wishbone and Betty's. -- Mark 18:59, 12 August 2007 (EDT)

Barnstar

Thanks! In all my wikidays, that's the first barnstar I've received, a moment of pride. Gorilla Jones 18:19, 5 September 2007 (EDT)

Bridgeport

By all means, get that listing. I am a great fan of old-man bars. Gorilla Jones 23:08, 11 September 2007 (EDT)

Hotels in Paris

Hello. I was visiting the wikipedia articles on Paris because i will visit the town and i llok for a hotel. Thus i discovered your wonderful looking maps which you created on the parisian arrondissements. Allow me one question: what criterias have you chosen when you mapped the hotels, restaurants etc.? --85.179.103.77 17:07, 9 November 2007 (EST)

Just whatever was in the guide at the time. I'm in the process of switching to OpenStreetMap which will allow us to keep it up-to-date easier. -- Mark 14:22, 21 March 2008 (EDT)

Thanks

Thanks for the info. I read the phone numbers help page and I guess I had a hard time disiphering it. From now on I'll make sure to use the tips you gave me. CarsonR

Data dumps

Hi Mark, I remember seeing long ago that you grabbed regular copies of Wikitravel content for back up. Are you still doing this? And if so, are you doing it for all language versions? Since IB won't release its data dumps (or even respond to questions of why they won't), I do occasionally have nightmares of massive amounts of work being lost! --Peter Talk 00:38, 26 August 2008 (EDT)

COTM - Copenhagen

Hey Mark, please take a look over at the Collaboration of Month Nomination page, and the Copenhagen entry. Also I'd really like some comments whether you'd be willing (and able) to help with lending a hand with your expertise on importing data from openstreetmap.org... Kind regards - Sertmann 17:38, 6 November 2008 (EST)

Map generating error

sertmann@sertmann-laptop:~/Documents/maps/osterbro$ make
wget -q -O - http://wikitravel.org/en/Special:Export?pages=Copenhagen/Østerbro > article.xml
xmlstarlet sel -N mw=http://www.mediawiki.org/xml/export-0.3/ -t -v "/mw:mediawiki/mw:page/mw:revision/mw:text" article.xml | xmlstarlet unesc > article.wiki
echo '<listings>' > listings-all.xml
sed 's/&/\&/g' < article.wiki >> listings-all.xml
echo '</listings>' >> listings-all.xml
echo > rels.xml
wget -q -O - "http://openstreetmap.org/api/0.6/relation/270363/full" > relation.xml
wget -q -O - "http://www.openstreetmap.org/api/0.6/map?bbox=12.5412851700452,55.68520668,12.608961044,55.71842802" > data.osm
xmlstarlet tr icon_rules.xsl \
-s border="Copenhagen/Østerbro" \
-s listingsPlacement="auto" \
-s expandForListings="yes" \
-s minOffset="65" \
-s orientation="landscape" \
-s size="two-page" \
listings.xml > wikitravel-print-rules.xml 2> icon_rules.log
make: *** [wikitravel-print-rules.xml] Error 6
make: *** Deleting file `wikitravel-print-rules.xml'

icon_rules.log:

warning: failed to load external entity "listings.xml"
unable to parse listings.xml

Config.mk:

################### SETTINGS ######################
# The name of the article in Wikitravel
ARTICLE = Copenhagen/Østerbro

# The name of the border way in OSM
# this is specified in OSM with a name tag
BORDER = Copenhagen/Østerbro

# The parent place in OSM
# this is specifed in OSM with an Is_In tag
IS_IN = "Demmark

# ORIENTATION can be either "landscape" or "portrait"
ORIENTATION = landscape

# SIZE can be "one-page" or "two-page"
SIZE = two-page

# Do you want a bell to ring when everything is done? (yes or no)
BELL = no

# How should the listings boxes be placed (manual or auto )
LISTINGS_PLACEMENT = manual

# If using auto listings placement should expand the map to fit them?
# ( yes or no )
EXPAND_FOR_LISTINGS = no

Wikitravel Image:

Image:Oesterbro_map.png
thumb
350px 
border=Copenhagen/Østerbro
is_in=Copenhagen
expand_for_listings=yes
relid=270363
Map of Østerbro

Openstreetmap relation:

http://www.openstreetmap.org/browse/changeset/2560727


Anything you can help with? --Stefan (sertmann) Talk 08:43, 27 September 2009 (EDT)

First, are you using the newest version from Gitorious? In any case I can certainly run my copy for you against the config in the Image tag if you like. -- Mark 14:38, 27 September 2009 (EDT)
OK, here's my run with the most current version:

mark@trane:~/share/WTP $ make Config.mk ARTICLE=Copenhagen/Østerbro echo ARTICLE = Copenhagen/Østerbro > Config.mk make: `Config.mk' is up to date. mark@trane:~/share/WTP $ cat Config.mk ARTICLE = Copenhagen/Østerbro mark@trane:~/share/WTP $ make wget -q -O - http://wikitravel.org/en/Special:Export?pages=Copenhagen/Østerbro > article.xml xmlstarlet sel -N mw=http://www.mediawiki.org/xml/export-0.3/ -t -v "/mw:mediawiki/mw:page/mw:revision/mw:text" article.xml | xmlstarlet unesc > article.wiki echo '<listings>' > listings-all.xml sed 's/&/\&/g' < article.wiki >> listings-all.xml echo '</listings>' >> listings-all.xml echo > rels.xml wget -q -O - "http://openstreetmap.org/api/0.6/relation/270363/full" > relation.xml wget -q -O - "http://www.openstreetmap.org/api/0.6/map?bbox=12.5412851700452,55.68520668,12.608961044,55.71842802" > data.osm xmlstarlet sel -T -t -m "//node/tag[@k='name']" -v @v -n data.osm > namednodes.txt xmlstarlet sel -T -t -m "//way/tag[@k='name']" -v @v -n data.osm >> namednodes.txt xmlstarlet sel -T -t -m "//node/tag[@k='name:en']" -v @v -n data.osm >> namednodes.txt xmlstarlet sel -T -t -m "//way/tag[@k='name:en']" -v @v -n data.osm >> namednodes.txt xmlstarlet sel -T -t -m '/listings' -m 'see|do|buy|eat|drink|sleep' -v @name -n listings-all.xml > listings.txt grep -vx -f namednodes.txt listings.txt > unmatched.txt || /bin/true xmlstarlet ed -d "`sh listfilter.sh | sed -e 's/_/ /g' -e 's/\"/\\\"/g'`" listings-all.xml > listings.xml xmlstarlet tr icon_rules.xsl \

               -s border="Copenhagen/Østerbro" \                                                                                                            
               -s listingsPlacement="auto" \                                                                                                                
               -s expandForListings="yes" \                                                                                                                 
               -s minOffset="65" \                                                                                                                          
               -s orientation="landscape" \                                                                                                                 
               -s size="two-page" \                                                                                                                         
               listings.xml > wikitravel-print-rules.xml 2> icon_rules.log                                                                                  

xmlstarlet tr --net osmarender.xsl wikitravel-print-rules.xml > map.svg 2> osmarender.log wget -q -O - http://wikitravel.org/shared/Image:Copenhagen_Østerbro_overlay.svg > overlay_page.html cp overlay_base.svg overlay.svg echo '<listings>' > unmatched.xml sed 's/.*/&<\/listing>/' unmatched.txt >> unmatched.xml echo '</listings>' >> unmatched.xml xmlstarlet tr unmatched.xsl map.svg > unmatched.svg xmlstarlet tr listings_box.xsl \ -s orientation="landscape" \ -s size="two-page" \ -s rulesfile="wikitravel-print-rules.xml" \ -s listingsPlacement="auto" \ -s boxWidth="70" \ -s box1X="" \ -s box1Y="" \ -s box1Height="" \ -s box2X="" \ -s box2Y="" \ -s box2Height="" \ -s box3X="" \ -s box3Y="" \ -s box3Height="" \ -s box4X="" \ -s box4Y="" \ -s box4Height="" \ listings.xml > listings.svg 2> listings_box.log cat listings.svg | gzip > Copenhagen_Østerbro_map_with_listings.svgz # For some reason Make clobbers inkscape's memory footprint so background this killall inkscape || /bin/true # sorry, one inkscape at a time inkscape: no process killed echo "cd /home/mark/share/WTP && "/usr/bin/inkscape -z --export-png=listings.png -w 3460 -h 3008 listings.svg"" | at now warning: commands will be executed using /bin/sh job 48 at Sun Sep 27 20:47:00 2009 sleep 15 while pidof inkscape ; do sleep 15 ; done 5824 5824 5824 5824 echo -n > index.scm echo '(define filename "listings.png" )' >> index.scm echo '(define outfile "Copenhagen_Østerbro_map_with_listings.png" )' >> index.scm echo '(define img (car (file-png-load 1 filename filename ) ) )' >> index.scm echo '(gimp-image-convert-indexed img 0 0 64 0 1 "none" )' >> index.scm echo '(file-png-save-defaults 1 img 2 outfile outfile )' >> index.scm echo '(gimp-quit 1 )' >> index.scm gimp -i -c -d -b - < index.scm >/dev/null 2>&1  !!! WARNING !!! There are unmatched listings in this article! Den Lille Havfrue Nyboder Trekroner Fortet Park bio Parken Stadium Østre Gasværk Casablanca Langelinie outlet Moshi Moshi Normann Copenhagen Paustian Rambow Charlottehaven Cafe Crazy Chicken Sundet Restauranten, Sejlklubben Frem Den Franske Café Hos Fischer Romarin Wokshop Øbro Spisehus No 1 Auberge Le Saint Jacques Restaurant Paustian Café Bopa Café Pixie Dag H Docken Figaro Bistrot Vinbar Kruts Karport Park café Hotel Rye Østerport Hotel Rent my Home The Laundromat Café play -q bell.ogg </code> So it looks like we're in pretty good shape. You'll want to add the listings to OSM, but that's just busy-work the rest is good -- ~~~~

Variants

Actions

Destination Docents

In other languages