Giter VIP home page Giter VIP logo

webpaper's Introduction

WebPaper

将微信公众号/微博/infoq等文章转换为标准html页面。主要是因为微信公众号/微博/infoq等发布出来的文章地址很不人性,而且其中的图片有的使用webp,很多网页摘取工具不支持。我的目标:

  1. 传入一个微信公众号/微博/infoq等文章地址,输出一个符合通常的web logger页面命名规范的html页面,并将其中的图片格式转换为png/jpeg等常见格式。
  2. 页面上传到github.io,直接做为一个internet web页面供正常的浏览查看以及网摘。

v0.2更新内容

完成:

  • 网页文章html抽取转换markdown(目前完成了微信公众号/微博/infoq等文章文章抽取,可对其他网站进行扩展)
  • 网页文章下载后,同步维护索引页面
  • 网页中的图片下载到本地,并转换页面img地址为本地(目前只对webp图片进行格式转换)
  • 支持直接进行git push发布

一点想法:

  • 目前生成的markdown页面,由github自动转为html,如果希望美观或自行定制页面,可继续完成markdown转html操作
  • 可考虑加入浏览器去广告扩展
  • 加入机器学习内容(自然语言处理相关),做文章摘要,文章标签生成。

使用方式

如果只做页面爬取,附带图片下载,则只需要命令行执行python脚本即可:

python webpaper.py https://www.infoq.cn/article/oZCcFAC7J4-01yFTG5r3

如果也想发布到github.io,则需要做以下简单步骤即可:

  1. 新建一个使用GitHub Pages的Repo。Repo如何配置GitHub Pages,请自行处理,不在此说明;
  2. 参考本项目中的webpaper.conf.template,配置好git发布信息,另存配置文件名为webpaper.conf;
  3. 之前的使用方式,执行命令即可。

ok.

webpaper's People

Contributors

majia29 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.