1 Star 0 Fork 0

bit212/arxiv2kindle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
arx2mob.sh 677 Bytes
一键复制 编辑 原始数据 按行查看 历史
xtoff 提交于 2016-10-26 04:08 +08:00 . bugfix
#!/bin/bash
python2 getarxivid.py $1 > arxivids
mkdir papers
for i in $(cat arxivids)
do
# download latex
./arxiv2md $i > /tmp/aa.log
ma=$(grep 'Found LaTeX source: ' /tmp/aa.log | cut -d':' -f3-)
echo $ma
echo '---' > /tmp/aa.tit
grep 'arxiv2md:title=' /tmp/aa.log | cut -c30- | awk '{print "title: "$0}' >> /tmp/aa.tit
echo '...' >> /tmp/aa.tit
# convert to markdown
cp tex2md.py /tmp/
pushd .
cd /tmp/tmp-arxiv2md
python2 ../tex2md.py $ma > aa.md
# convert to epub
pandoc -S -f markdown -t epub -o ../aa.epub /tmp/aa.tit aa.md
popd
# convert to mobi
ebook-convert /tmp/aa.epub papers/$i.mobi
done
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/bit212/arxiv2kindle.git
git@gitee.com:bit212/arxiv2kindle.git
bit212
arxiv2kindle
arxiv2kindle
master

搜索帮助