#!/usr/local/bin/bash # mirrorpg-abandoned Version 2.7 2017-01-27 17:00 Author: Sergej Qkowlew # This file is Public Doimain for i in config functions generate allsites 1site abandoned childs do [ ! -s ./mirrorpg-$i ] && wget http://mirrorpg.arda.ru/mirrorpg/mirrorpg-$i [ ! -s ./mirrorpg-$i ] && echo "No file mirrorpg-$i here. Download it from http://mirrorpg.arda.ru/mirrorpg/$i" [ ! -s ./mirrorpg-$i ] && exit done echo " mirrorpg-abandoned # =================================== ====================================== # This file is used for keeping con- В этом файле только хранятся конфиги, # figurations, not really run them. но не запускаются. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Decide to move site config here if: Перемещать конфиг сюда следует, если: # Site's content stops to change. Содержимое сайта перестало меняться. # Site's domain is lost or squotted. Домен сайта потерян или перехвачен. # Site loses it's hosting. Прекратился хостинг сайта. # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Do not move config here if: Не перемещайте сюда конфиг, если: # Site is alive, content is changing. Сайт жив, содержимое меняется. # =================================== ====================================== " exit # BEGIN PER-SITE CONFIGURATIONS НАЧАЛО КОНФИГУРАЦИЙ КОНКРЕТНЫХ САЙТОВ # - beleriand.tirion.su + beleriand.flyboard.ru ------------------------------ SqBuildLines beleriand.flyboard.ru SqBackPhpbb3Anon beleriand.flyboard.ru # prepare forum to be inserted into site beleriand.tirion.su cd beleriand.flyboard.ru for i in *.html do sed -e "s/href=\"\.\/index\.php\"/href=\"\/forum.html\"/g" $i > ${i}.bak mv ${i}.bak $i sed -e "s/\\\\"Северный предел\\\\"/Северный предел<\/a>. Копия от 2014-11-05/g" $i > ${i}.bak mv ${i}.bak $i cat $i | perl -e ' $fulltext=join("",<>); $fulltext=~s/\r\n/\n/gsi; $fulltext=~s///gsi; $fulltext=~s///gsi; $fulltext=~s///gsi; $fulltext=~s/
.*?forumenko.*?<\/div>//gsi; $fulltext=~s///gsi; $fulltext=~s///gsi; # не шмог! Может кто другой допилит # $fulltext=~s/(.*?)<\/a>/\1/gsi; print $fulltext; ' > ${i}.bak mv ${i}.bak $i echo $i done mv index.html forum.html rm index.php rm robots.txt cd .. SqBuildLines beleriand.tirion.su SqAddConf SqBackStatic SqRobots cd beleriand.tirion.su for i in *.html text/*.html istimor/*.html do [ -s $i ] || continue; sed -e "s/\//g" $i > ${i}.bak mv ${i}.bak $i echo $i done SqRecodeTree windows-1251 utf-8 SqCleanOuterHTMLTree cp -R ../beleriand.flyboard.ru/* ./ cd .. rm -rf beleriand.flyboard.ru SqReplace SqAddCsv "Белерианд Северный Предел" 5 "http://qkowlew.livejournal.com/164734.html?thread=2157438#t2157438" # - 3mush.ucoz.ru ------------------------------------------------------------ SqBuildLines 3mush.ucoz.ru SqAddConf SqBackStatic SqRobots cd $NowDomain SqUcozCleanTree SqSubstDomainByRootTree # Delete wrong meta charset tag SqRecodeTree utf-8 utf-8 rm -rf load publ index forum wget -x -nH http://$NowDomain/.s/t/992/1.gif wget -x -nH http://$NowDomain/.s/t/992/6.gif wget -x -nH http://$NowDomain/.s/t/992/9.gif wget -x -nH http://$NowDomain/.s/img/icon/ajsml.gif cd .. SqReplace SqAddCsv "ПРИ Три Мушкетёра" 5 http://qkowlew.livejournal.com/164734.html?thread=2159230#t2159230 # - ameller.narod.ru ------------------------------------------------ SqBuildLines ameller.narod.ru SqAddConf SqBackStatic SqRobots ameller.narod.ru cd ameller.narod.ru SqSubstDomainByRootTree '~s/http:\/\/ameller\.narod\.ru//gi' SqUcozCleanTree SqJSTree ameller.narod.ru SqAddFiles cd .. SqReplace SqGetTitle ; SqAddCsv "$NowTitle" 5 "http://qkowlew.livejournal.com/164734.html?thread=2159742#t2159742" # - 1962.earthsea.ru ------------------------------------------------ SqBuildLines 1962.earthsea.ru SqAddConf SqBackStatic SqRobots cd $NowDomain SqSubstDomainByRootTree NowDomR=`echo "www.$NowDomain" | perl -pe "~s/\./\\\\\\./gi"` NowDomReg="~s/http:\/\/$NowDomR//gi" SqSubstDomainByRootTree SqAllPicturesTree SqAddFiles cd .. SqReplace SqGetTitle ; SqAddCsv "$NowTitle" 5 "http://qkowlew.livejournal.com/164734.html?thread=2175102#t2175102" # - 1924.holdgold.ru ------------------------------------------------ SqBuildLines 1924.holdgold.ru SqAddConf SqBackStatic SqRobots cd $NowDomain wget --restrict-file-names=nocontrol -r -l 0 -x -nH http://www.1924.holdgold.ru SqSubstDomainByRootTree NowDom2=`echo "www.$NowDomain" | perl -pe "~s/\./\\\\\\./gi"` SqSubstDomainByRootTree "~s/http:\/\/$NowDom2//gi" SqFilePage page SqRecodeTree windows-1251 utf-8 SqAllPicturesTree SqAddFiles cd .. SqReplace SqGetTitle SqAddCsv "$NowTitle" 5 "http://qkowlew.livejournal.com/164734.html?thread=2158974#t2158974" SqBuildLines liliya-i-lev.ru SqAddConf SqBackStatic SqRobots cd liliya-i-lev.ru SqSubstDomainByRootTree # Delete index.html, keep index.shtml Прибиваем index.html ради index.shtml # for /?print URI и парсинга URI /?print rm index.html* wget -x -nH http://liliya-i-lev.ru/print.shtml wget -x -nH http://liliya-i-lev.ru/print.shtml?1 wget -x -nH http://liliya-i-lev.ru/print.shtml?2 wget -x -nH http://liliya-i-lev.ru/print.shtml?3 wget -x -nH http://liliya-i-lev.ru/print.shtml?4 wget -x -nH http://liliya-i-lev.ru/print.shtml?5 wget -x -nH http://liliya-i-lev.ru/print.shtml?6 wget -x -nH http://liliya-i-lev.ru/print.shtml?7 wget -x -nH http://liliya-i-lev.ru/print.shtml?8 wget -x -nH http://liliya-i-lev.ru/print.shtml?9 wget -x -nH http://liliya-i-lev.ru/print.shtml?10 # Add code to show ?print pages Добавляем обработку ?print страниц SqAddQueryReportTree shtml # Add php processing of .shtml files php обработка .shtml файлов echo 'AddHandler application/x-httpd-php .shtml'>.htaccess SqRecodeTree windows-1251 utf-8 cd .. SqReplace SqGetTitle SqAddCsv "$NowTitle" 5 # - 1431.allrpg.info ------------------------------------------------ SqBuildLines 1431.allrpg.info SqAddConf SqBackStatic SqRobots cd $NowDomain SqSubstDomainByRootTree SqFilePage index SqLjPicturesTree SqAddFiles for i in *.css do [ -s $i ] || continue cat $i | perl -e ' # subst paths $fulltext=join("",<>); $fulltext=~s/\r\n/\n/gsi; $fulltext=~s/(url)(\()http:\/\/www\.allrpg\.info(\/.+?)(\))/\1\2\3\4/gsi; print $fulltext; ' > ${i}.bak mv ${i}.bak $i done wget -x -nH http://www.allrpg.info/libraries/mootools/arrow_down_over.gif wget -x -nH http://www.allrpg.info/libraries/mootools/arrow_down.gif wget -x -nH http://constantinople.ru/images/stories/ingvar1/yanissari.jpg NowDomR=`echo "constantinople.ru" | perl -pe "~s/\./\\\\\\./gi"` NowDomReg="~s/http:\/\/$NowDomR//gi" SqSubstDomainByRootTree cd .. SqReplace SqAddCsv "1431: Об Игре - Анонс" 5 "http://qkowlew.livejournal.com/164734.html?thread=2181502#t2181502" # - 1612.allrpg.info ------------------------------------------------ SqBuildLines 1612.allrpg.info SqAddConf SqBackStatic SqRobots cd $NowDomain SqSubstDomainByRootTree cd .. SqReplace SqAddCsv "1612: игра 3 июля 2011 года на Ворошиловской даче(Медведково-Алтуфьево)" 4 "http://qkowlew.livejournal.com/164734.html?thread=2183806#t2183806" # - aaz.tut.su -------------------------------------------------------- SqBuildLines aaz.tut.su SqAddConf SqBackStatic SqRobots cd $NowDomain SqSubstDomainByRootTree SqRecodeTree windows-1251 utf-8 NowDomR=`echo "www.$NowDomain" | perl -pe "~s/\./\\\\\\./gi"` NowDomReg="~s/http:\/\/$NowDomR//gi" SqSubstDomainByRootTree #SqAddQueryReportTree html #echo 'AddHandler application/x-httpd-php .html'>.htaccess cd .. SqReplace SqGetTitle ; SqAddCsv "$NowTitle" 5 "http://qkowlew.livejournal.com/164734.html?thread=2169470#t2169470" # - a-zone.allrpg.info -------------------------------------------------------- SqBuildLines a-zone.allrpg.info SqAddConf SqBackStatic SqRobots cd $NowDomain SqSubstDomainByRootTree cd .. SqReplace SqAddCsv "Аномальная зона. Точка отсчёта. 3-5 июля 2009" 5 "http://qkowlew.livejournal.com/164734.html?thread=2174846#t2174846" # - 2141.allrpg.info ---------------------------------------------------------- SqBuildLines 2141.allrpg.info SqAddConf SqBackStatic SqRobots cd $NowDomain SqSubstDomainByRootTree SqAllPicturesTree SqAddFiles cd .. SqReplace SqAddCsv "ТермоЙад 2141 7-10 мая 2010 года" 5 "http://qkowlew.livejournal.com/164734.html?thread=2184062#t2184062" # - forum.earthsea.ru ----------------------------------------------- SqBuildLines forum.earthsea.ru SqAddConf SqBackStatic rm index.html SqRobots cd $NowDomain SqSubstDomainByRootTree NowDomR=`echo "www.$NowDomain" | perl -pe "~s/\./\\\\\\./gi"` NowDomReg="~s/http:\/\/$NowDomR//gi" SqSubstDomainByRootTree SqAddQueryReportTree php SqFilePage memberlist SqFilePage viewforum SqFilePage viewtopic SqFilePage posting SqFilePage style text/css SqFilePage ucp cd .. SqReplace SqAddCsv "Земноморье. Главная страница." 5 "http://qkowlew.livejournal.com/164734.html?thread=2163070#t2163070" # - 10th.holdgold.ru -------------------------------------------------------- SqBuildLines 10th.holdgold.ru SqAddConf SqBackStatic SqRobots cd $NowDomain SqSubstDomainByRootTree SqFilePage page SqRecodeTree windows-1251 utf-8 SqLjPicturesTree SqAddFiles cd .. SqReplace SqAddCsv "10-е королевство" 5 "http://qkowlew.livejournal.com/164734.html?thread=2181758#t2181758" # - 1584.allrpg.info ------------------------------------------------ SqBuildLines 1584.allrpg.info SqAddConf SqBackStatic SqRobots cd $NowDomain SqSubstDomainByRootTree SqFilePage index cd .. SqReplace SqAddCsv "Грозный час: Анонс и манифест игры 11-14 июня 2009" 5 "http://qkowlew.livejournal.com/164734.html?thread=2160254#t2160254" # - fortheemperor.allrpg.info ------------------------------------------------- SqBuildLines fortheemperor.allrpg.info SqAddConf SqBackStatic SqRobots cd $NowDomain rm roles/orders* SqSubstDomainByRootTree SqRecodeTree utf-8 utf-8 D SqCleanOuterHTMLTree SqCleanMooToolsTree SqCleanOfficeTree cd .. SqReplace SqAddCsv "Warhammer 40000: За Императора!" 5 "http://qkowlew.livejournal.com/164734.html?thread=2186366#t2186366" # - albiongames.org ----------------------------------------------------------- SqBuildLines albiongames.org SqAddConf SqBackStatic $NowDomain $NowDomain -E SqRetPath=`pwd` cd $NowDomain SqWikiDot rm -rf admin\:themes wget -O style.css.gz http://d3g0gp89917ko0.cloudfront.net/v--c67e663218b6/common--theme/base/css/style.css gzip -d style.css.gz if [ -s style.css ] ; then SqTree ' $fulltext=join("",<>); $fulltext=~s/(<\/head>)/\n\1/gsmi; print $fulltext; ' H fi wget -x -E http://themes.wikidot.com/local--code/sky-blue if [ -s themes.wikidot.com/local--code/sky-blue.css ] ; then cd themes.wikidot.com CSSTree themes.wikidot.com SqTree ' $fulltext=join("",<>); $fulltext=~s/http:\///gsmi; print $fulltext; ' C cd .. SqAddFiles SqTree ' $fulltext=join("",<>); $fulltext=~s/(<\/head>)/\n\1/gsmi; print $fulltext; ' H fi SqAllPicturesTree SqAddFiles SqSubstDomainByRootTree SqDupPageToIndexTree SqShowFile .showfile.php /index.html cd $SqRetPath SqRobots SqReplace SqAddCsv # END PER-SITE CONFIGURATIONS КОНЕЦ КОНФИГУРАЦИЙ КОНКРЕТНЫХ САЙТОВ # =================================== ====================================== SqUpdateCsv