<p>If you want to run your own copy of the <a href="http://1190.bicyclesonthemoon.info/ott/">ЯOЯЯIM TTO</a>, you\r
can, because I made it available. Follow these instructions to download and\r
setup your own ЯOЯЯIM TTO.</p>\r
-<p>This is about version 1.4.</p>\r
+<p>This is about version 1.5.</p>\r
+\r
+<h2>Read this</h2>\r
+<p>To have the mirror rendered correctly after migration the bots should re-read\r
+the whole thread. When some posts are archived before and some after the page\r
+will have HTML errors.</p>\r
+<p>I reccomend keeping a copy of the data archived by version 1.4 before moving\r
+to this one,</p>\r
+\r
<h2>Dependencies</h2>\r
The mirror depends on some things:\r
<ul>\r
<p>This and earlier versions can also be downloaded from <a href=\r
"svn://bicyclesonthemoon.info/ottmirror">svn://bicyclesonthemoon.info/ottmirror</a>.\r
Use "e" for read-only access.<br>\r
-If you want the source as it is right now, get it from <a href=\r
+If you want the source as it is exactly now, it's available at <a href=\r
"http://1190.bicyclesonthemoon.info/ott/src/">http://1190.bicyclesonthemoon.info/ott/src/</a>.\r
+(It's updated immediately and may contain errors).\r
</p>\r
\r
<h2>Preparing the enviroment</h2>\r
point to mawk.</li>\r
<li>Create a directory where the programs will be run from. Can be the same\r
where you downloaded the source. Set <code>propath</code> to point there.</li>\r
-<li>Create a directory for temporary files. Only you should have read access\r
-there. While someone makes a post, their password can be found in a temporary\r
-file. Set <code>tmppath</code> to point there.</li>\r
+<li>Create a directory for temporary files. Only you should have read and execute\r
+access there. While someone makes a post, their password can be found in a\r
+temporary file. Set <code>tmppath</code> to point there.</li>\r
<li>Create a directory where the bots will remember things. Set\r
<code>mempath</code> to point there. Create a file named "<code>name</code>"\r
there. Put your URL-encoded xkcd fora login in the first line and your\r
<li><code>mpost/ok</code></li>\r
<li><code>mpost/pm</code></li>\r
</ul>\r
-Only you should have read access to <code>mpost</code>. Passwords can be found\r
-there.</li>\r
+Only you should have read and execute access to <code>mpost</code>. Passwords\r
+can be found there.</li>\r
<li>Create a directory where the bots will write their reports. set\r
<code>logpath</code> to point there. \r
</li><li>Set <code>mirrpath</code> to point at the directory where the mirror is\r
This moves the log files once in a week. Otherwise they would grow to infinity.\r
</p>\r
\r
-<!-- <h2>Bugs</h2>\r
--->\r
+<h2>Bugs</h2>\r
+<p>This is a quick fix. It does work with the new phpBB but not everything is\r
+rendered as good as in the original.</p>\r
\r
<h2>Changes</h2>\r
<ul>\r
- <li>v.1.4 (31.08.2015):\r
+ <li>v1.4 (31.03.2016)\r
+ <ul>\r
+ <li>Changed to make it work with the new phpBB</li>\r
+ <li>Fixed makefile bug</li>\r
+ </ul></li>\r
+ <li><a href="http://1190.bicyclesonthemoon.info/ottmirror/1.4">v.1.4 (31.08.2015):</a>\r
<ul>\r
- <li>Added an additional field in the post form to stop spambots.</li>\r
+ <li>Added an additional field in the post form to stop spambots</li>\r
</ul></li>\r
<li><a href="http://1190.bicyclesonthemoon.info/ottmirror/1.3">v.1.3 (8.03.2015):</a>\r
<ul>\r
# OTT mirror
-# Copyright (C) 2014 Balthasar Szczepański
+# Copyright (C) 2014-2016 Balthasar Szczepański
# bot2.awk (bothasar_t)
# relinking, archiving avatars, attachments, images.
-# 5.03.2015
+# 28.03.2016
# This file is part of OTT mirror.
#
hex=sprintf("%02X",i);
ch2hex[ch]=hex
}
+ noquot=0;
};
{
gsub(/href=\"\./, "href=\"" fora, $0)
split($i, arr, "\"p?")
id=arr[2]
}
+ if ($(i-1) ~ /^class=\"post-buttons\"/ ) #")
+ {
+ noquot=1
+ print ">" >> outfile
+ }
+ if ($(i) ~ /^<\/ul/)
+ {
+ noquot=0;
+ }
# relink OTT links to mirror links
if($i ~ /###links_regexp;/)
else if (related6==1)
{
printf("%s\"/ott/image/%s\"\n",arr[1],imgdir imgname) >>outfile
+ }
+ else if(noquot != 0)
+ {
+
}
else
{
case INDELIVERABLE:
default:
sleep(pwait);
- printf("send a PM: ");
- sub=fork();
- if(!sub)
- {
- r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_PM,"-v",argp1,"-v",argp2,"-v",argp3,"-v",argp4,"-v",argp5,postpath,(char *)0);
- exit(r);
- }
- waitpid(sub,&r,0);
+ printf("send a PM: (Temporary disabled)");
+ // sub=fork();
+ // if(!sub)
+ // {
+ // r=execl(MAWK_PATH,MAWK_PATH,"-f",AWK_PM,"-v",argp1,"-v",argp2,"-v",argp3,"-v",argp4,"-v",argp5,postpath,(char *)0);
+ // exit(r);
+ // }
+ // waitpid(sub,&r,0);
+ r = INDELIVERABLE;
switch(r)
{
case POST_MSTD:
# OTT mirror
-# Copyright (C) 2014 Balthasar Szczepañski
+# Copyright (C) 2014, 2016 Balthasar Szczepañski
# findlatest.awk
# find the latest page and number of posts.
-# 12.09.2014
+# 28.03.2016
# This file is part of OTT mirror.
#
{
for(i=1;i<=NF;i++)
{
- if(tolower($i) ~ /posts/)
+ if(tolower($i) ~ /posts/ && $(i-1) ~ /^[0-9]+$/)
posts=$(i-1)
}
}
# OTT mirror
-# Copyright (C) 2014 Balthasar Szczepański
+# Copyright (C) 2014, 2016 Balthasar Szczepański
# index.awk
# separate the topic from index page.
-# 12.09.2014
+# 31.03.2016
# This file is part of OTT mirror.
#
if((related!=0)&& ($0 ~ /<li class=.row/))
{
where=1
+ level=0;
printf("%s","") > outfile
}
+ else if ($0 ~ /<li/ && where==1)
+ ++level
if ($0 ~ /t=###threadID;/)
{
if($0 ~ /<\/li>/)
{
- where=0
- close(outfile)
+ if(level>0)
+ --level
+ else
+ {
+ where=0
+ close(outfile)
+ }
}
};
END{
redirect: redirect.cpp makefile
$(CC) $(CF) -o redirect redirect.cpp $(LF1)
-enable: post update view mview posted
- chmod u+s post update view mview posted
+enable: post update view mview posted mpview
+ chmod u+s post update view mview posted mpview
# OTT mirror\r
-# Copyright (C) 2014 Balthasar Szczepański\r
+# Copyright (C) 2014, 2016 Balthasar Szczepański\r
# upload.awk\r
# separate userinfo, signatures and content from page and upload it.\r
-# 12.09.2014\r
+# 30.03.2016\r
\r
# This file is part of OTT mirror.\r
#\r
\r
};\r
{\r
+ \r
if((where==6) && ($0 == "</div>"))\r
{\r
exit\r
{\r
where=2\r
}\r
+ if($0 ~ /<div class=.postbody/)\r
+ {\r
+ where=2\r
+ }\r
\r
if((where==2) && ($0 ~ /<p class=.author./))\r
{\r
if(($0 ~ /<div class=.content./)&&(where=2))\r
{\r
where=3\r
+ print ("###inf&" uid) >> outfile\r
+ if(otterinfD != "")\r
+ {\r
+ print otterinfD > otterinf2\r
+ otterinfD = ""\r
+ }\r
}\r
\r
if($0 ~ /<div id=.sig[0-9]/)\r
if($0 ~ /<dl class=.postprofile/)\r
{\r
where=5\r
- print ("###inf&" uid) >> outfile\r
- printf ("%s","") > otterinf2\r
+ # print ("###inf&" uid) >> outfile\r
+ # printf ("%s","") > otterinf2\r
}\r
\r
if($0 ~ /<hr class=.divider/)\r
\r
if(where==5)\r
{\r
- print $0 >> otterinf2\r
+ if(otterinfD!="")\r
+ otterinfD = otterinfD "\n"\r
+ otterinfD = otterinfD $0\r
+ # print $0 >> otterinf2\r
}\r
};
\ No newline at end of file