<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl
#
# dcppt.pl - PowerPoint 逕ｨ HTML 菴懈�繧ｹ繧ｯ繝ｪ繝励ヨ
#
    @MAINTAINERS = ('Yasuhiro MORIKAWA &lt;morikawa��gfd-dennou.org&gt;',
		   );
    $UPDATE      = '$Date: 2015/01/09 09:23:15 $';
    $VERSION     = '$Revision: 1.4 $';
    $URL         =
    'http://www.gfd-dennou.org/library/cc-env/dcppt/SIGEN.htm';
#
#== 讎りｦ�
#
# PowerPoint 縺九ｉ菴懈�縺励◆ PNG(縺ｪ縺ｩ縺ｮ) 逕ｻ蜒冗ｾ､繧定ｦ九ｄ縺吶＞
# 繧ｹ繝ｩ繧､繝牙ｽ｢蠑�, 縺翫ｈ縺ｳ繧ｵ繝�繝阪う繝ｫ蠖｢蠑上� HTML 繧剃ｽ懈�縺吶ｋ繧ｹ繧ｯ繝ｪ繝励ヨ
#
#== 菴ｿ逕ｨ豕�
#
# $ dcppt.pl -r 縺ｨ縺吶ｋ縺薙→. 蜃ｺ蜉帙′髟ｷ縺��縺ｧ繝代う繝励〒繝壹�繧ｸ繝｣縺ｫ貂｡縺吶→
# 濶ｯ縺�〒縺励ｇ縺�. 萓�) $ dcppt.pl -r | jless
#
#
#== 繝舌げ?
#
# * Page 001, Page 002 縺ｯ縺�ｉ縺ｪ縺�°繧�
#
#== 螻･豁ｴ
#
# 莉･荳九�繧ｨ繝ｳ繝医Μ縺ｯ CVS 縺ｮ繧ｳ繝溘ャ繝医Ο繧ｰ繧貞�縺ｫ, CVS 縺ｫ繧医▲縺ｦ閾ｪ蜍慕噪縺ｫ逕滓�
# 縺輔ｌ縺ｾ縺�. 蠕薙▲縺ｦ, 莉･荳九�驛ｨ蛻��蝓ｺ譛ｬ逧�↓謇句虚縺ｧ邱ｨ髮�＠縺ｪ縺�＞繧医≧縺ｫ豕ｨ諢上＠
# 縺ｦ縺上□縺輔＞.  (繝ｭ繧ｰ縺ｮ繝輔か繝ｼ繝槭ャ繝医′縺壹ｌ縺ｦ縺励∪縺｣縺溷�ｴ蜷医↓縺ｯ謇句虚縺ｧ菫ｮ豁｣縺�
# 縺ｦ縺上□縺輔＞).
#
# $Log: dcppt.pl,v $
# Revision 1.4  2015/01/09 09:23:15  murashin
# * fix character encoding name.
#
# * 譁�ｭ励お繝ｳ繧ｳ繝ｼ繝�ぅ繝ｳ繧ｰ蜷阪ｒ逶ｴ縺励◆
#
# Revision 1.3  2015/01/09 09:16:46  murashin
# * use utf-8 for default character encoding instead of euc-jp
# * use Jcode and Getopt::Std instead of jcode.pl and getopts.pl
#
# * 繝�ヵ繧ｩ繝ｫ繝域枚蟄励さ繝ｼ繝峨→縺励※EUC-JP縺ｮ莉｣繧上ｊ縺ｫUTF-8繧剃ｽｿ縺�ｈ縺�↓縺励◆
# * jcode.pl縺ｨgetopts.pl縺ｮ莉｣繧上ｊ縺ｫJcode縺ｨGetopt::Std繧剃ｽｿ縺�ｈ縺�↓縺励◆
#
# Revision 1.2  2006/03/05 03:22:13  morikawa
# * "繧ｹ繝ｩ繧､繝�13.png" 縺ｪ縺ｩ縺ｮ繝輔ぃ繧､繝ｫ蜷阪�閾ｪ蜍慕噪縺ｫ "slide13.png" 縺ｫ謾ｹ蜷阪☆繧�.
# * 繝�ヰ繝�げ繝｡繝�そ繝ｼ繧ｸ縺ｮ蜃ｺ蜉帶婿蠑丈ｿｮ豁｣.
# * 繝輔ぃ繧､繝ｫ蜷阪�譁�ｭ励さ繝ｼ繝峨ｒ菫ｮ豁｣縺吶ｋ繧ｵ繝悶Ν繝ｼ繝√Φ蜀�〒, "." 繧� ".." 繧偵Μ繝阪�
#   繝�縺励ｈ縺�→縺吶ｋ繝舌げ繧剃ｿｮ豁｣. (莉翫∪縺ｧ縺ｯ繝ｪ繝阪�繝�縺後≧縺ｾ縺上＞縺九↑縺��縺ｧ縺溘∪
#   縺溘∪陦ｨ髱｢蛹悶＠縺ｪ縺九▲縺�)
# * Config.dcppt 繧� Emacs 縺ｧ髢九＞縺滄圀, 閾ｪ蜍慕噪縺ｫ cperl-mode 縺ｧ髢九￥繧医≧縺ｫ菫ｮ豁｣.
#
# Initial 2005/08/01
#  * epppt &lt;http://www.ep.sci.hokudai.ac.jp/~morikawa/perl/epppt/SIGEN_PUB.htm&gt;
#    繧� dcppt 縺ｨ謾ｹ蜷阪＠髮ｻ閼ｳ繝��繝ｫ縺ｨ縺励※ cc-env 縺ｫ鄂ｮ縺�.
#

##################################################
#####                                        #####
##                 蛻晄悄險ｭ螳�                    ###
#####                                        #####
##################################################
#
# 譌･譛ｬ隱槫�逅��縺溘ａ, Jcode 繧堤ｵ�∩霎ｼ繧.
use Jcode;

# 繧ｪ繝励す繝ｧ繝ｳ蜃ｦ逅��縺溘ａ, getopts 繧堤ｵ�∩霎ｼ繧.
use Getopt::Std;

# 諠��ｱ貅舌ョ繧｣繝ｬ繧ｯ繝医Μ蜷�
$SRC_DIR = 'src';

# 險ｭ螳壹ヵ繧｡繧､繝ｫ蜷�
$CONFIG_FILE = "$SRC_DIR/Config.dcppt";

# 逕ｻ蜒上し繧､繧ｺ螟画鋤繧ｳ繝槭Φ繝�
$CONVERT = 'convert';
$CONVERT_OPT = '-geometry';

# 繝�ヰ繝�げ繝｢繝ｼ繝�
$DEBUG = 0;

##################################################
#####                                        #####
##                 蠑墓焚隴伜挨                    ###
#####                                        #####
##################################################

# c, d 縺ｮ縺ｿ蠑墓焚繧偵→繧�.
getopts('c:d:vVxrRmMDq');

# 蠑墓焚縺檎┌縺��ｴ蜷医�繝倥Ν繝苓｡ｨ遉ｺ
unless ($opt_x || $opt_c || $opt_d ||
	$opt_v || $opt_V || $opt_r || $opt_R || $opt_m || $opt_M ||
	$opt_D || $opt_q) {
    &amp;Help;
    exit 1;
}
# D 繧ｪ繝励す繝ｧ繝ｳ縺ｮ蝣ｴ蜷医� $DEBUG 繧堤悄縺ｫ
if ($opt_D) {
    $DEBUG = 1;
}
# q 繧ｪ繝励す繝ｧ繝ｳ縺ｮ蝣ｴ蜷医� $QUIET 繧堤悄縺ｫ
if ($opt_q) {
    $QUIET = 1;
} else {
    $QUIET = 0;
}
# 蠑墓焚縺� v 繧� V 縺ｮ蝣ｴ蜷医↓縺ｯ繝舌�繧ｸ繝ｧ繝ｳ諠��ｱ縺�縺題｡ｨ遉ｺ
if ($opt_v || $opt_V) {
    &amp;PrintVersion;
    exit 1;
}
# 蠑墓焚縺� r 繧� R 縺ｮ蝣ｴ蜷医↓縺ｯ README.TXT 繧偵さ繝斐�縺励◆繧ゅ�繧貞�蜉�
if ($opt_r || $opt_R) {
    &amp;PrintReadme;
    exit 1;
}
# 蠑墓焚縺� m 繧� M 縺ｮ蝣ｴ蜷医↓縺ｯ menu.txt 縺ｮ繝�Φ繝励Ξ繝ｼ繝医ｒ蜃ｺ蜉�
if ($opt_m || $opt_M) {
    &amp;PrintMenuTxt("$SRC_DIR/menu.txt", $DEBUG);
    exit 1;
}
# c 繧ｪ繝励す繝ｧ繝ｳ縺ｮ蝣ｴ蜷医� $CONFIG_FILE 螟画峩
if ($opt_c) {
    $CONFIG_FILE = $opt_c;
}

# d 繧ｪ繝励す繝ｧ繝ｳ縺ｮ蝣ｴ蜷医� $SRC_DIR 螟画峩
if ($opt_d) {
    $SRC_DIR = $opt_d;
    # 譛ｫ蟆ｾ縺ｮ "/" 繧呈賜髯､縺励※縺翫￥
    $SRC_DIR =~ s|/+$||;
}

sub Help() {
    print STDOUT &lt;&lt;EOF;
  dcppt.pl:
    USAGE:
      dcppt.pl [-vVrRmM] [-x] [-q] [-c configfile] [-d srcdir] [-D]

    OPTION:
      -v, -V        : 繝舌�繧ｸ繝ｧ繝ｳ繝翫Φ繝舌�繧定｡ｨ遉ｺ
      -r, -R        : README.TXT 繧定｡ｨ遉ｺ
      -m, -M        : menu.txt 繝�Φ繝励Ξ繝ｼ繝医ｒ蜃ｺ蜉�
      -c configfile : 險ｭ螳壹ヵ繧｡繧､繝ｫ繧呈�遉ｺ縺励※螳溯｡�
      -d srcdir     : 逕ｻ蜒上ヵ繧｡繧､繝ｫ鄂ｮ蝣ｴ繧呈欠螳� (繝�ヵ繧ｩ繝ｫ繝医� $SRC_DIR)
      -D            : 繝�ヰ繝�げ繝｢繝ｼ繝� (髢狗匱閠�畑)
      -x            : 螳溯｡� (險ｭ螳壹ヵ繧｡繧､繝ｫ縺ｯ $CONFIG_FILE)
      -q            : 蝠上＞蜷医ｏ縺帷┌縺励〒螳溯｡� (繝�ヵ繧ｩ繝ｫ繝医〒蜃ｦ逅�)

EOF
    &amp;PrintVersion;
}
sub PrintVersion() {
    print STDOUT &lt;&lt;EOF;
  dcppt.pl Version $VERSION, Last Update: $UPDATE.

EOF
    foreach $MAINTAINER (@MAINTAINERS) {
	print STDOUT "  $MAINTAINER \n";
    }
    print STDOUT "    All Right Reserved.\n\n";
}

sub PrintMenuTxt() {
    local($menu_txt, $debug) = @_;
    print STDOUT "菴輔�繝ｼ繧ｸ蛻�� $menu_txt 繧貞�蜉帙＠縺ｾ縺吶°? [30]: ";
    $pagenum = &lt;STDIN&gt;;
    # 萓句､門�逅�
    $pagenum = "30" unless ($pagenum =~ /^\d+$/);
    # 譌｢縺ｫ繝輔ぃ繧､繝ｫ縺後≠繧句�ｴ蜷医�, 蛻･繝輔ぃ繧､繝ｫ繧貞�蜉�
    local($i) = 0;
    while (-f $menu_txt) {
	$i++;
	$menu_txt = "$menu_txt"."."."$i";
    }
    # $menu_txt 縺後ョ繧｣繝ｬ繧ｯ繝医Μ繧ょ性繧蝣ｴ蜷医�縺昴ｌ繧峨ｒ菴懈�縺吶ｋ.
    local(@menu_path) = split(/\//, $menu_txt);
    local($dirpath) = "";
    local($first) = 1;
    while($#menu_path &gt; 0){
	local($dir) = shift(@menu_path);
	$dirpath = $dir if $first;
	$dirpath .= '/' . "$dir" unless $first;
	mkdir($dirpath) unless -d $dirpath;
	print STDOUT "  mkdir $dirpath \n" if ($debug);
	$first = 0;
    }
    # 繝輔ぃ繧､繝ｫ繧ｪ繝ｼ繝励Φ &amp; 蛟､縺ｮ蜃ｺ蜉�
    print STDOUT "Creating $menu_txt ...";
    open(MENUTXT, "&gt; $menu_txt")
	|| die "繧ｨ繝ｩ繝ｼ: $menu_txt 縺ｫ譖ｸ縺崎ｾｼ繧縺薙→縺悟�譚･縺ｾ縺帙ｓ縺ｧ縺励◆. /n";
    local($j) = 1;
    for (1..${pagenum}) {
	local($outnum) = sprintf "%03d:\n", $j;
	print MENUTXT "$outnum";
	$j++;
    }
    close(MENUTXT);
    print STDOUT "done\n";
}

##################################################
#####                                        #####
##             險ｭ螳壹ヵ繧｡繧､繝ｫ遒ｺ隱�                ###
#####                                        #####
##################################################

unless (-f $CONFIG_FILE) {
    unless ($QUIET) {
	print STDOUT "險ｭ螳壹ヵ繧｡繧､繝ｫ縺ｧ縺ゅｋ $CONFIG_FILE 縺瑚ｦ句ｽ薙◆繧翫∪縺帙ｓ.\n".
	             "  1. dcppt 繝�ヵ繧ｩ繝ｫ繝医�險ｭ螳壹〒蜃ｦ逅�ｒ縺吶ｋ縺ｪ繧� \"y\",\n".
		     "  2. 蜃ｦ逅�ｒ荳ｭ譁ｭ縺吶ｋ縺ｪ繧�                     \"n\",\n".
		     "  3. $CONFIG_FILE 繝�Φ繝励Ξ繝ｼ繝医ｒ蜃ｺ蜉帙☆繧九↑繧噂"m\"\n".
		     "繧貞�蜉帙＠縺ｦ縺上□縺輔＞ [Y/n/m]: ";
	$ans = &lt;STDIN&gt;;
    } else {
	$ans = "";
    }

    if ($ans =~ /^[mM].*$/) {
	print STDOUT "Creating $CONFIG_FILE ...";
	&amp;OutputConfig($CONFIG_FILE, $VERSION, $UPDATE, $MAINTAINER, $DEBUG);
	print STDOUT "done\n";
	exit 0;
    }
    if ($ans =~ /^[nN].*$/) {
	die "繧ｨ繝ｩ繝ｼ: 蜃ｦ逅�ｒ荳ｭ譁ｭ縺励∪縺励◆.\n";
    }
}


##################################################
#####                                        #####
##             繝�ヵ繧ｩ繝ｫ繝郁ｨｭ螳壼､                ###
#####                                        #####
##################################################

##############################
###  繝ｭ繧ｱ繝ｼ繧ｷ繝ｧ繝ｳ (繧､繝ｳ繝励ャ繝�)
##
#
# 窶ｻ $SRC_DIR 縺ｮ繝�ヵ繧ｩ繝ｫ繝医� src 縺ｧ縺ゅｊ, dcppt.pl 縺ｮ -d
#    繧ｪ繝励す繝ｧ繝ｳ縺御ｸ弱∴繧峨ｌ繧後�縺昴�蠑墓焚繧貞叙繧�
#
# 諠��ｱ繝輔ぃ繧､繝ｫ
$infofile = "${SRC_DIR}/menu.txt";

# 繧ｿ繧､繝医Ν繝輔ぃ繧､繝ｫ
$titlefile = "${SRC_DIR}/title.txt";

##############################
###  繝ｭ繧ｱ繝ｼ繧ｷ繝ｧ繝ｳ (繧｢繧ｦ繝医�繝�ヨ)
##
# 蜈ｬ髢玖ｳ�ｺ千ｽｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$pubdir = "pub";

# 繧､繝ｳ繝�ャ繧ｯ繧ｹ繝輔ぃ繧､繝ｫ
$indexfile = "${pubdir}/index.html";

# 繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ (繧､繝｡繝ｼ繧ｸ)
$menufile = "${pubdir}/menu.html";
#$menufile = "";      # 逕ｻ蜒冗沿繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺後＞繧峨↑縺�凾

# 繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ (繝�く繧ｹ繝�)
$menutxtfile = "${pubdir}/menutxt.html";
#$menutxtfile = "";   # 繝�く繧ｹ繝育沿繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺後＞繧峨↑縺�凾

# 繧ｵ繝�繝阪う繝ｫ繝輔ぃ繧､繝ｫ蜷�
$thumbnail_file = "${pubdir}/thumbnail.html";

# 逕滓�縺励◆ HTML 繝輔ぃ繧､繝ｫ鄂ｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$htmldir = "${pubdir}/html";

# 繝｡繝九Η繝ｼ逕ｻ蜒上ヵ繧｡繧､繝ｫ鄂ｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$menudir = "${pubdir}/menu";

# 繧ｹ繝ｩ繧､繝臥判蜒上ヵ繧｡繧､繝ｫ鄂ｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$slidedir = "${pubdir}/slide";

# 繧ｵ繝�繝阪う繝ｫ逕ｻ蜒上ヵ繧｡繧､繝ｫ鄂ｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$thumbdir = "${pubdir}/thumbnail";

##############################
###  逕ｻ蜒上し繧､繧ｺ
##
# 繝｡繝九Η繝ｼ縺ｮ繧ｵ繧､繧ｺ
$menusize = "120x90";
# 繧ｹ繝ｩ繧､繝峨�繧ｵ繧､繧ｺ
$slidesize = "640x480";
# 繧ｵ繝�繝阪う繝ｫ縺ｮ繧ｵ繧､繧ｺ
$thumbsize = "200x150";

##############################
###  濶ｲ豺ｱ蠎ｦ縺ｮ險ｭ螳�
##
$depth = "8";      # 0: -depth 繧ｪ繝励す繝ｧ繝ｳ繧貞茜逕ｨ縺励↑縺�

##############################
###  譁�ｭ励さ繝ｼ繝�
##
# 蜃ｺ蜉帙＆繧後ｋ繝輔ぃ繧､繝ｫ縺ｮ譌･譛ｬ隱樊枚蟄励さ繝ｼ繝�
# "jis", "euc", "sjis", "utf8" 縺ｮ縺ｩ繧後°繧帝∈謚�
$jpcode = "utf8";
$system_code = "utf8";

##############################
###  繧ｹ繧ｿ繧､繝ｫ險ｭ螳�
##
# 襍ｷ蜍墓凾縺ｮ繝�ヵ繧ｩ繝ｫ繝医�繝壹�繧ｸ
# 蟾ｦ繝壹�繧ｸ
$defaultleft  = "$menufile";     # 繧､繝｡繝ｼ繧ｸ繝｡繝九Η繝ｼ
#$defaultleft  = "$menutxtfile";  # 繝�く繧ｹ繝医Γ繝九Η繝ｼ
# 蜿ｳ繝壹�繧ｸ
$defaultright = "$thumbnail_file";    # 繧ｵ繝�繝阪う繝ｫ
#$defaultright = "$htmldir/001.html";  # 1 繝壹�繧ｸ逶ｮ


## 繧ｹ繧ｿ繧､繝ｫ縺ｮ險ｭ螳�
# 0: 繧ｹ繧ｿ繧､繝ｫ辟｡縺�, 1: 繧ｹ繧ｿ繧､繝ｫ縺ゅｊ
$style_mode = "1";
    # 繝�く繧ｹ繝医�濶ｲ
$style_textcolor       = '#339933';
    # 閭梧勹濶ｲ
$style_bgcolor         = '#FFFFFF';
    # 蟋九ａ縺ｮ繝ｪ繝ｳ繧ｯ濶ｲ
$style_linkcolor       = '#666600';
    # 譌｢縺ｫ蜿ら�縺励◆蠕後�繝ｪ繝ｳ繧ｯ濶ｲ
$style_visitedcolor    = '#666633';
    # 繝槭え繧ｹ繧剃ｸ翫↓荵励○縺滓凾縺ｮ繝ｪ繝ｳ繧ｯ濶ｲ
$style_hovercolor      = '#CCFFCC';
    # 繝ｪ繝ｳ繧ｯ縺ｮ... none: 荳狗ｷ夂┌縺�, underline: 荳狗ｷ壹≠繧�,
    #             blink: 轤ｹ貊�, overline:荳顔ｷ�,
    #             line-through: 謇薙■豸医＠邱�
$style_link_underline  = 'none';
    # 繝ｪ繝ｳ繧ｯ縺ｮ... normal: 譎ｮ騾�, bold: 螟ｪ蟄�
$style_link_fontweight = 'bold';

# 蜑榊ｾ後�繝壹�繧ｸ縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｫ逕ｨ縺�ｋ譁�ｭ怜�
$previouslink = '[Prev]';
$nextlink     = '[Next]';

# 蜷��繝ｼ繧ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｮ荳贋ｸ九↓莉倥￠繧九Μ繝ｳ繧ｯ
$upperlink = '笆ｲParent Dirctory';
$upperurl  = '';
$lowerlink = 'ppt file笆ｼ';
$lowerurl  = '';

# 蜃ｺ蜉帙＆繧後ｋ蜷��繝ｼ繧ｸ縺ｮ譛ｫ蟆ｾ縺ｫ莉伜刈縺輔ｌ繧九Γ繝�そ繝ｼ繧ｸ繧呈欠螳�
#   - acktext 繧堤ｩｺ縺ｫ縺吶ｋ縺ｨ, 繝｡繝�そ繝ｼ繧ｸ縺昴�繧ゅ�縺悟�蜉帙＆繧後↑縺�
#   - acklink 縺梧欠螳壹＆繧後※縺�ｋ蝣ｴ蜷医�縺溘▽縺ｮ繧ｳ繝ｭ繝ｳ "::" 縺ｧ
#     蝗ｲ縺ｾ繧後◆驛ｨ蛻�� acklink 縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｫ螟画鋤
#   - $VERSION 縺ｧ dcppt.pl 縺ｮ繝舌�繧ｸ繝ｧ繝ｳ縺悟�蜉帙＆繧後ｋ
#   - $URL 縺ｧ dcppt.pl 縺ｮ鄂ｮ縺榊�ｴ謇縺ｮ URL 縺悟�蜉帙＆繧後ｋ
$acktext = "This page is generated with ::dcppt:: Version $VERSION";
$acklink = "$URL";

##############################
###  繧ｵ繝�繝阪う繝ｫ
##
# 0: 繧ｵ繝�繝阪う繝ｫ辟｡縺�, 1: 繧ｵ繝�繝阪う繝ｫ縺ゅｊ
$thumbnail_mode    = "1";
    # 繧ｵ繝�繝阪う繝ｫ縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｮ繝｡繝�そ繝ｼ繧ｸ
$thumbnail_link    = "[[ Thumbnail ]]";
    # 繧ｵ繝�繝阪う繝ｫ縺ｮ蛻励�謨ｰ
$thumbnail_col_num = "3";


##############################
###  邂｡逅��ｼ城幕逋ｺ閠�畑
##
# 逕ｻ蜒上ヵ繧｡繧､繝ｫ縺ｮ譯∵焚
$len = 3;
# 莉･荳九�諡｡蠑ｵ蟄舌ｒ謖√▽繧ゅ�繧堤判蜒上ヵ繧｡繧､繝ｫ縺ｨ縺吶ｋ.
@treat = ('gif', 'GIF', 'jpg', 'JPG', 'jpeg', 'JPEG',
	  'png', 'PNG', 'bmp', 'BMP', 'tif', 'TIF',
	  'tiff', 'TIFF');
# src/ 莉･荳九�逕ｻ蜒丞錐縺ｮ繝ｪ繝阪�繝�繝ｪ繧ｹ繝�
%ImgRenameList = (
		     '繧ｹ繝ｩ繧､繝�',	'slide',
		    );


##################################################
#####                                        #####
###       繝ｦ繝ｼ繧ｶ險ｭ螳壹ヵ繧｡繧､繝ｫ隱ｭ縺ｿ霎ｼ縺ｿ           ###
#####                                        #####
##################################################

# 繝ｦ繝ｼ繧ｶ縺ｮ險ｭ螳壹ヵ繧｡繧､繝ｫ縺瑚ｪｭ縺ｿ霎ｼ繧√ｋ蝣ｴ蜷医�縺昴ｌ繧定ｪｭ縺ｿ霎ｼ繧
if (-r $CONFIG_FILE) {
    require "$CONFIG_FILE";
}


##################################################
#####                                        #####
##                萓句､門�逅�                     ###
#####                                        #####
##################################################

# 譁�ｭ励さ繝ｼ繝峨�萓句､門�逅�
unless ($jpcode eq 'euc' || $jpcode eq 'sjis' || $jpcode eq 'jis' || $jpcode eq 'utf8') {
    print STDOUT "Modify \$jpcode from $jpcode to euc" if ($DEBUG);
    $jpcode = 'utf8';
}

##################################################
#####                                        #####
##             繝励Ο繧ｰ繝ｩ繝�譛ｬ菴�                  ###
#####                                        #####
##################################################


##################################################
## 讓呎ｺ門�蜉帙∪縺溘�繧ｿ繧､繝医Ν繝輔ぃ繧､繝ｫ縺九ｉ繧ｿ繧､繝医Ν蜿門ｾ�
##################################################

$title = &amp;TitleGet($titlefile, $jpcode, $QUIET, $DEBUG);

##################################################
## $SRC_DIR 蜀��繝輔ぃ繧､繝ｫ蜷阪ｒ繧ｷ繧ｹ繝�Β縺ｮ譁�ｭ励さ繝ｼ繝�
## (繝�ヵ繧ｩ繝ｫ繝医� utf8) 縺ｫ繝ｪ繝阪�繝�
##################################################

&amp;RenameCurrentCode($SRC_DIR, $system_code, $DEBUG);

##################################################
## $SRC_DIR 蜀��繝輔ぃ繧､繝ｫ蜷阪′迚ｹ螳壹�譌･譛ｬ隱槭�蝣ｴ蜷医�
## 闍ｱ隱槭↓繝ｪ繝阪�繝�
##################################################

&amp;RenameImgNameEtoJ($SRC_DIR, $system_code, $DEBUG);


##################################################
## pub 縺ｨ slide 縺ｨ thumbnail 逕ｨ縺ｮ繝�ぅ繝ｬ繧ｯ繝医Μ縺�
## 辟｡縺��ｴ蜷医�譁ｰ隕丈ｽ懈�. 縺ゅｋ蝣ｴ蜷医↓縺ｯ蜀榊ｺｦ逕滓�
## 縺吶ｋ縺九←縺�°蝠上＞蜷医ｏ縺帙ｋ. 逕滓�縺励↑縺��ｴ蜷医↓縺ｯ
## convert 縺ｯ縺翫％縺ｪ繧上↑縺�.
##################################################

#
# 逕ｻ蜒上� convert 縺ｯ譎る俣縺後°縺九ｋ縺溘ａ, 譌｢縺ｫ繝�ぅ繝ｬ繧ｯ繝医Μ縺�
# 蟄伜惠縺吶ｋ蝣ｴ蜷医↓縺ｯ蜀榊､画鋤縺励↑縺�ｈ縺�↓蜃ｺ譚･繧�.
#
if (-d $pubdir &amp;&amp; -d $menudir &amp;&amp; -d $slidedir
    &amp;&amp; -d $thumbdir || !$thumbnail_mode){
    unless ($QUIET) {
	print STDOUT "譌｢縺ｫ $slidedir 遲峨′蟄伜惠縺励※縺�∪縺�.\n".
	    "逕ｻ蜒上ｒ蜀榊ｺｦ螟画鋤縺励∪縺吶°? (螟画鋤縺ｫ縺ｯ蟆代�凾髢薙′縺九°繧翫∪縺�.) [y/N]: ";
	$ans = &lt;STDIN&gt;;

	if ($ans =~ /^[yY].*$/) {
	    $NoConvert = 0;
	} else {
	    $NoConvert = 1;
	}
    } else {
	$NoConvert = 1;
    }
    print STDOUT "  \$NoConvert is $NoConvert.\n" if ($DEBUG);
}

mkdir($pubdir) unless -d $pubdir;
mkdir($menudir) unless -d $menudir;
mkdir($slidedir) unless -d $slidedir;
if ($thumbnail_mode) {
    mkdir($thumbdir) unless -d $thumbdir;
}

##################################################
## $SRC_DIR 蜀��逕ｻ蜒上ヵ繧｡繧､繝ｫ縺ｮ蜷榊燕縺ｮ縺ｿ繧貞叙蠕�
##################################################

#
# $SRC_DIR 繝�ぅ繝ｬ繧ｯ繝医Μ蜀�°繧臥判蜒上ヵ繧｡繧､繝ｫ縺ｮ荳隕ｧ繧貞叙繧雁�縺�,
# @srcimgs 縺ｸ莉｣蜈･縺吶ｋ
#
@srcimgs = &amp;GetImageList($SRC_DIR, $DEBUG);


##################################################
## 驕ｩ蛻�↑逕ｻ蜒上ヵ繧｡繧､繝ｫ蜷阪ｒ菴懈�
##################################################
#
# @srcimgs 縺ｮ蜷榊燕繧帝←蛻�↓螟画峩縺励◆繧ゅ�繧� @pubimgs
# 縺ｨ縺励※蜿励￠蜿悶ｋ.
#
#     繧ｹ繝ｩ繧､繝�1.PNG  -&gt;   001.png
#      mgp00001.jpg  -&gt;   001.jpg
#             1.GIF  -&gt;   001.gif
#

@pubimgs = &amp;RenameImage(@srcimgs);


##################################################
## $SRC_DIR 蜀�� @srcimgs 繧� $slidedir 縺ｨ
## $thumbdir 蜀�↓ @pubimgs 縺ｨ繝ｪ繝阪�繝�縺励※遘ｻ蜍�.
## 遘ｻ蜍輔�髫帙↓ convert 縺ｧ逕ｻ蜒上し繧､繧ｺ螟画鋤
##################################################
if ($depth){
    $convert_depth = "-depth $depth"
} else {
    $convert_depth = ""
}

#
# 譛ｬ蠖薙� @srcimsg 縺ｨ @pubimgs 繧よｸ｡縺励◆縺�′,
# 2縺､縺ｮ驟榊�繧呈ｸ｡縺吶�縺ｯ perl 縺ｮ莉墓ｧ倅ｸ企擇蛟偵↑縺ｮ縺ｧ
# 繧ｵ繝悶Ν繝ｼ繝√Φ蜀�°繧臥峩謗･蜻ｼ縺ｶ
#
unless ($NoConvert){
    &amp;ConvertImage($SRC_DIR, $menudir, $menusize,
		  $CONVERT, $convert_depth . " " . $CONVERT_OPT, $DEBUG);
    
    &amp;ConvertImage($SRC_DIR, $slidedir, $slidesize,
		  $CONVERT, $convert_depth . " " . $CONVERT_OPT, $DEBUG);
    
    if ($thumbnail_mode){
	&amp;ConvertImage($SRC_DIR, $thumbdir, $thumbsize,
		     $CONVERT, $convert_depth . " " . $CONVERT_OPT, $DEBUG);
    }
}

##################################################
## slide, thumbnail 繝�ぅ繝ｬ繧ｯ繝医Μ蜀�°繧�
## 逕ｻ蜒上ヵ繧｡繧､繝ｫ縺ｮ繧ｿ繧､繝励ｒ蜿悶ｊ蜃ｺ縺�
##################################################

$imgtype_menu  = &amp;GetImageType($menudir, $DEBUG);
$imgtype_slide = &amp;GetImageType($slidedir, $DEBUG);
$imgtype_thumb = &amp;GetImageType($thumbdir, $DEBUG) if ($thumbnail_mode);

##################################################
## slide, thumbnail 繝�ぅ繝ｬ繧ｯ繝医Μ蜀�°繧�
## 逕ｻ蜒上ヵ繧｡繧､繝ｫ縺ｮ繧ｿ繧､繝励ｒ蜿悶ｊ蜃ｺ縺�
##################################################

#
# 逕ｻ蜒上ヵ繧｡繧､繝ｫ謨ｰ繧� $file_num 縺ｸ莉｣蜈･.
# 
$file_num = $#pubimgs + 1;

##################################################
## 諠��ｱ繝輔ぃ繧､繝ｫ縺九ｉ, 繝翫Φ繝舌�縺ｨ繧ｵ繝悶ず繧ｧ繧ｯ繝医ｒ蜿悶ｊ蜃ｺ縺�.
##################################################

#
# 諠��ｱ繝輔ぃ繧､繝ｫ縺檎┌縺��ｴ蜷医�髮帛梛菴懈�.
#
&amp;CreateInfo($infofile, $file_num, $DEBUG);

#
# 諠��ｱ繝輔ぃ繧､繝ｫ縺九ｉ, 繝翫Φ繝舌�縺ｨ繧ｵ繝悶ず繧ｧ繧ｯ繝医ｒ蜿悶ｊ蜃ｺ縺励※ @info 縺ｸ
#
@info = &amp;GetInfo($infofile, $jpcode, $DEBUG);

#
# @info 縺ｫ譬ｼ邏阪＆繧後ｋ繝翫Φ繝舌�縺ｨ繧ｵ繝悶ず繧ｧ繧ｯ繝医ｒ蛻�屬縺励※
# @number縲　subject縲�%info_hash 縺ｸ
#
# - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @info 縺ｨ @number 縺ｨ @subject 縺ｨ %info_hash 繧�
#   蜀�Κ縺ｧ蛻ｩ逕ｨ (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)
#
&amp;SplitInfo($DEBUG);

#
# 譁�ｭ励さ繝ｼ繝峨ｒ jpcode 逕ｨ縺九ｉ meta 繧ｿ繧ｰ縺ｫ譖ｸ縺崎ｾｼ繧逕ｨ縺ｫ螟画鋤.
#
$metajp = &amp;JpcodeToMeta($jpcode, $DEBUG);

#
# 繧ｹ繧ｿ繧､繝ｫ縺ｨ縺励※譖ｸ縺榊�縺呎枚蟄怜�
#
$style_out = &amp;StyleMake($style_mode, $style_textcolor, $style_bgcolor,
			$style_linkcolor, $style_visitedcolor,
			$style_hovercolor, $style_link_underline,
			$style_link_fontweight, $DEBUG);

$style_out_menu =
    &amp;StyleMakeForMenu($style_mode, $style_textcolor, $style_bgcolor,
			$style_linkcolor, $style_visitedcolor,
			$style_hovercolor, $style_link_underline,
			$style_link_fontweight, $DEBUG);

#
# 繧､繝ｳ繝�ャ繧ｯ繧ｹ縺ｮ菴懈�
#

&amp;MakeIndex($title, $style_out, $metajp,
	   $indexfile, $defaultleft, $defaultright, $DEBUG);

#
# img 繧ｿ繧ｰ縺ｮ alt 螻樊ｧ縺ｫ縲�&lt;縲阪√�&gt;縲阪√�"縲阪√�&amp;縲阪√�'縲阪′蜈･繧区枚蟄励ｒ
# 譖ｸ縺榊�縺輔↑縺�ｈ縺�↓縺吶ｋ縺溘ａ縲√◎繧後ｉ縺悟�繧峨↑縺�枚蟄励□縺代ｒ %altmsg 縺ｫ
# 譬ｼ邏阪�
#
#    - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @number 縺ｨ %info_hash 縺ｨ %altmsg 繧貞�驛ｨ縺ｧ蛻ｩ逕ｨ
#      (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)
#
&amp;MakeAltMsg($DEBUG);

#
# 逕ｻ蜒上ｒ蠑ｵ繧願ｾｼ繧繝｡繝九Η繝ｼ縺ｮ菴懈�
#    - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @number 縺ｨ %info_hash 縺ｨ %altmsg 繧貞�驛ｨ縺ｧ蛻ｩ逕ｨ
#      (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)

if ($menufile) {
    &amp;MakeMenu($menudir, $htmldir, $title, $style_out_menu,
	      $jpcode, $metajp, $imgtype_menu,
	      $upperlink, $upperurl, $lowerlink, $lowerurl,
	      $thumnail_mode, $thumbnail_file, $thumbnail_link,
	      $menufile, $menutxtfile, $DEBUG);
}

#
# 繝｡繝九Η繝ｼ縺ｮ菴懈�
#    - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @number 縺ｨ %info_hash 繧貞�驛ｨ縺ｧ蛻ｩ逕ｨ
#      (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)

if ($menutxtfile) {
    &amp;MakeMenuTxt($title, $style_out, $jpcode, $metajp,
		 $upperlink, $upperurl, $lowerlink, $lowerurl,
		 $thumnail_mode, $thumbnail_file, $thumbnail_link,
		 $menutxtfile, $menufile, $DEBUG);
}
#
# 蜷� HTML 縺ｮ菴懈�
#    - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @number 縺ｨ %info_hash 縺ｨ %altmsg 繧貞�驛ｨ縺ｧ蛻ｩ逕ｨ
#      (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)

&amp;MakeHtml($htmldir, $title, $style_out,
	  $previouslink, $nextlink, $imgtype_slide,
	  $acktext, $acklink, $jpcode, $metajp, $DEBUG);

#
# 繧ｵ繝�繝阪う繝ｫ縺ｮ菴懈�
#    - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @number 縺ｨ %info_hash 縺ｨ %altmsg 繧貞�驛ｨ縺ｧ蛻ｩ逕ｨ
#      (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)

&amp;MakeThumbnail($title, $style_out_menu, $jpcode, $metajp, $htmldir,
	       $thumnail_mode, $thumbnail_file, $thumbdir,
	       $thumbnail_link, $thumbnail_col_num,
	       $imgtype_thumb, $acktext, $acklink, $DEBUG);

#
# 邨ゆｺ�
#
&amp;EndMessage($DEBUG);


##################################################
#####                                        #####
##             繧ｵ繝悶Ν繝ｼ繝√Φ鄒､                  ###
#####                                        #####
##################################################

sub OutputConfig() {
    local($configfile, $version, $update, $maintainer, $debug) = @_;
    # $configfile 縺後ョ繧｣繝ｬ繧ｯ繝医Μ繧ょ性繧蝣ｴ蜷医�縺昴ｌ繧峨ｒ菴懈�縺吶ｋ.
    local(@config_path) = split(/\//, $configfile);
    local($dirpath) = "";
    local($first) = 1;
    while($#config_path &gt; 0){
	local($dir) = shift(@config_path);
	$dirpath = $dir if $first;
	$dirpath .= '/' . "$dir" unless $first;
	mkdir($dirpath) unless -d $dirpath;
	print STDOUT "  mkdir $dirpath \n" if ($debug);
	$first = 0;
    }
    open(CONFIGFILE, "&gt; $configfile")
	|| die "繧ｨ繝ｩ繝ｼ: $configfile 縺ｫ譖ｸ縺崎ｾｼ繧縺薙→縺悟�譚･縺ｾ縺帙ｓ縺ｧ縺励◆. \n";
    print CONFIGFILE &lt;&lt;EOF;
#####   $configfile for dcppt.pl    #####
##
#  This is Template File for dcppt ver $VERSION
#
#  (C) Copyright by @MAINTAINERS
#  $UPDATE.  All rights reserved.
#
EOF

    print CONFIGFILE &lt;&lt;'EOF';
##############################
###  繝ｭ繧ｱ繝ｼ繧ｷ繝ｧ繝ｳ (繧､繝ｳ繝励ャ繝�)
##
#
# 窶ｻ $SRC_DIR 縺ｮ繝�ヵ繧ｩ繝ｫ繝医� src 縺ｧ縺ゅｊ, dcppt.pl 縺ｮ -d
#    繧ｪ繝励す繝ｧ繝ｳ縺御ｸ弱∴繧峨ｌ繧後�縺昴�蠑墓焚繧貞叙繧�
#
# 諠��ｱ繝輔ぃ繧､繝ｫ
$infofile = "${SRC_DIR}/menu.txt";

# 繧ｿ繧､繝医Ν繝輔ぃ繧､繝ｫ
$titlefile = "${SRC_DIR}/title.txt";

##############################
###  繝ｭ繧ｱ繝ｼ繧ｷ繝ｧ繝ｳ (繧｢繧ｦ繝医�繝�ヨ)
##
# 蜈ｬ髢玖ｳ�ｺ千ｽｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$pubdir = "pub";

# 繧､繝ｳ繝�ャ繧ｯ繧ｹ繝輔ぃ繧､繝ｫ
$indexfile = "${pubdir}/index.html";

# 繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ (繧､繝｡繝ｼ繧ｸ)
$menufile = "${pubdir}/menu.html";
#$menufile = "";      # 逕ｻ蜒冗沿繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺後＞繧峨↑縺�凾

# 繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ (繝�く繧ｹ繝�)
$menutxtfile = "${pubdir}/menutxt.html";
#$menutxtfile = "";   # 繝�く繧ｹ繝育沿繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺後＞繧峨↑縺�凾

# 繧ｵ繝�繝阪う繝ｫ繝輔ぃ繧､繝ｫ蜷�
$thumbnail_file = "${pubdir}/thumbnail.html";

# 逕滓�縺励◆ HTML 繝輔ぃ繧､繝ｫ鄂ｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$htmldir = "${pubdir}/html";

# 繝｡繝九Η繝ｼ逕ｻ蜒上ヵ繧｡繧､繝ｫ鄂ｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$menudir = "${pubdir}/menu";

# 繧ｹ繝ｩ繧､繝臥判蜒上ヵ繧｡繧､繝ｫ鄂ｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$slidedir = "${pubdir}/slide";

# 繧ｵ繝�繝阪う繝ｫ逕ｻ蜒上ヵ繧｡繧､繝ｫ鄂ｮ蝣ｴ繝�ぅ繝ｬ繧ｯ繝医Μ
$thumbdir = "${pubdir}/thumbnail";

##############################
###  逕ｻ蜒上し繧､繧ｺ
##
# 繝｡繝九Η繝ｼ縺ｮ繧ｵ繧､繧ｺ
$menusize = "120x90";
# 繧ｹ繝ｩ繧､繝峨�繧ｵ繧､繧ｺ
$slidesize = "640x480";
# 繧ｵ繝�繝阪う繝ｫ縺ｮ繧ｵ繧､繧ｺ
$thumbsize = "200x150";

##############################
###  濶ｲ豺ｱ蠎ｦ縺ｮ險ｭ螳�
##
$depth = "8";      # 0: -depth 繧ｪ繝励す繝ｧ繝ｳ繧貞茜逕ｨ縺励↑縺�

##############################
###  譁�ｭ励さ繝ｼ繝�
##
# 蜃ｺ蜉帙＆繧後ｋ繝輔ぃ繧､繝ｫ縺ｮ譌･譛ｬ隱樊枚蟄励さ繝ｼ繝�
# "jis", "euc", "sjis", "utf8" 縺ｮ縺ｩ繧後°繧帝∈謚�
$jpcode = "utf8";
$system_code = "utf8";

##############################
###  繧ｹ繧ｿ繧､繝ｫ險ｭ螳�
##
# 襍ｷ蜍墓凾縺ｮ繝�ヵ繧ｩ繝ｫ繝医�繝壹�繧ｸ
# 蟾ｦ繝壹�繧ｸ
$defaultleft  = "$menufile";     # 繧､繝｡繝ｼ繧ｸ繝｡繝九Η繝ｼ
#$defaultleft  = "$menutxtfile";  # 繝�く繧ｹ繝医Γ繝九Η繝ｼ
# 蜿ｳ繝壹�繧ｸ
$defaultright = "$thumbnail_file";    # 繧ｵ繝�繝阪う繝ｫ
#$defaultright = "$htmldir/001.html";  # 1 繝壹�繧ｸ逶ｮ


## 繧ｹ繧ｿ繧､繝ｫ縺ｮ險ｭ螳�
# 0: 繧ｹ繧ｿ繧､繝ｫ辟｡縺�, 1: 繧ｹ繧ｿ繧､繝ｫ縺ゅｊ
$style_mode = "1";
    # 繝�く繧ｹ繝医�濶ｲ
$style_textcolor       = '#339933';
    # 閭梧勹濶ｲ
$style_bgcolor         = '#FFFFFF';
    # 蟋九ａ縺ｮ繝ｪ繝ｳ繧ｯ濶ｲ
$style_linkcolor       = '#666600';
    # 譌｢縺ｫ蜿ら�縺励◆蠕後�繝ｪ繝ｳ繧ｯ濶ｲ
$style_visitedcolor    = '#666633';
    # 繝槭え繧ｹ繧剃ｸ翫↓荵励○縺滓凾縺ｮ繝ｪ繝ｳ繧ｯ濶ｲ
$style_hovercolor      = '#CCFFCC';
    # 繝ｪ繝ｳ繧ｯ縺ｮ... none: 荳狗ｷ夂┌縺�, underline: 荳狗ｷ壹≠繧�,
    #             blink: 轤ｹ貊�, overline:荳顔ｷ�,
    #             line-through: 謇薙■豸医＠邱�
$style_link_underline  = 'none';
    # 繝ｪ繝ｳ繧ｯ縺ｮ... normal: 譎ｮ騾�, bold: 螟ｪ蟄�
$style_link_fontweight = 'bold';

# 蜑榊ｾ後�繝壹�繧ｸ縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｫ逕ｨ縺�ｋ譁�ｭ怜�
$previouslink = '[Prev]';
$nextlink     = '[Next]';

# 蜷��繝ｼ繧ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｮ荳贋ｸ九↓莉倥￠繧九Μ繝ｳ繧ｯ
$upperlink = '笆ｲParent Dirctory';
$upperurl  = '';
$lowerlink = 'ppt file笆ｼ';
$lowerurl  = '';

# 蜃ｺ蜉帙＆繧後ｋ蜷��繝ｼ繧ｸ縺ｮ譛ｫ蟆ｾ縺ｫ莉伜刈縺輔ｌ繧九Γ繝�そ繝ｼ繧ｸ繧呈欠螳�
#   - acktext 繧堤ｩｺ縺ｫ縺吶ｋ縺ｨ, 繝｡繝�そ繝ｼ繧ｸ縺昴�繧ゅ�縺悟�蜉帙＆繧後↑縺�
#   - acklink 縺梧欠螳壹＆繧後※縺�ｋ蝣ｴ蜷医�縺溘▽縺ｮ繧ｳ繝ｭ繝ｳ "::" 縺ｧ
#     蝗ｲ縺ｾ繧後◆驛ｨ蛻�� acklink 縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｫ螟画鋤
#   - $VERSION 縺ｧ dcppt.pl 縺ｮ繝舌�繧ｸ繝ｧ繝ｳ縺悟�蜉帙＆繧後ｋ
#   - $URL 縺ｧ dcppt.pl 縺ｮ鄂ｮ縺榊�ｴ謇縺ｮ URL 縺悟�蜉帙＆繧後ｋ
$acktext = "This page is generated with ::dcppt:: Version $VERSION";
$acklink = "$URL";

##############################
###  繧ｵ繝�繝阪う繝ｫ
##
# 0: 繧ｵ繝�繝阪う繝ｫ辟｡縺�, 1: 繧ｵ繝�繝阪う繝ｫ縺ゅｊ
$thumbnail_mode    = "1";
    # 繧ｵ繝�繝阪う繝ｫ縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｮ繝｡繝�そ繝ｼ繧ｸ
$thumbnail_link    = "[[ Thumbnail ]]";
    # 繧ｵ繝�繝阪う繝ｫ縺ｮ蛻励�謨ｰ
$thumbnail_col_num = "3";


##############################
###  邂｡逅��ｼ城幕逋ｺ閠�畑
##
# 逕ｻ蜒上ヵ繧｡繧､繝ｫ縺ｮ譯∵焚
$len = 3;
# 莉･荳九�諡｡蠑ｵ蟄舌ｒ謖√▽繧ゅ�繧堤判蜒上ヵ繧｡繧､繝ｫ縺ｨ縺吶ｋ.
@treat = ('gif', 'GIF', 'jpg', 'JPG', 'jpeg', 'JPEG',
	  'png', 'PNG', 'bmp', 'BMP', 'tif', 'TIF',
	  'tiff', 'TIFF');
# src/ 莉･荳九�逕ｻ蜒丞錐縺ｮ繝ｪ繝阪�繝�繝ｪ繧ｹ繝�
%ImgRenameList = (
		     '繧ｹ繝ｩ繧､繝�',	'slide',
		    );

EOF

    print CONFIGFILE &lt;&lt;EOF;
######################################################################
# 蜻ｼ縺ｳ蜃ｺ縺怜�縺九ｉ縺ｿ縺ｦ require '${configfile}' 縺� 1 繧定ｿ斐☆繧医≧縺ｫ縺吶ｋ.
# 縺昴≧縺ｧ縺ｪ縺代ｌ縺ｰ繝輔ぃ繧､繝ｫ縺瑚ｦ九▽縺九▲縺ｦ縺�↑縺�％縺ｨ縺悟愛螳壹＆繧後ｋ.
1;

######################################################################
#== Mode setting for Emacs
#Local Variables:
#mode: cperl
#End:
#
EOF

    close(CONFIGFILE);
}


# 讓呎ｺ門�蜉帙∪縺溘�繧ｿ繧､繝医Ν繝輔ぃ繧､繝ｫ縺九ｉ繧ｿ繧､繝医Ν繧貞ｾ励ｋ
#
# 蠑墓焚
#	$titlefile	繧ｿ繧､繝医Ν縺梧嶌縺崎ｾｼ縺ｾ繧後※縺�ｋ繝輔ぃ繧､繝ｫ
#
# 霑泌唆蛟､
#	繝輔ぃ繧､繝ｫ蜀��荳陦檎岼縺ｾ縺溘�讓呎ｺ門�蜉帙ｒ, 謾ｹ陦後ｒ蜿悶ｊ髯､縺�※霑斐☆
#
sub TitleGet {
    local($titlefile, $jpcode, $quiet, $debug) = @_;
    local($title);
    #
    # 繧ｿ繧､繝医Ν繝輔ぃ繧､繝ｫ縺後↑縺��ｴ蜷�, 讓呎ｺ門�蜉帙ｈ繧雁�蜉帙☆繧�.
    #
    unless  (-f "$titlefile") {
	unless ($quiet) {
	    print "繧ｿ繧､繝医Ν繧定ｨ伜�縺励※荳九＆縺�.\n  Title []: ";
	    $input = &lt;STDIN&gt; ;
	    chomp($input) ;
	} else {
	    $input = "" ;
	    chomp($input) ;
	}
	&amp;Jcode::convert(*input, "$jpcode");
	open(TITLE, "&gt; $titlefile") ||
	    die "繧ｨ繝ｩ繝ｼ: $titlefile 縺ｫ譖ｸ縺崎ｾｼ繧縺薙→縺後〒縺阪∪縺帙ｓ縺ｧ縺励◆. \n";
	print TITLE "$input" ;
	close(TITLE);
    }
    #
    # 繧ｿ繧､繝医Ν繝輔ぃ繧､繝ｫ縺九ｉ繧ｿ繧､繝医Ν繧貞叙繧雁�縺�.
    #
    print STDOUT "Get Title form $titlefile ...";
    open(TITLEFILE, "$titlefile")
	|| die "繧ｨ繝ｩ繝ｼ: $titlefile 縺瑚ｦ九▽縺九ｊ縺ｾ縺帙ｓ縺ｧ縺励◆. \n";
    while (&lt;TITLEFILE&gt;) {
	chomp;
	# 譁�ｭ励さ繝ｼ繝牙､画鋤
	&amp;Jcode::convert(*_, "$jpcode");
	push(@title_lists, $_);
    }
    # 荳陦檎岼縺�縺代ｒ蜿悶ｊ蜃ｺ縺�.
    $title = $title_lists[0];
    close(TITLEFILE);
    # 繝�ヰ繝�げ繝｡繝�そ繝ｼ繧ｸ
    print STDOUT "TitleGet: \$title = $title\n" if ($debug);
    # 蛟､縺ｮ霑泌唆
    print STDOUT "done.\n";
    return $title;
}

#
# $dir 蜀��繝輔ぃ繧､繝ｫ蜷阪ｒ $code 縺ｮ蜷榊燕縺ｫ螟画峩縺吶ｋ
#
# 蠑墓焚
#	$dir		繝�ぅ繝ｬ繧ｯ繝医Μ
#	$code		譁�ｭ励さ繝ｼ繝�
#
# 霑泌唆蛟､
#	縺ｪ縺�
#
#
sub RenameCurrentCode() {
    local($dir, $code, $debug) = @_;
    local($srcfile, $srcfile_org, $ok);
    print STDOUT "Rename files in $dir to $code ...";
    
    opendir(SRCDIR, "$dir")
	|| die "繧ｨ繝ｩ繝ｼ: $dir 繝�ぅ繝ｬ繧ｯ繝医Μ縺悟ｭ伜惠縺励∪縺帙ｓ. \n";
    # 譁�ｭ励さ繝ｼ繝峨′ Shift-JIS 縺ｧ縺ゅｋ蝣ｴ蜷医ｒ閠�∴, 縺�▲縺溘ｓ縺ｯ繝輔ぃ繧､繝ｫ蜷阪ｒ
    # 縺昴�縺ｾ縺ｾ蜿門ｾ�
    local(@srcfiles) = readdir(SRCDIR);
    closedir(SRCDIR);

    # 繝輔ぃ繧､繝ｫ蜷阪ｒ繧ｷ繧ｹ繝�Β縺ｮ繧ｳ繝ｼ繝� (繝�ヵ繧ｩ繝ｫ繝医� utf8) 縺ｫ螟画峩
    foreach $srcfile (@srcfiles) {
	next if ( ($srcfile eq "..") || ($srcfile eq ".") );
	$srcfile_org = $srcfile;
	&amp;Jcode::convert(*srcfile, "$code");
	$ok = rename("$dir/$srcfile_org", "$dir/$srcfile");
	if ($debug) {
	    print STDOUT "\n    $dir/$srcfile_org -&gt; $dir/$srcfile";
	    print STDOUT "\t \[Failure\]" if $ok == 0;
	}
    }

    print STDOUT "\n" if ($debug);
    print STDOUT "done.\n";
}

#
# $dir 蜀��繝輔ぃ繧､繝ｫ蜷阪′ %ImgRenameList 縺ｮ繧ｭ繝ｼ縺ｫ荳閾ｴ縺励◆蝣ｴ蜷�,
# 縺昴�蛟､縺ｫ螟画峩縺吶ｋ. 繝輔ぃ繧､繝ｫ蜷阪�譁�ｭ励さ繝ｼ繝峨� $code 縺ｧ縺ゅｋ縺ｨ
# 閠�∴縺ｦ荳閾ｴ縺ｮ蛻､螳壹ｒ陦後≧.
#
# 蠑墓焚
#	$dir		繝�ぅ繝ｬ繧ｯ繝医Μ
#
# 霑泌唆蛟､
#	縺ｪ縺�
#
#
sub RenameImgNameEtoJ() {
    local($dir, $code, $debug) = @_;
    local($srcfile, $from, $to, $suffix, $ok);
    print STDOUT "Rename files by \%ImgRenameList in ...";
    
    opendir(SRCDIR, "$dir")
	|| die "繧ｨ繝ｩ繝ｼ: $dir 繝�ぅ繝ｬ繧ｯ繝医Μ縺悟ｭ伜惠縺励∪縺帙ｓ. \n";
    # 繝輔ぃ繧､繝ｫ蜷阪ｒ蜿門ｾ�
    local(@srcfiles) = readdir(SRCDIR);
    closedir(SRCDIR);

    # 繝輔ぃ繧､繝ｫ蜷阪′ %ImgRenameList 縺ｮ繧ｭ繝ｼ縺ｫ繝偵ャ繝医☆繧句�ｴ蜷医�縺昴�
    # 蛟､縺ｫ繝ｪ繝阪�繝�
    foreach $srcfile (@srcfiles) {
	foreach $from (keys %ImgRenameList) {
	    $to = $ImgRenameList{$from};
	    &amp;Jcode::convert(*to, "$code");
	    &amp;Jcode::convert(*from, "$code");
	    next unless ($srcfile =~ /^$from(\d+\.\w+)$/);
	    $suffix = $1;
	    $ok = rename("$dir/$srcfile", "$dir/$to$suffix");
	    if ($debug) {
		print STDOUT "\n    $dir/$srcfile -&gt; $dir/$to$suffix";
		print STDOUT "\t \[Failure\]" if $ok == 0;
	    }
	}
    }
    
    print STDOUT "\n" if ($debug);
    print STDOUT "done.\n";
}


#
# $dir 蜀�°繧臥判蜒上ヵ繧｡繧､繝ｫ縺ｮ蜷榊燕縺ｮ繝ｪ繧ｹ繝医ｒ蜿悶ｊ蜃ｺ縺�
#
# 蠑墓焚
#	$dir		繝�ぅ繝ｬ繧ｯ繝医Μ
#
# 霑泌唆蛟､
#	$dir 蜀��逕ｻ蜒上ヵ繧｡繧､繝ｫ蜷阪�繝ｪ繧ｹ繝医ｒ霑斐☆
#
sub GetImageList(){
    local($dir, $debug) = @_;
    local(@treat) = @treat;
    local($srcfile, $imgtype);
    
    print STDOUT "Get Names of Image in $dir ...";
    opendir(DIR, "$dir")
	|| die "繧ｨ繝ｩ繝ｼ: $dir 繝�ぅ繝ｬ繧ｯ繝医Μ縺悟ｭ伜惠縺励∪縺帙ｓ. \n";
    local(@srcfiles) = grep(!/^\.\.?$/, sort(readdir(DIR)));
    closedir(DIR);
    
    #
    # 逕ｻ蜒上ヵ繧｡繧､繝ｫ縺ｮ縺ｿ @srcfiles_img 縺ｫ蜷ｫ繧√ｋ.
    # 譚｡莉ｶ縺ｯ, @treat 縺ｮ諡｡蠑ｵ蟄舌ｒ謖√▽縺薙→縺ｨ, 繝輔ぃ繧､繝ｫ蜷阪↓謨ｰ蟄励ｒ蜷ｫ繧縺薙→縺ｧ縺ゅｋ.
    #
    undef local(@srcfiles_img);
    foreach $srcfile (@srcfiles){
	local($img_ok) = 0;
	local(@srcfile_parts) = split(/\./, $srcfile);
	local($srcfilename) = $srcfile_parts[$#srcfile_parts - 1];
	local($srcfile_imgtype) = $srcfile_parts[$#srcfile_parts];
	foreach $imgtype (@treat){
	    if ($srcfile_imgtype eq $imgtype){
		if ($srcfilename =~ /^.*\d+.*$/){
		    $img_ok = 1;
		}
	    }
	}
	if ($img_ok) {
	    push(@srcfiles_img, $srcfile);
	    print STDOUT "  $SRC_DIR/$srcfile is IMG file.\n" if ($debug);
	}
    }

    # 繝�ぅ繝ｬ繧ｯ繝医Μ蜀�↓逕ｻ蜒上ヵ繧｡繧､繝ｫ縺檎┌縺��ｴ蜷医�繧ｨ繝ｩ繝ｼ繧定ｿ斐☆
    unless ($srcfiles_img[0]) {
	die "繧ｨ繝ｩ繝ｼ: $dir 蜀�↓縺ｯ逕ｻ蜒上ヵ繧｡繧､繝ｫ縺ｨ諤昴ｏ繧後ｋ繧ゅ�縺悟ｭ伜惠縺励∪縺帙ｓ. \n";
    }
    print STDOUT "  done.\n";
    return @srcfiles_img;
}


# 逕ｻ蜒上ヵ繧｡繧､繝ｫ繝ｪ繝阪�繝�繧ｵ繝悶Ν繝ｼ繝√Φ
#
# 蠑墓焚
#	@org	蜈���逕ｻ蜒上ヵ繧｡繧､繝ｫ蜷�
#
# 霑泌唆蛟､
#	@org 繧偵Μ繝阪�繝�縺励◆繧ゅ�. 繝ｪ繝阪�繝�縺ｯ莉･荳九�繧医≧縺ｫ
#       縺翫％縺ｪ繧上ｌ繧�
#
#         - 繧ｹ繝ｩ繧､繝�1.PNG  -&gt;   001.png
#         -  mgp00001.jpg  -&gt;   001.jpg
#         -         1.GIF  -&gt;   001.gif
#
sub RenameImage() {
    local(@org) = @_;
    local($debug) = $DEBUG;
    local(@rename);            # 繝ｪ繝阪�繝�蠕後�繝輔ぃ繧､繝ｫ蜷�
    local($len)   = $len;      # 繝ｪ繝阪�繝�縺励◆繝輔ぃ繧､繝ｫ縺ｮ譯∵焚
    print STDOUT "Prepare Names of image files in publish directory ...";

    undef @rename;
    local($orgimg);
    foreach $orgimg (@org){
	local(@orgimg_parts) = split(/\./, $orgimg);
	local($orgimgname) = $orgimg_parts[$#orgimg_parts - 1];
	local($orgimgtype) = $orgimg_parts[$#orgimg_parts];
	#
	# 繝輔ぃ繧､繝ｫ蜷阪�蜀�, 謨ｰ蛟､縺ｧ縺ｪ縺�ｂ縺ｮ繧貞叙繧企勁縺�.
	#
	if ($orgimgname =~ /([1-9]\d*)/){
	    $orgimgname = $1;
	} else {
	    warn "$orgimg 縺ｯ謨ｰ蟄励ｒ蜷ｫ縺ｾ縺ｪ縺�◆繧�, 逕ｻ蜒上ヵ繧｡繧､繝ｫ縺ｨ縺励※隴伜挨縺輔ｌ縺ｾ縺帙ｓ.\n";
	}
	#
	# 繝輔ぃ繧､繝ｫ縺ｮ繝翫Φ繝舌�繧定ｦ丞ｮ壹�譯∵焚縺ｫ縺吶ｋ
	#
	if ($len &lt; length($orgimgname)){
	    # 繧ｨ繝ｩ繝ｼ繝槭�繧ｫ繝ｼ
	    local($error) = 1;
	} else {
	    # 繧ｨ繝ｩ繝ｼ繝槭�繧ｫ繝ｼ縺ｮ隗｣髯､
	    $error = 0;
	}
	local($new_orgimgname) = sprintf('%.' . $len . 'd', $orgimgname);
	
	#
	# 諡｡蠑ｵ蟄舌ｒ蟆乗枚蟄励↓縺吶ｋ
	#
	local($new_orgimgtype) = $orgimgtype;
	$new_orgimgtype =~ tr/A-Z/a-z/;

	#
	# 繝輔ぃ繧､繝ｫ蜷阪ｒ @rename 縺ｫ譬ｼ邏�.
	#
	push(@rename, "${new_orgimgname}\.${new_orgimgtype}");

	#
	# 繝�ヰ繝�げ逕ｨ縺ｮ繝｡繝�そ繝ｼ繧ｸ蜃ｺ蜉�
	#
	if ($debug) {
	    print STDOUT "    $SRC_DIR/$orgimg -&gt; ${new_orgimgname}\.${new_orgimgtype}";
	    print STDOUT "\t \[Irregular Rename...\]" if $error == 1 ;
	    print STDOUT "\n";
	}
    }
    print STDOUT "  done.\n";

    #
    # 蜷榊燕縺碁㍾隍�＠縺ｦ縺�↑縺�°繝√ぉ繝�け縲�
    #
    print STDOUT "Checking File Name Duplication ...";
    local($check1, $check2, $n1, $n2, @checkarray, $duplication);
    @checkarray = @rename;
    $duplication = 0;
    $n1 = 0;
    $n2 = $n1 + 1;
    while (@checkarray) {
	$check1 = shift(@checkarray);
#	print STDOUT "n1 = $n1 check1 = $check1\n" if ($debug);
	foreach $check2 (@checkarray) {
#	    print STDOUT "n2 = $n2 check2 = $check2\n" if ($debug);
	    if ($check1 eq $check2) {
		$duplication = $check1;
		last;
	    }
	    $n2++;
	}
	last if $duplication;
	$n1++;
	$n2 = $n1 + 1;
    }

#    print STDOUT "n1 = $n1\n" if ($debug);
#    print STDOUT "n2 = $n2\n" if ($debug);

    if ($duplication) {
	warn "\n       Warning!! \"$org[$n1]\" 縺ｨ \"$org[$n2]\" 縺悟酔蜷阪� \"$duplication\" 縺ｫ繝ｪ繝阪�繝�縺輔ｌ縺ｾ縺吶�\n\n";
    }
    print STDOUT "  done.\n";
    return @rename;
}


# 逕ｻ蜒上ヵ繧｡繧､繝ｫ繧ｵ繧､繧ｺ螟画鋤 &amp; 遘ｻ蜍輔し繝悶Ν繝ｼ繝√Φ
#
# 蠑墓焚
#	$srcdir		遘ｻ蜍募�繝�ぅ繝ｬ繧ｯ繝医Μ
#	$todir		蜈ｬ髢狗畑縺ｮ遘ｻ蜍募�逕ｨ縺ｮ逕ｻ蜒上ヵ繧｡繧､繝ｫ鄂ｮ蝣ｴ
#	$imgsize	逕ｻ蜒上�繧ｵ繧､繧ｺ (螟画峩縺励ｈ縺�→縺吶ｋ繧ｵ繧､繧ｺ)
#	$convert	convert 縺ｮ繧ｳ繝槭Φ繝�
#	$convert_opt	convert 縺ｮ逕ｻ蜒丞､画峩逕ｨ繧ｪ繝励す繝ｧ繝ｳ縺ｮ譁�ｭ怜�
#	$debug		繝�ヰ繝�げ繧ｪ繝励す繝ｧ繝ｳ
#
# 證鈴ｻ吶�蠑墓焚
#	@srcimgs	$SRC_DIR 蜀��逕ｻ蜒上ヵ繧｡繧､繝ｫ荳隕ｧ
#	@pubimgs	$slidedir 縺ｪ縺ｩ縺ｧ菴ｿ逕ｨ縺吶ｋ繝輔ぃ繧､繝ｫ蜷堺ｸ隕ｧ
#
# 霑泌唆蛟､
#	縺ｪ縺�.
#
sub ConvertImage() {
    local($srcdir, $todir, $imgsize,
	  $convert, $convert_opt, $debug) = @_;
    local($command) = "$convert $convert_opt";
    local($n) = 0;

    print STDOUT "Convert Image files from $srcdir to $todir ...  \n";
    
    while($srcimgs[$n]){
	print STDOUT "  $command $imgsize ".
	    "$srcdir/$srcimgs[$n] $todir/$pubimgs[$n]....  ";
	
	system("$command $imgsize $srcdir/$srcimgs[$n] $todir/$pubimgs[$n]");

	print STDOUT "done.\n";
	$n++;
    }
    print STDOUT "done.\n";
}

#
# 繝�ぅ繝ｬ繧ｯ繝医Μ蜀��1縺､逶ｮ縺ｮ繝輔ぃ繧､繝ｫ縺ｮ逕ｻ蜒上ち繧､繝励ｒ蜿悶ｊ蜃ｺ縺�
#
# 蠑墓焚
#	$dir		繝�ぅ繝ｬ繧ｯ繝医Μ
#
# 霑泌唆蛟､
#	繝�ぅ繝ｬ繧ｯ繝医Μ蜀��1縺､逶ｮ縺ｮ繝輔ぃ繧､繝ｫ縺ｮ諡｡蠑ｵ蟄舌ｒ霑斐☆

sub GetImageType() {
    local($dir, $debug) = @_;
    print STDOUT "Get ImageType from $dir ..." unless ($debug);
    # 繝�ぅ繝ｬ繧ｯ繝医Μ繧ｪ繝ｼ繝励Φ
    opendir(DIR, "$dir")
	|| die "繧ｨ繝ｩ繝ｼ: $dir 繝�ぅ繝ｬ繧ｯ繝医Μ縺悟ｭ伜惠縺励∪縺帙ｓ. \n";
    local(@imgfiles) = grep(!/^\.\.?$/, readdir(DIR));
    closedir(DIR);
    # 繝�ぅ繝ｬ繧ｯ繝医Μ蜀�↓逕ｻ蜒上′縺ゅｋ縺九メ繧ｧ繝�け
    unless ($imgfiles[0]) {
	die "繧ｨ繝ｩ繝ｼ: $dir 繝�ぅ繝ｬ繧ｯ繝医Μ蜀�↓繝輔ぃ繧､繝ｫ縺悟ｭ伜惠縺励∪縺帙ｓ. \n";
    }
    # 荳縺､逶ｮ縺ｮ繝輔ぃ繧､繝ｫ縺�縺代ｒ隕九ｋ. (髱｢蛟偵＞縺九ｉ)
    local($sampleimg) = $imgfiles[0];
    local(@imgname_parts) = split(/\./, $sampleimg);
    local($imgtype) = $imgname_parts[$#imgname_parts];

    # 繝�ヰ繝�げ逕ｨ蜃ｺ蜉�
    print STDOUT "GetImageType: In $dir, ImageType is $imgtype.\n" if ($debug);
    print STDOUT "done.\n" unless ($debug);

    return $imgtype;
}


# $infofile (menu.txt) 逕滓�繧ｵ繝悶Ν繝ｼ繝√Φ
#
# 隱ｬ譏�
#	$infofile 縺悟ｭ伜惠縺励↑縺��ｴ蜷医�$file_num 縺ｫ蜷医ｏ縺帙◆ $infofile
#	繧剃ｽ懈�縺吶ｋ縲�$infofile 縺悟ｭ伜惠縺吶ｋ蝣ｴ蜷医�菴輔ｂ縺帙★縺ｫ霑斐☆縲�
#
# 蠑墓焚
#	$infofile	繧ｹ繝ｩ繧､繝画ュ蝣ｱ譬ｼ邏阪ヵ繧｡繧､繝ｫ (繝�ヵ繧ｩ繝ｫ繝� menu.txt)
#	$file_num	繧ｹ繝ｩ繧､繝峨�謨ｰ
#	$debug		繝�ヰ繝�げ繧ｪ繝励す繝ｧ繝ｳ
#
# 霑泌唆蛟､
#	縺ｪ縺�.
#
sub CreateInfo(){
    local($infofile, $file_num, $debug) = @_;
    #
    # $infofile 縺悟ｭ伜惠縺吶ｋ蝣ｴ蜷医�菴輔ｂ縺帙★縺ｫ邨ゆｺ��
    #
    if (-f "$infofile") {
	print STDOUT "Slide Informations file $infofile is already exist.\n";
	return;
    }
    #
    # 蟄伜惠縺励↑縺��ｴ蜷医�繧ｹ繝ｩ繧､繝画焚縺ｫ蜷医ｏ縺帙◆ $infofile 繧剃ｽ懈�縲�
    # 
    print STDOUT "Create Slide Informations file $infofile ...  ";
    print STDOUT "  In $infofile ...  \n" if ($DEBUG);
    open(INFOFILE, "&gt; $infofile")
	|| die "$infofile 縺ｫ譖ｸ縺崎ｾｼ繧縺薙→縺後〒縺阪∪縺帙ｓ縺ｧ縺励◆. \n";
    local($n) = 1 ;
    while ($n &lt;= $file_num ) {
	local($number) = sprintf('%.' . $len . 'd', $n);
	print INFOFILE "${number}:\n";
	$n++;
	print STDOUT "    ${number}:\n" if ($debug);
    }
    close(INFOFILE);
    print STDOUT "done\n";
    return;
}

# $infofile 縺九ｉ縺ｮ @info 縺ｸ諠��ｱ繧貞叙蠕励☆繧九し繝悶Ν繝ｼ繝√Φ
#
# 隱ｬ譏�
#	$infofile 蜀��繝��繧ｿ繧� @info 縺ｫ荳陦後▼縺､譬ｼ邏阪＠縺ｦ霑斐☆縲�
#	繧ゅ＠繧よ嶌蠑上′髢馴＆縺｣縺ｦ縺�ｋ蝣ｴ蜷医�繧ｨ繝ｩ繝ｼ繧定ｿ斐＠縺ｦ邨ゆｺ�☆繧九�
#	縺ｪ縺雁叙蠕励�髫帙∵律譛ｬ隱槭�譁�ｭ励さ繝ｼ繝峨ｒ $jpcode 縺ｫ螟画峩縺励※縺励∪縺��
#
# 蠑墓焚
#	$infofile	繧ｹ繝ｩ繧､繝画ュ蝣ｱ譬ｼ邏阪ヵ繧｡繧､繝ｫ (繝�ヵ繧ｩ繝ｫ繝� menu.txt)
#	$jpcode		譁�ｭ励さ繝ｼ繝�
#	$debug		繝�ヰ繝�げ繧ｪ繝励す繝ｧ繝ｳ
#
# 霑泌唆蛟､
#	@info		$infofile 縺ｮ蜷�｡後ｒ譬ｼ邏阪＠縺滄�蛻励�
#			譁�ｭ励さ繝ｼ繝峨�蜈ｨ縺ｦ $jpcode 縺ｸ螟画鋤縲�
#
sub GetInfo(){
    local($infofile, $jpcode, $debug) = @_;
    local(@info);
    print STDOUT "Get Slide Informations from $infofile ...  ";
    open(INFOFILE, "$infofile") || die "$infofile is not found.\n";
    while (&lt;INFOFILE&gt;) {
	# 萓句､門�逅�
	unless ($_ =~ /^(\d){3}:.*$/) {
	    die "$infofile 縺ｮ蜷�｡後�蟋九ａ縺ｯ 001:.., 002:.. 縺ｨ縺ｪ縺｣縺ｦ縺�ｋ蠢�ｦ√′縺ゅｊ縺ｾ縺�.\n"
	}
	chomp;
	# 譁�ｭ励さ繝ｼ繝牙､画鋤
	&amp;Jcode::convert(*_, "$jpcode");
	push(@info, $_);
	print STDOUT "    $_\n" if ($debug);
    }
    close(INFOFILE);
    print STDOUT "done\n";
    return @info;
}

#
# @info 縺ｫ譬ｼ邏阪＆繧後ｋ繝翫Φ繝舌�縺ｨ繧ｵ繝悶ず繧ｧ繧ｯ繝医ｒ蛻�屬縺励※
# @number縲　subject縲�%info_hash 縺ｸ
# 縺ｪ縺翫√し繝悶ず繧ｧ繧ｯ繝医′遨ｺ縺ｮ蝣ｴ蜷医￣age 001縲￣age 002 縺ｪ縺ｩ縺ｮ譁�ｭ励ｒ荳弱∴繧九�
#
# 蠑墓焚
#	$debug		繝�ヰ繝�げ繧ｪ繝励す繝ｧ繝ｳ
#
# 證鈴ｻ吶�蠑墓焚 (蜈･蜉�)
#	@info		蜷�｡後リ繝ｳ繝舌�縺ｨ繧ｵ繝悶ず繧ｧ繧ｯ繝医′譬ｼ邏阪＆繧後※縺�ｋ
#
# 證鈴ｻ吶�蠑墓焚 (蜃ｺ蜉�)
#	@number		蜷�｡後�繝翫Φ繝舌�繧呈�ｼ邏�
#	@subject	蜷�｡後�繧ｵ繝悶ず繧ｧ繧ｯ繝医ｒ譬ｼ邏�
#	%info_hash	繝翫Φ繝舌�繧偵く繝ｼ縺ｫ縲√し繝悶ず繧ｧ繧ｯ繝医ｒ蛟､縺ｫ譬ｼ邏阪＠縺滄｣諠ｳ驟榊�
#
# 霑泌唆蛟､
#	縺ｪ縺�.
#
sub SplitInfo(){
    local($debug) = @_;
    local($key);
    print STDOUT "Split Slide Informations ...  ";
    foreach $key (@info){
	local(@info_parts) = split(/:/, $key, 2);
	print STDOUT "    Number: $info_parts[0]\t Value: " if ($debug);
	# $info_parts[1] 縺檎ｩｺ縺ｮ蝣ｴ蜷医↓縺ｯ "Page 001" 縺ｮ繧医≧縺ｪ
	# 譁�ｭ怜�繧偵＞繧後※縺翫￥
	unless ($info_parts[1] =~ /\S+/){
	    $info_parts[1] = "Page " . "$info_parts[0]";
	    print STDOUT "[Not Found. Auto Generate...] " if ($debug);
	}
	$info_hash{"$info_parts[0]"} = "$info_parts[1]";
	push(@number, $info_parts[0]);
	push(@subject, $info_parts[1]);
	print STDOUT "$info_parts[1]\n" if ($debug);
    }
    print STDOUT "done\n";
    return;
}


#
# 譁�ｭ励さ繝ｼ繝峨ｒ jpcode 逕ｨ縺九ｉ meta 繧ｿ繧ｰ縺ｫ譖ｸ縺崎ｾｼ繧逕ｨ縺ｫ螟画鋤縺吶ｋ繧ｵ繝悶Ν繝ｼ繝√Φ
#
sub JpcodeToMeta($jpcode, $debug) {
    print STDOUT "Recognize Japanese Code is $jpcode ..." unless ($debug);
    local($jpcode, $debug) = @_;
    local($metajp, %meta_jpcode_list);
    %meta_jpcode_list = (
			 'euc',		'euc-jp',
			 'sjis',	'Shift_JIS',
                         'jis',	        'iso-2022-jp',
                         'utf8',        'utf-8',
			);
    $metajp = $meta_jpcode_list{"$jpcode"};
    # 繝�ヰ繝�げ逕ｨ蜃ｺ蜉�
    print STDOUT "JpcodeToMeta: \$jpcode = $jpcode =&gt; \$metajp = $metajp\n" if ($debug);
    print STDOUT "done.\n" unless ($debug);
    return $metajp;
}

#
# 繧ｹ繧ｿ繧､繝ｫ謨ｴ蠖｢繧ｵ繝悶Ν繝ｼ繝√Φ
#
# 蠑墓焚
#	$mode		0: 繧ｹ繧ｿ繧､繝ｫ辟｡縺�, 1: 繧ｹ繧ｿ繧､繝ｫ縺ゅｊ
#	$textcolor	繝�く繧ｹ繝医�濶ｲ
#	$bgcolor	閭梧勹濶ｲ
#	$linkcolor	蟋九ａ縺ｮ繝ｪ繝ｳ繧ｯ濶ｲ
#	$visitedcolor	譌｢縺ｫ蜿ら�縺励◆蠕後�繝ｪ繝ｳ繧ｯ濶ｲ
#	$hovercolor	繝槭え繧ｹ繧剃ｸ翫↓荵励○縺滓凾縺ｮ繝ｪ繝ｳ繧ｯ濶ｲ
#	$link_underline	繝ｪ繝ｳ繧ｯ縺ｮ... none: 荳狗ｷ夂┌縺�, underline: 荳狗ｷ壹≠繧�,
#				    blink: 轤ｹ貊�, overline:荳顔ｷ�,
#				    line-through: 謇薙■豸医＠邱�
#	$link_fontweight 繝ｪ繝ｳ繧ｯ縺ｮ... normal: 譎ｮ騾�, bold: 螟ｪ蟄�
#
#
# 霑泌唆蛟､
#	繧ｹ繧ｿ繧､繝ｫ縺ｨ縺励※譖ｸ縺榊�縺吝�蜉帙Γ繝�そ繝ｼ繧ｸ
#
sub StyleMake() {
    local($mode, $textcolor, $bgcolor, $linkcolor, $visitedcolor,
	  $hovercolor, $link_underline, $link_fontweight, $debug) = @_;
    local($style_output);
    # 繧ｹ繧ｿ繧､繝ｫ逕ｨ縺ｫ譖ｸ縺榊�縺呎枚蟄怜�繧貞�蜉�.
    $style_output =
	'  &lt;style type="text/css"&gt;'. "\n".
	'    &lt;!--'. "\n".
        "      body{\n".
        "           color:$textcolor;\n".
        "           background-color:$bgcolor;\n".
        "          }\n".
        "      a:link{color:$linkcolor;}\n".
        "      a:visited{color:$visitedcolor;}\n".
        "      a:hover{color:$hovercolor;}\n".
        "      a{\n".
        "        text-decoration:$link_underline;\n".
        "        font-weight:$link_fontweight;\n".
        "      }\n".
        "    --&gt;\n".
        "  &lt;/style&gt;\n";

    # 繧ｹ繧ｿ繧､繝ｫ謖�ｮ壹＠縺ｪ縺��ｴ蜷医�, nul 譁�ｭ励ｒ霑斐☆
    undef $style_output unless ($mode);

    # 繝�ヰ繝�げ逕ｨ蜃ｺ蜉�
    print STDOUT "StyleMake: \$style_output = \n $style_output\n" if ($debug);
    return $style_output;
}

#
# 繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ逕ｨ繧ｹ繧ｿ繧､繝ｫ謨ｴ蠖｢繧ｵ繝悶Ν繝ｼ繝√Φ
#
# 蠑墓焚
#	$mode		0: 繧ｹ繧ｿ繧､繝ｫ辟｡縺�, 1: 繧ｹ繧ｿ繧､繝ｫ縺ゅｊ
#	$textcolor	繝�く繧ｹ繝医�濶ｲ
#	$bgcolor	閭梧勹濶ｲ
#	$hovercolor	繝槭え繧ｹ繧剃ｸ翫↓荵励○縺滓凾縺ｮ繝ｪ繝ｳ繧ｯ濶ｲ
#
#
# 霑泌唆蛟､
#	繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺ｮ繧ｹ繧ｿ繧､繝ｫ縺ｨ縺励※譖ｸ縺榊�縺吝�蜉帙Γ繝�そ繝ｼ繧ｸ
#
sub StyleMakeForMenu() {
    local($mode, $textcolor, $bgcolor, $linkcolor, $visitedcolor,
	  $hovercolor, $link_underline, $link_fontweight, $debug) = @_;
    local($style_output);
    # 繧ｹ繧ｿ繧､繝ｫ逕ｨ縺ｫ譖ｸ縺榊�縺呎枚蟄怜�繧貞�蜉�.
    $style_output =
	'  &lt;style type="text/css"&gt;'. "\n".
	'    &lt;!--'. "\n".
        "      body{\n".
        "           color:$textcolor;\n".
        "           background-color:$bgcolor;\n".
        "          }\n".
        "      a:link{color:$linkcolor;}\n".
        "      a:visited{color:$visitedcolor;}\n".
        "      a:hover{color:$hovercolor;}\n".
        "      a:link img {border-color:$bgcolor;}\n".
        "      a:visited img {border-color:$bgcolor;}\n".
        "      a:hover img {border-color:$hovercolor;}\n".
        "      a{\n".
        "        text-decoration:$link_underline;\n".
        "        font-weight:$link_fontweight;\n".
        "      }\n".
        "    --&gt;\n".
        "  &lt;/style&gt;\n";

    # 繧ｹ繧ｿ繧､繝ｫ謖�ｮ壹＠縺ｪ縺��ｴ蜷医�, nul 譁�ｭ励ｒ霑斐☆
    undef $style_output unless ($mode);

    # 繝�ヰ繝�げ逕ｨ蜃ｺ蜉�
    print STDOUT "StyleMakeForMenu: \$style_output = \n $style_output\n" if ($debug);
    return $style_output;
}


#
# 蜷�う繝ｳ繝�ャ繧ｯ繧ｹ繝輔ぃ繧､繝ｫ菴懈�繧ｵ繝悶Ν繝ｼ繝√Φ
#
sub MakeIndex {
    local($title, $style_out, $metajp,
	  $indexfile, $defaultleft, $defaultright, $debug) = @_;
    print STDOUT "Creating Index File ..." unless ($debug);
    open(INDEXFILE, "&gt; $indexfile")
	|| die "繧ｨ繝ｩ繝ｼ: $indexfile 縺ｫ譖ｸ縺崎ｾｼ繧縺薙→縺悟�譚･縺ｾ縺帙ｓ縺ｧ縺励◆. /n";
    #
    # 繝倥ャ繝縺ｮ譖ｸ縺榊�縺�
    #
    print INDEXFILE &lt;&lt;EOF;
&lt;html&gt;
&lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=${metajp}"&gt;
  &lt;title&gt;$title&lt;/title&gt;
$style_out
&lt;/head&gt;

&lt;frameset cols="22%,78%"&gt;
&lt;frame src="../$defaultleft" name="menu" scrolling="yes"&gt;
&lt;frame src="../$defaultright" name="display" scrolling="yes"&gt;
&lt;/frameset&gt;

&lt;/html&gt;
EOF
    print STDOUT "done.\n" unless ($debug);
    close(INDEXFILE);
}

#
# img 繧ｿ繧ｰ縺ｮ alt 螻樊ｧ縺ｫ縲�&lt;縲阪√�&gt;縲阪√�"縲阪√�&amp;縲阪√�'縲阪′蜈･繧区枚蟄励ｒ
# 譖ｸ縺榊�縺輔↑縺�ｈ縺�↓縺吶ｋ縺溘ａ縲√◎繧後ｉ縺悟�繧峨↑縺�枚蟄励□縺代ｒ %altmsg 縺ｫ
# 譬ｼ邏阪�
#
# 蠑墓焚
#	$debug		繝�ヰ繝�げ繧ｪ繝励す繝ｧ繝ｳ
#
# 證鈴ｻ吶�蠑墓焚 (蜈･蜉�)
#	@number		蜷�｡後�繝翫Φ繝舌�繧呈�ｼ邏�
#	%info_hash	繝翫Φ繝舌�繧偵く繝ｼ縺ｫ縲√し繝悶ず繧ｧ繧ｯ繝医ｒ蛟､縺ｫ譬ｼ邏阪＠縺滄｣諠ｳ驟榊�
#
# 證鈴ｻ吶�蠑墓焚 (蜃ｺ蜉�)
#	%altmsg		alt 螻樊ｧ縺ｫ譖ｸ縺榊�縺吝､繧呈�ｼ邏�
#
# 霑泌唆蛟､
#	縺ｪ縺�.
#
#
sub MakeAltMsg(){
    local($debug) = @_;
    local($num);
    print STDOUT "Creating Alt Attribute ...";
    foreach $num (@number){
	# 縲�&lt;縲阪√�&gt;縲阪√�"縲阪√�&amp;縲阪√�'縲阪′蜈･繧区枚蟄励�
	# alt 螻樊ｧ縺ｫ縺ｯ譖ｸ縺榊�縺輔↑縺��
	if ($info_hash{$num} =~ /\&lt;|\&gt;|\"|\&amp;|\'/) {
	    $altmsg{$num} = '';
	} else {
	    $altmsg{$num} = $info_hash{$num};
	}
	print STDOUT "           ${num} : $info_hash{$num}\n" if ($debug);
	print STDOUT "                    alt=\"$altmsg{$num}\"\n" if ($debug);
    }
    print STDOUT "done.\n";
    return;
}


#
# 逕ｻ蜒上ｒ蠑ｵ繧願ｾｼ繧薙□繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺ｮ菴懈�繧ｵ繝悶Ν繝ｼ繝√Φ
#    - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @number 縺ｨ %info_hash 縺ｨ %altmsg 繧貞�驛ｨ縺ｧ蛻ｩ逕ｨ
#      (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)
#
sub MakeMenu() {
    local($menudir, $htmldir, $title, $style_out,
	  $jpcode, $metajp, $imgtype_menu,
	  $upperlink, $upperurl, $lowerlink, $lowerurl,
	  $thumnail_mode, $thumbnail_file, $thumbnail_link,
	  $menufile, $anotherfile, $debug) = @_;
    print STDOUT "Creating Menu File ..." unless ($debug);
    # 譁�ｭ励さ繝ｼ繝牙､画鋤
    &amp;Jcode::convert(*upperlink, "$jpcode");
    &amp;Jcode::convert(*upperurl, "$jpcode");
    &amp;Jcode::convert(*lowerlink, "$jpcode");
    &amp;Jcode::convert(*lowerurl, "$jpcode");
    &amp;Jcode::convert(*thumbnail_link, "$jpcode");
    open(MENUFILE, "&gt; $menufile")
	|| die "繧ｨ繝ｩ繝ｼ: $menufile 縺ｫ譖ｸ縺崎ｾｼ繧縺薙→縺悟�譚･縺ｾ縺帙ｓ縺ｧ縺励◆. /n";
    #
    # 逕ｻ蜒上�蟾ｦ縺ｫ譖ｸ縺崎ｾｼ繧謨ｰ蟄励�逕滓� (鬆ｭ縺ｮ繧ｼ繝ｭ繧貞叙繧企勁縺�)
    #
    local(%leftnum, $num, $left);
    undef %leftnum;
    foreach $num (@number) {
	$left = sprintf("%d", $num);
	$leftnum{$num} = $left;
    }
    #
    # 繝倥ャ繝縺ｮ譖ｸ縺榊�縺�
    #
    print MENUFILE &lt;&lt;EOF;
&lt;html&gt;
&lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=${metajp}"&gt;
  &lt;title&gt; $title Menu&lt;/title&gt;
$style_out
&lt;/head&gt;
&lt;body&gt;

EOF
    #
    # 荳翫↓莉倥￠繧九Μ繝ｳ繧ｯ
    #
    if ($upperlink &amp;&amp; $upperurl) {
	print MENUFILE &lt;&lt;EOF;
&lt;small&gt;
  &lt;a href="../${upperurl}" target="_top"&gt;${upperlink}&lt;/a&gt;
&lt;/small&gt;

EOF
    }
    #
    # 繧ｵ繝�繝阪う繝ｫ繝｢繝ｼ繝峨∈縺ｮ繝ｪ繝ｳ繧ｯ
    #
    if ($thumbnail_mode &amp;&amp; $thumbnail_file &amp;&amp; $thumbnail_link) {
	print MENUFILE &lt;&lt;EOF;
&lt;hr noshade size="1"&gt;
&lt;center&gt;&lt;small&gt;
  &lt;a href="../${thumbnail_file}" target="display"&gt;${thumbnail_link}&lt;/a&gt;
&lt;/small&gt;&lt;/center&gt;
&lt;hr noshade size="1"&gt;

EOF
    }
    #
    # 繧､繝｡繝ｼ繧ｸ繝｡繝九Η繝ｼ縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ
    #
    if ($anotherfile) {
	print MENUFILE &lt;&lt;EOF;
&lt;center&gt;&lt;small&gt;
  [Image] &amp;nbsp;
  &lt;a href="../$anotherfile" target="menu"&gt;[Text]&lt;/a&gt;
&lt;/small&gt;&lt;/center&gt;&lt;/small&gt;&lt;/center&gt;
&lt;hr noshade size="1"&gt;

EOF
    }
    #
    # 逕ｻ蜒冗岼谺｡繝ｪ繝ｳ繧ｯ縺ｮ繝倥ャ繝驛ｨ蛻�嶌縺榊�縺�
    #
    print MENUFILE &lt;&lt;EOF;
&lt;table cellpadding="0" cellspacing="0" width="100%" align="center"&gt;
EOF
    foreach $num (@number){
	print MENUFILE &lt;&lt;EOF;
&lt;tr align="center"&gt;
  &lt;td valign="top"&gt;&lt;br&gt;&lt;small&gt;$leftnum{$num}&lt;/small&gt;&lt;/td&gt;
  &lt;td align="center"&gt;
    &lt;a href="../${htmldir}/${num}.html" target="display"&gt;
    &lt;img src="../${menudir}/${num}.${imgtype_menu}" border="15" alt="$altmsg{$num}"&gt;
    &lt;/a&gt;
  &lt;/td&gt;
&lt;/tr&gt;

EOF
    }
    #
    # 逶ｮ谺｡驛ｨ蛻��繝輔ャ繧ｿ縺ｮ譖ｸ縺榊�縺�
    #
    print MENUFILE &lt;&lt;EOF;
&lt;/table&gt;

EOF
    #
    # 荳九↓莉倥￠繧九Μ繝ｳ繧ｯ
    #
    if ($lowerlink &amp;&amp; $lowerurl) {
	print MENUFILE &lt;&lt;EOF;
&lt;hr noshade size="1"&gt;
&lt;small&gt;&lt;div align="right"&gt;
  &lt;a href="../${lowerurl}" target="_top"&gt;${lowerlink}&lt;/a&gt;
&lt;/div&gt;&lt;/small&gt;

EOF
    }
    #
    # 繝輔ャ繧ｿ縺ｮ譖ｸ縺榊�縺�
    #
    print MENUFILE &lt;&lt;EOF;
&lt;/body&gt;
&lt;/html&gt;
EOF
    close(MENUFILE);
    # 繝�ヰ繝�げ逕ｨ蜃ｺ蜉�
    if ($debug) {
	print STDOUT "MakeMenu:\n" ;
	foreach $num (@number){
	    print STDOUT "           ${num} : $info_hash{$num}\n";
	    print STDOUT "                    alt=\"$altmsg{$num}\"\n";
	}
    }
    print STDOUT "done.\n" unless ($debug);
}

#
# 繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺ｮ菴懈�繧ｵ繝悶Ν繝ｼ繝√Φ
#    - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @number 縺ｨ %info_hash 繧貞�驛ｨ縺ｧ蛻ｩ逕ｨ
#      (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)
#
sub MakeMenuTxt() {
    local($title, $style_out, $jpcode, $metajp,
	  $upperlink, $upperurl, $lowerlink, $lowerurl,
	  $thumnail_mode, $thumbnail_file, $thumbnail_link,
	  $menufile, $anotherfile, $debug) = @_;
    print STDOUT "Creating MenuTexT File ..." unless ($debug);
    # 譁�ｭ励さ繝ｼ繝牙､画鋤
    &amp;Jcode::convert(*upperlink, "$jpcode");
    &amp;Jcode::convert(*upperurl, "$jpcode");
    &amp;Jcode::convert(*lowerlink, "$jpcode");
    &amp;Jcode::convert(*lowerurl, "$jpcode");
    &amp;Jcode::convert(*thumbnail_link, "$jpcode");
    open(MENUFILE, "&gt; $menufile")
	|| die "繧ｨ繝ｩ繝ｼ: $menufile 縺ｫ譖ｸ縺崎ｾｼ繧縺薙→縺悟�譚･縺ｾ縺帙ｓ縺ｧ縺励◆. /n";
    #
    # 繝倥ャ繝縺ｮ譖ｸ縺榊�縺�
    #
    print MENUFILE &lt;&lt;EOF;
&lt;html&gt;
&lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=${metajp}"&gt;
  &lt;title&gt; $title Menu&lt;/title&gt;
$style_out
&lt;/head&gt;
&lt;body&gt;

EOF
    #
    # 荳翫↓莉倥￠繧九Μ繝ｳ繧ｯ
    #
    if ($upperlink &amp;&amp; $upperurl) {
	print MENUFILE &lt;&lt;EOF;
&lt;small&gt;
  &lt;a href="../${upperurl}" target="_top"&gt;${upperlink}&lt;/a&gt;
&lt;/small&gt;

EOF
    }
    #
    # 繧ｵ繝�繝阪う繝ｫ繝｢繝ｼ繝峨∈縺ｮ繝ｪ繝ｳ繧ｯ
    #
    if ($thumbnail_mode &amp;&amp; $thumbnail_file &amp;&amp; $thumbnail_link) {
	print MENUFILE &lt;&lt;EOF;
&lt;hr noshade size="1"&gt;
&lt;center&gt;&lt;small&gt;
  &lt;a href="../${thumbnail_file}" target="display"&gt;${thumbnail_link}&lt;/a&gt;
&lt;/small&gt;&lt;/center&gt;
&lt;hr noshade size="1"&gt;

EOF
    }
    #
    # 繧､繝｡繝ｼ繧ｸ繝｡繝九Η繝ｼ縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ
    #
    if ($anotherfile) {
	print MENUFILE &lt;&lt;EOF;
&lt;center&gt;&lt;small&gt;
  &lt;a href="../$anotherfile" target="menu"&gt;[Image]&lt;/a&gt; &amp;nbsp;
  [Text]
&lt;/small&gt;&lt;/center&gt;&lt;/small&gt;&lt;/center&gt;
&lt;hr noshade size="1"&gt;

EOF
    }
    #
    # 逶ｮ谺｡繝ｪ繝ｳ繧ｯ縺ｮ繝倥ャ繝驛ｨ蛻�嶌縺榊�縺�
    #
    print MENUFILE &lt;&lt;EOF;
&lt;ol&gt;&lt;small&gt;
EOF
    foreach $num (@number){
	print MENUFILE &lt;&lt;EOF;
&lt;li&gt;&lt;a href="../${htmldir}/${num}.html" target="display"&gt;$info_hash{$num}&lt;/a&gt;&lt;br&gt;

EOF
    }
    #
    # 逶ｮ谺｡驛ｨ蛻��繝輔ャ繧ｿ縺ｮ譖ｸ縺榊�縺�
    #
    print MENUFILE &lt;&lt;EOF;
&lt;/small&gt;&lt;/ol&gt;

EOF
    #
    # 荳九↓莉倥￠繧九Μ繝ｳ繧ｯ
    #
    if ($lowerlink &amp;&amp; $lowerurl) {
	print MENUFILE &lt;&lt;EOF;
&lt;hr noshade size="1"&gt;
&lt;small&gt;&lt;div align="right"&gt;
  &lt;a href="../${lowerurl}" target="_top"&gt;${lowerlink}&lt;/a&gt;
&lt;/div&gt;&lt;/small&gt;

EOF
    }
    #
    # 繝輔ャ繧ｿ縺ｮ譖ｸ縺榊�縺�
    #
    print MENUFILE &lt;&lt;EOF;
&lt;/body&gt;
&lt;/html&gt;
EOF
    close(MENUFILE);
    # 繝�ヰ繝�げ逕ｨ蜃ｺ蜉�
    if ($debug) {
	print STDOUT "MakeMenu:\n" ;
	foreach $num (@number){
	    print STDOUT "           ${num} : $info_hash{$num}\n";
	}
    }
    print STDOUT "done.\n" unless ($debug);
}


#
# 蜷� HTML 繝輔ぃ繧､繝ｫ菴懈�繧ｵ繝悶Ν繝ｼ繝√Φ
#    - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @number 縺ｨ %info_hash 縺ｨ %altmsg 繧貞�驛ｨ縺ｧ蛻ｩ逕ｨ
#      (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)
#
sub MakeHtml {
    local($htmldir, $title, $style_out,
	  $previouslink, $nextlink, $imgtype,
	  $acktext, $acklink, $jpcode, $metajp, $debug) = @_;
    # 繝�ヰ繝�げ逕ｨ繝｡繝�そ繝ｼ繧ｸ繝倥ャ繝
    print STDOUT "MakeHtml:\n" if ($debug);

    # 譁�ｭ励さ繝ｼ繝牙､画鋤
    &amp;Jcode::convert(*previouslink, "$jpcode");
    &amp;Jcode::convert(*nextlink, "$jpcode");
    #
    # 繝�ぅ繝ｬ繧ｯ繝医Μ縺ｮ蜑企勁縺ｨ菴懈�
    #
    print STDOUT "Removing Old HTML Files ..." unless ($debug);
    print STDOUT "  Remove ./${htmldir}, and Mkdir ${htmldir}" if ($debug);

    system("/bin/rm -rf ./${htmldir}/") if -d "./${htmldir}";
    mkdir("${htmldir}", 0755);

    print STDOUT "done.\n". "Creating HTML Files ..." unless ($debug);

    # 迴ｾ蝨ｨ縺ｮ繝�ぅ繝ｬ繧ｯ繝医Μ縺ｮ蝣ｴ謇繧貞叙蠕�
    local($current_dir) = `pwd`;
    chomp $current_dir;
    # 繝�ぅ繝ｬ繧ｯ繝医Μ遘ｻ蜍�
    chdir("./${htmldir}");
    print STDOUT "  Move to $htmldir ...\n" if ($debug);

    # 隕∫ｴ�逡ｪ蜿ｷ縺ｨ縺励※ $element_num 繧堤畑諢�
    local($element_num) = 0;


    while ($number[$element_num]) {
	local($allpage_num) = $#number + 1;
	local($previous_num) = $element_num - 1;
	local($next_num) = $element_num + 1;
	local($htmlnumber) = $number[$element_num];
	local($htmlfile) = "${htmlnumber}.html";
	#
	# 繝倥ャ繝縺ｮ菴懈�
	#
	open(HTMLFILE, "&gt; $htmlfile")
	    || die "繧ｨ繝ｩ繝ｼ: $htmlfile 縺ｫ譖ｸ縺崎ｾｼ繧縺薙→縺悟�譚･縺ｾ縺帙ｓ縺ｧ縺励◆. /n";
	print HTMLFILE &lt;&lt;EOF;
&lt;html&gt;
&lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=${metajp}"&gt;
  &lt;title&gt;$title [$info_hash{$htmlnumber}]&lt;/title&gt;
$style_out
&lt;/head&gt;
&lt;body&gt;
EOF
	#
	# 蜑榊ｾ後�繝壹�繧ｸ縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ, 迴ｾ繝壹�繧ｸ/繝壹�繧ｸ邱乗焚, 蟆城｡後�譖ｸ縺榊�縺�
	#
	print HTMLFILE &lt;&lt;EOF;

&lt;hr noshade size="1"&gt;
&lt;table width="90%"&gt;
  &lt;tr&gt;
    &lt;td width="30%"&gt;
EOF
	# 譛蛻昴�繝壹�繧ｸ縺ｨ譛蠕後�繝ｼ繧ｸ縺ｮ蝣ｴ蜷医�繝ｪ繝ｳ繧ｯ繧定ｲｼ繧後↑縺��縺ｧ
	# 譚｡莉ｶ蛻�ｲ舌☆繧�.

	# 譛蛻昴�繝壹�繧ｸ縺ｯ [蜑埼�‐ 縺ｫ繝ｪ繝ｳ繧ｯ繧定ｲｼ繧峨↑縺�
	if ($previous_num &lt; 0) {
	    print HTMLFILE &lt;&lt;EOF;
      ${previouslink}
      &lt;A HREF="$number["$next_num"].html"&gt;${nextlink}&lt;/A&gt;
EOF
	}
	# 譛蠕後�繝壹�繧ｸ縺ｯ [蠕碁�‐ 縺ｫ繝ｪ繝ｳ繧ｯ繧定ｲｼ繧峨↑縺�
	elsif ($next_num &gt; $#number) {
	    print HTMLFILE &lt;&lt;EOF;
      &lt;A HREF="$number["$previous_num"].html"&gt;${previouslink}&lt;/A&gt;
      ${nextlink}
EOF
	}
	# 縺昴�莉悶�鬆√�荳｡譁ｹ縺ｫ繝ｪ繝ｳ繧ｯ
	else {
	    print HTMLFILE &lt;&lt;EOF;
      &lt;A HREF="$number["$previous_num"].html"&gt;${previouslink}&lt;/A&gt;
      &lt;A HREF="$number["$next_num"].html"&gt;${nextlink}&lt;/A&gt;
EOF
	}


	print HTMLFILE &lt;&lt;EOF;
    &lt;/td&gt;
    &lt;td width="30%" align="center"&gt;
    $next_num / $allpage_num
    &lt;/td&gt;
    &lt;td align="right"&gt;
      $info_hash{$htmlnumber}
    &lt;/td&gt;
  &lt;/tr&gt;
&lt;/table&gt;
&lt;hr noshade size="1"&gt;

EOF
	#
	# 逕ｻ蜒剰ｲｼ繧翫▽縺鷹Κ蛻�
	#
	print HTMLFILE &lt;&lt;EOF;
&lt;img src="../../${slidedir}/${htmlnumber}.${imgtype}" alt="$altmsg{$htmlnumber}"&gt;

EOF
	#
	# 繝壹�繧ｸ譛ｫ蟆ｾ縺ｮ繝｡繝�そ繝ｼ繧ｸ蜃ｺ蜉�
	#
	if ($acktext) {
	    print HTMLFILE &lt;&lt;EOF;
&lt;hr noshade size="1"&gt;
&lt;div align="right"&gt;
EOF
	    local($_) = $acktext;
	    if ($acklink_out = $acklink) {
		${acklink_out} = "&lt;b&gt;&lt;a href=\"${acklink_out}\" target=\"_top\"&gt;";
		s/::/${acklink_out}/ || s/^/${acklink_out}/;
		${acklink_out} = "&lt;/a&gt;&lt;/b&gt;";
		s/::/${acklink_out}/ || s/$/${acklink_out}/;
	    }
	    print HTMLFILE "$_\n";
	    print HTMLFILE ": at ", &amp;FmtTime, "&lt;/div&gt;\n";
	}
	#
	# 繝輔ャ繧ｿ縺ｮ菴懈�
	#
	print HTMLFILE &lt;&lt;EOF;
&lt;/body&gt;
&lt;/html&gt;
EOF
	close(HTMLFILE);
	print STDOUT "${element_num}, " unless ($debug);
	# 繝�ヰ繝�げ逕ｨ蜃ｺ蜉�
	if ($debug) {
	    print STDOUT "  page: ${element_num}\n".
		         "    allpage : ${allpage_num}\n".
		         "    previous: ${previous_num}\n".
		         "    next    : ${next_num}\n".
		         "    html_num: ${htmlnumber}\n".
		         "    htmlfile: ${htmlfile}\n";
	}
	# 谺｡縺ｮ繝ｫ繝ｼ繝励∈
	$element_num++;
    }
    # 蜈��繝�ぅ繝ｬ繧ｯ繝医Μ縺ｫ謌ｻ繧�
    chdir("$current_dir");
    print STDOUT "  Back to $current_dir.\n" if ($debug);
    print STDOUT "done.\n" unless ($debug);
    return;
}

#
# 譎る俣蜃ｺ蜉帷畑繧ｵ繝悶Ν繝ｼ繝√Φ
#
sub FmtTime {
	local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
	 = localtime time;
	sprintf "%4d/%02d/%02d %02d:%02d:%02d",
		$year + 1900, $mon + 1, $mday, $hour, $min, $sec;
}

#
# 繧ｵ繝�繝阪う繝ｫ菴懈�繧ｵ繝悶Ν繝ｼ繝√Φ
#    - 繧ｰ繝ｭ繝ｼ繝舌Ν螟画焚縺ｮ @number 縺ｨ %info_hash 縺ｨ %altmsg 繧貞�驛ｨ縺ｧ蛻ｩ逕ｨ
#      (貂｡縺励◆縺九▲縺溘￠縺ｩ, 貂｡縺帙↑縺九▲縺溘�縺ｧ繧ｵ繝懊ｋ)
#
sub MakeThumbnail() {
    local($title, $style_out, $jpcode, $metajp, $htmldir,
	  $thumnail_mode, $thumbnail_file, $thumbdir,
	  $thumbnail_link, $thumbnail_col_num,
	  $imgtype_thumb, $acktext, $acklink, $debug) = @_;
    # 繝�ヵ繧ｩ繝ｫ繝医�蛻励�謨ｰ
    local($thumbnail_col_num_def) = "3";

    # 繝�ヰ繝�げ逕ｨ繝｡繝�そ繝ｼ繧ｸ蜃ｺ蜉�
    print STDOUT "MakeThumbnail: \$thumbnail_mode = $thumbnail_mode\n" if ($debug);
    # $thumnail_mode 縺悟⊃ (0) 縺ｪ繧峨�菴輔ｂ縺帙★縺ｫ邨ゆｺ�
    return unless ($thumbnail_mode);

    # 繝ｦ繝ｼ繧ｶ逕ｨ, 繝�ヰ繝�げ逕ｨ繝｡繝�そ繝ｼ繧ｸ蜃ｺ蜉�
    print STDOUT "Creating Thumbnail File ..." unless ($debug);
    if ($debug) {
	print STDOUT "  \$thumbnail_file = $thumbnail_file\n".
	             "  \$thumbdir = $thumbdir\n".
	             "  \$thumbnail_link = $thumbnail_link\n".
	             "  \$thumbnail_col_num = $thumbnail_col_num\n".
	             "  \$thumbdir = $thumbdir\n";
    }
    # 譁�ｭ励さ繝ｼ繝牙､画鋤
    &amp;Jcode::convert(*thumnail_link, "$jpcode");
    # 萓句､門�逅�
    unless ($thumbnail_col_num =~ /^\d+$/){
	print STDOUT "  Modify \$thumbnail_col_num ".
	    "from $thumbnail_col_num to $thumbnail_col_num_def.\n" if ($debug);
	$thumbnail_col_num = $thumbnail_col_num_def;
    }
    # 繝輔ぃ繧､繝ｫ繧ｪ繝ｼ繝励Φ
    open(THUMBFILE, "&gt; $thumbnail_file")
	|| die "繧ｨ繝ｩ繝ｼ: $thumbnail_file 縺ｫ譖ｸ縺崎ｾｼ繧縺薙→縺悟�譚･縺ｾ縺帙ｓ縺ｧ縺励◆. /n";
    #
    # 繝倥ャ繝縺ｮ譖ｸ縺榊�縺�
    #
    print THUMBFILE &lt;&lt;EOF;
&lt;html&gt;
&lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=${metajp}"&gt;
  &lt;title&gt; $title Thumbnail&lt;/title&gt;
$style_out
&lt;/head&gt;
&lt;body&gt;

&lt;hr noshade size="1"&gt;
&lt;center&gt;
  $title
&lt;/center&gt;
&lt;hr noshade size="1"&gt;


EOF
    #
    # 繝��繝悶Ν縺ｮ繝倥ャ繝驛ｨ蛻�嶌縺榊�縺�
    #
    print THUMBFILE &lt;&lt;EOF;
&lt;table border="0" cellspacing="20" cellpadding="0" align="center"&gt;
EOF

    #
    # 繧ｵ繝�繝阪う繝ｫ驛ｨ蛻�ｽ懈�
    #

    # 隕∫ｴ�逡ｪ蜿ｷ縺ｨ縺励※ $element_num 繧堤畑諢�
    local($element_num) = 0;

    while ($number[$element_num]) {
	local($thumbnum) = $number[$element_num];
	local($amari) = $thumbnum % $thumbnail_col_num;

	#
	# 繝��繝悶Ν縺ｮ驟咲ｽｮ縺ｫ繧医▲縺ｦ &lt;tr&gt; 縺ｮ縺､縺代◆縺励ｒ縺翫％縺ｪ縺�.
	# 蟾ｦ遶ｯ : 3n+1 ($amari == 1)
	# 蜿ｳ遶ｯ : 3n   ($amari == 0)
	if ($amari == 1) {
	    print THUMBFILE &lt;&lt;EOF;
  &lt;tr align="center" valign="bottom"&gt;
EOF
	}

        print THUMBFILE &lt;&lt;EOF;
    &lt;td align="center" valign="top"&gt;
      &lt;a href="../${htmldir}/${thumbnum}.html"&gt;
        &lt;img src="../${thumbdir}/${thumbnum}.${imgtype_thumb}" border="2" alt="$altmsg{$thumbnum}"&gt;
      &lt;/a&gt;
      &lt;br&gt;
      &lt;small&gt;
         $info_hash{$thumbnum}
      &lt;/small&gt;
    &lt;/td&gt;
EOF
	if ($amari == 0) {
	    print THUMBFILE &lt;&lt;EOF;
  &lt;/tr&gt;
EOF
	}
	# 繝�ヰ繝�げ逕ｨ蜃ｺ蜉�
	if ($debug) {
	    print STDOUT "    ${thumbdir}/${thumbnum}.${imgtype_thumb} -&gt; ".
		           "./${htmldir}/${thumbnum}.html\n";
	}
	$element_num++;
    }

    #
    # 繝��繝悶Ν縺ｧ谺�縺代※縺�ｋ驛ｨ蛻�ｒ霑ｽ蜉�
    #
    local($total) = $#number + 1 ; # 逕ｻ蜒上�謨ｰ繧貞叙蠕�
    local($total_amari) = $total % $thumbnail_col_num;
    local($total_nokori) = $thumbnail_col_num - $total_amari;
    local($i);
    # 繝�ヰ繝�げ逕ｨ蜃ｺ蜉�
    if ($debug) {
	print STDOUT "  \$total        = $total\n".
	             "  \$total_amari  = $total_amari\n".
	             "  \$total_nokori = $total_nokori\n";
    }
    
    for ($i = $total_nokori; $i &gt; 0; $i--) {
	print THUMBFILE &lt;&lt;EOF;
    &lt;td&gt;&amp;nbsp;&lt;/td&gt;
EOF
    }
    if ($total_nokori) {
	print THUMBFILE &lt;&lt;EOF;
  &lt;/tr&gt;
EOF
    }

    #
    # 繝��繝悶Ν縺ｮ繝輔ャ繧ｿ驛ｨ蛻�嶌縺榊�縺�
    #
    print THUMBFILE &lt;&lt;EOF;
&lt;/table&gt;
EOF

    #
    # 繝壹�繧ｸ譛ｫ蟆ｾ縺ｮ繝｡繝�そ繝ｼ繧ｸ蜃ｺ蜉�
    #
    if ($acktext) {
	print THUMBFILE &lt;&lt;EOF;
&lt;hr noshade size="1"&gt;
&lt;div align="right"&gt;
EOF
	local($_) = $acktext;
	if ($acklink_out = $acklink) {
	    ${acklink_out} = "&lt;b&gt;&lt;a href=\"${acklink_out}\" target=\"_top\"&gt;";
	    s/::/${acklink_out}/ || s/^/${acklink_out}/;
	    ${acklink_out} = "&lt;/a&gt;&lt;/b&gt;";
	    s/::/${acklink_out}/ || s/$/${acklink_out}/;
	}
	print THUMBFILE "$_\n";
	print THUMBFILE ": at ", &amp;FmtTime, "&lt;/div&gt;\n";
    }

    #
    # 繝輔ャ繧ｿ縺ｮ譖ｸ縺榊�縺�
    #
    print THUMBFILE &lt;&lt;EOF;
&lt;/body&gt;
&lt;/html&gt;
EOF
    close(THUMBFILE);
    
    print STDOUT "done.\n" unless ($debug);
}



# 邨ゆｺ�Γ繝�そ繝ｼ繧ｸ縺ｮ陦ｨ遉ｺ (繝�ヰ繝�げ繝｢繝ｼ繝画凾)
#
sub EndMessage() {
    local($debug) = @_;
    print STDOUT "EndMessage: Execute Successfully!!\n" if ($debug);
    print STDOUT "Complete.\n" unless ($debug);
}


##################################################
#####                                        #####
##         README.TXT 蜃ｺ蜉帙し繝悶Ν繝ｼ繝√Φ         ###
#####      (蜀�ｮｹ縺ｯ README.TXT 縺ｮ繧ｳ繝斐�)      #####
##################################################


sub PrintReadme() {
    print STDOUT &lt;&lt;'EOF';
笘� dcppt (GFD Dennou Club PowerPoint 謨ｴ蠖｢) 繧ｻ繝�ヨ version 1 笘�

   PowerPoint 繝輔ぃ繧､繝ｫ繧定ｦ九ｄ縺吶＞ HTML 蠖｢蠑上↓螟画鋤縺吶ｋ Perl 繧ｹ繧ｯ繝ｪ繝励ヨ

笆� 讎りｦ�

   PowerPoint 縺ｯ繝励Ξ繧ｼ繝ｳ繝��繧ｷ繝ｧ繝ｳ縺ｫ萓ｿ蛻ｩ縺�縺�, 縺昴ｌ繧剃ｸ�ｺｺ縺ｫ隕九∴繧九ｈ縺�↑
   HTML 蠖｢蠑上↓螟画鋤縺吶ｋ縺ｮ縺碁擇蛟偵￥縺輔＞.
   (PowerPoint 縺ｧ縲粂TML蠖｢蠑上〒菫晏ｭ倥阪→縺励※繧ゅ◎縺薙◎縺楢ｦ九ｋ縺薙→縺後〒縺阪ｋ縺ｮ
    縺�縺�, Windows 縺ｧ縺ｪ縺�→邯ｺ鮗励↓隕九ｌ縺ｪ縺�％縺ｨ縺後≠縺｣縺溘ｊ, 逕ｻ蜒上↓繧医▲縺ｦ縺ｯ
    HTML 蛹門�譚･縺ｪ縺�ｂ縺ｮ繧ゅ≠繧�)

   縺薙�繧ｹ繧ｯ繝ｪ繝励ヨ縺ｮ繧ｻ繝�ヨ繧剃ｽｿ縺�％縺ｨ縺ｧ, 縺ｩ縺ｮ繝励Λ繝�ヨ繝輔か繝ｼ繝�縺ｧ繧�
   隕九ｋ縺薙→縺後〒縺�, 縺昴％縺昴％隕九ｄ縺吶＞(?)HTML繝輔ぃ繧､繝ｫ繧剃ｽ懈�縺吶ｋ縺薙→縺悟�譚･繧�.


笆� 譴ｱ蛹�黄

   dcppt.tar.gz 繝輔ぃ繧､繝ｫ繧貞ｱ暮幕縺吶ｋ縺薙→縺ｧ莉･荳九�繝輔ぃ繧､繝ｫ縺後〒縺阪≠縺後ｋ
   縺ｯ縺壹〒縺ゅｋ.

     繝ｻ dcppt.pl         窶ｦ HTML 繝輔か繝ｼ繝槭ャ繝医ｒ菴懈�縺吶ｋPerl繧ｹ繧ｯ繝ｪ繝励ヨ
     繝ｻ sample           窶ｦ 繧ｵ繝ｳ繝励Ν
     繝ｻ README.TXT       窶ｦ 縺薙�繝輔ぃ繧､繝ｫ

   (髢狗匱閠�畑繝��繝ｫ)
     繝ｻ Makefile         窶ｦ make 逕ｨ縺ｮ繝輔ぃ繧､繝ｫ


笆� 繧ｵ繝ｳ繝励Ν (縺翫∪縺�)

   sample 繝�ぅ繝ｬ繧ｯ繝医Μ縺ｫ縺ｯ, dcppt 縺ｮ繧ｵ繝ｳ繝励Ν縺檎ｽｮ縺�※縺ゅｋ.
   (縺薙�繧ｵ繝ｳ繝励Ν繧剃ｽｿ縺医ｋ縺九←縺�°縺ｧ, 繧ｷ繧ｹ繝�Β荳翫〒 dcppt 縺�
    菴ｿ縺医ｋ縺九←縺�°縺ｮ繝�せ繝医↓繧ゅ↑繧九□繧阪≧)

   繝ｻ src/             窶ｦ 諠��ｱ蜈� 
          title.txt    窶ｦ 繧ｵ繝ｳ繝励Ν縺ｮ繧ｿ繧､繝医Ν繝輔ぃ繧､繝ｫ
          menu.txt     窶ｦ 繧ｵ繝ｳ繝励Ν縺ｮ繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ
          Slide*.PNG   窶ｦ 繧ｹ繝ｩ繧､繝峨ｒ逕ｻ蜒丞喧縺励◆繝輔ぃ繧､繝ｫ
                          (PowerPoint 縺ｮ縲係eb 繝壹�繧ｸ縺ｧ菫晏ｭ倥阪〒菴懈�)
   繝ｻ Makefile	       窶ｦ make 逕ｨ繝輔ぃ繧､繝ｫ
   繝ｻ dcppt.ppt	       窶ｦ 繧ｵ繝ｳ繝励Ν縺ｮ ppt 繝輔ぃ繧､繝ｫ
   繝ｻ pub/             窶ｦ 蜈ｬ髢狗畑繧ゅ�鄂ｮ蝣ｴ



   笆｡ HTML 逕滓�

      sample 縺ｫ遘ｻ蜍輔＠, dcppt 繧ｳ繝槭Φ繝峨ｒ螳溯｡後☆繧�

        $ cd sample
	$ perl ../dcppt.pl -x

      縺吶ｋ縺ｨ, pub 繝�ぅ繝ｬ繧ｯ繝医Μ莉･荳九↓, index.html 遲�,
      逕滓�縺輔ｌ縺� HTML 遲峨′縺ｧ縺阪ｋ縺ｯ縺壹〒縺ゅｋ.

      繝悶Λ繧ｦ繧ｶ縺ｧ螳滄圀縺ｫ隕九※縺ｿ縺ｦ谺ｲ縺励＞

      
   笆｡ 蛻晄悄蛹�

      逕滓�縺励◆ HTML 繧呈ｶ亥悉縺�, 蛻晄悄蛹悶＠縺溘＞蝣ｴ蜷医�,

        $ make clean

      縺ｨ縺吶ｋ縺ｨ濶ｯ縺�.


笆� HTML 菴懈�謇矩��

   笳� Windows 縺ｧ陦後≧菴懈･ｭ

      縺ｾ縺�, Windows 蛛ｴ縺ｧ ppt 繝輔ぃ繧､繝ｫ縺九ｉ逕ｻ蜒上ヵ繧｡繧､繝ｫ繧堤函謌舌☆繧句ｿ�ｦ√′縺ゅｋ.

      PowerPoint 縺ｮ縲後ヵ繧｡繧､繝ｫ縲坂�縲係eb繝壹�繧ｸ縺ｧ菫晏ｭ倥阪→縺励※縲�
      縲後ヵ繧｡繧､繝ｫ縺ｮ遞ｮ鬘槭阪↓ gif, jpeg, png 縺ｮ縺ｩ繧後°繧帝∈謚槭☆繧九�
      縲後�繝ｬ繧ｼ繝ｳ繝��繧ｷ繝ｧ繝ｳ縺ｮ繧ｹ繝ｩ繧､繝峨ｒ蜈ｨ縺ｦ繧ｨ繧ｯ繧ｹ繝昴�繝医＠縺ｾ縺吶°�溘阪↓
      縲後�縺�阪→遲斐∴繧九�

      縺吶ｋ縺ｨ, PowerPoint 縺ｮ繝輔ぃ繧､繝ｫ蜷阪→蜷後§縺ｪ蜑阪�繝�ぅ繝ｬ繧ｯ繝医Μ縺ｫ
      逕ｻ蜒上′菫晏ｭ倥＆繧後ｋ縺ｮ縺ｧ, 縺昴ｌ縺斐→ Linux 迺ｰ蠅��繝槭す繝ｳ
      (Web 繧ｵ繝ｼ繝舌〒縺�＞縺ｧ縺励ｇ縺�) 縺ｫ繧ｳ繝斐�縺吶ｋ.


   笳� Linux (Web 繧ｵ繝ｼ繝�)縺ｧ陦後≧菴懈･ｭ

      0. dcppt.pl 縺悟茜逕ｨ縺ｧ縺阪ｋ縺溘ａ縺ｫ縺ｯ...

	 a. perl 縺御ｽｿ縺医ｋ
	    - 蟆よ判 Web 繧ｵ繝ｼ繝舌↑繧牙ｿ�★菴ｿ縺医ｋ
	    - perl 5.6.1 縺ｧ蜍穂ｽ懃｢ｺ隱肴ｸ�

	    - 窶ｻ 繝代せ縺ｫ髢｢縺励※ 窶ｻ
		 dcppt.pl 縺ｯ Debian 縺ｮ迺ｰ蠅�〒菴懈�縺励◆縺ｮ縺ｧ
		 perl 縺ｮ繝代せ縺� /usr/bin/perl 縺ｨ縺ｪ縺｣縺ｦ縺�ｋ.
		 莉悶� OS 縺ｮ蝣ｴ蜷医�繝代せ縺檎焚縺ｪ繧句�ｴ蜷医′縺ゅｋ縺ｮ縺ｧ
		 螟画峩縺吶ｋ縺薙→
		 (perl 縺ｮ繝代せ縺ｯ which perl 縺ｨ縺吶ｋ縺ｨ遏･繧九％縺ｨ縺後〒縺阪ｋ)

		 螟画峩縺ｯ, dcppt.pl 譛ｬ菴薙�荳逡ｪ荳翫�陦後�
		 縲�#!/usr/bin/perl縲阪ｒ譖ｸ縺肴鋤縺医ｌ縺ｰ繧医＞

	 b. Jcode 縺御ｽｿ縺医ｋ (譌･譛ｬ隱樊枚蟄励さ繝ｼ繝臥畑繝ｩ繧､繝悶Λ繝ｪ縺ｧ縺�)
	   - Debian GNU/Linux 7.0 縺ｪ繧峨�, libjcode-pm-perl 繝代ャ繧ｱ繝ｼ繧ｸ繧�
	     繧､繝ｳ繧ｹ繝医�繝ｫ縺吶ｋ縺薙→縺ｧ, 繧ｷ繧ｹ繝�Β縺ｫ邨�∩霎ｼ繧√ｋ

	 c. ImageMagic 縺御ｽｿ縺医ｋ (逕ｻ蜒丞�逅��縺溘ａ縺ｧ縺�)
	    - 蟆よ判 Web 繧ｵ繝ｼ繝舌↑繧牙ｿ�★菴ｿ縺医ｋ
	    - Debian GNU/Linux 3.0 縺ｪ繧峨�, imagemagic 繝代ャ繧ｱ繝ｼ繧ｸ繧�
	      繧､繝ｳ繧ｹ繝医�繝ｫ縺吶ｋ縺薙→縺ｧ, 繧ｷ繧ｹ繝�Β縺ｫ邨�∩霎ｼ繧√ｋ

         縺ｪ縺�, 蜍穂ｽ懃｢ｺ隱阪�縺溘ａ縺ｫ sample 繝�ぅ繝ｬ繧ｯ繝医Μ縺檎畑諢上＆繧後※縺�ｋ.
	 繧ゅ＠繧ゆｸ玖ｨ倥�謇矩��↓縺励◆縺後▲縺ｦ縺�∪縺剰｡後°縺ｪ縺��ｴ蜷�,
	 sample 莉･荳九〒莉･荳九�繧医≧縺ｫ蜍穂ｽ懊メ繧ｧ繝�け繧定｡後↑縺｣縺ｦ谺ｲ縺励＞.

	    $ make clean
	    $ make

      1. 逕ｻ蜒上ヵ繧｡繧､繝ｫ縺悟�縺｣縺ｦ縺�ｋ繝�ぅ繝ｬ繧ｯ繝医Μ繧� src 縺ｫ螟画峩

            $ mv &lt;繝�ぅ繝ｬ繧ｯ繝医Μ&gt; src

      2. dcppt -x 螳溯｡�

            $ dcppt -x

      3. 蜃ｦ逅�∈謚�

             險ｭ螳壹ヵ繧｡繧､繝ｫ縺ｧ縺ゅｋ src/Config.dcppt 縺瑚ｦ句ｽ薙◆繧翫∪縺帙ｓ.
               1. dcppt 繝�ヵ繧ｩ繝ｫ繝医�險ｭ螳壹〒蜃ｦ逅�ｒ縺吶ｋ縺ｪ繧� "y",
               2. 蜃ｦ逅�ｒ荳ｭ譁ｭ縺吶ｋ縺ｪ繧�                     "n",
               3. src/Config.dcppt 繝�Φ繝励Ξ繝ｼ繝医ｒ蜃ｺ蜉帙☆繧九↑繧�"m"
             繧貞�蜉帙＠縺ｦ縺上□縺輔＞ [Y/n/m]: 

	 縺ｨ閨槭°繧後ｋ縺後◎縺ｮ縺ｾ縺ｾ Enter

      4. 繧ｿ繧､繝医Ν蜈･蜉�

             繧ｿ繧､繝医Ν繧定ｨ伜�縺励※荳九＆縺�.
	       Title []:

	 縺ｫ繧ｹ繝ｩ繧､繝峨�繧ｿ繧､繝医Ν繧貞�蜉�. (遨ｺ逋ｽ縺ｧ繧ょｮ溯｡後�蜿ｯ閭ｽ)
	  
      5. 逕滓�

         蜃ｦ逅�′髢句ｧ九＆繧後ｋ. (荳蝗樒岼縺ｯ逕ｻ蜒上�蜃ｦ逅�′縺翫％縺ｪ繧上ｌ繧�
	 縺ｮ縺ｧ蟆代�凾髢薙′縺九°繧�).

	     Get Names of Image in src ...  done.
	     Prepare Names of image files in publish directory ...  done.
	     Get ImageType from pub/menu ...done.
	     Get ImageType from pub/slide ...done.
	     Get ImageType from pub/thumbnail ...done.
	     Get Slide Informations from src/menu.txt ...  done
	     Recognize Japanese Code is euc ...done.
	     Creating Index File ...done.
	     Creating Menu File ...done.
	     Creating Menu File ...done.
	     Removing Old HTML Files ...done.
	     Creating HTML Files ...0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, done.
	     Creating Thumbnail File ...done.
	     Complete.

	 譛蠕後↓縲靴omplete縲阪′縺ｧ繧九→螳御ｺ�.
	
      7. 縺ｧ縺阪≠縺後ｊ遒ｺ隱�

         pub/index.html 縺ｫ逕滓�縺輔ｌ縺溘ｂ縺ｮ縺ｮ繧､繝ｳ繝�ャ繧ｯ繧ｹ縺檎ｽｮ縺九ｌ繧九�縺ｧ
	 縺昴ｌ繧偵∩縺ｦ縺ｿ繧�.


   笳� 縺翫∪縺�

      1. 繝｡繝九Η繝ｼ繧呈嶌縺崎ｾｼ繧

         src/menu.txt 縺ｫ蟆城｡御ｸ隕ｧ繧呈嶌縺崎ｾｼ繧縺薙→縺ｧ譁�ｭ励Γ繝九Η繝ｼ縺ｫ
	 譖ｸ縺榊�縺吶％縺ｨ縺悟�譚･繧�.
	 
	 譖ｸ蠑上�

		001:&lt;1縺､繧√�繧ｹ繝ｩ繧､繝峨�鬘檎岼&gt;
		002:&lt;2縺､繧√�繧ｹ繝ｩ繧､繝峨�鬘檎岼&gt;
		003:&lt;3縺､繧√�繧ｹ繝ｩ繧､繝峨�鬘檎岼&gt;
			    :

	 縺ｨ縺ｪ繧�. 蜈ｷ菴鍋噪縺ｫ縺ｯ

		001:縺ｯ縺倥ａ縺ｫ
		002:逶ｮ谺｡
		003:BIOS縺｣縺ｦ?
		     :

	 縺ｨ譖ｸ縺榊�縺帙�濶ｯ縺�.

	 窶ｻ sample 蜀�� menu.txt 繧貞盾辣ｧ縺励※谺ｲ縺励＞.

	 譖ｸ縺咲ｵゅｏ縺｣縺溘ｉ, 蜈医↓ dcppt.pl 繧貞ｮ溯｡後＠縺溷�ｴ謇縺ｧ

	    $ dcppt.pl -q

	 繧貞ｮ溯｡後☆繧九→濶ｯ縺�. 縺ｩ縺�ｈ縺�↓繧ｿ繧､繝医Ν繧呈嶌縺肴鋤縺医◆縺��ｴ蜷医�
	 src/title.txt 繧呈嶌縺肴鋤縺医ｋ縺ｨ濶ｯ縺�.
	 
      
      2. 譖ｸ蠑上ｒ縺�ｍ縺�ｍ螟画峩

         險ｭ螳壹ヵ繧｡繧､繝ｫ src/Config.dcppt 繧呈嶌縺肴鋤縺医ｋ縺薙→縺ｧ隕区��∴遲峨ｒ
	 螟画峩縺吶ｋ縺薙→縺悟庄閭ｽ縺ｧ縺ゅｋ. src/Config.dcppt 縺ｯ

	    $ dcppt.pl -x

	 縺ｨ縺励※, 

             險ｭ螳壹ヵ繧｡繧､繝ｫ縺ｧ縺ゅｋ src/Config.dcppt 縺瑚ｦ句ｽ薙◆繧翫∪縺帙ｓ.
               1. dcppt 繝�ヵ繧ｩ繝ｫ繝医�險ｭ螳壹〒蜃ｦ逅�ｒ縺吶ｋ縺ｪ繧� "y",
               2. 蜃ｦ逅�ｒ荳ｭ譁ｭ縺吶ｋ縺ｪ繧�                     "n",
               3. src/Config.dcppt 繝�Φ繝励Ξ繝ｼ繝医ｒ蜃ｺ蜉帙☆繧九↑繧�"m"
             繧貞�蜉帙＠縺ｦ縺上□縺輔＞ [Y/n/m]:
	     
         縺ｫ縲稽縲阪ｒ謚ｼ縺励※ Enter 縺吶ｋ縺薙→縺ｧ逕滓�縺輔ｌ繧�.
	    
	 src/Config.dcppt 繧� emacs 繧� jvim 縺ｪ縺ｩ縺ｮ譌･譛ｬ隱櫁｡ｨ遉ｺ蜿ｯ閭ｽ縺ｪ
	 繧ｨ繝�ぅ繧ｿ縺ｧ髢九″, 邱ｨ髮�☆繧�.

	 繝ｻ 繝ｭ繧ｱ繝ｼ繧ｷ繝ｧ繝ｳ

	    蜷�ｨｮ繝輔ぃ繧､繝ｫ繧�ョ繧｣繝ｬ繧ｯ繝医Μ縺ｮ險ｭ螳壹′蜿ｯ閭ｽ縺ｧ縺ゅｋ縺�, 蝓ｺ譛ｬ逧�↓螟�
	    譖ｴ縺ｮ蠢�ｦ√�辟｡縺�. (窶ｦ縺ｨ縺�≧縺倶ｸ区焔縺ｫ螟画峩縺吶ｋ縺ｨ繝ｪ繝ｳ繧ｯ蛻�ｌ縺ｪ縺ｩ
	    縺瑚ｵｷ縺薙ｋ蜿ｯ閭ｽ諤ｧ縺碁ｫ倥＞縺ｮ縺ｧ螟画峩縺励↑縺�％縺ｨ繧貞ｼｷ縺乗耳螂ｨ縺吶ｋ). 螟�
	    譖ｴ縺ｮ髫帙↓縺ｯ, 荳願ｨ倥〒逕ｨ諢上＠縺ｦ縺阪◆繝輔ぃ繧､繝ｫ繧�ョ繧｣繝ｬ繧ｯ繝医Μ縺ｮ蜷榊燕
	    繧偵◎繧御ｼｼ蜷医ｏ縺帙※螟画峩縺吶ｋ蠢�ｦ√′縺ゅｋ.


	 繝ｻ 繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ驕ｸ謚�

	      # 繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ (繧､繝｡繝ｼ繧ｸ)
	      $menufile = "${pubdir}/menu.html";
	      #$menufile = "";      # 逕ｻ蜒冗沿繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺後＞繧峨↑縺�凾
	      
	      # 繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ (繝�く繧ｹ繝�)
	      $menutxtfile = "${pubdir}/menutxt.html";
	      #$menutxtfile = "";   # 繝�く繧ｹ繝育沿繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺後＞繧峨↑縺�凾

            繝｡繝九Η繝ｼ繝輔ぃ繧､繝ｫ縺ｫ縺ｯ逕ｻ蜒冗沿縺ｨ繝�く繧ｹ繝育沿縺檎畑諢上＆繧後※縺�ｋ縺�,
	    縺ｩ縺｡繧峨°縺励°蠢�ｦ√↑縺��ｴ蜷�, 荳翫〒縺ｯ繧ｳ繝｡繝ｳ繝医い繧ｦ繝医＆繧後※縺�ｋ
	    繧ゅ�縺ｮ陦碁�ｭ縺ｮ縲�#縲阪ｒ蜿悶ｊ髯､縺上→濶ｯ縺�□繧阪≧.

	    縺溘□縺励◎縺ｮ蝣ｴ蜷�, 莉･荳九�險ｭ螳壹ｂ縺昴ｌ縺ｫ縺ゅｏ縺帙↑縺�→
	    繝｡繝九Η繝ｼ縺瑚｡ｨ遉ｺ縺輔ｌ縺ｪ縺上↑縺｣縺溘ｊ縺吶ｋ縺ｮ縺ｧ豕ｨ諢�.

	      # 襍ｷ蜍墓凾縺ｮ繝�ヵ繧ｩ繝ｫ繝医�繝壹�繧ｸ
	      # 蟾ｦ繝壹�繧ｸ
	      $defaultleft  = "$menufile";     # 繧､繝｡繝ｼ繧ｸ繝｡繝九Η繝ｼ
	      #$defaultleft  = "$menutxtfile";  # 繝�く繧ｹ繝医Γ繝九Η繝ｼ
	      # 蜿ｳ繝壹�繧ｸ
	      $defaultright = "$thumbnail_file";    # 繧ｵ繝�繝阪う繝ｫ
	      #$defaultright = "$htmldir/001.html";  # 1 繝壹�繧ｸ逶ｮ

	      
	 繝ｻ 逕ｻ蜒上し繧､繧ｺ

	      ##############################
	      ###  逕ｻ蜒上し繧､繧ｺ
	      ##
	      # 繝｡繝九Η繝ｼ縺ｮ繧ｵ繧､繧ｺ
	      $menusize = "120x90";
	      # 繧ｹ繝ｩ繧､繝峨�繧ｵ繧､繧ｺ
	      $slidesize = "640x480";
	      # 繧ｵ繝�繝阪う繝ｫ縺ｮ繧ｵ繧､繧ｺ
	      $thumbsize = "200x150";

	    縺薙ｌ繧堤ｷｨ髮�☆繧九％縺ｨ縺ｧ逕ｻ蜒上し繧､繧ｺ縺ｮ螟画峩縺悟庄閭ｽ縺ｧ縺ゅｋ.


	 繝ｻ 濶ｲ豺ｱ蠎ｦ縺ｮ險ｭ螳�

	      ##############################
	      ###  濶ｲ豺ｱ蠎ｦ縺ｮ險ｭ螳�
	      ##
              $depth = "8";      # 0: -depth 繧ｪ繝励す繝ｧ繝ｳ繧貞茜逕ｨ縺励↑縺�

	    縺薙ｌ繧堤ｷｨ髮�☆繧九％縺ｨ縺ｧ convert 繧ｳ繝槭Φ繝峨� -depth 繧ｪ繝励す繝ｧ繝ｳ
	    縺ｫ險ｭ螳壹☆繧句､繧貞､画峩縺ｧ縺阪ｋ. 謨ｰ縺悟ｰ代↑縺�⊇縺ｩ逕ｻ蜒上し繧､繧ｺ縺ｯ
	    蟆上＆縺上↑繧九′, 逕ｻ雉ｪ縺ｯ闕偵￥縺ｪ繧�. 謨ｰ蟄励ｒ 0 縺ｫ縺吶ｋ縺ｨ, -depth
            繧ｪ繝励す繝ｧ繝ｳ繧貞茜逕ｨ縺帙★縺ｫ convert 縺ｮ繝�ヵ繧ｩ繝ｫ繝医�蜃ｦ逅�↓莉ｻ縺帙ｋ.


	 繝ｻ 譁�ｭ励さ繝ｼ繝�

	      # 蜃ｺ蜉帙＆繧後ｋ繝輔ぃ繧､繝ｫ縺ｮ譌･譛ｬ隱樊枚蟄励さ繝ｼ繝�
	      # "jis", "euc", "sjis", "utf8" 縺ｮ縺ｩ繧後°繧帝∈謚�
	      $jpcode = "utf8";
	      $system_code = "utf8";

	    $jpcode 縺ｮ繝�ヵ繧ｩ繝ｫ繝医� utf8 縺�縺�, Windows 迺ｰ蠅��莠ｺ縺ｪ縺ｩ縺ｯ
	    sjis 縺ｧ繧り憶縺��縺九ｂ遏･繧後↑縺�.  (荳願ｨ倥↓隧ｲ蠖薙☆繧九ｂ縺ｮ莉･螟悶ｒ蜈･
	    蜉帙＠縺溷�ｴ蜷医� utf8 縺ｫ縺ｪ繧九�縺ｧ豕ｨ諢�.)

	    縺ｪ縺�, $system_code 縺ｯ dcppt.pl 繧貞虚菴懊＆縺帙ｋ繝励Λ繝�ヨ繝輔か繝ｼ
	    繝�縺ｮ繝�ヵ繧ｩ繝ｫ繝域枚蟄励さ繝ｼ繝峨↓蠢�★蜷医ｏ縺帙※谺ｲ縺励＞.


	 繝ｻ 繧ｹ繧ｿ繧､繝ｫ險ｭ螳�

	      # 0: 繧ｹ繧ｿ繧､繝ｫ辟｡縺�, 1: 繧ｹ繧ｿ繧､繝ｫ縺ゅｊ
	      $style_mode = "1";
	          # 繝�く繧ｹ繝医�濶ｲ
	      $style_textcolor       = '#999900';
		          :

	    譁�ｭ励�濶ｲ繧�レ譎ｯ濶ｲ遲峨�險ｭ螳壹′蜿ｯ閭ｽ縺ｧ縺ゅｋ.
	    蜷�ｨｭ螳壼､画焚繧定ｨｭ螳壹＠縺ｦ谺ｲ縺励＞.
	    險ｭ螳壹′髱｢蛟偵↑蝣ｴ蜷医� $style_mode 繧� 0 縺ｫ縺吶ｋ縺薙→縺ｧ,
	    陬�｣ｾ辟｡縺励↓繧ゅ〒縺阪ｋ.

	      
	      # 蜑榊ｾ後�繝壹�繧ｸ縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｫ逕ｨ縺�ｋ譁�ｭ怜�
	      $previouslink = '[Prev]';
	      $nextlink     = '[Next]';

	    繧ｹ繝ｩ繧､繝峨�蜑榊ｾ後�繝壹�繧ｸ縺ｫ鬟帙�髫帙�繝ｪ繝ｳ繧ｯ縺ｮ繝｡繝�そ繝ｼ繧ｸ
	    繧定ｨｭ螳壹〒縺阪ｋ.

	      $upperlink = '笆ｲParent Dirctory';
	      $upperurl  = '';
	      $lowerlink = 'ppt 繝輔ぃ繧､繝ｫ笆ｼ';
	      $lowerurl  = '';

	    蟾ｦ縺ｫ蜃ｺ繧九Γ繝九Η繝ｼ縺ｮ荳贋ｸ九↓繝ｪ繝ｳ繧ｯ繧剃ｻ倥￠繧九％縺ｨ縺後〒縺阪ｋ.
	    $upperlink, $lowerlink 縺ｧ譁�ｭ怜�縺ｮ謖�ｮ壹ｒ,
	    $upperurl, $lowerurl 縺� URL 縺ｮ謖�ｮ壹ｒ陦後↑縺�.
	    荳翫� $upperlink 繧� $lowerlink 縺ｯ萓九↑縺ｮ縺ｧ,
	    螟画峩縺励※繧よｧ九ｏ縺ｪ縺�.
	    窶ｦ縺�, 縺昴ｌ縺槭ｌ, 縺ｩ縺｡繧峨°縺ｧ繧らｩｺ縺ｫ縺ｪ縺｣縺ｦ縺�ｋ縺ｨ
	    繝ｪ繝ｳ繧ｯ縺昴�繧ゅ�縺後〒縺阪↑縺��縺ｧ豕ｨ諢�.


	 繝ｻ 繧ｵ繝�繝阪う繝ｫ

	      # 0: 繧ｵ繝�繝阪う繝ｫ辟｡縺�, 1: 繧ｵ繝�繝阪う繝ｫ縺ゅｊ
	      $thumbnail_mode    = "1";
	          # 繧ｵ繝�繝阪う繝ｫ縺ｸ縺ｮ繝ｪ繝ｳ繧ｯ縺ｮ繝｡繝�そ繝ｼ繧ｸ
	      $thumbnail_link    = "[[ Thumbnail ]]";
		  # 繧ｵ繝�繝阪う繝ｫ縺ｮ蛻励�謨ｰ
	      $thumbnail_col_num = "3";

	    繧ｵ繝�繝阪う繝ｫ縺ｮ險ｭ螳壹ｒ陦後↑縺�.

	 譖ｸ縺咲ｵゅｏ縺｣縺溘ｉ, 蜈医↓ dcppt.pl 繧貞ｮ溯｡後＠縺溷�ｴ謇縺ｧ

	    $ dcppt.pl -q

	 繧貞ｮ溯｡後☆繧九→濶ｯ縺�. 縺ｩ縺�ｈ縺�↓繧ｿ繧､繝医Ν繧呈嶌縺肴鋤縺医◆縺��ｴ蜷医�
	 src/title.txt 繧呈嶌縺肴鋤縺医ｋ縺ｨ濶ｯ縺�.

EOF
}
</pre></body></html>