NITDgpOS / Medium_Grabber

This is an automated program that lets you grab the link of any article under any topic just by logging into your Google linked medium account.
MIT License
12 stars 19 forks source link

Adding PDF output with Hyperlinks #21

Closed KanishkaHalder1771 closed 5 years ago

KanishkaHalder1771 commented 5 years ago

->This modification gives the user and option for the type of output file. For PDF input is 1 and for .txt input is 2. Users can now directly click on the link of the pdf to open the article instead of manually copy pasting the URL.

->The encode('latin-1', 'ignore') code eliminates any character which is not included in the ASCII code. This is essential for writing the text in .pdf format. Next the decode('latin-1') part again decodes the rectified string into byte-form as the FPDF.cel() command takes input in byte-form in Python 3.

->The text color is in black and the link color is in blue in the .pdf output.

->In the line f= open("output.txt","a+", encoding='utf8') encoding='utf8' is required because the default encoding may vary according to the environment. Attaching a screenshot from StackOverflow regarding the matter. Link ->https://stackoverflow.com/questions/42070668/python-3-default-encoding-cp1252 capture

ZER-0-NE commented 5 years ago

Can you update relevant sections of readme and possibly a screenshot with it?

KanishkaHalder1771 commented 5 years ago

Updated the Readme. Solves #1 #3

ZER-0-NE commented 5 years ago

Hey @KanishkaHalder1771, can you add a relevant ss for the pdf file after the ss of the text file?

KanishkaHalder1771 commented 5 years ago

Sorry, couldn't understand what you wanted. Can you explain what you mean by 'ss'

ZER-0-NE commented 5 years ago

My bad. I meant screenshots @KanishkaHalder1771

KanishkaHalder1771 commented 5 years ago

Added the screenshot in README.md and file is located in /images/output_pdf.PNG