GithubHelp home page GithubHelp logo

geektime_to_pdf's Introduction

极客时间专栏转换为PDF

说明:该项目仅仅只能用户个人学习使用,不能在商业中使用,若极客时间官方要求该代码仓库删除,请联系我进行删除

使用方法

配置信息

在配置文件config.js中修改配置所需要的信息

/**
 * 需要转换为 pdf 的配置信息 
 */
module.exports = {
    url: 'https://time.geekbang.org/serv/v1/article', // 该配置项不需要改动
    commentUrl: 'https://time.geekbang.org/serv/v1/comments', // 该配置项不需要改动
    columnBaseUrl: 'https://time.geekbang.org/column/article/', // 该配置项不需要改动
    columnName: '玩转VScode', // 专栏名称
    firstArticalId: 18053, //专栏第一篇文章的ID
    isdownloadVideo: false, // 是否下载音频
    isComment: false, // 是否导出评论
    commentCount: 3, // 评论导出数量,最大20个
    cookie: 'cookie'
};
  • 上面的配置项前三项是不需要修改的, 只需要修改后面的专栏信息

  • 会自动生成一个geektime_{{columnName}} 的文件夹来保存导出的所有pdf文件, columnName 为上面配置的

  • firstArticalId 这个参数最好配置专栏第一篇文章的 ID ,这个可以获取专栏的所有的文章,若不是第一篇文章的ID 则获取的是该文章以及之后的文章

  • cookie 你在网页版登录后返回的cookie信息

运行

  1. [email protected]:greyireland/geektime_to_pdf.git 在本地克隆下来
  2. 然后执行 npm i 安装依赖
  3. 编辑config.js配置
  4. 运行主程序 node columnArticleList.js 等待一段时间,生成 PDF 完成

导出结果

合成为一个PDF

python merge.py /Users/hh/geek/geektime2pdf/algo combined.pdf

效果

我的课程

geektime_to_pdf's People

Contributors

dependabot[bot] avatar greyireland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

geektime_to_pdf's Issues

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.