Automating the action of creating the presentations
February 12, 2017 · 4 mins read
Categories: python |
GitHub repository : https://github.com/singh1114/automatingPresentations/ 8th February 2017 I came back from my so-called holidays and sir were ready to excite me with a new task on the table. As we know that the progress in the chatting app is really slow, that is why I decided to work on this side project. So the basic aim of the project is to create the presentations that are good enough to get the work done. We didn’t want to create something extraordinary. The basic aim of the project is to create a markdown presentation from a Powerpoint presentation. Sir were able to get whole of the text out from the presentation and now the job is to create something is good enough with the formatting. The file that contains the whole of the text, differentiate each slide with some references in the end. So differentiating two different slides will be easy. Next task will be to figure out what tags to be used for all the content. I saw that all the heading were written in the capitals. But we cannot differentiate between different levels of headings. So this might be done manually. 9th February 2017 Now was the time to think something about the procedure that we were going to follow. I wrote some of the pseudo code to start with.
We decided to use python for completing the job. So let the work begin. 10th February 2017 I wrote the code for the above-written pseudo code. In the end, the code written was somewhat different from the pseudo code. While writing the code I learned a few things about the file handling in python which I want to share in a quick fashion. First of all, the file handling in python does not require any type of library to be imported. For opening a file, we can use the function open(). The parameter that we pass are:
Read the file: whenever the line starts with *: read each character: if the letters are capital: give heading h1 if the * is first in the group: raise the height by 50% if there is nothing after * do nothing if the line starts with References: write the code for new slides
- The file name
- The mode in which we want to open the file
- Even if the first word is in upper case it takes it a header text
- Paragraphs are not handled properly.
Please share your Feedback:
Did you enjoy reading or think it can be improved? Don’t forget to leave your thoughts in the comments section below! If you liked this article, please share it with your friends, and read a few more!