Skip to content

Latest commit

 

History

History
90 lines (79 loc) · 3.34 KB

README.md

File metadata and controls

90 lines (79 loc) · 3.34 KB

osd-slides

osd-slides is a tool to download and search Prof. Paine's slides through terminal or with one command or as library.

License: MIT GitHub issues codecov build PyPI Docs

Overview

  • Open Software Development classes slides are hard to turn it to a pdf and download and search for keywords. This tool will help students to download slides and search for keywords in slides easily.
  • This tool can be used as a library or run from command line.

Features

  • Read what slides are available
  • Download osd slides.
  • Search for keywords in the slides.

Install

pip install osd-slides

Dependencies

To install decktape, run in osd-slides.

$ npm install decktape

You will need node.js on your computer for above to run. Check if node.js in your computer by running this. And then check the version of npm. You might want to restart your terminal/powershell after installing node.js.

$ Node --version
$ npm --version

How to use

Users can download files by calling searchAndDownloadPdf().

from osd-slides.osd_slides.main import Downloader
downloader = Downloader()
downloader.searchAndDownloadPdf()

Users can view what files can be downloaded by calling showDownloadablePdf()

from osd-slides.osd_slides.main import Downloader
downloader = Downloader()
downloader.showDownloadablePdf()

Users can search for keywords in slides and open the exact slide the keyword exists.

from osd-slides.osd_slides.search import Search
url = "https://www.cs.columbia.edu/~paine/4995/lectures/"
search = Search(url, ["22-legal.html","21-econ.html"])
search.lookup("Legal")
search.open(1)

Example

As said above users can search for keywords in slides and open the exact slide the keyword exists.

from osd-slides.osd_slides.search import Search
url = "https://www.cs.columbia.edu/~paine/4995/lectures/"
search = Search(url, ["22-legal.html","21-econ.html"])
search.lookup("Legal")
search.open(1)

or running the project from command line like this

$ python osd-slides/osd_slides/__main__.py search
Which slides would you like to search in? Please provide slides with spaces between them: 
>> 22-legal.html 21-econ.html
Slides reading completed
What keyword would you like to look up: 
>> Legal
Slides that can be found are
[(1, 0, '22-legal.html'), (1, 1, '22-legal.html'), (2, 0, '22-legal.html')]
Which one would you like to open? please provide the number.
>> 2

will result in the following:

A gif image on searching