Skip to main content

A nifty Python tool for expediting evidence printing.

Project description

Evidence With Ease

A nifty Python tool to expedite evidence printing

This script is aimed at helping debaters who use Google Docs to write their cases and scatter links to evidence all throughout their documents. I know (from personal experience) that it's a nightmare to go through cases two days before a tournament, click on every link, and print each webpage and PDF individually. Even if you have a master evidence sheet, it still takes hours to click and print--hours which would be better spent preparing blocks and fine-tuning arguments.

Installing evidence-with-ease will make the evidence command available to you: just run evidence in your terminal and the GUI should appear. Paste the shareable link to your Doc, select a target download folder, and hit "Go!" Don't close the terminal--the program will log its progress and alert you of any unexpected failures.

The Program (in a nutshell)

Evidence with Ease utilizes the Python Requests and BeautifulSoup4 modules to first scrape your Google Doc for any hyperlinks, then to scrape each linked webpage and download its HTML source code. Next, each HTML file is converted to a PDF using pdfkit. Finally, using PyPDF2's FileMerger, all the PDFs are merged into one big PDF for maximum printing ease. Individual PDFs longer than 30 pages aren't included in the final product (but are still downloaded for you), and should an error occur in either grabbing a webpage's source code or converting it to a PDF, the program will let you know so you can download/print those files afterwards.

Clean Printing

I created functions with BeautifulSoup that remove ~80-90% of unwanted tags (images/videos, forms, headers/footers etc.) from the HTML as well as all Javascript and CSS styling before writing to file. Some pages are cleaner than others, but it does the job, and I daresay it does it adequately well.

Known Issues

Removing Javascript from webpages breaks certain well-devloped sites which generate all page content dynamically, so some 'cleaned' files might not contain any article content at all. Furthermore, removing Javascript looks fishy to sites with good bot detection, so some pages may be blocked or Captcha-prompted. I haven't yet figured out a good way to stop the program from downloading these blocked/Captcha'd pages, but by supplying a realistic user agent and other legitimate browser markers in the request header, I've managed to get around most blocks. In short, don't treat this program as the be-all end-all, and review the final PDF closely for any broken or blocked pages as you'll have to reprint these from the original sources yourself.

Happy printing! -Sage

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evidence with ease-1.1.3.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

evidence_with_ease-1.1.3-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file evidence with ease-1.1.3.tar.gz.

File metadata

  • Download URL: evidence with ease-1.1.3.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.3

File hashes

Hashes for evidence with ease-1.1.3.tar.gz
Algorithm Hash digest
SHA256 959960c26028c56dd3f7fd61d45ac23f86b1b621fde2fc6a16cf2b3775b5fa60
MD5 41dc7e8a8513c5eeeead20abbd18569e
BLAKE2b-256 e2d2f2d0f7e0ef25c0957f94be2c0be6c5223ca047c46910fbb5d18dce675b11

See more details on using hashes here.

File details

Details for the file evidence_with_ease-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: evidence_with_ease-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.7.3

File hashes

Hashes for evidence_with_ease-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ece9cb516b68c2236509454578126315fafee323741015a50812ccde15499861
MD5 cc62232005e984fea4f0647d6a2d6315
BLAKE2b-256 965d203b1349963cc4bdc2242f757b33090f78ce07dd9722a83f2bea5d79c712

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page