mediawiki_import.sh

#!/bin/bash

# Author: Vincenzo D'Amore
# Date: 24 May 2011
# VQWiki -> MediaWiki import script

IMPORT_TMP=/tmp/wiki-import/
SOURCE_DIR=/var/www/vqwiki/

mkdir $IMPORT_TMP
find $SOURCE_DIR -name \*.txt | xargs -I{} ./patch_vqwiki.pl {} $IMPORT_TMP $SOURCE_DIR

find $IMPORT_TMP -type f | xargs -I{} php importTextFile.php {}

php importImages.php --extensions=png $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=jpg $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=jpeg $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=gif $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=zip $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=doc $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=pdf $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=rtf $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=zip $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=xls $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=xlsx $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=xml $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=ppt $SOURCE_DIR/upload/jsp/
php importImages.php --extensions=docx $SOURCE_DIR/upload/jsp/

  1. Non c'è ancora nessun commento.
  1. No trackbacks yet.

Lascia un commento

Effettua il login con uno di questi metodi per inviare il tuo commento:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger cliccano Mi Piace per questo: