If you get 403 error with your site, then use this:

For requests for help from CG administrators, Wranglers, and experienced CG members. Please read the FAQ before posting. Also look at CG Wiki for tutorials and how-tos written by other CG webtoonists.
Post Reply

did it work?

yes it worked allright!
1
50%
no it didn't work
1
50%
eventually, I managed to make it do something usefull
0
No votes
 
Total votes: 2

User avatar
YarpsDat
Cartoon Hero
Posts: 3637
Joined: Wed Oct 30, 2002 5:28 am
Location: nowhere

auto keen replacement.

Post by YarpsDat »

It seems the update script is down- even if you upload your files, they will not show up.
and that sucks.

so I made a little thingy that may help us work around that bug.
be warned though! it takes some skill to use it, and if you screw up you may damage your site, so be warned- you're using it at your own risk.

problem overview:
keenspace is almost ok- if the html is there, it will show up,
but the update script is down, so it doesnt generate the .html files
so if you can ftp to your site, but all the files have been deleted
or if you can't see new updates...

you can use my program(right click and SaveAs) to provide the html for upload
source code in C aviable
EDIT:scroll down to get the newest (and propably working) version.
the programand the code also aviable from my mirror site.


WARNING! program is not guaranteed to be bug free,
and the compiled one is NOT guaranteed to be virus free,
so run at your own responsibility.


The program generates .html files, almost like the autokeen,
then you have to upload thoes files to your site.
but it's quite primitive

flaw... erm "features":
1.dailytemplate, and indextemplate must be smaller than 30000 bytes (29 kb)
2."list file" must be smaller than 19kb
3.only the following tags work:
***todays_comics***
***first_day***
***previous_day***
***next_day***
***last_day***
ie. advertisment, and calendar tags DO NOT work.
you propably should include the advertisment java code in your templates

look here to see how.

4.only one image, and no text to go with it per page.
5.first-previous-next-last images have to be gifs. (ie. "first_day.gif")
and you need the "ghosted" files (ie. "first_day_ghosted.gif"), or you need to edit first and last .html file after they are generated.


manual:
1.you need to create the list file, named "data.txt".
it's a file that contains names of your image files, in chronological order,
separated with new-line character. Avoid spaces, and weird characters.
file should look like this:
ddt20030105.jpg
ddt20030108.gif
color20030110a.gif
ddt20030112.jpg
ddt20030115.gif
ddt20030117.gif

note: if you have two images on one day only include the first one,
then you can modify the html to include the other file.

tip: put all the image files in one directory ie. c:\temp\pleh\images\
run MS-dos prompt and type

Code: Select all

cd c:\temp\pleh
dir c:\temp\pleh\images /b /on >data.txt
check if they are in chronological order!

2.save your dailytemplate, and indextemplate as template.txt and main.txt respectively
you can remove some of the unused tags, ie. replace the callendar with "feature n/a" or something

put data.txt, template.txt, main.txt and the program in one directory (ie. c:\temp\pleh)
and create subdirectory named "keen" there (ie. c:\temp\pleh\keen)

3.run the program.

4.do something like this:

Code: Select all

cd c:\temp\pleh\keen
ren *.htm *.html
5.check if the files look allright,
you can edit some of them to include side-notes, rants, other images ect.

note:if the last episode is missing, add an empty line to "data.txt" (at the end)

6.upload all the files from c:\temp\pleh\keen into \public_html\d\ directory on your account
(or only the new ones, if your account wasn't deleted, just frozen)

rename index.htm (from c:\temp\pleh) to index.html, and upload it into \public_html\
and put all the images into \public_html\d\ too

make sure you don't damage anything!
do not touch indextemplate and dailytemplate "files" in your \public_html\ directory,
and don't delete anything, unless you're 100% sure you are allowed to!


7.check if the site looks allright.

8.post some comment here.
If it doesn't work [maybe] I'll try and fix it.
(my own site is somewhat diffrent, and I already have an advanced program for it, so I haven't really tested this one)

User avatar
YarpsDat
Cartoon Hero
Posts: 3637
Joined: Wed Oct 30, 2002 5:28 am
Location: nowhere

Post by YarpsDat »

hmm, something's wrong I can't download anything, so in case you're experiencing the same problem, here's the source code:

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

/*
           autokeen substitute
            by YarpsDat from
              the nowhere
          nowhere.keenspace.com

         if the keenspace is down
         you can visit my mirror:
       roadfromnowhere.republika.pl


*/

char listfile[20000];
char dailytemplate[50000];
char *list[200];

FILE *plik;

int listfile_size,dailytemplate_size,ilosc;

int obs(char *co, char *naco1,char *naco2,char *naco3,int *t1, int *wrote)
{ //this one takes care of one keen tag
 if (strncmp(dailytemplate+*t1, co, strlen(co)-1)==0)
  {
   fwrite((dailytemplate+*wrote),1,*t1-*wrote,plik);
   fwrite(naco1,1,strlen(naco1),plik);
   fwrite(naco2,1,strlen(naco2),plik);
   fwrite(naco3,1,strlen(naco3),plik);
   *t1=*t1+strlen(co);
   *wrote=*t1;
   return 1;
  }
 return 0;
}

char *cyferki(int nr)
{ // ie. dt20030107.gif -> 20030107
 static char name[100];
 int t1,t2;
 t2=0;
 for(t1=0;t1<strlen(list[nr]);t1++)
  {
   if ((list[nr][t1]>='0') && (list[nr][t1]<='9')) name[t2++]=list[nr][t1];
  }
 name[t2]=0;
 return name;
}

void zrobplik(int nr,char *name)
{ // this one takes care of one file
 int t1,wrote;

 plik=fopen(name,"w");
 wrote=0;
 for(t1=0;t1<dailytemplate_size;t1++)
  {
   if (obs("***todays_comics***","<img src='/d/",list[nr],"'>",&t1,&wrote)) continue;
   if (nr==ilosc-1)
     {
      if (obs("***next_day***","<img src='/images/next_day_ghosted.gif' border=0></a>","","",&t1,&wrote)) continue;
      if (obs("***last_day***","<img src='/images/last_day_ghosted.gif' border=0></a>","","",&t1,&wrote)) continue;
     }
    else
     {
      if (obs("***next_day***","<a href='/d/",cyferki(nr+1),".html'><img src='/images/next_day.gif' border=0></a>",&t1,&wrote)) continue;
      if (obs("***last_day***","<a href='/'><img src='/images/last_day.gif' border=0></a>","","",&t1,&wrote)) continue;
     }
   if (nr==0)
     {
      if (obs("***previous_day***","<img src='/images/previous_day_ghosted.gif' border=0></a>","","",&t1,&wrote)) continue;
      if (obs("***first_day***","<img src='/images/first_day_ghosted.gif' border=0></a>","","",&t1,&wrote)) continue;
     }
    else
     {
      if (obs("***previous_day***","<a href='/d/",cyferki(nr-1),".html'><img src='/images/previous_day.gif' border=0></a>",&t1,&wrote)) continue;
      if (obs("***first_day***","<a href='/d/",cyferki(0),".html'><img src='/images/first_day.gif' border=0></a>",&t1,&wrote)) continue;
     }
  }
 fwrite((dailytemplate+wrote),1,dailytemplate_size-wrote,plik);
}



void dekodujliste()
{
 int nr,t1;
 nr=1;
 list[0]=listfile;
 for(t1=0;t1<listfile_size;t1++)
  {
   if ((*(listfile+t1)==10)||(*(listfile+t1)==13))
    {
     *(listfile+t1)=0;
     list[nr]=listfile+t1+1;
     if (*(listfile+t1-1)!=0) nr++;
    }
  }
 ilosc=nr-1;
}

void main()
{
 int t;
 char name[100];

 printf(" Autokeen substitute\n\n    by YarpsDat\n\nnowhere.keenspace.com\n\n\n");
 printf("\n\n\nworking...");
 plik=fopen("data.txt","r");
 listfile_size=fread(listfile,1,20000,plik);
 close(plik);
 plik=fopen("template.txt","r");
 dailytemplate_size=fread(dailytemplate,1,50000,plik);
 close(plik);
 dekodujliste();
 for(t=0;t<ilosc;t++)
  {
   strcpy(name,"./keen/");
   strcat(name,cyferki(t));
   strcat(name,".htm");
   zrobplik(t,name);
  }
 strcpy(name,"./index.htm");

 plik=fopen("main.txt","r");
 dailytemplate_size=fread(dailytemplate,1,50000,plik);
 close(plik);

 zrobplik(ilosc-1,name);
 printf("\nok!\n");
}


User avatar
McBean
Regular Poster
Posts: 562
Joined: Sat Jul 20, 2002 12:14 pm
Contact:

Post by McBean »

All that code...it's a nightmare!

User avatar
Sss
Regular Poster
Posts: 135
Joined: Thu Mar 14, 2002 4:00 pm
Location: Louisville, KY
Contact:

Post by Sss »

Autokeen works fine for me! I think the problem is just trying to set it up initially. Especially finding the right $path. As for placing the newest comic on the actual index page I wanna say you have to make the index a xhtml (maybe sever side ("index.shtml") as well?) file and put a <!--#EXEC CGI="point to autokeenlite.cgi" --> in there somewhere. I can't get it to work right but I really don't need to for the way my comic is presented. I just manually put links pointing to the right pages in autokeen.

See it in action on S.U.I.T.'s
Image
-That's what I said, deal with it!

User avatar
Sss
Regular Poster
Posts: 135
Joined: Thu Mar 14, 2002 4:00 pm
Location: Louisville, KY
Contact:

Post by Sss »

...or you could just go to Autosite and download a site automation program. It works on Labgoats!
Image
-That's what I said, deal with it!

User avatar
Labgoat
Regular Poster
Posts: 230
Joined: Fri Jan 01, 1999 4:00 pm
Location: Tuscaloosa, AL, USA
Contact:

Autosite

Post by Labgoat »

Autosite's a great tool, but you have to have PHP enabled on the server for it to work. Also, your /strips directory can only contain comics in the YYYYMMDD format. I had a comic in the directory that was not in this format, and it would not work properly. That was entirely my fault, however.
LabGoats, Inc.
Ask Dr. Science
A Humor Site...FOR SCIENCE!!!

Luchito
Regular Poster
Posts: 208
Joined: Fri Jan 01, 1999 4:00 pm
Location: Santiago, Chile
Contact:

Post by Luchito »

updater.pl

This is the Perl script I used to maintain April's Imaginary Webcam's mirror.

Includes:
* calendar
* storyline dropdown
* daily archive
* keenspace advertisement
* comic name and author
* no limits for dailytemplate and indextemplate
* no need for list file, since it reads the comics directory.

Notes:
* Requires the utilities djpeg and file, in order to get the size of your comic images. Those can be found only on Unix and Linux systems.
* More notes in the WARNINGS section in the source code.
* Configuration section: edit as you think it fits.
* Doesn't support ALL the Keenspace tags.

List of tags it supports:
***todays_comics***
***first_day***
***previous_day***
***next_day***
***last_day***
***todays_date***
***advertisement***
***calendar***
***storyline***
Luis Gonz

User avatar
YarpsDat
Cartoon Hero
Posts: 3637
Joined: Wed Oct 30, 2002 5:28 am
Location: nowhere

Post by YarpsDat »

Krazy Krow wrote:Seems to mostly work, but it only does 35 files at a time.
oops, I forgot to add a call to fclose, my box could handle 128 files open at the same time, so I didn't notice that, soray.
also, there was a mistake: I wanted to make it auto-keen compatible, but a-k puts the images into /comics/, and I thought it was /d/, it's all fixed now:
the new improved program, this time it's compiled in some microsoft C++, that's why code is twice as big, and propably works slower
and the code

Post Reply