GithubHelp home page GithubHelp logo

slimlime / slidegrubber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cballenar/slidegrubber

0.0 1.0 0.0 18 KB

Slidegrubber is a python package that can download SlideShare presentations as PDF files.

License: MIT License

Shell 2.28% Python 97.72%

slidegrubber's Introduction

SlideGrubber

SlideGrubber is a python package that can download SlideShare presentations as PDF files. It uses the power of BeautifulSoup, ImageMagick (through Wand), and Requests.

Requirements

You will need ImageMagick installed on your system to be able to do the image-to-pdf conversion.

$ apt-get install imagemagick

Install

Run the standard setup.py

$ python setup.py install

Usage

You can pass the url to initialize the class and then call grub() to download the presentation to a pdf file.

>>> from slidegrubber import SlideGrubber
>>> s = SlideGrubber('http://www.slideshare.net/author/my-slide')
Your presentation My Slide by author is ready for processing.
>>> s.grub()
'/current_working_directory/my-slide-by-author.pdf'

If no filename or path is specified the presentation will be downloaded to the current working directory using the url to build the name. But you can also specify the output path, like so:

>>> s.grub('/my_local_path/my_slide.pdf')
'/my_local_path/my_slide.pdf'

You can get additional information such as the title, author, and (after the presentation has been downloaded) processed output path:

>>> s.title
u'My Slide'

>>> s.author
u'The Author'

>>> s.filename
u'my-slide-by-author'

The slides markup can also be accessed as a property and you can pass the images markup to grub() as a second argument to specify what images to convert to pdf. This is helpful if you only need a fraction of the images but it requires more work.

As of v2.7, the slides are now sorted.

>>> # get entire markup
>>> markup = s.slides_markup
(u'<img ...>', u'<img ...>', ...)

>>> # grab first five slides
>>> s.grub('', markup[:5])
u'/current_working_directory/my-slide-by-author.pdf'

Logging

v2.4 fills SlideGrubber with log messages. This should be looked at more carefully...

Dependencies

slidegrubber's People

Contributors

cballenar avatar

Watchers

James Cloos 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.