https://github.com/terminus2049/wechatscope
被删微信公众号文章存档
https://github.com/terminus2049/wechatscope
anticensorship no-more-404
Last synced: 4 months ago
JSON representation
被删微信公众号文章存档
- Host: GitHub
- URL: https://github.com/terminus2049/wechatscope
- Owner: Terminus2049
- License: mpl-2.0
- Created: 2018-07-13T16:50:28.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-18T19:13:59.000Z (over 4 years ago)
- Last Synced: 2024-12-08T12:50:17.911Z (5 months ago)
- Topics: anticensorship, no-more-404
- Language: R
- Homepage: http://206.189.252.32:3838/Wechatscope/
- Size: 21.1 MB
- Stars: 227
- Watchers: 17
- Forks: 41
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wechatscope
## 每日数据存档
由于 Wechatscope() 项目只提供七天内的被删数据,设计定时任务每日获取近三天的数据,并去重后合并到同一数据库内。
```bash
git clone https://github.com/Terminus2049/Wechatscope.git
```设置定时任务:
```bash
crontab -e
````wechatscope.R` 负责抓取最近三天的数据并合并到数据库内。可开启定时任务:
复制 `0 */1 * * * cd ~/Wechatscope && R CMD BATCH wechatscope.R` 到最后一行。程序会每小时运行一次。
## 表格化
`app.R` 利用 shiny 进行表格化。
在 R 语言环境中 `shiny::runApp()`
## 在线部署并自动更新
在 Linux 服务器上安装 [shiny-server](https://github.com/rstudio/shiny-server)
```bash
cd /srv/shiny-server/
git clone https://github.com/Terminus2049/Wechatscope.git
```同样开启定时任务:
```crontab -e```
复制 `0 */1 * * * cd /srv/shiny-server/Wechatscope/ && R CMD BATCH wechatscope.R` 到定时任务中。
然后就可以在 `http://:3838/Wechatscope/` 查看。
### 注意
1. 请安装合适的 R 版本,不要使用默认的 R 版本,但也不要安装最新的 R 3.5,应安装 R 3.4。安装教程:[UBUNTU PACKAGES FOR R](https://cran.rstudio.com/bin/linux/ubuntu/README.html)
2. 下载并安装 [shiny-server](https://www.rstudio.com/products/shiny/download-server/)
3. 需要安装 R 包 `readr`、`shiny`、`httr`、`DT` 和 `data.table`,如果内存过小,会编译失败,可通过 [此教程](https://github.com/tidyverse/readr/issues/544#issuecomment-264647581) 处理。
## 下载原始文件
安装 rust,编译后:
```
./target/release/wechat_scope_dl < ceninfo.csv
```