checked and updated tool, added new useful script
This commit is contained in:
parent
cbb2cb9360
commit
b6f305e5ba
|
@ -58,6 +58,3 @@ $RECYCLE.BIN/
|
|||
# breakpad symlink / directory
|
||||
/google-breakpad
|
||||
/google-breakpad/
|
||||
|
||||
# convert_faction_xml2html
|
||||
/html/
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 1500d779ccaa5e1d525863b1fd7911f0303a38e8
|
||||
Subproject commit d5ac96e7a7e29e3c2ac7142eace8291e4c5ddb03
|
|
@ -0,0 +1 @@
|
|||
/html/
|
|
@ -1,19 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
|
||||
"http://www.w3.org/TR/html4/frameset.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content="HTML Tidy for Linux (vers 6 November 2007), see www.w3.org">
|
||||
<title>Compare Glest Units</title>
|
||||
<link type="TEXT/CSS" rel="STYLESHEET" href="style.css">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<frameset rows="80,*">
|
||||
<frame src="compare_help.html" frameborder="1">
|
||||
<frameset cols="50%,50%" rows= "*">
|
||||
<frame src="index.html#factions" frameborder= "1">
|
||||
<frame src="index.html#factions" frameborder= "1">
|
||||
</frameset>
|
||||
</frameset>
|
||||
</html>
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Compare Glest Units</TITLE>
|
||||
<LINK TYPE="TEXT/CSS" REL="STYLESHEET" HREF="style.css">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
||||
<META HTTP-EQUIV="content-type" CONTENT="text/html; charset=utf-8">
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<H3 ALIGN=CENTER>Choose units in the left and right frames to compare.</H3>
|
||||
<DIV ALIGN=CENTER><A HREF="glest_autodocument_summary.html" TARGET="_top">Home</A></DIV>
|
||||
</BODY>
|
||||
</HTML>
|
Binary file not shown.
Before Width: | Height: | Size: 318 B |
|
@ -0,0 +1,95 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Use this script to make autodocumentation for docs in data's repository
|
||||
# ----------------------------------------------------------------------------
|
||||
# 2015 Written by filux <heross(@@)o2.pl>
|
||||
# Copyright (c) 2015 under GNU GPL v3.0+
|
||||
LANG=C
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
techtree="megapack"
|
||||
else
|
||||
techtree="$1"
|
||||
fi
|
||||
if [ "$2" = "" ]; then
|
||||
rel_path_docs_icons="../../techs"
|
||||
else
|
||||
rel_path_docs_icons="$2"
|
||||
fi
|
||||
if [ "$3" = "" ]; then
|
||||
rel_path_tech_test="../../../../data/glest_game/techs"
|
||||
else
|
||||
rel_path_tech_test="$3"
|
||||
fi
|
||||
SCRIPTDIR="$(dirname "$(readlink -f "$0")")"
|
||||
cd "$SCRIPTDIR"
|
||||
rm -rf html
|
||||
sed "s|^generate_g3d_images = .*|generate_g3d_images = 0|" "$techtree.ini" > "$techtree-temp.ini"
|
||||
./convert_faction_xml2html.pl "$techtree-temp.ini"
|
||||
|
||||
cd html
|
||||
icons_list1="$(grep -o "images/[^/ ]*/[^/ ]*/[^. ]*.bmp" *.html)"
|
||||
icons_list2="$(grep -o "images/[^/ ]*/[^/ ]*/[^. ]*.jpg" *.html)"
|
||||
icons_list3="$(grep -o "images/[^/ ]*/[^/ ]*/[^. ]*.png" *.html)"
|
||||
icons_list="$(echo -e "$icons_list1 $icons_list2 $icons_list3" | xargs)"
|
||||
echo ">>> replacing icon for (unit='|', upgrade='\', resource='/') ..."
|
||||
for icon_file in $icons_list; do
|
||||
filename="$(echo "$icon_file" | awk -F ':' '{print $1}')"
|
||||
icon="$(echo "$icon_file" | awk -F ':' '{print $2}')"
|
||||
|
||||
faction="$(echo "$icon" | awk -F '/' '{print $2}')"
|
||||
uu_name="$(echo "$icon" | awk -F '/' '{print $3}')"
|
||||
bmp_file="$(echo "$icon" | awk -F '/' '{print $4}')"
|
||||
find_file="$(find $rel_path_tech_test/$techtree/factions/$faction -type f -name "$bmp_file")"
|
||||
|
||||
echo "$find_file" | grep -q "factions/$faction/upgrades"
|
||||
if [ "$?" -eq "0" ]; then :
|
||||
sed -i "s|images/$faction/$uu_name/$bmp_file|$rel_path_docs_icons/$techtree/factions/$faction/upgrades/$uu_name/images/$bmp_file|" "$filename"
|
||||
echo -n "\\"
|
||||
else
|
||||
echo "$find_file" | grep -q "factions/$faction/units"
|
||||
if [ "$?" -eq "0" ]; then :
|
||||
sed -i "s|images/$faction/$uu_name/$bmp_file|$rel_path_docs_icons/$techtree/factions/$faction/units/$uu_name/images/$bmp_file|" "$filename"
|
||||
echo -n "|"
|
||||
fi
|
||||
fi
|
||||
sleep 0.01s
|
||||
done
|
||||
icons_list1="$(grep -o "images/resources/[^. ]*.bmp" *.html)"
|
||||
icons_list2="$(grep -o "images/resources/[^. ]*.jpg" *.html)"
|
||||
icons_list3="$(grep -o "images/resources/[^. ]*.png" *.html)"
|
||||
icons_list="$(echo -e "$icons_list1 $icons_list2 $icons_list3" | xargs)"
|
||||
for icon_file in $icons_list; do
|
||||
filename="$(echo "$icon_file" | awk -F ':' '{print $1}')"
|
||||
icon="$(echo "$icon_file" | awk -F ':' '{print $2}')"
|
||||
|
||||
bmp_file="$(echo "$icon" | awk -F '/' '{print $3}')"
|
||||
res_name="$(echo "$bmp_file" | awk -F '.' '{print $1}')"
|
||||
sed -i "s|images/resources/$bmp_file|$rel_path_docs_icons/$techtree/resources/$res_name/images/$bmp_file|" "$filename"
|
||||
echo -n "/"
|
||||
sleep 0.01s
|
||||
done
|
||||
echo
|
||||
|
||||
echo ">>> removing not required files ..."
|
||||
rm -rf css js
|
||||
find ./images/*/* -type d | xargs rm -rf
|
||||
rm -rf images/datatables images/resources
|
||||
find ./images/* -type f -name "*.canon" | xargs rm -f
|
||||
find ./images/* -type f -name "*.cmapx" | xargs rm -f
|
||||
find ./images/* -type f -name "*.text" | xargs rm -f
|
||||
|
||||
rm -f all.html
|
||||
all_html_list="$(grep '"all.html"' *.html | awk -F ':' '{print $1}' | xargs)"
|
||||
for filename in $all_html_list; do
|
||||
sed -i '/All Units of all Factions/d' "$filename"
|
||||
done
|
||||
|
||||
if [ "$(which optipng)" != "" ]; then
|
||||
echo ">>> optimizing .png files ..."
|
||||
find ./images -type f -name '*.png' -exec optipng '{}' \;
|
||||
else
|
||||
echo "Warning: 'optipng' not found"
|
||||
fi
|
||||
cd "$SCRIPTDIR"
|
||||
rm -f "$techtree-temp.ini"
|
|
@ -0,0 +1 @@
|
|||
/jquery*.min.js
|
|
@ -11,8 +11,8 @@
|
|||
<frameset rows="80,*">
|
||||
<frame src="compare_help.html" frameborder="1">
|
||||
<frameset cols="50%,50%" rows= "*">
|
||||
<frame src="glest_autodocument_summary.html#factions" frameborder= "1">
|
||||
<frame src="glest_autodocument_summary.html#factions" frameborder= "1">
|
||||
<frame src="index.html#factions" frameborder= "1">
|
||||
<frame src="index.html#factions" frameborder= "1">
|
||||
</frameset>
|
||||
</frameset>
|
||||
</html>
|
||||
|
|
|
@ -11,6 +11,6 @@
|
|||
<BODY>
|
||||
|
||||
<H3 ALIGN=CENTER>Choose units in the left and right frames to compare.</H3>
|
||||
<DIV ALIGN=CENTER><A HREF="glest_autodocument_summary.html" TARGET="_top">Home</A></DIV>
|
||||
<DIV ALIGN=CENTER><A HREF="index.html" TARGET="_top">Home</A></DIV>
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
|
|
@ -15,7 +15,7 @@ body {
|
|||
/* Header */
|
||||
#header {
|
||||
width: 1016px;
|
||||
height: 313px;
|
||||
height: 175px;
|
||||
margin: 0 auto;
|
||||
background: url("header/header.jpg") no-repeat;
|
||||
}
|
||||
|
@ -121,6 +121,7 @@ img.left {
|
|||
#header #logo {
|
||||
width: 365px;
|
||||
margin: 0 auto;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
/* Download image */
|
||||
|
|
|
@ -38,7 +38,7 @@ resources_path=../../../data/glest_game/techs/megapack/resources
|
|||
|
||||
pack_file=../../../data/glest_game/techs/megapack/megapack.xml
|
||||
|
||||
out_path=../../../html
|
||||
out_path=html
|
||||
|
||||
glestkeys=../../../data/glest_game/glestkeys.ini
|
||||
|
||||
|
@ -152,7 +152,7 @@ header=<<EOT
|
|||
|
||||
<!-- stuff for table-sorting, see jquery.com and datatables.net for details
|
||||
-->
|
||||
<script type="text/javascript" language="javascript" src="js/jquery-1.5.min.js" ></script>
|
||||
<script type="text/javascript" language="javascript" src="js/jquery-1.11.2.min.js" ></script>
|
||||
<script type="text/javascript" language="javascript" src="js/jquery.dataTables.min.js"></script>
|
||||
<!--
|
||||
<script type="text/javascript" language="javascript" src="js/TableTools.min.js"></script>
|
||||
|
|
|
@ -12,7 +12,7 @@ SCRIPTDIR="$(dirname $(readlink -f $0))"
|
|||
. $SCRIPTDIR/../../../mk/linux/mg_shared.sh
|
||||
|
||||
echo 'Downloading Javascript libraries...'
|
||||
wget http://code.jquery.com/jquery-1.5.2.js -O media/jquery-1.5.min.js
|
||||
wget http://code.jquery.com/jquery-1.11.2.js -O media/jquery-1.11.2.min.js
|
||||
wget http://www.datatables.net/download/build/jquery.dataTables.min.js -O media/jquery.dataTables.min.js
|
||||
|
||||
echo 'Detecting system and installing dependencies...'
|
||||
|
@ -22,35 +22,25 @@ detect_system
|
|||
echo 'We have detected the following system:'
|
||||
echo ' [ '"$distribution"' ] [ '"$release"' ] [ '"$codename"' ] [ '"$architecture"' ]'
|
||||
|
||||
|
||||
case $distribution in
|
||||
SuSE|SUSE?LINUX|Opensuse)
|
||||
case $release in
|
||||
*)
|
||||
SuSE|SUSE?LINUX|Opensuse)
|
||||
case $release in
|
||||
*)
|
||||
echo '(Open)SuSE...'
|
||||
sudo zypper install graphviz-perl perl-GraphViz perl-Config-IniFiles perl-PerlMagick
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
Fedora)
|
||||
case $release in
|
||||
*)
|
||||
echo 'Fedora...'
|
||||
#sudo yum groupinstall "Development Tools"
|
||||
#sudo yum install subversion automake autoconf autogen jam
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
Debian|Ubuntu|LinuxMint)
|
||||
case $release in
|
||||
*)
|
||||
case $release in
|
||||
*)
|
||||
echo 'Debian / Ubuntu...'
|
||||
sudo apt-get install perl graphviz libgraphviz-perl libconfig-inifiles-perl perlmagick
|
||||
#sudo apt-get install libimage-size-perl
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
echo 'ERROR: Unknown distribution. Stopping here.' >&2
|
||||
exit 1
|
||||
|
|
|
@ -1,300 +0,0 @@
|
|||
body {
|
||||
margin: 0 auto;
|
||||
width: 1016px;
|
||||
|
||||
background-color: #161616;
|
||||
font-size: 0.8em;
|
||||
color: #fff6c0;
|
||||
font-family: "Lucida Sans Unicode","Lucida Grande","Lucida Sans", sans-serif;
|
||||
}
|
||||
|
||||
/*
|
||||
* Structure
|
||||
*/
|
||||
|
||||
/* Header */
|
||||
#header {
|
||||
width: 1016px;
|
||||
height: 313px;
|
||||
margin: 0 auto;
|
||||
background: url("header/header.jpg") no-repeat;
|
||||
}
|
||||
|
||||
/* Horizontal menu */
|
||||
#menu {
|
||||
background-image: url("menu.jpg");
|
||||
background-repeat: no-repeat;
|
||||
height: 65px;
|
||||
}
|
||||
|
||||
/* Side menus */
|
||||
#menu #first { float: left }
|
||||
#menu #second { float: right }
|
||||
|
||||
/* Main content */
|
||||
#content {
|
||||
width: 512px;
|
||||
margin: 0 auto;
|
||||
background: url("wood_panel.jpg") repeat-y;
|
||||
}
|
||||
|
||||
/* Article (core text of the page) */
|
||||
#article {
|
||||
font-size: 1.1em;
|
||||
line-height: 1.5em;
|
||||
padding: 2em;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
/* end of article has to be below side modules */
|
||||
#end_article {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Side modules */
|
||||
#aside_left {
|
||||
float: left;
|
||||
width: 420px;
|
||||
margin-left: -168px;
|
||||
}
|
||||
#aside_left ul {
|
||||
padding: 0 17px 0 168px;
|
||||
margin: 0 2em 2em 2em;
|
||||
}
|
||||
|
||||
#aside_right {
|
||||
float: right;
|
||||
width: 420px;
|
||||
margin-right: -168px;
|
||||
}
|
||||
#aside_right ul {
|
||||
padding: 0 140px 0 25px;
|
||||
margin: 0 2em;
|
||||
}
|
||||
|
||||
.aside .up_image {
|
||||
width: 420px;
|
||||
height: 278px;
|
||||
}
|
||||
.aside .down_image {
|
||||
width: 420px;
|
||||
height: 191px;
|
||||
}
|
||||
|
||||
/* fill .up_image and .down_image with content */
|
||||
.aside .content {
|
||||
margin-top: -210px;
|
||||
margin-bottom: -80px;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
#footer {
|
||||
width: 1016px;
|
||||
height: 143px;
|
||||
margin: 0 auto;
|
||||
background-image: url("footer/footer.jpg");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Text display: side, colors, etc.
|
||||
*/
|
||||
p { text-indent: 2em }
|
||||
a { color: #ecc72d }
|
||||
a:link { text-decoration: none }
|
||||
a:hover { text-decoration: underline }
|
||||
a img { border: 0; }
|
||||
img.right {
|
||||
float: right;
|
||||
margin: 0 0 10px 10px;
|
||||
}
|
||||
img.left {
|
||||
float: left;
|
||||
margin: 0 10px 10px 0;
|
||||
}
|
||||
|
||||
/* news dates, scores: gold */
|
||||
.info, .date, #content h3 { color: #ecc72d; }
|
||||
#content h3 { font-weight: normal; text-indent: 3em }
|
||||
|
||||
/* Logo */
|
||||
#header h1 {
|
||||
width: 365px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
/* Download image */
|
||||
h2#download {
|
||||
margin: 0 auto;
|
||||
margin-top: -2em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Module titles */
|
||||
.aside h3 { display: block; }
|
||||
|
||||
.aside h3#news { margin-left: 240px; }
|
||||
.aside h3#servers { margin-left: 50px; }
|
||||
.aside h3.forums { margin-left: 230px; }
|
||||
.aside h3#links { margin-left: 110px; }
|
||||
|
||||
/* Menu links */
|
||||
#menu ul { margin: 0; padding: 0}
|
||||
#menu li { display: inline; }
|
||||
/* left horizontal menu should not "touch" the wood */
|
||||
#menu #second li:first-child { margin-left: 10px; }
|
||||
|
||||
#menu a {
|
||||
/* fixed available space: fixed size */
|
||||
font-size: 14px;
|
||||
color: #b5dbb5;
|
||||
font-variant: small-caps;
|
||||
margin: 0 8px;
|
||||
}
|
||||
|
||||
/*
|
||||
* Modules
|
||||
*/
|
||||
#aside_left { background: url("modules/l_repeat.jpg") repeat-y }
|
||||
#aside_left .up_image { background: url("modules/l_up.jpg") }
|
||||
#aside_left .down_image { background: url("modules/l_down.jpg") }
|
||||
|
||||
#aside_right {background: url("modules/r_repeat.jpg") repeat-y}
|
||||
#aside_right .up_image {background: url("modules/r_up.jpg")}
|
||||
#aside_right .down_image {background: url("modules/r_down.jpg")}
|
||||
|
||||
.aside ul li {
|
||||
list-style-image: url("modules/star.png");
|
||||
clear: right;
|
||||
}
|
||||
|
||||
/* News module */
|
||||
.date {
|
||||
display: block;
|
||||
float: right;
|
||||
margin-top: 1em;
|
||||
margin-bottom: 1.5em;
|
||||
/* Font */
|
||||
font-family: "DejaVu Serif Condensed", serif;
|
||||
font-style: italic;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
/* Servers module */
|
||||
.aside table {
|
||||
width: 200px;
|
||||
margin-left: 50px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
.aside table td:first-child {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Forums module */
|
||||
.forums .date {
|
||||
margin-top: 3px;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
#footer ul {
|
||||
margin: 0 auto;
|
||||
padding-top: 90px;
|
||||
width: 25em;
|
||||
}
|
||||
#footer li {
|
||||
list-style-type: none;
|
||||
display: inline;
|
||||
margin: 0 1em;
|
||||
}
|
||||
/* links in the dark space, images above */
|
||||
#footer img {
|
||||
vertical-align: -20%;
|
||||
}
|
||||
|
||||
/*
|
||||
* Additional background images
|
||||
*/
|
||||
#header_left {
|
||||
float: left;
|
||||
width: 140px;
|
||||
height: 882px;
|
||||
|
||||
background-image: url("header/left.jpg");
|
||||
background-repeat: no-repeat;
|
||||
margin-left: -140px;
|
||||
}
|
||||
|
||||
#header_right {
|
||||
float: right;
|
||||
height: 843px;
|
||||
width: 143px;
|
||||
|
||||
background-image: url("header/right.jpg");
|
||||
background-repeat: no-repeat;
|
||||
margin-right: -143px;
|
||||
}
|
||||
|
||||
#footer_left {
|
||||
float: left;
|
||||
height: 143px;
|
||||
width: 101px;
|
||||
margin-left: -101px;
|
||||
background: url("footer/footer_left.jpg") no-repeat;
|
||||
}
|
||||
|
||||
#footer_right {
|
||||
float: right;
|
||||
height: 143px;
|
||||
width: 106px;
|
||||
margin-right: -106px;
|
||||
background: url("footer/footer_right.jpg") no-repeat;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* DataTables sorting
|
||||
*/
|
||||
|
||||
.sorting_asc {
|
||||
background-image: url('../images/datatables/sort_asc.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
}
|
||||
|
||||
.sorting_desc {
|
||||
background-image: url('../images/datatables/sort_desc.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
}
|
||||
|
||||
.sorting {
|
||||
background-image: url('../images/datatables/sort_both.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
}
|
||||
|
||||
.sorting_asc_disabled {
|
||||
background-image: url('../images/datatables/sort_asc_disabled.png') ;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
}
|
||||
|
||||
.sorting_desc_disabled {
|
||||
background-image: url('../images/datatables/sort_desc_disabled.png') ;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center right;
|
||||
}
|
||||
|
||||
tr.odd {
|
||||
background-color: #7E2217;
|
||||
}
|
||||
|
||||
tr.even {
|
||||
background-color: #7F462C;
|
||||
}
|
||||
|
Loading…
Reference in New Issue