iPhone6 blus港版序列号f2qp2nxpg5qt是FCCQD4TKG5QR是正品吗

#!/bin/env perl
Program: build-folio.pl
Version: 1.0
Released: 27 Oct 2002
Author: Steve Hawtin
License: GPL Copyleft
The Build Folio program generates web pages that let you navigate a set of
files and directories.
Very good at generating thumbnailed indexes of
directories containing a lot of images.
The way the web pages are generated
can be completely controlled via configuration files.
The program is built as a
Perl 5 script which by default calls the Tk package to provide a graphical
front end.
Originally developed on a PC running Windows, it should be able to run
If you are running Windows on a PC then the best version of Perl
to install is the one from ActiveState. If you are running UNIX or LINUX and
you don't have a Perl installtion... INSTALL PERL NOW (you will feel better
The script includes its own documentation.
Either run the program and click
on the Help button, or type the command:
build-folio.pl -dir
# Detailed Changes:
14 May 2002
Sent out with "Florida " CD, limited distribution
18 May 2002
General release, created project on www.freshmeat.net
implemented the **only** mechanism
${to_top} expansion variable
Use filename on wflio expansions
Use DirTree to select directory (if Tk::DirTree module available)
Define (and use) require_if_present that will ignore
missing CPAN packages
Split script into packages
Implement the "prune" attribute
Changed the order of attribute names for attributes that
are indexed by other attributes (eg filetype_render_*)
Complete rewrite to give a more generic way to specify
Specify tags and attributes from exended version of HTML 4
definition
27 Sep 2002
General release, updated project on www.freshmeat.net
Changed title to pagetitle to reduce conflicts
Changed names of general tag attributes (title, style, id etc)
to distinguish them (changed to tagtitle, tagstyle, tagid etc)
Removed complaint if checking for non existant page relationship
Fixed file names with square and curley brackets
Fixed singlepara for top level page without subdirs
Generate thumbnail images with GD by default
Reimplement FPage concepts
Complete the documentation
Switch to using more CPAN modules
Test under X11 version of Tk
Create "attribute browser" to allow users to interactively
define folio files (and check effects)
use Time::L
# Here are the global variables that leak between the various packages
# in this file
use vars ('$operating_system','$top_dir');
use vars ('$prog_version','$prog_release','$prog_home','$prog_name');
# Global variables defined for command line options
use vars ('$start_dir','$hide_wfolio','$dont_use_icons','$ignore_empty_dirs');
use vars ('$force_os','$no_fpage','$no_tk','$no_progress');
use vars ('$no_fileselect','$no_dirtree','$flag_name','$help');
use vars ('$simple_wflio','$usage','$fpage_present');
use vars ('$progress_steps','$no_win32API');
$prog_version = "1.1";
$prog_release = "27 Nov 2007";
$prog_home
= "/software/index.htm";
# This calls a function at the end of the script.
I have put all the
# high level functions right down there at the bottom so that I can
# test prototypes for the functions (well for some anyway)
# If we returned from main then we are done
my(%defaults_structure);
my(%default_values,%expand);
sub list_categories
my($cat) = @_;
if(!$default_values{$cat})
::add_output("Unknown document category $cat in list\n");
return(keys(%{$default_values{$cat}}));
sub lookup
my($cat,$item) = @_;
if(!$default_values{$cat})
::add_output("Unknown document category $cat in lookup\n");
if(!${$default_values{$cat}}{$item})
::add_output("Unknown $cat item $item in lookup\n");
return(%{${$default_values{$cat}}{$item}});
sub top_init
%defaults_structure =
=> ["*attrib","where","default","comment"],
=> ["*tag","tagsrc","comment"],
"tagattrib" => ["*tag","*wattrib","htmlattrib","tagsrc","comment"],
=> ["*flag","default","var","param","comment"],
=> ["*name","comment"],
=> ["*function","arg","comment"],
"pagestmt"
=> ["*statement","context","args","comment"],
=> ["*operator","prec","comment"],
"pdsections" => ["*section","parent","comment"],
=> ["*name","tag","comment"],
"bi-attrib" => ["*name","comment"],
"variable"
=> ["*name","pdsections","comment"],
# Later replaced by a better name for the program
"prog_name" => $0,
"flame_address" => pack("i",)."es".pack("C",64).
"b".pack("i3",,,),
"table_bg"
=> "\"#ccffff\"",
"table_headbg" => "\"#66ffff\"",
"page_text"
=> "\"#000066\"",
=> "\"#FFFFCC\"",
"page_link"
=> "\"#0000EE\"",
"page_vlink"
=> "\"#551A8B\"",
"page_alink"
=> "\"#FF0000\"",
"example_text" => "\"#000000\"",
"example_bg"
=> "\"#FFFFFF\"",
=> "\"#CC0000\"",
=> "\"#009900\"",
=> "\"#3333FF\"",
=> Page::backout(""),
"prog_version" => $::prog_version,
"prog_release" => $::prog_release,
"prog_home"
=> $::prog_home,
"doc_head" => <<"EndDocHead",
for($i=0;$i<=$#$i++)
my(@row,$state,$span);
@row = @{$data[$i]};
$ret .= "\n";
$state = "cell";
for($j=0;$j<=$#$j++)
my($bg,$r,$g,$b,$darkness);
$r = substr($row[$j],0,1);
$g = substr($row[$j],1,1);
$b = substr($row[$j],2,1);
if($r eq "-")
$span = 0 if($state eq "cell");
$state = "blank";
my($bg,$contrast);
if($state ne "cell")
$state = "cell";
$bg = "$r$r$g$g$b$b";
$contrast = "black";
$contrast = "white"
if(hex($r) + hex($g) + hex($b) < 24);
$ret .= <<"EndCell";
$ret .= "\n";
$ret .= "\n";
return($ret);
"width" => "95%",
"tagsrc_table" =>
"is_table" => 1,
{ title => "Code",
format => '',
{ title => "Meaning",
"width" => "40%",
"foreach" => sub {return("3.0","4.0","4.0D","DU","IE","NN")},
"row" => sub
my($attrib,%a) = @_;
"3.0" => "Generally part of HTML before 4.0, now removed",
"4.0" => "Part of the HTML 4.0 Specification",
"4.0D" => "Part of the HTML 4.0 Specification but depreciated",
=> "Don't use",
=> "MicroSoft specific, should be avoided",
=> "Netscape specific, should be avoided",
return(table_row("tagsrc_table",$attrib,$a{$attrib}));
"attribvals_table" =>
"is_table" => 1,
{ title => "Value",
format => '',
{ title => "Meaning",
"width" => "70%",
"foreach" => sub {return("0",".","**zero**","**null**","**empty**")},
"row" => sub
my($attrib,%a) = @_;
=> "If the value is 0 or the empty string ".
"look for a binding higher up the directory tree",
=> "A value of dot leaves the attribute not set, ".
"but moves on to another attribute (rather than looking ".
"higher up the directory tree",
"**zero**" => "Numeric value {{st}}0{{et}}",
"**null**" => "The value is unset (don't look anywhere else)",
"**empty**" => "The value is an empty string",
return(table_row("attribvals_table",$attrib,$a{$attrib}));
sub expand_entry ($)
my($item) = @_;
my(@items);
# Given a single item return a list, if it looks
# like "[one,two,three]" return three elements
# otherwise just one
if($item =~ s/^\[([^\]\[]+)\]$/$1/)
@items = split(/,/,$item);
$items[0] = $
return(@items);
sub cart_product (@)
# Fully expand all the lists of entries to get individual
# defaults values
my(@in_vals) = @_;
my(@out_vals,$i);
@out_vals = ([]);
for($i=0;$i<=$#in_$i++)
my($item,$prev,@prev_out);
@prev_out = @out_
@out_vals = ();
# First time round the loop
foreach $item (expand_entry($in_vals[$i]))
foreach $prev (@prev_out)
@a = @{$prev};
push(@a,$item);
push(@out_vals,\@a);
return(@out_vals);
sub add_cat ($@)
my($cat,@vals) = @_;
my($val_ary,@items,$item);
top_init() if(!%defaults_structure);
if(!$defaults_structure{$cat})
::add_output("Undefined structure $cat in documentation\n");
return(0);
if(!$default_values{$cat})
$default_values{$cat} = {};
@vals = cart_product(@_);
foreach $val_ary (@vals)
my(%a,$i,$identifier,@line);
@line = @{$val_ary};
$identifier = "";
if($#line != $#{$defaults_structure{$cat}}+1)
::add_output("Expecting ".
$#{$defaults_structure{$cat}}+1 .
" args but got ".$#line." args (".
@line.")");
for($i=0;$i<=$#{$defaults_structure{$cat}};$i++)
$key = ${$defaults_structure{$cat}}[$i];
if($key =~ s/^\*//)
$identifier .= ":" if($identifier);
$identifier .= $line[$i+1];
$a{$key} = $line[$i+1];
::add_output("Missing identifier in $cat documentation\n")
if(!$identifier);
::add_output("Multiple definitions of \"$identifier\" in $cat\n")
if(${$default_values{$cat}}{$identifier});
${$default_values{$cat}}{$identifier} = \%a;
return(1);
sub get_element
my($cat,$item,$field) = @_;
if(!$default_values{$cat})
::add_output("Unknown document category $cat in get_element\n");
return("");
if(!${$default_values{$cat}}{$item})
::add_output("Unknown $cat item $item in get_element\n");
return("");
return(${${$default_values{$cat}}{$item}}{$field});
sub print ()
my($prog_name,$image,$all_manual);
my(@l,$attrib);
top_init() if(!%defaults_structure);
chdir($::top_dir);
$prog_name = $0;
# Remove the extension
$prog_name =~ s/\.[^\.]+$//;
# Get to the actual program name
@l = split(/[\\\/]+/,$prog_name);
$prog_name = $l[$#l];
$::prog_name = $prog_
$expand{"prog_name"} = $prog_
# Fill out the default pagedefs
foreach $attrib ("index_pagedef","wflio_pagedef")
Attribute::get("..",$attrib,\$val);
$val =~ s/\</\&/g;
$val =~ s/^\n+//;
$val =~ s/\n+$/\n/;
$expand{$attrib} = $
# All the documentation is encoded within the script
# (OK so it is a tad clumsy but it means we have only
# a single file to move round).
$all_manual = GenName::all_icons_gif();
$all_manual .= <2!!9&]B
M92!0:&]T;W-H;W"H(#0N,`#_[@`.061O8F4`9``````!_]L`A``*!P<'"`<*
M"`@*#PH("@\2#0H*#1(4$!`2$!`4$0P,#`P,#!$,#`P,#`P,#`P,#`P,#`P,
M#`P,#`P,#`P,#`P,`0L,#!43%2(8&"(4#@X.%!0.#@X.%!$,#`P,#!$1#`P,
M#`P,$0P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`P,#`S_P``1"`!Q`'(#`1$`
M`A$!`Q$!_]T`!``/_\0!H@````
#if attrib_quiet:("pagetitle")
#set ${page_title} attrib:("pagetitle")
#set ${page_title} "WFolio File for ${filename}"
${page_title}
#if attrib_quiet:("baseref")
#foreach ${linkrel} sortlex:(split:(attrib:("rellinks")))
#endforeach
#foreach ${linkrev} sortlex:(split:(attrib:("revlinks")))
#endforeach
#foreach ${metatag} split:(attrib:("metatags"))
#if attrib_quiet:(var:("metatag"))
#set ${content} attrib:(var:("metatag"))
#endforeach
$[start_body]
#if not:(attrib_quiet:("notitle"))
#if attrib_quiet:("pagetitle")
$[pagetitle]
${page_title}
$[pre_text]
#set ${para_started} 1
#rem The connection to the index page
#if attrib_quiet:("_index_wflink")
#set ${index_wf_file} genname_rel:("$[_dirname]/$[_index_wflink]","wflio")
#output icon:(${filename},"index",${index_wf_file},"&nbsp")
#if attrib_quiet:("_left_wflink")
#set ${left_wf_file} genname_rel:("$[_dirname]/$[_left_wflink]","wflio")
#output icon:(${filename},"left",${left_wf_file},"&nbsp")
$[filename_style]
$[_filename]
#output backout:($[filename_style])
#if $[created_flag] ne "none"
$[created_style]$[created_flag]
#output backout:($[created_style])
#if attrib_quiet:("_right_wflink")
#set ${right_wf_file} genname_rel:("$[_dirname]/$[_right_wflink]","wflio")
#output icon:(${filename},"right",${right_wf_file},"&nbsp")
#if not:(attrib_quiet:("singlepara"))
#if ${para_started}
$[post_text]
#output backout:($[start_body])
#endsection
The {{pagedef_href}} for the {{wflio_href}} pages
>>wflio~~index_pagedef~~~~
#if attrib_quiet:("pagetitle")
#set ${page_title} attrib:("pagetitle")
#elsif ${topdir}
#set ${page_title} "Top Generated Page"
#set ${page_title} "Generated page for ${cfilename}"
${page_title}
#if attrib_quiet:("baseref")
#foreach ${linkrel} sortlex:(split:(attrib:("rellinks")))
#endforeach
#foreach ${linkrev} sortlex:(split:(attrib:("revlinks")))
#endforeach
#foreach ${metatag} split:(attrib:("metatags"))
#if attrib_quiet:(var:("metatag"))
#set ${content} attrib:(var:("metatag"))
#endforeach
$[start_body]
#if not:(attrib_quiet:("notitle"))
#if attrib_quiet:("pagetitle")
$[pagetitle]
${page_title}
$[pre_text]
#set ${para_started} ""
#if ${dir_subdirs} || not:(${topdir})
#section indexdirs
#set ${para_started} 1
$[pre_dirs]
#if not:(${topdir})
#rem parent icon going up one level
#set ${iconfile} iconfile:(${filename},"parent")
#set ${imgindex} genname_rel:("${filename}/..","index")
#foreach ${dir} ${dir_subdirs}
#output render:(${filename},${dir},"$[postthumb_dirs]")
#endforeach
$[post_dirs]
#if not:(attrib_quiet:("singlepara"))
#set ${para_started} ""
#endsection
#set ${left_file} ""
#if ${dir_files}
#section indexfiles
#if not:(${para_started})
#if not:(attrib_quiet:("singlepara"))
#if attrib_quiet:("h1text")
$[pre_files]
#foreach ${file} ${dir_files}
#output render:(${filename},${file},"$[postthumb_files]")
#rem Of course ${filename} is the directory name (we are generating
#rem the index here after all)
#set ${path_to_file} "${filename}/${file}"
#if has_wflio:(${path_to_file})
#execute set_wflink:(${path_to_file},"index",${filename})
#if ${left_file}
#execute set_wflink:(${path_to_file},"left",${left_file})
#execute set_wflink:(${left_file},"right",${path_to_file})
#set ${left_file} ${path_to_file}
#endforeach
$[post_files]
#set ${para_started} ""
#endsection
#if ${para_started}
$[post_text]
#output backout:($[start_body])
#endsection
The {{pagedef_href}} for the index pages
>>pdsections~~wflio~~~~
The top section of the {{wflio_href}} page
>>pdsections~~index~~~~
The top section of the index page
>>pdsections~~indexdirs~~index~~
Where the directories are rendered on the index page
>>pdsections~~indexfiles~~index~~
Where the files are rendered on the index page
>>pd-tag~~linkrel????~~link~~
Define relationship between pages, the {{st}}rellinks{{et}} attribute
determines the relationship name.
{{st}}linkrel????_target{{et}} attribute to set the target.
>>pd-tag~~linkrev????~~link~~
Define reverse relationship between pages, the {{st}}revlinks{{et}} attribute
determines the relationship name
>>pd-tag~~author~~meta~~
Sets the author of the document.
>>pd-tag~~generator~~meta~~
Sets the generator program of the document.
>>pd-tag~~wflioimg~~img~~
The image used to represent a file on the {{wflio_href}} page
>>pd-tag~~dirspara~~p~~
The paragraph used to show subdirectories on the index page
>>pd-tag~~icon~~img~~
The image used to represent an icon
>>pd-tag~~filespara~~p~~
The paragraph used to show plain files on the index page
>>pd-tag~~thumb~~img~~
The thumbnail image used to represent a file or directory
>>variable~~page_title~~wflio~~
Title of the page
>>variable~~filename~~wflio,index~~
Name of file being {{render_href}}ed
>>variable~~issecondary~~wflio,index~~
Set to false if generating index page, false otherwise
>>variable~~issubdir~~wflio,index~~
Set to true if within sub-directory
>>variable~~dir_subdirs~~index~~
List of subdirectories from here
>>variable~~dir_files~~index~~
List of files within this directory
>>variable~~dir_objects~~index~~
List of files and subdirectories
>>variable~~isdir~~wflio,index~~
True if current file is a directory
>>variable~~topdir~~index~~
True if this is the root directory for this run
>>variable~~pagetype~~wflio,index~~
The type of page being generated (wflio or index)
>>variable~~index_wf_file~~wflio~~
Name of index file
>>variable~~left_wf_file~~wflio~~
Name of file to the left
>>variable~~right_wf_file~~wflio~~
Name of file to the right
>>variable~~singlepara~~wflio,index~~
Attempt to render page in a single paragraph
>>variable~~index_singlepara~~index~~
Attempt to render index page in a single paragraph
>>variable~~wflio_singlepara~~wflio,index~~
Attempt to render {{wflio_href}} page in a single paragraph
>>variable~~cfilename~~wflio,index~~
Cannonical version of the filename
>>variable~~dir~~indexdirs~~
Directory being expanded (accesable from {{st}}$[postthumb_dirs]{{et}}
>>variable~~file~~indexfiles~~
File being expanded (accesable from {{st}}$[postthumb_files]{{et}}
>>bi-attrib~~_dirname~~
Name of directory containing file
>>bi-attrib~~_filename~~
Name of file with directory part removed
>>bi-attrib~~_fileext~~
File extension
>>bi-attrib~~_filesize~~
File size, this attribute will round to the nearest kB, MB or GB and
give sizes like "23MB"
>>bi-attrib~~_filerawsize~~
File size in bytes
>>bi-attrib~~_file_modified~~
The date on which the file was last modified
>>bi-attrib~~_file_created~~
The date on which the file was created
>>bi-attrib~~_thumb_file~~
If the file contains an image this attribute will be replaced by a pointer
to the thumbnail image.
Must be called from the same directory.
>>bi-attrib~~_thumb_local~~
If the file contains an image this attribute will be replaced by a thumbnail.
Must be called from the same directory.
>>bi-attrib~~_thumb_remote~~
If the file contains an image this attribute will be replaced by a thumbnail.
Will supply complete path to image.
>>bi-attrib~~_tidy_name~~
Do some tidying up on the name (remove directory, replace underscores with spaces etc)
>>bi-attrib~~_to_root~~
The path from this file to the root generated page
>>bi-attrib~~_timenow~~
The time the script was run
>>bi-attrib~~_timenow_dmy~~
The time the script was run (day month year)
>>bi-attrib~~_timenow_dmysl~~
The time the script was run (day/mon/year)
>>bi-attrib~~_timenow_mdy~~
The time the script was run (month day year)
>>bi-attrib~~_timenow_mdysl~~
The time the script was run (mon/day/year)
>>bi-attrib~~_timenow_24~~
The time the script was run (hour24:min)
>>bi-attrib~~_timenow_am~~
The time the script was run (hour12:min am/pm)
>>bi-attrib~~_index_wflink~~
Name of file that is index to this one
>>bi-attrib~~_left_wflink~~
Name of file that is left of this one
>>bi-attrib~~_right_wflink~~
Name of file that is right of this one
>>wflio~~special_action1~~~~.~~
This attribute defines a "{{action_href}}" which will be called
on every file before the index files are generated.
>>wflio~~special_action2~~~~.~~
Defines a second special action which will only come into
effect if {{st}}special_action1{{et}} is defined.
>>wflio~~special_action3~~~~.~~
See {{st}}special_action2{{et}}
>>wflio~~special_action4~~~~.~~
See {{st}}special_action2{{et}}
>>wflio~~special_action5~~~~.~~
See {{st}}special_action2{{et}}
>>wflio~~special_action6~~~~.~~
See {{st}}special_action2{{et}}
>>wflio~~special_action7~~~~.~~
See {{st}}special_action2{{et}}
>>wflio~~special_action8~~~~.~~
See {{st}}special_action2{{et}}
>>wflio~~special_action9~~~~.~~
See {{st}}special_action2{{et}}
>>wflio~~notitle~~wflio~~.~~
If set does not insert title on to page
>>wflio~~wflio_notitle~~wflio~~1~~
By default don't have titles on {{wflio_href}} pages
>>wflio~~prune~~~~.~~
If this is set for a directory don't descend into the directory
just leave the contents undisturbed
>>wflio~~rellinks~~wflio,index~~**null**~~
List of types of rellink to assert for the page
>>wflio~~revlinks~~wflio,index~~**null**~~
List of types of revlink to assert for the page
>>wflio~~pagedef_fun~~wflio,index~~.~~
A "magic" attribute.
only be set for root but can be set as many times as you want.
Allows you to create new {{funs_href}} by defining them in Perl code.
See the {{perlscript_href}} section for more details.
>>wflio~~icon_dir~~wflio,index~~.~~
A "magic" attribute.
If it is set the program looks for icon
images in the selected directory and adds them to the usable set.
only be set for root but can be set as many times as you want.
>>wflio~~global_var~~wflio,index~~.~~
A "magic" attribute.
If set the nominated variable will have that value
for all pages (even the ones above here).
only be set for root but can be set as many times as you want.
>>wflio~~global_var_rel~~wflio,index~~.~~
A "magic" attribute.
If set the nominated variable will have that value
for all pages (even the ones above here), the value will be prepended with
the name of the directory that the folio file is within, so you can use this to
name a file that gets used for many directories (e.g. a background image
used for lost of pages).
only be set for root but can be set as many times as you want.
>>wflio~~no_fpage~~wflio,index~~.~~
A "magic" attribute.
If set no {{fpage_href}} files will be generated
(since {{fpage_href}} processing does not yet work this option is not heavily
>>wflio~~simple_wflio~~wflio,index~~.~~
A "magic" attribute.
If set causes the program to only look for
global {{attrib_href}} (rather
than those associated with particular files and directories).
this speeds up the process, at the cost of reducing flexibility.
only be set for root.
>>wflio~~hide_wfolio~~wflio,index~~.~~
A "magic" attribute.
If set true (and running on Windows) will attempt to make
generated files hidden.
only be set for root.
>>wflio~~ignore_empty_dirs~~wflio,index~~.~~
A "magic" attribute.
If set empty directories will not be reported.
only be set for root.
>>wflio~~baseref~~wflio,index~~.~~
Base reference for the page
>>wflio~~metatags~~wflio,index~~generator author~~
List of metatags to assert in the page header
>>wflio~~generator~~wflio,index~~Build Folio~~
Generator program
>>wflio~~author~~wflio,index~~.~~
Who generated the page (ran the program or edited the {{folio_href}} file)
>>wflio~~topcomment~~wflio,index~~.~~
{{html_href}} comment at the top of the page
>>wflio~~index_topcomment~~index~~.~~
HTML comment at the top of the index pages
>>wflio~~wflio_topcomment~~wflio~~.~~
HTML comment at the top of the {{wflio_href}} pages
>>wflio~~border~~index~~**zero**~~
width of borders for images
>>wflio~~thumb_width~~index~~60~~
width of thumbnail images
>>wflio~~thumb_height~~index~~.~~
height of thumbnail images
>>wflio~~thumb_file_openmessage~~index~~.~~
When creating thumbnail image files the program has to read the source
image to find out if it is worth creating a thumbnail.
Some images (especially
JPG files) cause the GD library to crash.
If this flag is set then the
program will print out the names of the image files it is opening
so you can see which one caused a crash.
>>wflio~~thumb_file_minratio~~index~~10~~
this is the minimum size ratio between the area an image and its
thumbnail.
If the requested thumbnail is too large then the
software will link directly to the image rather than create an
intermediate version.
>>wflio~~thumb_file_width~~index~~200~~
the width of the image file created for a thumbnail.
NB the width of the
thumbnail image in the wfolio file will be set by thumb_width
>>wflio~~thumb_file_height~~index~~.~~
the height of the image file created for a thumbnail.
NB the height of the
thumbnail image in the wfolio file will be set by thumb_height
>>wflio~~embed_height~~index,wflio~~20~~
Default height of embeded objects.
Since these are mostly
sounds this is a suitable height.
>>wflio~~embed_width~~index,wflio~~150~~
Default width of embeded objects.
Since these are mostly
sounds this is a suitable width
>>wflio~~embed_autostart~~index,wflio~~false~~
Do we want to start embedded objects on page load?
>>wflio~~index_thumb_border~~index~~.~~
The border width for thumbnail images on the index pages (use {{st}}"**zero**"{{et}}
to have no border)
>>wflio~~index_textcolor~~index~~.~~
The colour to use for text on index pages (select from {{colours_href}})
>>wflio~~wflio_textcolor~~wflio~~.~~
The colour to use for text on {{wflio_href}} pages (select from {{colours_href}})
>>wflio~~textcolor~~wflio,index~~.~~
The colour to use for text (select from {{colours_href}})
>>wflio~~index_pre_text~~index~~.~~
Text to place at top of page on the index pages
>>wflio~~filename_style~~wflio~~**null**~~
The style tags for filenames in {{wflio_href}} pages
>>wflio~~created_style~~wflio~~~~
The style for the created note in {{wflio_href}} pages
>>wflio~~created_flag~~wflio~~&(Created: $[_file_created])~~
The text to be placed after the file name of {{wflio_href}} pages
>>wflio~~pre_text~~wflio,index~~**null**~~
Text to place at top of page
>>wflio~~index_post_text~~index~~.~~
Text to place at bottom of index pages
>>wflio~~post_text~~wflio,index~~**null**~~
Text to place at bottom of page
>>wflio~~index_pre_dirs~~index~~.~~
Text to place before directory listing on the index pages
>>wflio~~pre_dirs~~wflio,index~~**null**~~
Text to place before directory listing
>>wflio~~index_post_dirs~~index~~.~~
Text to place after directory listing on the index pages
>>wflio~~post_dirs~~wflio,index~~**null**~~
Text to place after directory listing
>>wflio~~start_body~~wflio,index~~~~
Text to start page bodies
>>wflio~~pagetitle~~wflio,index~~.~~
Title for pages
>>wflio~~index_pagetitle~~index~~.~~
Title for index pages
>>wflio~~wflio_pagetitle~~index~~.~~
Title for {{wflio_href}} pages
>>wflio~~postthumb_dirs~~index~~&~~
separator for directory thumbnails
>>wflio~~index_pre_files~~index~~.~~
Text to place before file listing on the index pages
>>wflio~~pre_files~~wflio,index~~**null**~~
Text to place before file listing
>>wflio~~index_post_files~~index~~.~~
Text to place after file listing on the index pages
>>wflio~~post_files~~wflio,index~~**null**~~
Text to place after file listing
>>wflio~~postthumb_files~~index~~&~~
separator for file thumbnails
>>wflio~~index_picture~~indexes~~.~~
The name of the image file to use when representing this directory
in the index of its parent.
Setting this causes the directory
to be shown using this picture rather than the one that happens to occur first.
>>wflio~~force_category~~indexes~~.~~
The type to use without doing any pattern checking against the file
>>wflio~~force_dircategory~~indexes~~.~~
The type to use without doing any pattern checking against the directory
name (overrides {{st}}force_category{{et}}
>>wflio~~force_filecategory~~indexes~~.~~
The type to use without doing any pattern checking against the file
name (overrides {{st}}force_category{{et}}
>>wflio~~category_default~~indexes~~dontknow~~
The default file type to use if no other type is identified
>>wflio~~category_list~~indexes~~ignore picture web text wave mp3 folio fpage~~
The list of file types to test for.
If this list is extended
then corresponding pattern and {{render_href}}
methods will also be required.
Note that a corresponding
{{render_href}} method might also be needed.
>>wflio~~category_dontknow_render~~indexes~~file:$[_tidy_name@$]~~
How files to {{render_href}} files whose type we can't identify
>>wflio~~category_dontknow_filerender~~indexes~~.~~
How files to {{render_href}} files whose type we can't identify
>>wflio~~force_dirrender~~indexes~~.~~
Force the program to {{render_href}} the directories using this value rather
than matching the file's category (overrides {{st}}force_render{{et}})
>>wflio~~force_filerender~~indexes~~.~~
Force the program to {{render_href}} the files using this value rather
than matching the file's category (overrides {{st}}force_render{{et}})
>>wflio~~force_render~~indexes~~.~~
Force the program to {{render_href}} the directories or files using this value rather
than matching the file's category
>>wflio~~default_dirrender~~indexes~~wflio:$~~
The default way to {{render_href}}
directories (overrides the various category specific {{st}}_dirrender{{et}}s
if it is set
>>wflio~~category_dontknow_dirrender~~indexes~~wflio:$[_tidy_name@$]~~
How files to {{render_href}} directories whose type we can't identify
>>wflio~~category_folio_pattern~~indexes~~\.(folio)$~~
The {{regex_href}} that identifies {{st}}folio{{et}}
>>wflio~~category_folio_render~~indexes~~file:$[_$_icon@$]~~
How files to {{render_href}} files whose type we can't identify
>>wflio~~category_folio_filerender~~indexes~~.~~
How to {{render_href}} folio files.
>>wflio~~category_fpage_pattern~~indexes~~\.(fpage)$~~
The {{regex_href}} that identifies {{fpage_href}}
files for generating pages
>>wflio~~category_fpage_render~~indexes~~file:$[_$_icon@$]~~
How to {{render_href}} {{fpage_href}} files
>>wflio~~category_fpage_filerender~~indexes~~.~~
How to {{render_href}} {{fpage_href}} files
>>wflio~~category_fpage_dirrender~~indexes~~.~~
How to {{render_href}} {{fpage_href}} files
>>wflio~~category_ignore_pattern~~indexes~~(~)$~~
If the file name matches this {{regex_href}} it is ignored
(more correctly the {{st}}category_ignore_render{{et}} is used which
normally tells the program to ignore them)
>>wflio~~category_ignore_render~~indexes~~ignore~~
How to {{render_href}} {{st}}ignore{{et}} files
>>wflio~~category_ignore_filerender~~indexes~~.~~
How to {{render_href}} {{st}}ignore{{et}} files
>>wflio~~category_ignore_dirrender~~indexes~~.~~
How to {{render_href}} {{st}}ignore{{et}} files
>>wflio~~category_mp3_pattern~~indexes~~\.(mp3)$~~
The {{regex_href}} that identifies {{st}}mp3{{et}}
>>wflio~~category_mp3_render~~indexes~~file:$[_wave_icon@$] $[_tidy_name@$]~~
How to {{render_href}} {{st}}mp3{{et}} files
>>wflio~~category_mp3_filerender~~indexes~~.~~
How to {{render_href}} {{st}}mp3{{et}} files
>>wflio~~category_mp3_dirrender~~indexes~~.~~
How to {{render_href}} {{st}}mp3{{et}} files
>>wflio~~category_notype_render~~indexes~~file:$[_tidy_name@$]~~
How to {{render_href}} files with no extension
>>wflio~~category_notype_filerender~~indexes~~.~~
How to {{render_href}} files with no extension
>>wflio~~category_notype_dirrender~~indexes~~.~~
How to {{render_href}} files with no extension
>>wflio~~category_picture_pattern~~indexes~~\.(jpg|jpeg|gif|bmp)$~~
>The {{regex_href}} that identifies picture files
>>wflio~~category_picture_render~~indexes~~wflio:$[_thumb_file@$]~~
How to {{render_href}} image files
>>wflio~~category_picture_filerender~~indexes~~.~~
How to {{render_href}} image files
>>wflio~~category_picture_dirrender~~indexes~~wflio:$~~
How to {{render_href}} image directories
>>wflio~~category_text_pattern~~indexes~~\.(txt|text)$~~
The {{regex_href}} that identifies text files
>>wflio~~category_text_render~~indexes~~file:$[_tidy_name@$]~~
How to {{render_href}} text files
>>wflio~~category_text_filerender~~indexes~~.~~
How to {{render_href}} text files
>>wflio~~category_text_dirrender~~indexes~~.~~
How to {{render_href}} text files
>>wflio~~category_wave_pattern~~indexes~~\.(wav|wave)$~~
The {{regex_href}} that identifies {{st}}wave{{et}}
>>wflio~~category_wave_render~~indexes~~embed:$[_tidy_name@$]~~
How to {{render_href}} audio files
(except {{st}}mp3{{et}})
>>wflio~~category_wave_filerender~~indexes~~.~~
How to {{render_href}} audio files
(except {{st}}mp3{{et}})
>>wflio~~category_wave_dirrender~~indexes~~.~~
How to {{render_href}} audio files
(except {{st}}mp3{{et}})
>>wflio~~category_web_pattern~~indexes~~\.(htm|html)$~~
The {{regex_href}} that identifies web files
>>wflio~~category_web_render~~indexes~~file:$[_$_icon@$] $[_tidy_name@$]~~
How to {{render_href}} web files
>>wflio~~category_web_filerender~~indexes~~.~~
How to {{render_href}} web files
>>wflio~~category_web_dirrender~~indexes~~wflio:$[_$_icon@$] $[_tidy_name@$]~~
How to {{render_href}} web files
>>wflio~~category_unknown_render~~indexes~~file:$[_$_icon@$] $[_tidy_name@$]~~
How to {{render_href}} web files
>>wflio~~category_unknown_dirrender~~indexes~~wflio:$~~
How to {{render_href}} web files
>>wflio~~category_unknown_filerender~~indexes~~file:$[_$_icon@$] $[_tidy_name@$]~~
How to {{render_href}} web files
>>wflio~~indexfiles_h1text~~indexes~~Files~~
Heading before listing of files
>>cmdline~~dir~~.~~start_dir~~dir~~
The start in directory {{st}}dir{{et}}
>>cmdline~~hide_wfolio~~BOOL~~~~~~
If set true (and running on Windows) will attempt to make
generated files hidden.
Will not hide the index files, or any
file whose category is not {{st}}wfolio{{et}} or {{st}}icon{{et}}
>>cmdline~~ignore_empty_dirs~~BOOL~~~~~~
If set the program will not list the empty directories it
encounters
>>cmdline~~dont_use_icons~~BOOL~~~~~~
Reduces (but does not eliminate) the number of images
>>cmdline~~force_os~~N/A~~~~~~
Force the OS name to be the value specified
>>cmdline~~no_fpage~~BOOL~~~~~~
If this is set the program will not attempt to produce
{{fpage_href}} files
>>cmdline~~no_tk~~BOOL~~~~~~
Don't start the graphical interface, just process the files
>>cmdline~~no_progress~~BOOL~~~~~~
Don't use the Tk progress bar to display progress (for example if you
don't have the module built for your system)
>>cmdline~~no_fileselect~~BOOL~~~~~~
Don't use the Tk FileSelection widget
>>cmdline~~progress_steps~~100~~~~~~
Number of steps in each progress section
>>cmdline~~no_dirtree~~BOOL~~~~~~
Don't use the Tk DirTree widget
>>cmdline~~genname~~wflio~~flag_name~~new_name~~
Will cause all generated files to be named with the prefix
{{st}}new_name{{et}} (NB not tested, changing this could
have strange effects)
>>cmdline~~help~~BOOL~~~~~~
Generate the help files (but you already have them!)
>>cmdline~~simple_wflio~~BOOL~~~~~~
If set causes the program to only look for global {{attrib_href}} (rather
than those associated with particular files and directories).
this speeds up the process, at the cost of reducing flexibility.
>>icon~~backup~~
This icon indicates a directory used to backup files
>>icon~~dir~~
A directory.
This icon will not normally be used
>>icon~~dontknow~~
The file type here is unknown.
Notice that the file has an extension
(otherwise it would be a {{st}}notype{{et}} file) we just don't recognise
the what the extension name means
>>icon~~down~~
Move down a level.
Not used in the normal operation but may be
exploited by an {{fpage_href}} definition
>>icon~~empty~~
An empty directory
>>icon~~folio~~
A {{folio_href}} file
>>icon~~fpage~~
An {{fpage_href}} file
>>icon~~ignore~~
This file matches our ignore pattern.
In normal operation this
file would be ignored and the icon would never appear
>>icon~~index~~
Link back to the directory containing the thumbnails
>>icon~~left~~
The previous image in a sequence
>>icon~~mp3~~
The icon to use for {{st}}mp3{{et}} files.
Not normally used
since the {{st}}wave{{et}} icon is used instead
>>icon~~notype~~
This file has no extension.
The icon would normally not
be used since the {{st}}notype{{et}} files are usually rendered with
just the name
>>icon~~original~~
A directory containing original images.
Often these are much
larger than browsers can cope with so they should be resized
>>icon~~panorama~~
A directory containing stitched together vistas.
Normally very
wide hence they need special scaling of the thumbnails
>>icon~~parent~~
The parent directory of this one
>>icon~~picture~~
A picture.
Normally a picture file will be represented by a
thumbnail version of the image, however there are occasions when
an icon is needed.
>>icon~~right~~
The next picture in the sequence
>>icon~~text~~
A text file
>>icon~~tools~~
A directory containing programs and scripts
>>icon~~unknown~~
This indicates an unknown icon type.
Normally occurs only when
an icon is missing
>>icon~~up~~
Move up a level.
Like down this icon is not used normally
>>icon~~wave~~
A directory containing audio files.
Normally sound files are
either linked to or embedded
>>icon~~web~~
A web page
>>icon~~wfolio~~
A file generated by the {{st}}{{prog_name}}{{et}} program.
These are normally deleted by the program and would never appear
>>icon~~working~~
A working or temporary directory
>>pagestmt~~endwhile~~~~~~
End of while block
>>pagestmt~~endif~~~~~~
End of if block
>>pagestmt~~endsection~~~~~~
End of section
>>pagestmt~~endforeach~~~~~~
End of foreach block
>>pagestmt~~rem~~single~~ignore~~
Remark, the rest of the line is ignored
>>pagestmt~~label~~single~~name~~
Label naming a target for a goto
>>pagestmt~~goto~~single~~name~~
Jump to label
>>pagestmt~~last~~single~~~~
Jump out of enclosing loop
>>pagestmt~~next~~single~~~~
Go round the loop again
>>pagestmt~~section~~block~~name~~
Start of section
>>pagestmt~~set~~single~~var exp~~
Set a variable to a value
>>pagestmt~~output~~single~~exp~~
Put out a line to the generated file.
This lets you execute
some code and send out the result
>>pagestmt~~message~~single~~exp~~
Send a message to the user
>>pagestmt~~execute~~single~~exp~~
Execute a string as though it was a statement
>>pagestmt~~if~~block~~exp~~
If the expression is true do the first block
>>pagestmt~~elsif~~within:if~~exp~~
Else if statement, check the expression and decide if to do the next block
>>pagestmt~~else~~within:if~~~~
Else, where to go when all else fails
>>pagestmt~~foreach~~block~~var vexp~~
Do the block once for each element of the list, setting the variable
to the value each time
>>pagestmt~~while~~block~~exp~~
Keep repeating the block until the expression is false
>>pageopr~~**~~1~~
Raise to power
>>pageopr~~*~~2~~
>>pageopr~~/~~3~~
>>pageopr~~%~~4~~
>>pageopr~~x~~5~~
Concatenate strings (i.e. {{st}}"ab"x5{{et}} is
{{st}}"ababababab"{{et}})
>>pageopr~~+~~5~~
>>pageopr~~-~~6~~
>>pageopr~~.~~7~~
Append two strings
>>pageopr~~>pageopr~~>pageopr~~>~~8~~
Greater than
>>pageopr~~>=~~8~~
Greater than or equal to
>>pageopr~~lt~~9~~
Less than comparison for strings
>>pageopr~~gt~~9~~
Greater than for strings
>>pageopr~~le~~9~~
Less than or equal to for strings
>>pageopr~~ge~~9~~
Greater than or equal to for strings
>>pageopr~~!=~~10~~
>>pageopr~~~~10~~
>>pageopr~~==~~10~~
Equals (note the same as C not BASIC)
>>pageopr~~ne~~11~~
Not equal for strings
>>pageopr~~eq~~11~~
Equal strings
>>pageopr~~&~~12~~
Logical and (if you don't know the difference use &&)
>>pageopr~~^~~13~~
Exclusive or
>>pageopr~~|~~14~~
Logical or (if you don't know the difference use ||)
>>pageopr~~&&~~15~~
>>pageopr~~||~~16~~
EndDefaults
my(%tagtypes);
foreach $line (@defaults)
my(@vals) = split(/~~/,$line);
next if(!$line);
# Note the elements for the documentation
# Must call with & since the 0th element is the category
if(!&Document::add_cat(@vals))
# Unrecognised default type, just give up
# Some types of defaults require setting up other
# structures
if($vals[0] eq "htmltag")
# Define a new html tag
Page::add_tag($vals[1],$vals[2]);
elsif($vals[0] eq "pagestmt")
Page::add_stmt($vals[1],$vals[2],$vals[3]);
elsif($vals[0] eq "pageopr")
Page::add_oper($vals[1],$vals[2]);
elsif($vals[0] eq "tagattrib")
# Define a new html tag attribute
my($cat,$tags,$attrib_name,$html_name,$comment) = @
my(@tags,$tag);
if($tags =~ s/^\[([^\]]+)\]$/$1/)
@tags = split(/,/,$tags);
$tags[0] = $
foreach $tag (@tags)
Page::add_tagattrib($tag,$attrib_name,$html_name);
if(${$tagtypes{"${attrib_name}"}}{$tag} ||
${$tagtypes{"${html_name}"}}{$tag})
add_output("Multiple definition of tag ($tag,$attrib_name,$html_name)\n");
${$tagtypes{"${attrib_name}"}}{$tag} = 1;
${$tagtypes{"${html_name}"}}{$tag} = 1;
${$tagtypes{"${attrib_name}:${html_name}"}}{$tag} = $
elsif($vals[0] eq "wflio")
if($vals[1] =~ s/\[([^\]]+)\]/||/)
# sort out multiple var definitions
# Define the attribute default value
$attrib{$vals[1]} = Document::get_element("wflio",$vals[1],"default");
elsif($vals[0] eq "cmdline")
$val = Document::get_element("cmdline",$vals[1],"default");
if(Document::get_element("cmdline",$vals[1],"var"))
$val .= ":".Document::get_element("cmdline",$vals[1],"var");
$options{Document::get_element("cmdline",$vals[1],"flag")} = $
Attribute::defaults(\%attrib);
sub display_help ()
my($ex1,$ex2);
$ex1 = GenName::examples(1);
$ex2 = GenName::examples(2);
add_output(<= 0)
substr($val,index($val,$str1),length($str1),$str2);
return($val);
sub main ()
# Read the configuration (build into the script)...
top_init_pre_cmdline();
# ...now that we know what the command line options are...
Opt::get(%options);
# ...finally use those settings to configure the script
top_init_post_
# We have two cases, with or without Tk
if($no_tk)
# Don't want a user interface, just do the processing
session_init(0);
webify_dir(".");
FPage::run_session if(!$no_fpage && $fpage_present);
# Put together the Tk based front end
GUI::set_state("Gathering Parameters",1);
GUI::define_interface(\&start_session);
{# This collection of elements manipulates images.
Most importantly for
# creating small thumbnails that reduce the load on directiories with
# large numbers of images
my $is_started = "";
# Load all the dependent packages when this one is started
return if($is_started ne "");
$is_started = 1;
# Load the GD modules (but only if this function is called
my $module_found = 0;
eval(<<"LoadModule");
# Use require so we don't load the module if it is not there
require GD;
\$module_found = 1;
LoadModule
if($module_found == 0)
add_output("Failed to find GD module");
sub default_type
return "gif";
sub thumbnail
my($dir,$src_name) = @_;
my($target_width,$target_height,$minratio,$openmessage);
Attribute::get("$dir/$src_name","thumb_file_width",\$target_width,1);
Attribute::get("$dir/$src_name","thumb_file_height",\$target_height,1);
Attribute::get("$dir/$src_name","thumb_file_minratio",\$minratio,1);
Attribute::get("$dir/$src_name","thumb_file_openmessage",\$openmessage,1);
$minratio = 9 if(!defined $minratio || $minratio new("$dir/$src_name");
if(!defined $gd)
::add_output("Failed to read image data from $dir/$src_name");
my($src_width,$src_height) = $gd->getBounds();
if(!defined $target_width && !defined $target_height)
::add_output("Resizize must define either width or height");
$target_width = int($src_width*$target_height/$src_height)
if(!defined $target_width || $target_width <= 0);
$target_height = int($src_height*$target_width/$src_width)
if(!defined $target_height || $target_height <= 0);
if($target_width = 16000 ||
$target_height = 16000)
::add_output("Cannot resize image to $target_width x $target_height");
if((($src_width*$src_height)/($target_width*$target_height)) new($target_width,$target_height);
$new_gd->copyResampled($gd,0,0,0,0,$target_width,$target_height,
$src_width,$src_height);
# Now lets save it
# I should keep a track of all the thumbnails an allocate new entries
# in order, but for the moment I will be a bit cruder
my $target_filename = GenName::obtain("$dir/$src_name","thumb",$dir);
return undef
if(!defined $target_filename);
if(default_type() eq "gif")
my $fh = IO::File->new(">$dir/$target_filename");
print $fh $new_gd->gif();
$fh->close();
::add_output("Cannot yet produce thumbnail in ".default_type().
" format\n");
# We succeeded
FileCounts::inc('thumb');
::set_hidden("$dir/$target_filename") if($::hide_wfolio);
return $target_}

我要回帖

更多关于 lg g5韩版序列号查询 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信