feat: Complete project reorganization

- Reorganize core-theory into 6 thematic subdirectories (01-06)
- Clean up root directory, move files to appropriate locations
- Create comprehensive README files for navigation
- Add new academic papers and research content
- Implement English naming convention for better indexing
- Total: 42 core theory files organized, 7 READMEs created

Key improvements:
- Clear hierarchical structure (foundational → matrix → analysis → empires)
- Better discoverability with detailed navigation guides
- Scalable framework for future content expansion
- AI-friendly organization for indexing and processing
This commit is contained in:
ben
2025-10-21 12:56:11 +00:00
parent b6105b6770
commit 1595d7f68e
105 changed files with 19448 additions and 197 deletions

View File

@@ -0,0 +1,45 @@
#!/bin/bash
echo "=== 应用简化 ZSH 配置 ==="
echo ""
# 备份当前配置
echo "1. 备份当前 .zshrc..."
cp ~/.zshrc ~/.zshrc.backup.$(date +%Y%m%d_%H%M%S)
echo "✓ 已备份到 ~/.zshrc.backup.$(date +%Y%m%d_%H%M%S)"
# 应用简化配置
echo ""
echo "2. 应用简化配置..."
cp /home/ben/code/huhan3000/simplified_zshrc ~/.zshrc
echo "✓ 简化配置已应用"
echo ""
echo "3. 清理缓存..."
rm -rf ~/.oh-my-zsh/cache/*
echo "✓ 缓存已清理"
echo ""
echo "4. 测试新配置..."
if zsh -c "source ~/.zshrc; echo '配置加载成功'" 2>/dev/null; then
echo "✓ 新配置测试通过"
else
echo "✗ 新配置测试失败,恢复备份..."
cp ~/.zshrc.backup.$(date +%Y%m%d_%H%M%S) ~/.zshrc
echo "✓ 已恢复原配置"
exit 1
fi
echo ""
echo "=== 简化完成 ==="
echo "新配置包含的插件:"
echo " - git (必需)"
echo " - docker (必需)"
echo " - docker-compose (Docker 相关)"
echo " - colored-man-pages (彩色手册页)"
echo " - extract (解压文件)"
echo " - zsh-autosuggestions (自动建议)"
echo " - zsh-syntax-highlighting (语法高亮)"
echo ""
echo "移除了 16 个不必要的插件,应该能解决你的问题!"
echo "请重新启动终端或运行: source ~/.zshrc"

51
scripts/build_docs.sh Executable file
View File

@@ -0,0 +1,51 @@
#!/bin/bash
# 胡汉三千年项目文档构建脚本
# Hu-Han Three Thousand Years Project Documentation Build Script
echo "🚀 开始构建胡汉三千年项目文档..."
# 检查是否安装了必要的依赖
echo "📦 检查依赖..."
# 检查Python环境
if ! command -v python3 &> /dev/null; then
echo "❌ 错误未找到Python3"
exit 1
fi
# 检查是否安装了Sphinx
if ! python3 -c "import sphinx" &> /dev/null; then
echo "📥 安装Sphinx..."
pip install sphinx sphinx-rtd-theme myst-parser
fi
# 进入文档目录
cd documentation/sphinx-docs
echo "🧹 清理旧的构建文件..."
make clean
echo "🔨 构建HTML文档..."
make html
if [ $? -eq 0 ]; then
echo "✅ 文档构建成功!"
echo "📖 文档位置: documentation/sphinx-docs/_build/html/index.html"
echo "🌐 可以用浏览器打开查看"
# 如果是在支持的环境中,尝试打开浏览器
if command -v xdg-open &> /dev/null; then
echo "🚀 正在打开浏览器..."
xdg-open _build/html/index.html
elif command -v open &> /dev/null; then
echo "🚀 正在打开浏览器..."
open _build/html/index.html
fi
else
echo "❌ 文档构建失败"
exit 1
fi
cd ../..
echo "🎉 完成!"

12858
scripts/rename_documents.sh Normal file

File diff suppressed because it is too large Load Diff

33
scripts/serve_docs.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
# 胡汉三千年项目文档服务器
# Hu-Han Three Thousand Years Project Documentation Server
echo "🚀 启动胡汉三千年项目文档服务器..."
# 检查文档是否已构建
if [ ! -d "documentation/sphinx-docs/_build/html" ]; then
echo "📚 文档尚未构建,正在构建..."
./build_docs.sh
fi
# 进入文档目录
cd documentation/sphinx-docs/_build/html
# 获取本机IP地址
LOCAL_IP=$(hostname -I | awk '{print $1}')
echo "📖 文档服务器启动成功!"
echo ""
echo "🌐 访问地址:"
echo " 本地访问: http://localhost:8000"
echo " 局域网访问: http://$LOCAL_IP:8000"
echo ""
echo "💡 提示:"
echo " - 按 Ctrl+C 停止服务器"
echo " - 修改文档后需要重新构建: ./build_docs.sh"
echo ""
echo "🎉 正在启动服务器..."
# 启动Python HTTP服务器
python3 -m http.server 8000

View File

@@ -0,0 +1,20 @@
#!/bin/bash
# 胡汉三千年项目 - 本地文档服务器启动脚本
# Hu-Han Three Thousand Years Project - Local Documentation Server
echo "🚀 启动胡汉三千年项目文档服务..."
# 检查文档是否已构建
if [ ! -d "documentation/sphinx-docs/_build/html" ]; then
echo "📚 文档未构建,正在构建..."
./build_docs.sh
fi
# 启动本地服务器
echo "🌐 启动本地Web服务器..."
echo "📖 文档地址: http://localhost:8080"
echo "🛑 按 Ctrl+C 停止服务器"
cd documentation/sphinx-docs/_build/html
python3 -m http.server 8080

105
scripts/test_plugins.sh Normal file
View File

@@ -0,0 +1,105 @@
#!/bin/bash
echo "=== 插件测试脚本 ==="
echo "逐个测试你的 zsh 插件..."
echo ""
# 测试基本 zsh 功能
echo "1. 测试基本 zsh 功能..."
if zsh -c "echo 'ZSH 基本功能正常'" 2>/dev/null; then
echo "✓ ZSH 基本功能正常"
else
echo "✗ ZSH 基本功能异常"
exit 1
fi
echo ""
echo "2. 测试 Oh My Zsh 核心..."
if zsh -c "source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'Oh My Zsh 核心正常'" 2>/dev/null; then
echo "✓ Oh My Zsh 核心正常"
else
echo "✗ Oh My Zsh 核心异常"
exit 1
fi
echo ""
echo "3. 测试内置插件(逐个)..."
plugins=(
"git"
"docker"
"docker-compose"
"ansible"
"terraform"
"kubectl"
"helm"
"aws"
"gcloud"
"colored-man-pages"
"command-not-found"
"extract"
"history-substring-search"
"sudo"
"systemd"
"tmux"
"vscode"
"web-search"
"z"
)
for plugin in "${plugins[@]}"; do
echo -n "测试插件: $plugin ... "
if zsh -c "plugins=($plugin); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
done
echo ""
echo "4. 测试自定义插件..."
# 测试 zsh-autosuggestions
echo -n "测试 zsh-autosuggestions ... "
if zsh -c "plugins=(zsh-autosuggestions); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
# 测试 zsh-syntax-highlighting
echo -n "测试 zsh-syntax-highlighting ... "
if zsh -c "plugins=(zsh-syntax-highlighting); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
# 测试 zsh-completions
echo -n "测试 zsh-completions ... "
if zsh -c "plugins=(zsh-completions); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
echo ""
echo "5. 测试插件组合..."
# 测试核心插件组合
echo -n "测试核心插件组合 ... "
if zsh -c "plugins=(git docker colored-man-pages extract); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
# 测试自定义插件组合
echo -n "测试自定义插件组合 ... "
if zsh -c "plugins=(zsh-autosuggestions zsh-syntax-highlighting zsh-completions); source ~/.oh-my-zsh/oh-my-zsh.sh; echo 'OK'" 2>/dev/null; then
echo "✓"
else
echo "✗"
fi
echo ""
echo "插件测试完成!"