Automating My Life with Python: The Ultimate Guide | Code With Me

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 มิ.ย. 2024
  • Hi friends! In this video we are going to be building some fun things with Python that can actually help automate tasks in your life! What should we build next?
    Make sure to checkout oneAPI #oneAPI :
    www.intel.com/content/www/us/...
    www.intel.com/content/www/us/...
    0:00 Intro
    0:53 OneApi
    1:29 Python Project 1 Intro
    2:13 How To Setup Your Python Environment
    3:50 Coding First Python Project
    7:03 Python Project 2 Intro
    7:59 Coding Second Python Project
    Github: github.com/TiffinTech/
    LinkedIn: / tiffany-janzen
    Instagram: / tiffintech
    Tiktok: www.tiktok.com/@tiffintech?la...
    ❤️ Subscribe for more videos using this link th-cam.com/users/tiffintech?su...
    Business inquiries: info@thisistiffin.com
    SIGNUP FOR MY NEW MONTHLY NEWSLETTER at www.tiffintech.co
    ✅ Exclusive discounts
    ✅ Tips from people in the STEM world
    ✅ Stay up to date with the latest tech events and news
    ✅ And so much more!
    // My Story
    I am currently a software developer who once modeled and thought I wanted to pursue a career in the fashion industry. While I was modeling in Hong Kong, I eventually felt the desire to further my education. I decided to depart the modeling world and move back to Canada, knowing that could be the end of my modeling opportunities. I attended Ryerson University for GCM (Graphic Communications Management), as I thought I might still work in the fashion industry in another capacity. It was in my last year of university, I was introduced to a very basic coding course. I instantly fell in love. From there I knew I wanted to pursue software development but didn't have a clue where to start. I didn't want to go back to university as I just completed a four-year degree. I decided to enroll in a 10-week intensive coding Bootcamp. From there I started working at a small startup learning and growing my technical and soft skills. I then transitioned to a larger company where I am a software developer and technical consultant today.
    Automating My Life with Python: The Ultimate Guide | Code With Me
    #AutomatingMyLifewithPython #tiffintech

ความคิดเห็น • 399

  • @CodingWithLewis
    @CodingWithLewis ปีที่แล้ว +187

    Gonna need that source code 👀

    • @TiffInTech
      @TiffInTech  ปีที่แล้ว +51

      Lewis saving the day! I meant to link that 😆 You can find the source code here:
      github.com/TiffinTech/python-pdf-audo
      github.com/TiffinTech/python-automate-delete-files

    • @lxv-crunchy
      @lxv-crunchy ปีที่แล้ว +1

      Hey Lewis! I love your videos by the way :) Have a great day!

    • @pratik2617
      @pratik2617 ปีที่แล้ว

      @@TiffInTech hey Tiff, just sent u dm on insta , i found your channel today , i have mentioned my project work as well , i can say i can work for just $500 USD , a month . i would request you to please reply.

    • @nelsonbeneche2372
      @nelsonbeneche2372 ปีที่แล้ว +1

      How to have your email adress?

    • @stormyweathers9887
      @stormyweathers9887 ปีที่แล้ว

      @@TiffInTech Will it read epub files or is it just going to be PDFs? Also, what text editor have you used, please?

  • @Shr11mp
    @Shr11mp ปีที่แล้ว +58

    So, a really helpful function here would be the os walk function. It'll recursively iterate through every file in a directory. From there, in your loop you could check the file extension and remove based on that or any other condition. From there, you could use the argparse package and take arguments from the cli to ask the user things like what files they want to remove or the file extensions they want to remove. Then after that, you could think about putting everything in functions so as to not pollute the global namespace and use the standard "if __name__ == '__main__'" pattern. Lots of different, cool things you can do here, a great beginner project!

  • @yolamontalvan9502
    @yolamontalvan9502 ปีที่แล้ว +22

    You finally convinced me to learn Python on my own. I'm a C++ and C# programmer and we don't use Python at work. You have been showing us what we can do with Python and I am amazed. Thanks for the tips. I'm interested in face recognition and fingerprints reading softwares.

    • @user-sc3vu9ui3c
      @user-sc3vu9ui3c 2 หลายเดือนก่อน

      give me your email to communicate with you please , I am interested in programmimg brave things

  • @StorytellerDan
    @StorytellerDan 4 หลายเดือนก่อน +2

    Just started a Data Science bootcamp - binge watching for tonnes of research. This was a great insight into something a little more interesting than the boring mess I've had thrown at me so far. Cheers.

  • @shi-woonyi2605
    @shi-woonyi2605 ปีที่แล้ว +5

    I read webnovels and few years ago before Tencent saw the huge western market there were a bunch of different websites for each novel, they were translated into english.
    So keeping track of them became a bit tiring and if I used a webpage if it was down, well RIP.
    So I taught myself javascript and made a chrome extension that I can use on my PC and Tablet, using firebase to store my novels database.
    I love stats so keeping track of what I read, how many words, chapters etc. was fun and useful. Some novels have character names that I don't like or use censorship on words, replacing them is easy, saving it for each novel individually and so on. Using it daily.
    Another project of mine is a tool to add some data into my spreadsheet, I made a project that does a lot of calculations for me and adds it to the Google spreadsheet.
    ofc there are others, but those too are my most used and useful ones.

  • @IntelSoftware
    @IntelSoftware ปีที่แล้ว +12

    Awesome tutorial and video Tiff!! Thanks for partnering with us on sharing #oneAPI 💙

  • @Velo1010
    @Velo1010 6 หลายเดือนก่อน

    So I just discovered your channel. One thing many tech channels have in common is the presenter is horrible- fast paced, difficult to understand, and language barrier. This channel is none of those. So glad to find a channel that’s simple and straightforward.

  • @adrianojordao4634
    @adrianojordao4634 ปีที่แล้ว +35

    1)Make a mouse and key logger, that saves mouse position, and major mouse events as a sequence. Use that to replay the sequence as fast as you want and as many times as u want using python.
    2) find a way to put chatGPT talking to it self in python.

    • @xingyanglan6836
      @xingyanglan6836 7 หลายเดือนก่อน

      just call the function with the prompt as the response of the previous function call

  • @andywelch6433
    @andywelch6433 ปีที่แล้ว +1

    Beautiful and Smart! Just starting my Python journey - will be tuning in for more! Thx Tiff, keep 'em coming!

    • @TiffInTech
      @TiffInTech  ปีที่แล้ว

      Thanks Andy! I just shared another Python video as welll ❤️ wishing you all the best

  • @TiffInTech
    @TiffInTech  ปีที่แล้ว +17

    Hi friends! In this video we are going to be building some fun things with Python that can actually help automate tasks in your life! What should we build next?

    • @funnyshots2428
      @funnyshots2428 ปีที่แล้ว +1

      HI Sister you teach one of the best way i ever heard its very easy to under stand can i request you for a Python DSA with projects It will be very helpful for new comer like me to learn and implement Thank you sooo much

    • @iViktor87
      @iViktor87 ปีที่แล้ว

      Music creating (or a music generating with a presetup options) in python, and sounds creating too. Need something like that for my first Pygame project because of can not to find any good music with a free licence to use inside a game which I'm trying to make like during last month😁

    • @manm5302
      @manm5302 ปีที่แล้ว

      a gui with tkinter would be great, so that opening an IDE is not necessary

    • @JustinMacri007
      @JustinMacri007 ปีที่แล้ว

      She knows her stuff vsn we be freinds

  • @teja00219
    @teja00219 ปีที่แล้ว +65

    Great video!!!
    I would like to suggest a correction at 05:03 :-
    text = pdfreader.getPage(page_num).extractText() actually works for PDFs that have a single page. But if a PDF has multiple pages, then the text gets overwritten with the contents of the new page. So, to avoid that we can append the new page's content to the current text and then format the text into clean_text after the end of the loop

    • @GrandAmericaMotorcycleRides
      @GrandAmericaMotorcycleRides ปีที่แล้ว +1

      Also, it seems there may be a limit on how much text can actually be saved as audio using the ".save_to_file()" method. No matter if i place a longer literal string value or use a variable the length of the audio file is always 6 seconds.

    • @teja00219
      @teja00219 ปีที่แล้ว

      @@GrandAmericaMotorcycleRides No. It isn't the case for me. I'm able to save audio files that are even longer than 5 minutes!

    • @elgato2584
      @elgato2584 ปีที่แล้ว

      @@teja00219 I'm actually getting 41 second files and it's always the last 41 seconds of the text.

    • @josephkwon9323
      @josephkwon9323 ปีที่แล้ว +5

      Not to mention the clean_text var needs to be declared outside the for loop

  • @Seevawonderloaf
    @Seevawonderloaf 11 หลายเดือนก่อน +1

    I loved this. Would love to see more projects that youve done!

  • @emmaaberg3566
    @emmaaberg3566 6 หลายเดือนก่อน

    Filling out forms has really been a livesaver for me. Especially when you can make it dynamic to work for several webpages.

  • @alexyu4629
    @alexyu4629 ปีที่แล้ว +4

    Thanks for sharing Tiff, the pdf to audio project would create a lot of time savings for me!

    • @TiffInTech
      @TiffInTech  ปีที่แล้ว +2

      Glad it was helpful!

  • @paydennordlund
    @paydennordlund ปีที่แล้ว +4

    Hey Tiff! This video is awesome! In your terminal for VSCode how do you get it to say "python"? My terminal shows a file path instead and doesn't look clean at all.

  • @vincenzo6412
    @vincenzo6412 5 หลายเดือนก่อน

    When you said "if even worse" I knew the downloads folder was coming haha... My work computer's downloads folder is the scariest place on Earth. Great vid!

  • @guyonlead
    @guyonlead ปีที่แล้ว +19

    For Project 2, I really like using pathlib. You can iterate through a dynamic file path if you just did "for file in list(Path(downloads_folder).rglob('*.pdf')): file.unlink()" for pdf files. You can also do it via comprehension list.

    • @TaurusWD
      @TaurusWD ปีที่แล้ว +2

      This is the way. Pathlib should be the preferred way of dealing with file objects in place of the os library. There might be some niche scenarios where you want the os library, but for the most part PathLib provides what you need and in a superior format (i.e. it can handle various differences which occur between various file systems).

    • @AndreaGhensi
      @AndreaGhensi ปีที่แล้ว +2

      I second that. Arjian Codes did a video tutorial for pathlib some time ago, it's worth checking it out.

  • @SamB2112
    @SamB2112 7 หลายเดือนก่อน +6

    Thank you for the 2 inspiring projects.
    When trying the first one, I had to spend quite a lot of time debugging, possibly due to the fact that the used modules have been updated since the video has been made and a number of functions had been renamed (even ChatGPT is not updated regarding PyPDF2 3.0.0 !). If you wish to save your time, here is the updated code, with a little correction to the loop:
    import pyttsx3, PyPDF2
    title = input("Which book would you like to listen to?
    ") + ".pdf"
    pdfreader = PyPDF2.PdfReader(open(title, 'rb'))
    speaker = pyttsx3.init()
    first_page = input("Starting with what page?
    ")
    last_page = input("Ending with what page?
    ")
    text = ""
    for page_number in range(int(first_page - 1), int(last_page)):
    text = text + pdfreader.pages[page_number].extract_text()
    clean_text = text.strip().replace('
    ', ' ')
    print(clean_text)
    speaker.save_to_file(clean_text, 'result2.mp3')
    speaker.runAndWait
    speaker.stop()
    Now this version correctly prints out the converted text, but fails to create the mp3 file, don't know why. Chat GPT created this version of the code, which works, and the resulting voice reading is actually surprisingly clear:
    import fitz # PyMuPDF
    import pyttsx3
    # Get the input file name
    title = input("Which book would you like to listen to?
    ") + ".pdf"
    # Initialize the text-to-speech engine
    speaker = pyttsx3.init()
    # User input for page range
    first_page = int(input("Starting with what page?
    "))
    last_page = int(input("Ending with what page?
    "))
    # Initialize an empty text variable
    text = ""
    # Open the PDF file
    pdf_document = fitz.open(title)
    # Loop through pages and extract text
    for page_number in range(first_page - 1, min(last_page, len(pdf_document))):
    page = pdf_document.load_page(page_number)
    text += page.get_text()
    # Close the PDF document
    pdf_document.close()
    # Save the MP3 file
    mp3_output = input("How would you like to call the resulting .mp3 file?
    ") + ".mp3"
    speaker.save_to_file(text, mp3_output)
    speaker.runAndWait()
    speaker.stop()
    print(f"Text extracted and saved as {mp3_output}")

    • @TaskForge
      @TaskForge 4 หลายเดือนก่อน

      Second one doesn’t work.
      “ModuleNotFoundError: No module named ‘frontend’

    • @TaskForge
      @TaskForge 4 หลายเดือนก่อน

      After installing “frontend”
      New error, “RuntimeError: Directory ‘static/‘ does not exist

  • @panjash41
    @panjash41 ปีที่แล้ว

    After years of programming in C, C+, etc., I fell in love with Python, Numpy and Pandas. I sincerely recommend :).

  • @giantsbane8439
    @giantsbane8439 7 หลายเดือนก่อน +2

    This was an inspiring video, I like the first project but I think i want to investigate observing images and attempting to pull text from images. I have a ton of old PDF's of scanned books that are no longer in print, that don't have any digital versions available, so it's just scans or nothing. That would be nice to be able to digitize.

  • @brookestephen
    @brookestephen ปีที่แล้ว +1

    I wanted to make a grocery shopping list, by selecting recipes in a database, where the code adds up all the amounts for each common item. Results come out in an Excel spreadsheet!

  • @davidhernandez9985
    @davidhernandez9985 ปีที่แล้ว +1

    Permission to come aboard TnT 1st., time viewer of your show I thought that online discovery learning coding, is cool! MerryXmas🎅🏻 & may you have a fantastic holiday season❄,🤘🏼!

  • @miguelavello7493
    @miguelavello7493 ปีที่แล้ว

    Thank you for sharing ....very helpful. I think that I will spend some time with Python thanks to your video. Very powerful and limitless

  • @erichbachman7363
    @erichbachman7363 ปีที่แล้ว

    I love the way you display what music you play!

  • @panjash41
    @panjash41 ปีที่แล้ว +2

    For those who are used to bundling exe files. pyinstaller for Python does a great job.

  • @nicholastan3027
    @nicholastan3027 ปีที่แล้ว +135

    might be a bug in pdf to mp3. You re only converting the last page of the pdf since you don't concatenate each page together in your loop.

    • @virtimus2
      @virtimus2 ปีที่แล้ว +5

      Quite funny noone noticed :)

    • @jaroslavkrbec582
      @jaroslavkrbec582 ปีที่แล้ว +2

      I tried and noticed immediately. Did you manage to solve it?

    • @firemankoxd
      @firemankoxd ปีที่แล้ว +28

      @@jaroslavkrbec582 clean_text += text.strip()... in the for loop (the + sign is adding text from every page to the string instead of rewriting the whole variable every iteration)

    • @AdventurousJohn
      @AdventurousJohn ปีที่แล้ว +2

      Damn you sir! for beating me to this EXACT comment.

    • @lennyuwaeme
      @lennyuwaeme ปีที่แล้ว

      @@firemankoxdi'm getting the error that clean_text is undefined when i do this any way to stop that

  • @jaredalbin5658
    @jaredalbin5658 ปีที่แล้ว +1

    Your camera is amazing clear! The video looks so good and you look so good in it!
    Would you mind me asking what dslr you are using?

  • @abrahamkumah9663
    @abrahamkumah9663 ปีที่แล้ว +1

    Thanks for the video, I converted a 100-page pdf but the mp3 file generated was very short, less than a page. Am I missing anything? what do I need to add to the code to convert all 100 pages?

  • @Two_Buck
    @Two_Buck ปีที่แล้ว

    Excellent. Thank you, this gets me excited to learn python.

  • @connorl7679
    @connorl7679 ปีที่แล้ว

    Thx Tiff, love this!

  • @artherrera4669
    @artherrera4669 11 หลายเดือนก่อน

    Tiff , you are the best !!. I have learned a lot with you !!. Thanks

  • @TheChinaShop
    @TheChinaShop ปีที่แล้ว +1

    A good lesson, if you know the web, then learning python will not be difficult.

  • @tejasgaikwad1527
    @tejasgaikwad1527 ปีที่แล้ว

    Thanks for making this tutorial 🙌

  • @Ishkatan
    @Ishkatan 3 หลายเดือนก่อน

    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.

  • @joyomanda375
    @joyomanda375 4 หลายเดือนก่อน

    This just what I´m lookig for! Thanks!

  • @PaulBillingtonFW
    @PaulBillingtonFW 5 หลายเดือนก่อน

    Hi Tiff, Nice video and well-spoken. The PDF to audio might have a problem. I think that it will only produce the last page as audio, because all previous pages will be overwritten in the for loop.

  • @kevinwoodrobotics
    @kevinwoodrobotics ปีที่แล้ว +3

    Great way to apply Python in real life!

  • @BearMeat4Dinner
    @BearMeat4Dinner ปีที่แล้ว +1

    Awesome video. New sub here. Good deal to learn from ya! You RAWK!❤

  • @smtxtv
    @smtxtv 3 หลายเดือนก่อน

    Thank you. Inspiring, regardless of the minor critical comments. Will work through it.

  • @schwartzpat
    @schwartzpat ปีที่แล้ว +2

    Great video! Can you play the .mp3 clip and/or post more info on how to match a specific voice for the mp3?

  • @thejannzer882
    @thejannzer882 ปีที่แล้ว +2

    please do never stop making videos. they are awesome

  • @danielsoares7456
    @danielsoares7456 ปีที่แล้ว

    Wow, really cool, but i've a question about pdf speech reader script, is there any support to another language or is it only in english? Anyway... Nice job Tiffany, great stuff.

  • @phillipsquarcetta999
    @phillipsquarcetta999 ปีที่แล้ว +1

    Hi Tiff! Thank you so much for all you do for the community 😀. Question for you... I'm currently playing around with the PDF to audio example and am able to get it to read the text from the PDF after running the Python code in my terminal as suggested but it won't generate the .mp3 file for some reason despite my project having the PDF file needed. Any thoughts on why this could be? I've tried other PDF files as well and got the same result. Thanks!

    • @hitlerssecondcoming2523
      @hitlerssecondcoming2523 ปีที่แล้ว

      You might not be running with appropriate permissions

    • @chuckbelcher
      @chuckbelcher ปีที่แล้ว +1

      Having the same issue. Its not a permissions issue. I add the code below to take the contents of clean_text and create a text file which it does without issue. I am running 3.9.6 and the demo uses 3.9.10 may look into the that. Awesome demo though. Very much enjoyed it.
      with open('sample.txt', 'w') as f:
      f.write(clean_text)
      f.close()

    • @phillipsquarcetta999
      @phillipsquarcetta999 ปีที่แล้ว

      @@chuckbelcher I don't believe it's a permission issue either. Currently running 3.9.6 as well. Were you able to update to 3.9.10 as shown in the video? If so, how did you do it? Thank you both for reaching out. Much appreciated!

    • @2002RM
      @2002RM ปีที่แล้ว +4

      Put it into Chat GPT. It would probably do a better job...
      Sorry, but I expected to see an actual demo of the output once the code was created. It's like "he I created code which 'says' it does something, but I'm not going to actually show if it works or not"

    • @mbw365
      @mbw365 ปีที่แล้ว

      A couple of things I see that might be an issue.
      clean_text is defined in the for loop, so it's scope is not accessible outside of the for loop.
      I'm not familiar with the PyPDF2 library, but it looks like extractPage is creating a string. clean_text seems to be getting set to this value with every iteration, meaning that when you have 5 pages of input, each page will overwrite the previous one, and it's value on the 5th iteration would only be the text on the 5th page. At a glance, the documentation shows that pages is an iterable property, so you could simplify the loop as well. This would be a good idea, since getPage is deprecated.
      Probably I would fix this something like:
      ...
      clean_pages_of_text = []
      for page in pdfreader.pages:
      page_text = page.extractText()
      clean_pages_of_text.append( page_text.strip().replace('
      ', ' '))
      text_for_speech = ''.join(clean_pages_of_text)
      speaker.save_to_file(text_for_speech, 'story.mp3')
      ....
      I'm perhaps being a bit more verbose with the code than needed, but just trying to make it easier to understand.

  • @user-lz3tv4wz4d
    @user-lz3tv4wz4d ปีที่แล้ว

    There are two convenient small things. I try first code and see the sentences it print, but it can’t save anything. If I just use "speak.say(clean_text)", I can hear it fine. But when I try to "speak.say(clean_text)", then "save_to_file(clean_text, file name.mp3)", the production of mp3 file ends up being ahead of the actual pronunciation.

  • @missdblogs
    @missdblogs ปีที่แล้ว

    Hi Tiff, In order to read the PDF file, where should I save it. Like I use VScode for the coding for the first project.

    • @Handlebrake2
      @Handlebrake2 ปีที่แล้ว

      Lol, if you just want to use the name, in the same folder. Otherwise you'd need to enter in the whole name in opens first argument.

  • @markmilan57
    @markmilan57 11 หลายเดือนก่อน

    Wow you made my life easier! Thanks a lot.

  • @macdaddyin
    @macdaddyin ปีที่แล้ว

    The last program. Does it put the deleted file in the recycle bin?

  • @codaemon375
    @codaemon375 ปีที่แล้ว

    Amazing video!

  • @larbesabdellah7079
    @larbesabdellah7079 ปีที่แล้ว

    Hello , the thing I like in ur programming way is that u are not programming like super heroes , but u programme like ordinary people and u do magical things 🌹

  • @Mbro-dq2do
    @Mbro-dq2do 9 หลายเดือนก่อน

    Thank you! excellent video

  • @skmuiruri
    @skmuiruri 10 หลายเดือนก่อน

    Hi,
    Love your videos, what setup (software and hardware) are you using to create them?

  • @shadetreehandyman
    @shadetreehandyman ปีที่แล้ว

    first time visitor... trying to set this up in pycharm... should that be doable without a lot of grief... also wondering if it would be possible to create a customizable filter for youtube... something that would allow you to create some diversity on what shows up on your youtube homepage.

  • @iantullie
    @iantullie ปีที่แล้ว +3

    New to your channel, and I appreciate the production values and simple approach, but I found the video title a bit clickbaity - converting a PDF file to MP3 and deleting one file in your downloads folder isn't anyone's definition of "the ultimate guide" to "automating my life". Yes, you could extend them both a bit, but neither automate much at all - running a Python program still requires you to run it, and converting the MP3 still requires you to both run it and then play the file. I'm not hating, just wishing that people would be more honest in their titles.

  • @MartinThoma
    @MartinThoma ปีที่แล้ว +19

    Nice project!
    I've just noticed your video as I'm the maintainer of pypdf and PyPDF2. The timing was unfortunate: I've decided to deprecate PyPDF2 and move forward with pypdf.
    The syntax is pretty much the same. However, you're also using the deprecated PdfFileReader. This will fail with PyPDF2>=3.0.0. As you haven't pinned the version in 3:30 people will stumble over this.

    • @lennyuwaeme
      @lennyuwaeme ปีที่แล้ว

      hi how do we solve this issue i keep getting the"sequence indices must be integers" error when i try to do. text = reader.pages[page_num].extractText()

    • @MartinThoma
      @MartinThoma ปีที่แล้ว

      @@lennyuwaeme I guess page_num is not an integer in your case. Check what it is. Maybe None? Maybe a string?

    • @JeffreyShaffer
      @JeffreyShaffer ปีที่แล้ว +10

      Here is updated code that should work with pypdf and grab all of the pages of a PDF document:
      import pyttsx3, pypdf
      pdfreader = pypdf.PdfReader(open('book.pdf', 'rb'))
      speaker = pyttsx3.init()
      clean_text = ''
      for page_num in range(len(pdfreader.pages)):
      text = pdfreader.pages[page_num].extract_text()
      clean_text += text.strip().replace('
      ', '')
      print(clean_text)
      speaker.save_to_file(clean_text, 'story.mp3')
      speaker.runAndWait()
      speaker.stop()

    • @cosmicaug
      @cosmicaug ปีที่แล้ว

      Technically, there's nothing wrong with that loop (and it makes it look like the original in the video so it's good that way) but it would be more Pythonic (and readable) to avoid using that list like object to iterate over indices derived from that range. It's clearer to avoid indexing like that altogether since pdfreader.pages (as per above) is a list like object and can be iterated directly. That may not have been possible using PyPDF2 (I'm not sure -I'm sure @Martin Thoma could say).
      Do something like:
      for page in pdfreader.pages:
      text = page.extract_text()
      clean_text += text.strip().replace('
      ', '')

    • @saulroa851
      @saulroa851 ปีที่แล้ว

      @@JeffreyShaffer My maaan! Totally works. Thanks!

  • @s4k742
    @s4k742 8 หลายเดือนก่อน

    Thanks Tiff, but why don't you run the audio file to check it?

  • @bizz3436
    @bizz3436 11 หลายเดือนก่อน

    How do you get it to delete a specific file type for example if I wanted to delete all files that are .csv?

  • @valesanchez6336
    @valesanchez6336 ปีที่แล้ว +1

    For the second project:
    How do you make it dynamic to look at all the PDF files or be able to look at files with similar names?

    • @mohammedk8545
      @mohammedk8545 10 หลายเดือนก่อน

      I know this is late
      but you need to use a python module called "glob"
      pdf_files = glob.glob("/path/to/dir/*.pdf")
      this will basically take every file that ends with .pdf and put them in a list
      and then you have to go through the list and delete each file in the list like this
      if pdf_files:
      for file in pdf_files:
      os.remove(file)
      print("PDF file/s have been removed successfully")
      else:
      print("No PDF files were found in the Downloads directory")
      you could also modify the pattern like this
      pdf_files = glob.glob("/path/to/dir/book*.pdf")
      this will contain every file that starts with book and end with .pdf
      for example these files will be deleted:
      book.pdf
      book1.pdf
      book23423423.pdf

  • @cjveeneman
    @cjveeneman ปีที่แล้ว +2

    like the pdf to audio idea. BTW; I believe you are only saving the last page to the mp3. Intended ?

  • @voyager1bg
    @voyager1bg 8 หลายเดือนก่อน

    I liked how you said: "not gonna explain how to install python", though is this working as intended, it seems to me clean_text would contain only last page, because it's been overwritten in every iteration, and the resulting mp3 would be only for last page?

  • @Sooska100
    @Sooska100 ปีที่แล้ว

    What learning material do you recommend for a beginner who wants to learn Python?

  • @edwinrosales6322
    @edwinrosales6322 10 หลายเดือนก่อน

    Nicely done!

  • @YourHeartFeelings
    @YourHeartFeelings หลายเดือนก่อน

    Thank you very much

  • @bci3937
    @bci3937 6 หลายเดือนก่อน

    Thank you showin for how Ideas and Phython works together, i want to learn python but i dont know if i can realize my ideas with python....a bit a complicated process. Data Science is interessting but i am not a coder so what can python do? My first idea that follows me is that i want to solve problemes inside linux and windows like errors you dont see (beginner struggle) and asking yourself whats going on here...i thougth python can grab some of the hidden infos and popup a little helper....and so so...like "you forgot using sudo - type in sudo - here is a webpage what shows u hints using it".

  • @2broken22
    @2broken22 ปีที่แล้ว

    Amazing video. ChatGPT helped me fix some issues with the updated version of pdfreader. But still, this script only converts 1 first sentence of my PDF for some reason. Looks like it stops after a period in text. Anyone knows how to fix it?

  • @hamidullah7742
    @hamidullah7742 ปีที่แล้ว

    Great 👍👍

  • @arpanlidder5076
    @arpanlidder5076 ปีที่แล้ว

    Very good topic. Spelling mistakes are normal in live coding situations and non scripted sessions. Don’t initiate influence leakage by apologizing about your spellings when it is not a big deal. You have a good topic, good professional presentation however your copy/ script can be rehearsed to improve the flow. It gets better with experience and chatGPT. Good luck.

    • @janusztarnowski115
      @janusztarnowski115 ปีที่แล้ว

      Simple Application Enter your details
      th-cam.com/video/DWn5-Ej8R-M/w-d-xo.html

  • @Khujandiho
    @Khujandiho ปีที่แล้ว

    in the first part, you got my curiosity. second part, you got my attention

  • @danielnunes9874
    @danielnunes9874 4 หลายเดือนก่อน +1

    Hi! Are those codes running locally? If I upload them to Google Drive or OneDrive, any chance of them running using Cloud?

    • @ewoutlagendijk9604
      @ewoutlagendijk9604 15 วันที่ผ่านมา +1

      You can read the pdf, but probably not play the file. At least it didn't when I tried just now with Google Colabs.

  • @nnennaumelloh8834
    @nnennaumelloh8834 ปีที่แล้ว

    This might be a silly question, but I'll ask anyway.
    We can do the same thing in Jupyter Notebook right? 🤔

  • @abduvahobibrohimov108
    @abduvahobibrohimov108 ปีที่แล้ว +1

    very useful video Thanks
    😊

  • @plan0go
    @plan0go ปีที่แล้ว

    is that platform independent (works at linux? / ubuntu? )

  • @germantoenglish898
    @germantoenglish898 ปีที่แล้ว

    I'd like to hear that resulting book.mp3 file. Is it very robotic or does it sound natural? Is it audiobook quality or would it drive you insane?

  • @outdoorcat5107
    @outdoorcat5107 ปีที่แล้ว

    Typed exactly as you and I am getting the following error: "Segmentation fault: 11". Google tells me it could be related to macOS compatibility issues or the terminal is trying to access memory it isn't supposed to?

  • @reristavi
    @reristavi ปีที่แล้ว

    why do you copy paste commands? or is it also a process of automation?

  • @airobotusa
    @airobotusa ปีที่แล้ว

    Hi Tiffany,
    I am very exciting to see your Python video that automate tasks very much,.
    Which text editor are you using for this video?
    Are you recommending to use Jupyter, PyCharm, Sublime?
    Happy New Year to you

    • @TiffInTech
      @TiffInTech  ปีที่แล้ว

      Thank you! Vscode

    • @MrSlimfinger
      @MrSlimfinger ปีที่แล้ว

      @@TiffInTech You should probably pin the comment made by @MartinThoma 🙂 Great video 👍

  • @leoparada8478
    @leoparada8478 ปีที่แล้ว

    Thanks for this video....Could you tell me about your camera?....Is it a Sony video camera?

  • @ChenHaziza
    @ChenHaziza ปีที่แล้ว +2

    one more thing, i fail to see how it supposed to run if the loop will overwrite the clean_text on every itteration... i would love some help with that

    • @mihaisabadac2481
      @mihaisabadac2481 ปีที่แล้ว +1

      Hey there. I think she did just the last page to save some time. You can initialize the clean_text = ' ' before the loop and inside replace "clean_text =" with "clean_text +=" and eliminate the print. For me worked fine, just that my pdf needed more cleaning :)

  • @geeklany
    @geeklany ปีที่แล้ว +2

    So I'm kinda wondering.. wouldn't the mp3 only contain the last page? Since the clean_text variable is reset in the for cycle. Anyway for a 6 minute of code and to give some great ideas it is perfect :D Thanks for the inspiration.

    • @davidbristoll195
      @davidbristoll195 ปีที่แล้ว

      Yeah, I think it needs a blank string and then to add each clean_page to the page. E.g, before the loop: new_page = "" | in the loop, new_page += clean_page.

    • @bp-ob8ic
      @bp-ob8ic ปีที่แล้ว

      @@davidbristoll195 thanks for the tip. I solved it this way:
      clean_text = "" #(initialize the blank string before the loop)
      clean_text += text.strip().replace('/n', " ") #in the loop
      In the mp3, I get a pause at the end of each line, but that may because I created the pdf from a Word file. I'll have to dive deeper into that another time.

    • @davidbristoll195
      @davidbristoll195 ปีที่แล้ว +1

      @bp4924 glad you got it working. Good luck with the pause issue 👍

  • @e-fox7528
    @e-fox7528 ปีที่แล้ว +1

    Thank you really , can you make a python tutorial for complete beginners by building projects from scratch like 30 days of python , you really know how to teach , all respect and love from Belgium

  • @nerdmaino
    @nerdmaino ปีที่แล้ว

    Amazing video, can you tell me the model name of your desk?

  • @skasgard1591
    @skasgard1591 ปีที่แล้ว

    What is it that shows the errors with the red arrows and green arrows for functioning code in terminal? 2:51

  • @arash_vaziri
    @arash_vaziri 6 หลายเดือนก่อน

    In the first section the mp3 only contains the last page, I believe, as text is not concatenated with prev. ones !

  • @buntun3670
    @buntun3670 4 หลายเดือนก่อน

    this was really cool

  • @datag1199
    @datag1199 10 หลายเดือนก่อน

    Nice video and tutorial. Thanks. I

  • @fernandocotta2420
    @fernandocotta2420 ปีที่แล้ว +1

    Hi, i have this problem. PyPDF2.errors.DeprecationError: PdfFileReader is deprecated and was removed in PyPDF2 3.0.0. Use PdfReader instead.

  • @KBA3AP
    @KBA3AP 22 วันที่ผ่านมา

    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.

  • @betterstack
    @betterstack 2 หลายเดือนก่อน

    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 💪

  • @joshuacheng7325
    @joshuacheng7325 6 หลายเดือนก่อน

    when you use a new library, how do you know how to use the new functions?

  • @maxsmith108
    @maxsmith108 7 หลายเดือนก่อน

    Neat, thanks.

  • @ChenHaziza
    @ChenHaziza ปีที่แล้ว +2

    hi
    i am kind of a noob when it comes to coding, and i built a project using tkinter for gui which will open a selected pdf and turn it into mp3, however it only works with small files,
    any idea how can i make it happen for big files too? like 500 pages book?

    • @ChenHaziza
      @ChenHaziza ปีที่แล้ว +1

      well since no one is able to give me a straight answer and I am pretty sure there isn't one lol apparently pyttsx3 has limit for 5000 characters or words I'm not sure. so its pointless unless you have a one page pdf

    • @imanotjr1368
      @imanotjr1368 ปีที่แล้ว +1

      You gotta have some patience as well man xd, but I have the same problem, i'm trying to put my lectures in there but I only get 20 sec audio files

    • @ChenHaziza
      @ChenHaziza ปีที่แล้ว

      @@imanotjr1368 im gettin the feeling that the pyttsx3 limitations is the problem

    • @jmg9509
      @jmg9509 ปีที่แล้ว

      @@ChenHaziza Yup pretty useless for anything indepth or of substance.

  • @gamerneutro3245
    @gamerneutro3245 4 หลายเดือนก่อน

    I was struggling with pdf project so much, you don't have idea, I'm just thinking about more implementations that I can input and all that stuff lmao

  • @NoxPark
    @NoxPark ปีที่แล้ว

    How do we put the terminal at the bottom of the Visual Studio Code screen? I am using VSC version 1.73.1.

    • @lilv728
      @lilv728 ปีที่แล้ว

      It should automatically appear and stay there once you try to run your code but if you want to access it before you run anything you should be able to find it on the bottom right? Maybe top right. If you're just trying to install what she installed you can do that by opening the terminal outside of vsc as well. (Windows key + X, then click windows terminal)

  • @klabifortune147
    @klabifortune147 ปีที่แล้ว

    I love you Tiffany. This is really cool 😍 😍 🔥

  • @thandothemisunderstood
    @thandothemisunderstood ปีที่แล้ว

    Nice project, I love you.

  • @samgould8567
    @samgould8567 ปีที่แล้ว

    Do you happen to use Emacs or code in any Lisp dialects? The thumbnail got me hopeful.

  • @CandidoZfinda
    @CandidoZfinda 7 หลายเดือนก่อน

    Hello very good your class of Python

  • @iwantcheesypuffs
    @iwantcheesypuffs 6 หลายเดือนก่อน

    Chat GPT 4, can summarize and bring out highlights of a PDF as well. No code, unless you need to do it en masse as an integration

  • @raytry69
    @raytry69 ปีที่แล้ว

    8:10 You might not know it but the concrete is softest at Sunday 7am.

  • @Rapha-Aguiar
    @Rapha-Aguiar ปีที่แล้ว

    What about a script to copy and paste content from every pdf, xlsx or docx file to a page in a Notion database? :)
    I'll try this whenever I have free time...

  • @Zorlel
    @Zorlel 5 หลายเดือนก่อน

    You did a good job with the title and the thumbnail!
    They actually fooled me into believing that this video had at least a bit of work put into it and it wouldn't be completely useless.
    This has nothing to do with automation nor with anything life related so good job on the clickbait I guess.