DEV Community

Script Smith
Script Smith

Posted on

4 Python Scripts I Use to Automate My Most Annoying Daily Tasks

I kept doing the same four things manually, every single week.

Sorting downloaded files into folders. Writing the same types of emails. Checking if a product price had dropped. Digging text out of PDFs.

So I wrote Python scripts to handle all of them. Here's what each one does — with the key parts of the code.


1. File Organizer — Sort a messy folder in one command

My Downloads folder was a disaster. This script sorts everything automatically.

# Organize by file type
python file_organizer.py ~/Downloads --mode type

# Preview first (no files moved)
python file_organizer.py ~/Downloads --dry-run
Enter fullscreen mode Exit fullscreen mode

It maps extensions to categories automatically:

FILE_TYPE_MAP = {
    "Images":    [".jpg", ".jpeg", ".png", ".gif", ".webp"],
    "Documents": [".pdf", ".doc", ".docx", ".txt"],
    "Videos":    [".mp4", ".mov", ".avi", ".mkv"],
    "Code":      [".py", ".js", ".ts", ".html", ".css"],
    # ... and more
}
Enter fullscreen mode Exit fullscreen mode

You can also sort by date (--mode date) or both (--mode both).


2. Email Drafter — 7 templates, ready in seconds

I was writing the same follow-up and cold outreach emails over and over. Now I just run:

python email_drafter.py --template follow_up \
  --to "Sarah" \
  --topic "our product demo"
Enter fullscreen mode Exit fullscreen mode

Output:

Subject: Following up on our product demo

Hi Sarah,

I hope this message finds you well.

I wanted to follow up on our product demo. I understand you may be busy,
but I'd love to hear your thoughts whenever you have a moment.
...
Enter fullscreen mode Exit fullscreen mode

Available templates: follow_up, cold_outreach, thank_you, apology, meeting_request, project_update, invoice_reminder.


3. Price Monitor — Get alerted when prices drop

I was manually checking Amazon prices for things I wanted to buy. Now I just add the product once and let it run:

# Add a product to track
python price_monitor.py add \
  --url "https://www.amazon.com/dp/B08N5WRWNW" \
  --selector ".a-price-whole" \
  --target 89.99 \
  --name "Kindle"

# Check all prices now
python price_monitor.py check

# Monitor every 60 minutes automatically
python price_monitor.py watch --interval 60
Enter fullscreen mode Exit fullscreen mode

It saves a full history to CSV so you can see price trends over time.


4. PDF Extractor — Get text out of any PDF instantly

Extracting text from PDFs, especially in bulk, used to be painful.

# Single file to text
python pdf_extractor.py extract report.pdf

# Convert to Markdown
python pdf_extractor.py extract report.pdf --format markdown

# Search keyword across 100 PDFs at once
python pdf_extractor.py search ./research-papers/ --keyword "machine learning"

# Batch extract all PDFs in a folder
python pdf_extractor.py batch ./my-pdfs/
Enter fullscreen mode Exit fullscreen mode

The search feature is the one I use most — it saved me hours going through research documents.


Setup

All four scripts run on Python 3.10+. Two of them (file_organizer and email_drafter) use only the standard library — no installation needed.

For the other two:

pip install requests beautifulsoup4  # price_monitor
pip install pymupdf                  # pdf_extractor
Enter fullscreen mode Exit fullscreen mode

Get the full pack

If you want all four scripts with full source code, a detailed README, and requirements.txt:

👉 Python Automation Scripts Pack — $9 on Gumroad

Questions or suggestions? Drop a comment below — I read every one.

Top comments (0)