This translation is older than the original page and might be outdated.
Translations of this page?:

Exportation de pages multiples en HTML

Offline Doku

Pour exporter des pages multiples ou des espaces de noms complets utilisez ce package nommé ”offline-doku” écrit par Pavel Shevaev.

Malheureusement offline-doku ne manipule pas le contenu du plugin correctement. Quelqu'un a t'il une solution ?
Le script de Pavel nécessite PHP>4.3, pour ceux qui ne veulent pas passer à une version supérieure de PHP modifiez la ligne 46 du code de la façon suivante :

changez :

$tokens = $parser->parse (file_get_contents ($file)); 

en :

$fp = fopen ($file, "rb" ») ;
$buffer = fread ($fp, filesize ($file));
fclose ($fp) ;
$tokens = $parser->parse ($buffer) ;

Pavuk

Voici un exemple en ligne de commande Pavuk pour exporter toutes les pages:

pavuk -dont_leave_site -noRobots -index_name "index.html" -httpad "+X_DOKUWIKI_DO: export_xhtml" -cookie_file cookies.txt -cookie_send -skip_rpattern "(.*\?do=(diff|revisions|backlink|index|export_.*))|feed\.php.*" -tr_chr_chr "?&*:" _ -post_update -fnrules F "*" "%h/%d/%b%E" http://www.dokuwiki.org

Changez simplement l'URL à la fin de la commande. En outre, cette commande manipule les restrictions ACL en utilisant un cookie. Copiez le fichier “cookies.txt” dans le profil de votre navigateur web pour autoriser la procédure de connexion du script avec vos qualifications.

Bash

Un script bash pour exporter toutes les pages en utilisant l'option export_xhtmlbody:

#!/bin/bash
 
#Dokuwiki Export 0.1 - by Venator85 (venator85[at]gmail[dot]com)
#Warning: Dokuwiki´s URL rewrite must be turned OFF for this to work, otherwise change line 27 accordingly
 
#USAGE:
# Save this script in an empty dir and run it from a shell:
# sh whatever.sh
 
FTP_DOKU_PATH="ftp://ftp.wesavetheworld.com/dokuwiki" # No trailing slashes!
FTPUSER="albert_einstein"
FTPPASS="emc2"
 
HTTP_DOKU_PATH="http://www.wesavetheworld.com/dokuwiki" # No trailing slashes!
 
wget --ftp-user=$FTPUSER --ftp-password=$FTPPASS --recursive --no-host-directories --cut-dirs=2 "$FTP_DOKU_PATH/data/pages/"
 
SLASH='/'
COLON=':'
mkdir "./exported"
for i in `find pages/ -type f`
do
	PAGE=${i#"pages/"}
	PAGE=${PAGE%".txt"}
	PAGE=${PAGE//$SLASH/$COLON}
 
	wget -O - "$HTTP_DOKU_PATH/doku.php?do=export_xhtmlbody&id=$PAGE" > "./exported/$PAGE.htm"
done

Credits

If you create, translate or modify whole or part of this page, add your name and your email here. *Philippe LAPEYRIE

 
fr/tips/export_html.txt · Last modified: 2008/08/13 17:34 by laynee
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Imprint Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
WikiForumIRCBugsGitXRefTranslate