{"id":49,"date":"2005-12-16T11:25:00","date_gmt":"2005-12-16T11:25:00","guid":{"rendered":"http:\/\/marcoratto.co.uk\/blog\/?p=49"},"modified":"2005-12-16T11:25:00","modified_gmt":"2005-12-16T11:25:00","slug":"tutto-citta","status":"publish","type":"post","link":"https:\/\/marcoratto.it\/blog\/general\/tutto-citta\/","title":{"rendered":"Tutto Citt\u00e0"},"content":{"rendered":"<p>Vi ricordate l&#8217;unica cosa utile che veniva data insieme alle Pagine Gialle ?<br \/><span style=\"font-weight: bold;\">Il Tutto Citt\u00e0 !!!<\/span><br \/>Finalmente sono disponibili via web in formato pdf sul sito di <a href=\"http:\/\/mappe.virgilio.it\/tc\/carta\/index.jsp\" target=\"_new\">Virgilio<\/a>.<br \/>Utilizzate Linux e le volete scaricare tutte ?<br \/>Potete utilizzare il seguente script <span style=\"font-style:italic;\">&#8220;scaricaTuttoCitta.sh&#8221;<\/span>:<br \/><code><br \/>#!\/bin\/sh<br \/>ELENCO_FILE=elenco.html<br \/>ELENCO_URL=http:\/\/mappe.virgilio.it\/tc\/carta\/index.jsp<br \/>if [ \"$http_proxy\" != \"\" ]<br \/>then<br \/>echo \"http_proxy... $http_proxy\"<br \/>fi<br \/>if [ ! -f $ELENCO_FILE ]<br \/>then<br \/>wget -q -O $ELENCO_FILE \"$ELENCO_URL\"<br \/>RET_CODE=$?<br \/>if [ $RET_CODE -ne 0 ]<br \/>then<br \/>echo \"ERRORE: Il comando wget non riesce a scaricare il file $ELENCO_FILE!\"<br \/>exit 1<br \/>fi<br \/>fi<br \/>if [ ! -f $LENCO_FILE]<br \/>then<br \/>echo \"ERRORE: Il file $ELENCO_FILE non esiste!\"<br \/>exit 1<br \/>fi<br \/>cat $ELENCO_FILE | grep -i option | grep -v -i selected | sed 's\/^.*&lt;option value=\"\/\/g' | sed 's\/\"&gt;.*$\/\/g' | sed 's\/^index.jsp?citta=\/\/g' | while read COMUNE<br \/>do<br \/>COMUNE_SENZA_SPAZI=`echo \"$COMUNE\" | tr \" \" \"_\"`<br \/>COMUNE_FILE=\"$COMUNE_SENZA_SPAZI.HTML\"<br \/>COMUNE_DIR=\"$COMUNE_SENZA_SPAZI\"<br \/>COMUNE_TAR=$COMUNE_SENZA_SPAZI.tar.bzip2<br \/>echo \"Download $COMUNE...\"<br \/>if [ ! -d $COMUNE_DIR ]<br \/>then<br \/>wget -q -O $COMUNE_FILE \"http:\/\/mappe.virgilio.it\/tc\/carta\/scarica.jsp?citta=$COMUNE\"<br \/>if [ -f $COMUNE_FILE ]<br \/>then<br \/>cat $COMUNE_FILE | grep -i href | grep -i .zip | sed 's\/^.*&lt;a href=\"\/\/g' | sed 's\/\"&gt;.*$\/\/g' | while read ZIP_URL<br \/>do<br \/>ZIP_FILE=`basename $ZIP_URL`<br \/>wget -P $COMUNE_DIR $ZIP_URL<br \/>unzip -o -d $COMUNE_DIR -j $COMUNE_DIR\/$ZIP_FILE<br \/>rm -f $COMUNE_DIR\/$ZIP_FILE<br \/>done<br \/>rm -f $COMUNE_FILE<br \/>fi<br \/>fi<br \/>if [ ! -f $COMUNE_TAR ]<br \/>then<br \/>tar cvjf $COMUNE_TAR $COMUNE_DIR<br \/>fi<br \/>done<br \/>if [ -f $ELENCO_FILE ]<br \/>then<br \/>rm -f $ELENCO_FILE<br \/>fi<br \/><\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Vi ricordate l&#8217;unica cosa utile che veniva data insieme alle Pagine Gialle ?Il Tutto Citt\u00e0 !!!Finalmente sono disponibili via web in formato pdf sul sito di Virgilio.Utilizzate Linux e le volete scaricare tutte ?Potete utilizzare il seguente script &#8220;scaricaTuttoCitta.sh&#8221;:#!\/bin\/shELENCO_FILE=elenco.htmlELENCO_URL=http:\/\/mappe.virgilio.it\/tc\/carta\/index.jspif [ &#8220;$http_proxy&#8221; != &#8220;&#8221; ]thenecho &#8220;http_proxy&#8230; $http_proxy&#8221;fiif [ ! -f $ELENCO_FILE ]thenwget -q -O $ELENCO_FILE &#8220;$ELENCO_URL&#8221;RET_CODE=$?if [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/marcoratto.it\/blog\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marcoratto.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marcoratto.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marcoratto.it\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/marcoratto.it\/blog\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":0,"href":"https:\/\/marcoratto.it\/blog\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"wp:attachment":[{"href":"https:\/\/marcoratto.it\/blog\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marcoratto.it\/blog\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marcoratto.it\/blog\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}