What it is
This tool scans a directory on your server and uses any image files that
match the requirements specified below to build the .stripindex file
that iStrip uses to store information about strips and news items.
Uses for this script
This script will be mainly of interest to people who already have a webcomic
site and wish to switch over to the iStrip software to drive it. If you
have previously run a webcomic using an automation script such as Autokeen
Lite or if you have done it manually with plain HTML pages then this script
will make the process of migrating over to iStrip easier. This script can
also be used by people who are setting up a site from scratch but who already
have a backlog of material to make available immediately. The strip index
builder will let you get all your strips online and not have to upload
them one at a time and then wait for the next day to upload the next.
Important notes
As this script is a new addition to iStrip it may still be a little buggy
in places. I have of course tested it and read through the code several
times to make sure nothing obvious is wrong but there may be some bugs
lurking in there somewhere. If you get any odd results with this script
then please leave a bug report on the iStrip source page.
Currently this script only scans for strips. It may at some future date
be expanded to also scan for news but at the moment if you have news on
your server from another web comic publishing system such as Autokeen Lite
then these will not be entered into the strip index. You can enter them
manually after running the script of course, but this could take some time
if you had a large number of strips in your archive.
Preparation for use
Before you can run this script there are several prerequisites that need
to be met:
- iStrip must be fully installed and configured. See the installation
instructions for more details on how to install iStrip, or the upgrade
instructions for more details on how to upgrade an older installation
of iStrip to the version in this package.
- The buildindex.php script needs to be installed on the server. This
is done by uploading it to the admin directory for your site. If you
upload it somewhere else the paths will be incorrect and the script
will fail to run.
- iStrip must be able to write to the .stripindex file. You should
upload the empty .stripindex file in this package to the proper location
on the server and make sure that iStrip can write it. This may require
that you CHMOD the .stripindex file to appropriate permission level.
Recommended values are listed in the installation instructions.
- There must be strip files on the server that the script can use to
build a stripindex. Obviously, a strip index can't be generated if
there are no strips to generate one from available. It is recommended
that you move any strip images you may already have on your server
to the location that iStrip uses to store strips (this is the
content/strips/
directory relative to the iStrip root directory by default).
- The strip files must be in a file format that PHP can identify as
being an image. For PHP 4.2.3 the files that will be recognised are
GIF, JPEG, PNG, BMP and TIFF (Motorola and Intel byte order are both
supported), and PHP 4.3.0 will also recognize XBM files. Formats such
as Photoshop or Painter images are not supported because they don't
have MIME types. Shockwave Flash files are not supported because they
have a MIME type of
application/x-shockwave-flash and
therefore wont be recognised as images by iStrip. WARNING:
While some uncompressed formats such as BMP are recognised, it is recommended
that you use these formats under no circumstances
whatsoever. These formats are not compressed and this results in
huge file sizes, even for relatively small images. Visitors to your
site will be kept waiting for ever for strips to display, even on broadband
connections, and massive amounts of bandwidth on your server will be
consumed. For web-published images, the preferred formats are GIF,
JPEG and PNG.
- The filenames
of the strips need to be in a specific format so that the script can
determine the date which should be assigned to each strip. The format
is an 8 digit number, followed by a dot, then the file type extension.
The 8 digit number is a date in the format YYYYNNDD, in other words,
the first four digits represent the year, the next two the month and
the last two the day of the month. For example 20031017 would be the
17th of October, 2003. This is similar to the format for filenames
used by Autokeen Lite, but without prefix or postfix support. Examples
of valid filenames are 19760911.gif (11th September, 1976) or 20000229.png
(29th February, 2000). Filenames such as foo_19760911.gif or 19760911_foo.gif
are invalid and will be ignored by the script because they contain
extra characters. 20030229.jpg is technically invalid because it refers
to the 29th of February on a non-leap year. However, PHP will treat
this date as the first of March. This can obviously lead to problems
if you also have a strip for the 1st of March 2003, so be very careful
when working with dates for near the end of February NOTE:
Dates that are valid but in the future will be rejected as iStrip does
not yet support post-dated strips.
- The dates specified in the filenames must all be unique. If all your
strips are in the same image format it will be impossible to have two
with the same date anyway because the filenames would be identical
and therefore not allowed by the operating system. But if you mix several
different formats then it is possible for two of them to have the same
date, 20031017.gif and 20031017.jpg, for example. In this case an entry
for the .gif file will be generated but the .jpg file will be rejected
because the list of files found by the script is sorted alphabetically
before being processed. In addition you could cause some confusion
if you specify a strip for the 29th of February and one for the first
of March if the year in question isn't a leap year.
Using the script
This script runs in a web browser and is triggered when you visit its location.
It runs entirely on the server, the web browser only provides the interface.
There are two stages of operation for this script, a data gathering stage
and a data processing stage. To use the script, follow the instructions
below:
- Run the strip by visiting it with your web browser. You will be asked
for your login details.
- The script will complete it's first stage of operation by scanning the
strip directory and generating a list of any strips it finds that meet
the requirements given above. This list will then be presented to you.
- If you so wish, you can now enter titles for the strips that the script
located. If you are not sure which strip is which you can review each strip
by following the "view image" link.
- Once you have edited the strip titles to your satisfaction, click the
"generate strip index" button at the bottom of your list
- The script will now attempt to generate and save a strip index file.
You will be presented with a status report informing you of whether
the operation succeeded or not.
- If the script reports that the strip index was successfully generated
and saved then the process is now complete.
Post-running activities
Once the script has been run there are a few more tasks that should be
performed:
- Check for files that weren't added and resolve the problem that
caused them to be rejected. By running the checkfs script you can
obtain a list of any files that were rejected by buildindex. To run
checkfs, go to the admin index page and follow the "Audit filesystem"
link. Resolving any problems that were reported may require you to
rename strips or convert them to an appropriate file format. Some
problems may not be resolvable, for example there is no way to have
2 strips with the same date. You will either have to put one strip
on a different day or delete one. Run the buildindex script again
- Once you have resolved any problems that may have occurred, delete
the buildindex.php script from your server. Once your strip index
has been successfully built the normal admin pages will be sufficient
for administrating your webcomic.
Troubleshooting
This is a list of problems that may occur with this script and ways to
resolve them:
- Script fails to run
The script may be installed to the wrong location. Make sure that it
is in the admin directory
The include files that the script needs may be missing. Ensure that
iStrip is installed correctly
The include files may be the incorrect version. Replace the installed
includes with the ones in this package
- Warning message about pre-existing strip index is displayed
You have already uploaded strips or a .stripindex file that contained
an entry. Ignore this error in the latter case. You may choose to
also ignore it in the former case, but bear in mind that if you have
defined any news items then these will be orphaned from the strip
index and will have to be manually deleted from the server
- No files are listed
Your strip files are in the wrong location. Move them to the proper
location on the server.
Your strip files are improperly named. Rename them to the format described
above.
Your strips are in a format that iStrip doesn't recognise as an image,
or as an image with a MIME type of application/octet-stream, for example
Photoshop PSD format. Convert them to an appropriate file format and
try again.
- Files are not in the order I want
You made a mistake with the filenames. Check that the filenames really
specify the date you want them to.
- No strip index was saved
The current strip index may not be writeable. Check that it has the
correct permissions set. If not, CHMOD it to the appropriate settings
(see installation documentation)
The strip index may not exist yet and the directory into which it is
meant to be written is not writeable. Upload the empty .stripindex
file in the package and CHMOD it to the correct level of permission.
|