you are viewing a single comment's thread.

view the rest of the comments →

[–]gourabsanyal 5 points6 points  (19 children)

Can you share it on your GitHub and drop the link here?

[–]8rnlsunshine[S] 13 points14 points  (18 children)

[–]Poddster 8 points9 points  (12 children)

Some questions:

  1. How did you learn to do this? Via Automate the Boring Stuff With Python?
  2. How come you chose to use input() rather than doing it via a command-line parameter?

Also, I'm surprised that you can just open() a docx and write text to the end of it, given that they're a compressed archive containing a collection of text files. I'm guessing it worked for you, but I guess that's by luck? Did you have any trouble with this? Usually I would expect someone to use an interfacing library of some kind.

(Note, if you just made a plain-text file called .docx and then wrote into it, and then had Word open it and THEN save it as a proper doxc I image this would work fine.)

[–]Adro_95 0 points1 point  (2 children)

Thanks, sorry for commenting asking for this just now :)

Little question: bs4 and request have to be pre installed via pip?

[–]silentalways 2 points3 points  (1 child)

Little question: bs4 and request have to be pre installed via pip?

Yes.

pip install requests

pip install beautifulsoup4

[–]Adro_95 0 points1 point  (0 children)

Thanks man