zixia / bbs

大话西游 BBS
https://www.zixia.net/bbs
GNU General Public License v3.0
22 stars 3 forks source link

Recover 0Announce menu entrence #6

Closed huan closed 3 years ago

huan commented 3 years ago

image

the .Names need to be generated?

realkcn commented 3 years ago

After generate 0Announce/.Names and groups/.Names , it will recover.

realkcn commented 3 years ago

recovered .Names by scripts:

#!/bin/sh

function gen_item
{
  dir=$1
  number=$2
  title=$(head -2 $dir/.Names|tail -1|sed 's/^# Title=\(.*\)$/\1/g')

  echo "Name=$title"
  echo 'Attach=0'
  echo "Path=~/$dir"
  echo "Numb=$number"
  echo '#'
}

cd $1
numb=1
echo '#'
echo "# Title=$2"
echo '#'

for directory in `find . -mindepth 2 -maxdepth 2 -name .Names|sed 's/^\.\/\(.*\)\/.Names$/\1/g'` ;
do
  gen_item $directory $numb
  numb=$((number+1))
done

generate groups/.Names:

cd ~/0Announce/groups
bash ~/tmp/KCN/gen_names.sh . 讨论区精华 > .Names

then generate 0Announce/.Names

cd ~/0Announce
bash ~/tmp/KCN/gen_names.sh . 本站精华区 > .Names
huan commented 3 years ago

精华区目录出现了~ 虽然看起来非常奇怪,但是好像就是当年的样子吧。。。

K core 英明神武,一统江湖!

image