Automating My Life with Python: The Ultimate Guide | Code With Me
![*](https://i0.wp.com/allprowebdesigns.com/wp-content/uploads/2024/05/1716741558_maxresdefault.jpg?resize=840%2C430&ssl=1)
Video Title: Automating My Life with Python: The Ultimate Guide | Code With Me
okay I am really excited for this video getting to build with python different scripts to automate my life sounds like a really good idea there’s so much in my life that I can automate and I’m going to share with you today some really cool and honestly really simple python projects that you can build to automate your life but not only are these scripts really interesting for actually automating your life and doing really cool stuff but it’s a great way to show potential and future employers different projects or things that you are working on a lot of these scripts can really be built out into quite large projects that you can make around them push them to your GitHub show you are constantly building and it’s just a really fun thing to do okay let’s get started oh wait make sure to hit that subscribe button for more Tech coding career related videos leave in the comments other videos you want to see and let’s get to it where are we going we’re not going too far before we get into it though I want to say a big thank you to Intel and their one API tools and libraries for sponsoring this video this is across architecture developers Dream Suite making it easy to port code between platforms and even providing a certain level of future proofing this is a great tool for devs working with AI Internet of Things cloud and so much more one API is not only a huge benefit for your toolkit but also it saves a ton of time I link them down below so make sure to go check them out for more details and to start building with them foreign something I’ve been wanting to build for a while is a script that will take a PDF and turn it into an audio file oftentimes if I’m studying or learning something new and it’s in PDF format and I have to spend so much time reading it I would prefer to just be listening to it so I built a script with python that will take any PDF and convert it into an audio file let’s get building first thing we are going to be building as I mentioned is turning a PDF into an MP3 file and this is super simple there’s two packages required but before we get into it last time I made a python project I got a lot of questions around setting up the project in Python because last time we used replit this time we are in vs code so I’m going to share with you a few commands to a ensure you are installed python is installed and really how to get your virtual environment running first thing we need to do is check that you have python installed or what python version you have and of course if you don’t have python installed pause this video and go install it we’re not going to do that in this video because it’s pretty Excel explanatory online all right so you can see I have python 3.9.10 installed then what we need to do is get our virtual environment up and running so first of all you can see um in the project I already have it up and running but just to show you what I did so type in this command here then we type in source it’s not not there okay so now you can see we are in our virtual environment next up we need to install these two packages so we go and once again I am the worst seller on the planet so let me just copy this command I’ve written down install and p y t t x x three and this is actually a module that is a text to speech conversion library in Python and this is going to be a huge help in getting us to convert our text into speech go next up we need to install py PDF and I already installed this as well but I just want to go through the process with you to ensure you understand and this one here that we just installed is a python Library used for performing major tasks on PDF files and in this case we have a book PDF so any PDF you want to turn into audio put it in your project directory okay now let’s get into some coding the fun part so first of all what we need to do is open the PDF so let’s call this PDF reader I told you we can’t spell today and then let’s use this package here [Music] and here we are going to pass in the PDF in this case mine is called EDF foreign we need to initiate speaker you could use the other package [Music] [Music] [Music] foreign [Music] text strip the text [Music] foreign there then we want to actually take that speaker and save it to file to save it as an MP3 I pass in the clean text and what do we now we pass and whatever we want to call is MP3 file I’m going to call it story time [Music] then we stop it all right moment of truth [Music] here we go we can see printed printed out text and we have our MP3 this is really simple it’s really fun easy project I need two modules from Python and it’s a really really simple thing to build but you can imagine how powerful it can get when you are using large PDFs if you want specific Pages there’s so much you can play around with this so I will link all the code below and I really encourage you to uh really take this clone this and build on top of it build a really cool project and it really shows initiative when you are pushing things to GitHub that you’re building things like this and expanding on them and also too when you are looking for uh future drafts okay project two this is a big one I’m not even going to show you if you’ve seen past videos you’ve seen my desktop folder or my desktop and it’s a disaster equally as bad if even worse is actually my downloads folder so I wanted to build a python script that we could actually use to clean out my downloads folder and for this I wanted to be specific into which file formats I wanted to be able to delete let’s get into it okay project number two that we are going to be doing is being able to access our downloads folder and then delete specific files from that folder and this is something that I’m sure you’ve all had the instances of where your downloads folder is just kind of out of control for this I’m going to do it that it deletes specific files but you could also really add on to this so it’s for the entire downloads folder or different extensions but I really wanted to do this is the base you can build upon it and I’m not going to go through again the showing you how to start the virtual environment I’m assuming that you have done that from the previous project first thing we need to do is import and install the OS module which really gives us access to our operating system then we need to give a file path that we want to access and in this case there’s construction going on and in this case we are going to be accessing our downloads so replace Tiffany Jansen with your name or the name that’s on your computer [Music] so check if um the file path exists let’s remove it and let’s print something to let us know successfully being deleted ah delete Ted okay there we go and then else the style oh it’s really annoying that I did one with one quote and everything um okay so we have a file path here as you can see but we need to give it a specific file so let me go my downloads folder I am not going to show you this folder because it’s a disaster this is why we are doing this and one file that I want to delete today is two dogs surgery but once again you could we could replace this and make it Dynamic to delete all PDFs or delete everything in the downloads folder I just wanted to start small to show you this also if you didn’t catch it from last time a simple way to run a python in your terminal is right click and then I was like right or left click right click and then go run python file and terminal should get successfully deleted this file has successfully been deleted yay but then if I was to run it again because now it doesn’t exist it should say this balance on exist there you have it those are two really small but fun things to do think of different ways that you could even put these together and it’s really just playing around with different modules in Python doing some kind of conditional statements and um whatnot but it’s such a fun way to think of different projects to build and expand upon so I linked my GitHub down below which will feature both of these and okay we’ve done our work here okay we have built some really cool scripts if you ask me I’m curious to know what else should we automate what should we automate next leave down in the comments and let’s continue building together I link the projects down below too so make sure to go check them out build them then build on top of them like I said it’s a great way to add to your portfolio to contribute to you know bulk up your GitHub all of that okay you can see the sun is out it’s time to go enjoy the weekend bye everyone [Music]
-
Sale!
Wireless WIFI Repeater Extender Amplifier Booster 300Mbps
$29.99$14.99 Add to cartWireless WIFI Repeater Extender Amplifier Booster 300Mbps
Categories: Electronics, Wi-Fi Router, Wireless Wi-Fi Extender Tags: 300Mbps, 802.11N, Amplifier, Booster, Extender, mobile wi-fi booster, Remote, WIFI, Wireless, Wireless WIFI, Wireless WIFI Repeater, Wireless WIFI Repeater Extender, Wireless WIFI Repeater Extender Amplifier, Wireless WIFI Repeater Extender Amplifier Booster, Wireless WIFI Repeater Extender Amplifier Booster 300Mbps$29.99$14.99 -
Sale!
Full RGB Light Design Gaming Headset Headphones with Mic
$24.99$14.99 Add to cartFull RGB Light Design Gaming Headset Headphones with Mic
Categories: Electronics, Gaming, Gaming Headsets Tags: Design, Full, Full RGB Light Design Gaming Headset, Full RGB Light Design Gaming Headset Headphones, Full RGB Light Design Gaming Headset Headphones with Mic, Gamer, Gaming, Gaming Headset Headphones, gaming headset wireless, Headphone, Headphones, Headset, Light, Mic, Package, RGB$24.99$14.99 -
Sale!
Wireless BlueTooth Multi-Device Keyboard Mouse Combo
$39.99$19.99 Add to cartWireless BlueTooth Multi-Device Keyboard Mouse Combo
Categories: Electronics, Gaming, Gaming Keyboards, Keyboard Mouse Combos Tags: Combo, Keyboard, keyboard mouse combos, Mouse, MultiDevice, Set, WireKeyboard Mouse Combo, Wireless, Wireless BlueTooth Keyboard Mouse Combo, Wireless BlueTooth Keyboard Mouse Combos, Wireless BlueTooth Multi-Device Keyboard Mouse Combo, Wireless BlueTooth Multi-Device Keyboard Mouse Combos$39.99$19.99 -
Sale!
High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
$199.99$139.99 Add to cartHigh Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar
Categories: Gaming, Gaming Chairs Tags: Adjustable, Chair, computer chairs, Desk, Executive, Gaming, Girl, Headrest, High, High Back Leather Executive Adjustable Swivel Gaming Chair, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest, High Back Leather Executive Adjustable Swivel Gaming Chair with Headrest and Lumbar, High Back Leather Executive Adjustable Swivel Gaming Chairs, Leather, Lumbar, Office, Racing, Swivel$199.99$139.99 -
Sale!
Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
$29.99$19.99 Select optionsProfessional LED Light Wired Gaming Headphones with Noise Cancelling Microphone
SKU: N/A Categories: Electronics, Gaming, Gaming Headsets Tags: Cancelling, Gaming, Gaming Headphones with Noise Cancelling Microphone, gaming headset, Headphones, Headset, LED, Light, Mic, Microphone, Noise, Professional, Professional LED Light Wired Gaming Headphones, Professional LED Light Wired Gaming Headphones with Noise Cancelling Microphone, Wired, Wired Gaming Headphones, Wired Gaming Headphones with Noise Cancelling Microphone$29.99$19.99 -
Sale!
Gaming Desk with LED Lights USB Power Outlets and Charging Ports
$349.99$249.99 Select optionsGaming Desk with LED Lights USB Power Outlets and Charging Ports
SKU: N/A Categories: Computer Desk, Gaming, Gaming Desk Tags: and Charging Ports, Charging, Desk, Desks, Gaming, gaming desk with led lights, Gaming Desks with LED Lights, Home, LED, Lights, Monitor, Office, Outlets, Port, Power, Room, Stand, USB, USB Power Outlets, White, Workstation$349.99$249.99 -
Sale!
Wired Mixed Backlit Anti-Ghosting Gaming Keyboard
$99.99$79.99 Add to cartWired Mixed Backlit Anti-Ghosting Gaming Keyboard
Categories: Electronics, Gaming, Gaming Keyboards Tags: Antighosting, Backlit, Blue, brown, Gaming, Gaming Keyboard, gaming keyboards, gaming keyboards and mouse, Keyboard, Laptop, Switch, Wired, Wired Mixed Backlit Anti-Ghosting Gaming Keyboard, Wired Mixed Backlit Anti-Ghosting Gaming Keyboards, Wired Mixed Backlit Gaming Keyboard$99.99$79.99 -
Sale!
Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
$119.99$59.99 Add to cartWireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset
Categories: Electronics, Gaming, Gaming Headsets Tags: 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, ANC, Audio, Bluetooth, Cancellation, Ear, Earphone, gaming headset, Headphones, Headset, Hi-Res Over the Ear Headphones Headset, HiRes, Noise, Wireless, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Headphones, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headset, Wireless Bluetooth 5.3 ANC Noise Cancellation Hi-Res Over the Ear Headphones Headsets$119.99$59.99 -
Sale!
Wired Sports Gaming Headset Earbuds with Microphone
$19.99$9.99 Select optionsWired Sports Gaming Headset Earbuds with Microphone
SKU: N/A Categories: Gaming, Gaming Headsets Tags: Accessories, Earbud, Earphone, Earphones, Gaming, gaming headset with microphone, Headphones, Headset, IOS, Microphone, Sports, Wired, Wired Sports Gaming Headset Earbuds, Wired Sports Gaming Headset Earbuds with Microphone, Wired Sports Headset Earbuds$19.99$9.99 -
Sale!
150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
$49.99$29.99 Add to cart150W Universal Multi USB Fast Charger 16 Port MAX Charging Station
Categories: Charging Stations, Electronics Tags: 150W, 150W Charging Station, 150W Universal Multi USB Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Station, 150W Universal Multi USB Fast Charger 16 Port MAX Charging Stations, 150W Universal Multi USB MAX Charging Station, 16 Port MAX Charging Station, 3.5A, Charger, Charging, Fast, laptop charging stations, Max, Multi, Port, Stand, Station, Universal, USB$49.99$29.99
Gonna need that source code 👀
Got this error: PyPDF2.errors.DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.
In regards to project #1, please don't reinvent the bicycle => Android app Moon+ Reader supports PDF files and has TTS support. Can scroll anywhere in the file, confirm proper spelling in case you hear something completely whackaroo, don't have to deal with huge mp3 files.
Are u single?
Пайтон это уараина
Thanks!
Thank you very much
Thank you so much baby.
what a magic, great
A pretty one 💚
Automate sending messages
Can u teach me python
Your backspace button Hates you.
Noob question: Why the "python3 -m" before every pip install? If the active virtual environment was created as python3, can't you just run pip install?
we need brave things like building ancensored ai bot for coding or great project for automating chatgpt to deel with websites and scan websites and ……. I want marry woman can achieve like this things or a friend like that , this challenge for you if you want to be like elion musk ….or one othe top programmer in the world , let me see your comments
All much easier with Open Interpreter these days!
Hi. I get the error: "PyPDF2.errors.DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead." Am I missing something?
Great job with the video Tiff! 🚀 If anyone’s looking for more Python tutorials, we’ve released Loguru logging, task scheduling, and more to help the community too 💪
Clean up picture duplicates and file them by category or by date if they don't have a category (in a table). Recognize certain categories automagically (sailing pictures, motorcycle pictures, faces). I like the PDF reader! So nice and simple.
Cringetastic!