programthinkmirror
programthinkmirror copied to clipboard
愚弟posclegom敬上
Courtesy of @chenmaop: https://rawgit.com/posclegom/programthinkmirror/master/ 这个是墙内可达的 对于repo过大不好下载有一个不太优雅的解决方案,就是利用 svn checkout https://github.com/posclegom/programthinkmirror/trunk/forum4 只选择性下载forum4文件夹,其余部分直接从btsync中复制过来
for my dear old friend
all scripts below, (in the form of master[n].sh) presumes that the <BTSync folder of programthinkmirror> is /root/blog/ you need to change that folder in all the scripts to have them work properly if your BTSync reception folder of programthinkmirror is different.
to update forum section only:
cd
when programthink has added a new blog article: (note: sometimes programthink lags in updating the BTSync off-line blog folder, in this case one can update the forum section first, then update the blog when the updated off-line blog folder becomes available later. That is, updating the nlist without updating the mlist, and carry out all the steps associated with updating the nlist/forum without carrying out the final steps associated with updating the mlist and the overall blog, e.g. master7.sh, etc.)
update src/mlist/mlist
update src/nlist/nlist
cp src/mlist/mlist .
cp src/nlist/nlist forum4/
cd forum4
mv ../src/pt17/shift.sh .
edit seq
an additional note on src/:
the src/ contains both production and historical/deprecated codes, folders containing production codes are: pt10/ pt17/ pt18/ pt20/ pt21/
an additional note on >500 forums for the first time:
when an article's forum comments exceed 500, do the following after updating the forum section: ./master9b.sh ./master9.sh ./master7.sh
an additional note on >1000 forums:
comments >500 are all appended into section C pt17/sensor.sh reveals difference between last checkpoint when difference exceed 500, (use the lab/ directory for the following)
append section B to current section C
and make resulting file the new section C
vim nB.xml
:set encoding=utf-8
:wq
vim nC.xml
:set encoding=utf-8
:wq
cat nB.xml nC.xml > out.xml
vim out.xml
:set encoding=utf-8
:set nowrap
go to second line
1500x
150x
then x until the first
note on code in labforum/ and src/pt21/ these codes are for verifying that the number of comments for each forum are up-to-date with respect to actual counts in the real forums on program-think.blogspot.com how to use: after a fresh forum update cd forum4/ cp *.xml ../labforum/ cd .. cd labforum ./master4.sh ./count.sh > count diff count ../forum4/newww (result from diff should be totally blank, any output from diff indicates discrepancy between mirror forum and actual forum and can be investigated by following the line number on the display for diff, the line numbers start from 1, so 1 should be subtracted from the line number outputs in order to go to the relevant forums)