This is the interface for viewing and ONGing time after Time stories. It consists of the following parts:
If you want to make a time after Time story and have it ONGed from here contact me via PM or e-mail (bicyclesonthemoon @ chirping mustard). You'll get an username and password. Then you can get access via SFTP to a directory where you can upload frames. In that directory there are also configuration files which you can use to change some things, like the ONG time, the alt text, etc. Together we determine what to put in those files.
The behavior of the viewer and the bots can be defined for each story by configuration files in the directory of a story:
This is the file that defines settings for the whole story.
The filename is settings. Each line contains one setting. The line format is:
name=value
The beginning of each line is the name of the option. The equal sign character is the separator. Everything after the separator is the the value of that setting.
If one name appears in multiple lines the newer line replaces the older one.
This is the file that stores the current state of an ongoing story. The filename is ongstate. First line contains 4 integers separated by a space:
To start a story change the state from 0 to 4. After story starts the values will be automatically modified by the system when needed.
This is the file that stores the times whern each frame was uploaded to the viewer. The filename is ongtime. It consists of lines with the following format
nnnn YYYY-MM-DD hh:mm
where nnnn
is the frame number, YYYY
is the year, MM
the month, DD
the day, hh
the hour and mm
the minute. Example:
0001 2013-08-07 22:00
0002 2013-08-07 23:00
0003 2013-08-08 00:00
0004 2013-08-08 01:00
0005 2013-08-08 02:00
0006 2013-08-08 21:00
0007 2013-08-08 22:00
0008 2013-08-08 23:00
The bot will automatically generate new lines in this file after uploading frames to the viewer.
This is the file used to define the times to upload new frames to the viewer. It consists of lines which are unix timestamps
If a timestamp from the future is found it will be used instead of the value calculated from the ongtime setting. Timestamps from the past are ignored. The first found value will be used. Because of this the timestamps should be in ascending orderThis is the file used to force an update of frames which are already available on the viewer. Each line is a number of a frame to update. Instead of a number a "c" character can be used to update the cfrt frame. After the bot successfully updates all the listed frames the file is automatically cleared.
These store the login information for the bot that posts to the OTT. The filenames are set by the ongbot and pleaseongbot settings.
The files consist of 3 lines:
When a new frame is uploaded to the viewer the bot will check if the previous one was posted to the OTT. If it wasn't the bot will post it. The ongbot file is used for this. If the file does not exist the feature will be disabled.
In the viewer, for the most recent frame there is an [ONG this for me] link available. If clicked the bot will post the frame to the OTT after checking if it isn't already there. The pleaseongbot file is used for this. If the file doesn't exist the feature will be disabled.
There is a possibility to create files with settings that apply to just one specific frame. The filenames are determined by the special setting. The settings defined in this file will replace those set in the settings file. The file has the same format as the settings file with one exception. After the lines with names and values there can be one empty line. All next lines will be assumed to be part of the text setting. Example:
title=Take the wheelstick
This is kind of similar to a HTTP header.
frame=bsta-000229.png
BBHTML=[quote][color=#FF8800]KXA: Wasn't it heavier before?[/color][/quote]<br><br>Suddenly, you realise something.<br>
HTML=<div class="tq"><span class="ni">KXA: Wasn't it heavier before?</span></div><br><br>Suddenly, you realise something.<br>
[tq][ni]KXA: Wasn't it heavier before?[/ni][/tq]
Suddenly, you realise something.
These files will be read after the viewer determines which frame should be displayed. This requires checking if the frame is out of limits, if cfrt is defined and in case frame is not specified if first or last frame shoud be shown. All these checks are done using only the general settings. These are the first things the viewer does. As soon as this is done the special settings are loaded.
While all the settings can be overwritten with these files not all settings make sense in these files. Similarly not all settings make sense outside these files.
These are the settings which are defined in the settings file and can be redefined for individual frames in the special files. Some of the values are used directly and some are used as the format string for the AWK sprintf function.
Not all settings have to be specified. Unspecified settings will take a default value which usually is 0 or an empty string.
Some settings should have an individual value for each frame. These are not taken directly but are generated by the AWK sprintf function:
sprintf(setting,f)
where "setting" is the value of the setting taken from the file and "f" is the frame number. If the story uses subframes this will be used instead:
sprintf(setting,f,s)
where "s" is the subframe character.
It is OK to ignore the sprintf and use a static value. The sprintf function has no problem taking more arguments taken in the format string.
This is OK:
sprintf("bftf-%04u",1)
This is also OK:
sprintf("bftf",1)
This is not OK:
sprintf("%04u: bftf-%04u",1)
If this sprintf mechanism is not enough to customize some setting for each frame in the desired way the special files can be used to overwrite the settings for individual frames
/aftertime/viewer?story=
) and to the directory name on the server.
title=t-1_%04u
frame=t-1_%04u.png
number=%02x
Stories can have text appearing when moving the mouse cursor over the frame. Even if the text is not identical for all frames the number of different texts is usually much smaller than the number of all frames. Because of this a special mechanism was created.
1=Wait for it.
6=Don't wait for it.
In the Time story there were so called "meteor frames". In the mscha numbering system there are 5 frames between 2440 and 2441. This mechanism was made to support such frame numbers
sf-2440=e
means that between frame 2440 and 2441 there will be 2440a, 2440b, 2440c, 2440d and 2440e.
sf-353=a
a=½
?story=t1i&f=353a
. This was implemented especially to support the 353½ frame of t1i.
For some stories there is a possibility to see alternative / enhanced versions of some or all the frames. This mechanism is implemented to support such enhancements.
enhance-0
is the name of the original. Example:enhance-0=original
enhance-1=blue
enhance-2=very blue
enhance-3=no fading
title-1=blue t1i-%04u%s
title-2=very blue t1i-%04u%s
title-3=no fading t1i-%04u%s
frame-1=bluet1i-%04u%s.png
frame-2=hyperblue-%04u%s.png
frame-3=nofading-%04u%s.png
inframe-1=enhphys-%04u%s.png
match-1=(\/(npb)?remapt-1_%04u\.png)|(_2F(npb)?remapt_2D1_5F%04u_2Epng)
Some stories come from other sources. It is possible to include a link to their original viewers
otherviewertext=this frame in mscha's viewer
otherviewerurl=http://xkcd.mscha.org/vieweraftertime/t-1_%04u
https://xkcd.mscha.org/vieweraftertime/t-1_0001
or https://xkcd.mscha.org/vieweraftertime/1732
.
special=advent-%02u
Some stories have a special text message under each frame. These settings were implemented to support stories like The Advent or BSTA. These settings should be defined in the special file.
[tq][ni]KXA: Wasn't it heavier before?[/ni][/tq]
Suddenly, you realise something.
<br>
tags. It can be generated from the original BBcode text by the undertext_bb2html.awk script. Example:HTML=<div class="tq"><span class="ni">KXA: Wasn't it heavier before?</span></div><br><br>Suddenly, you realise something.<br>
<br>
tags. If this setting is not specified it is assumed that the original text is already in BBcode format and the vbiewer will automatically escape it. For BSTA it was generated by the ong-bsta.awk script. Example:BBHTML=[quote][color=#FF8800]KXA: Wasn't it heavier before?[/color][/quote]<br><br>Suddenly, you realise something.<br>
frame=%04u.png
cfrt=phys-cfrt.png
There is an emergency mechanism. For an ongoing story posted locally from the server there is a possibility to define special frame which will be posted instead of the next frame in a situation where the new frames to upload are missing for a long time.
To use this feature both finalreplaceframe and finalreplacetime have to be defined.
subject=Re: 1190: Time for Physics – phys-%04u
match=(phys-%04u\.png)|(/aftertime/frame\?(([a-zA-Z&;0-9=]*story=phys[a-zA-Z&;0-9=]*f=0*%u)|([a-zA-Z&;0-9=]*f=0*%u[a-zA-Z&;0-9=]*story=phys)))
When bot sends a post to the OTT there is a possibility to use a newpixbOTTification - to post the frame with a drawing of a newpixbot holding the frame.
npbframe=npbftf-%04u.png
It may require some explanation which is not provided yet. It uses paths specific to my server. All paths are defined on the beginning of the files.
The following files are available: