diff --git a/README.rst b/README.rst index 8f460d4..4ed6623 100644 --- a/README.rst +++ b/README.rst @@ -50,8 +50,8 @@ You can get additional information such as the title, author, and (after the pre >>> s.author u'The Author' - >>> s.output_path - u'/current_working_directory/my-slide-by-author.pdf' + >>> 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. diff --git a/setup.py b/setup.py index 861db4b..16c97db 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='slidegrubber', - version='2.5.1', + version='2.6', description='Back up your SlideShare presentations to PDF.', classifiers=[ 'Development Status :: 5 - Production/Stable', diff --git a/slidegrubber/grub.py b/slidegrubber/grub.py index 37ef2cb..dc30ece 100644 --- a/slidegrubber/grub.py +++ b/slidegrubber/grub.py @@ -16,6 +16,7 @@ class SlideGrubber(object): soup = None title = None author = None + filename = None output_path = None slides_markup = None @@ -37,6 +38,7 @@ def __init__(self, url): # get slide title and author from soup self.title = self.get_title(self.soup) self.author = self.get_author(self.soup) + self.filename = self.get_filename(self.soup) # get array of slides img tags self.slides_markup = self.get_slides_markup(self.soup) @@ -129,7 +131,7 @@ def set_output(self, output_path): # if no output filename, build from url if output_file == '': - output_file = self.get_filename() + output_file = self.filename # check filename for correct format if output_file[-4:] != self.OUTPUT_FORMAT: