Giter Site home page Giter Site logo

pku_copyleft's Introduction

PKU Copyleft

A tool for downloading theses from Peking University's copyright protection system.

Modified from the original PKU Copyleft repository.

This software is free and belongs to the public domain. The author provides no warranties or guarantees. Users must assume all responsibilities for using this software; any consequences resulting from its use are borne by the users.

Dependency Installation

  • Required dependencies: fish (version >= 3.0.0), curl, jq, pup, img2pdf.
  • Optional dependencies: parallel (to enhance download speed), ocrmypdf (for OCR on downloaded PDFs. Limited support for Chinese).

Arch Linux

sudo pacman --sync --refresh --sysupgrade && sudo pacman --sync fish curl jq img2pdf parallel

pup (or pup-git, pup-bin), ocrmypdf need to be installed from AUR.

Ubuntu

sudo apt-add-repository ppa:fish-shell/release-3
sudo apt update && sudo apt install fish curl jq img2pdf parallel ocrmypdf

pup needs to be installed manually.

Termux

apt update && apt install fish curl jq pup parallel

img2pdf and ocrmypdf needs to be installed manually.

macOS

Install with Homebrew๏ผš

brew install fish curl jq pup parallel ocrmypdf

img2pdf needs to be installed manually.

Usage

  1. Connect to Peking University's campus network or use the Peking University VPN.
  2. Go to the Peking University Thesis Database, and search for the thesis you want.
  3. Click on the title of the thesis in the search results, go to the "View Thesis Information" page, and click "View Full Text" at the top right corner.
  4. A page with a URL like "https://drm.lib.pku.edu.cn/pdfindex1.jsp?fid=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" will pop up, where you can view the thesis. Note down the xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx part after fid= in the URL.
  5. In your browser, press F12 (or Ctrl + Shift + I on Windows, Option + Command + I on MacOS) to open Developer Tools, select the Storage tab, choose Cookies, and find the row with Name as JSESSIONID. Note down the value YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY in the Value column.
  6. Open a command line tool, navigate to the folder where pku_copyleft.fish is located, and run the following command to download the thesis PDF to that folder.
./pku_copyleft.fish -c 'YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY' -f 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

Free Software

This software is free and belongs to the public domain. See Unlicense.txt for details.

pku_copyleft's People

Contributors

mingcenwei avatar deletememoryyy avatar

Watchers

 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.