Automation scripts you need to try (Collection) — Part 2
18 Insanely Useful Python Automation Scripts I Use Everyday
18 个我每天都在使用的超级实用的 Python 自动化脚本
Scripts That Increased My Productivity and Performance Even More
让我的生产力和表现更上一层楼的脚本
I’ve been using Python for almost 5 years now, and the one thing that continues to attract me and drive my research is its ability to automate tasks. Over the past year, I’ve been diving into Python’s automation capabilities and have come across some amazing packages, facts, and useful scripts. In this blog, I’ll share a collection of daily automation scripts that have significantly boosted my productivity and performance.
我使用 Python 已经将近 5 年了,一直吸引我并推动我研究的一点就是它自动化任务的能力。在过去的一年里,我一直在深入研究 Python 的自动化功能,发现了一些令人惊叹的包、事实和实用脚本。在这篇博客中,我将分享一系列显著提升我的生产力和效率的日常自动化脚本。
This is part 2 of my Automation scripts collection, check out the part 1 here.
1. Pomodura
The
番茄工作法是最简单的提高效率方法之一。它基于将工作分成多个时间段,传统上每段 25 分钟,中间用短暂的休息(5 分钟)分隔开。Pomodoro Technique is one of the simplest methods for improving productivity. It’s based on breaking work into intervals, traditionally 25 minutes long, separated by short breaks (5 minutes).
番茄工作法是最简单的提高效率方法之一。它基于将工作分成多个时间段,传统上每段 25 分钟,中间用短暂的休息(5 分钟)分隔开。
This Python automation script enhances the Pomodoro Technique by adding a Forced device lock once the timer runs out, ensuring you take the much-needed break.
这个 Python 自动化脚本通过在计时器结束时强制锁定设备来改进番茄工作法,确保你进行必要的休息。
2. TodayScope
I’ve always wanted to stay connected — to the stars, the stories, and the world around me — but without the daily struggle of searching Google for it all. That’s why I developed this automation script. Every morning when I start my desktop, it automatically brings me the top news, today’s history, and astrological insights, all in one go!
我一直想与星空、故事和周围的世界保持联系——但不想每天都在 Google 上搜索这些信息。这就是为什么我开发了这个自动化脚本。每天早上当我启动电脑时,它会自动为我一次性带来热门新闻、今日历史和星象洞察!
3. TrendyStocks
There’s a saying: “What’s seen sells.”
有句话说:"所见即所售。"
In the stock market, perception can be as powerful as the numbers. Smart investors know it’s not just about the figures, but the stories, the news, and the buzz shaping the market.
在股市中,感知力可能和数字一样重要。聪明的投资者都知道,这不仅仅是关于数字,还包括故事、新闻和影响市场的舆论。
When a stock is trending — whether for good or bad reasons — more people talk about it, and more articles are written about it. This growing chatter can offer valuable clues for making smarter buy or sell decisions.
当一支股票处于趋势之中时——无论是由于好的还是坏的原因——会有更多人谈论它,也会有更多关于它的文章出现。这些不断增加的讨论可以为做出更明智的买入或卖出决定提供有价值的线索。
This automation script taps into Google Trends to create a graph for any stock you’re interested in, giving you insights into its popularity and helping guide your investment strategy.
这个自动化脚本利用 Google 趋势为您感兴趣的任何股票创建图表,让您了解其受欢迎程度并帮助指导您的投资策略。
Applications- 应用程序-
- Helps in making better financial decisions so that you won’t end up looking like a fool.
有助于做出更好的理财决定,这样你就不会最终看起来像个傻瓜。 - Useful in keyword research to understand what’s trending and what’s not.
在关键词研究中有助于了解什么正在流行,什么不流行。
4. Neatify 🧹 4. 整理
Is your download folder a chaotic mess?
你的下载文件夹一团糟吗?
Do you find yourself scrambling to locate crucial files when you need them most?
你是否发现在最需要重要文件时手忙脚乱地寻找它们?
Have you attempted folder organization countless times, only to fall short?
你是否尝试过无数次整理文件夹,却总是半途而废?
This all-in-one automation script transforms how you organize and manage your files in just minutes! Simply provide the path to the folder you want to clean up, and the script will work its magic.
这款多功能自动化脚本能在几分钟内改变你整理和管理文件的方式!只需提供想要整理的文件夹路径,脚本就会自动完成所有工作。
- File Extension Sorting: Automatically categorize all files into separate folders based on their file extensions for a more organized structure.
文件扩展名分类:根据文件扩展名自动将所有文件分类到不同的文件夹中,实现更有序的文件结构。 - Duplicate File Removal: Detect and remove duplicate files by comparing their hashes, ensuring no redundant copies clog up your storage.
重复文件删除:通过比较文件哈希值来检测和删除重复文件,确保存储空间不会被多余的副本占用。 - Date-Based Organization: Arrange files into folders based on their creation or last-modified dates, making it easy to locate files by period.
按日期组织:根据文件的创建或最后修改日期将文件整理到文件夹中,便于按时间段查找文件。
With this dual-purpose tool, you get a clean, logical file structure free of duplicates and organized by type and time. Efficiency has never been this seamless!
使用这个多功能工具,您可以获得一个整洁、逻辑清晰的文件结构,没有重复文件,并按类型和时间进行组织。效率从未如此流畅!
5. ClockWork 5. 时钟装置
Time tracking helps you uncover patterns, optimize workflows, and stay accountable. It’s a key tool for turning your efforts into measurable progress and ensuring every minute counts.
时间追踪帮助你发现规律、优化工作流程并保持负责。这是将你的努力转化为可衡量进展并确保每分钟都有价值的关键工具。
Manually tracking tasks and time can quickly become overwhelming. Remembering start times, calculating durations, and maintaining logs disrupts your workflow and introduces room for error. The outcome? A productivity tool that turns into just another task on your list.
手动追踪任务和时间很快就会让人不知所措。记住开始时间、计算持续时间和维护日志会打断工作流程,还会带来出错的可能。结果如何?一个本该提高生产力的工具反而变成了你待办事项中的又一个任务。
This automation script eliminates these headaches with a simple, intuitive solution. It automates the tracking process, allowing you to set custom task durations, monitor progress in real-time, and automatically generate detailed logs, so you can focus on what truly matters.
这个自动化脚本通过一个简单直观的解决方案消除了这些烦恼。它自动化了跟踪过程,让你能够设置自定义任务时长,实时监控进度,并自动生成详细日志,这样你就能专注于真正重要的事情。
Script Application — 脚本应用 —
- Time Tracker 时间追踪器
- Model Training Tracker 模型训练追踪
6. ClipTranslate 6. 快译
Have you ever been overwhelmed by copied text, unable to track what you’ve pasted, or, worse, losing important snippets? Have you ever struggled with text in a non-native language, constantly visiting Google Translate for a quick conversion? Ever Thought of having a tool that captures everything you copy and effortlessly translates it into English? This automation script is your clipboard assistant. It monitors all the text you copy and provides seamless translations.
你是否曾经被复制的文本淹没,无法跟踪你粘贴的内容,或者更糟糕的是,丢失了重要的片段?你是否因为处理非母语文本而苦恼,不得不频繁访问谷歌翻译进行快速转换?是否想过拥有一个能捕获所有复制内容并轻松将其翻译成英语的工具?这个自动化脚本就是你的剪贴板助手。它会监控你复制的所有文本并提供流畅的翻译。
7. Video2GIF
Bloggers and content creators know the importance of GIFs. Videos are great for sharing and showcasing content but when it comes to embedding in blog posts GIFs are the first and better choice. This automation script can convert videos into GIFs with no watermark and few lines of code.
博主和内容创作者都知道 GIF 的重要性。视频非常适合分享和展示内容,但是在博客文章中嵌入内容时,GIF 是首选且更好的选择。这个自动化脚本可以通过几行代码将视频转换为无水印的 GIF。
8. WordCounter 8. 字数计数器
There is a famous line from the web series BoJack Horseman — “Every day it gets a little easier. But you gotta do it every day — that’s the hard part. But it does get easier”.
网剧《马男波杰克》中有句著名台词:"每天都会变得容易一点。但你必须每天坚持——这才是最难的部分。不过它确实会变得更容易。"
One of the best pieces of advice that I have ever gotten in my initial days of Blogging is to write regularly a certain amount of words. However, there was no cheaper or simpler way to track how many words I had written in a day. This automation script works as a life savior by keeping track of the number of words I have written in a day and motivating me once I reach my daily milestone.
在我博客写作的初期,我得到的最好建议之一就是每天规律地写一定数量的文字。然而,当时并没有便宜或简单的方法来记录我每天写了多少字。这个自动化脚本就像救星一样,帮我追踪每天写作的字数,并在我达到每日目标时给予鼓励。
You can check out a more advanced version of it with a live counter, top words chart, and customized multiple milestones here.
您可以在这里查看它的高级版本,其中包含实时计数器、热词图表和自定义的多个里程碑。
9. FakeFill
Whether you’re a data scientist testing models or just filling out forms with random information, this Python automation script has you covered. It generates realistic-looking but fake datasets, perfect for testing, development, and simulations. From names and emails to phone numbers and more, this tool creates sample data quickly and efficiently.
无论你是测试模型的数据科学家,还是只需要用随机信息填写表格,这个 Python 自动化脚本都能满足你的需求。它可以生成看起来真实但实际是虚假的数据集,非常适合用于测试、开发和模拟。从姓名和电子邮件到电话号码等,这个工具可以快速高效地创建样本数据。
10. HeaderSpy
Email headers are crucial metadata components of an email that reveal important details about its origin, transmission, and content. Although they’re not visible to the recipient by default, you can view them using email client features or specialized tools. These headers contain various fields, each serving a specific function.
电子邮件头是电子邮件的重要元数据组成部分,揭示了有关其来源、传输和内容的重要细节。虽然默认情况下收件人看不到它们,但您可以使用电子邮件客户端功能或专门工具来查看它们。这些邮件头包含多个字段,每个字段都有特定的功能。
They play an essential role in the smooth operation of email systems, helping to authenticate messages and provide transparency about the sender. Email headers are instrumental in preventing spam, verifying the sender’s identity, and troubleshooting delivery issues.
它们在电子邮件系统的顺利运行中发挥着重要作用,有助于验证邮件并提供发件人的透明度。电子邮件头在防止垃圾邮件、验证发件人身份和排查邮件投递问题方面起着关键作用。
If you’ve never seen an email header, trust me — it’s far from easy on the eyes. This automation script extracts key information from email headers, helping you determine whether an email is spoofed, bounced, or potentially malicious.
如果你从未见过电子邮件头,相信我——它看起来一点也不赏心悦目。这个自动化脚本从邮件头中提取关键信息,帮助你判断一封邮件是否被伪造、退回或存在潜在的恶意。
You can learn more about Email Headers here.
您可以在此处了解有关电子邮件头的更多信息。
11. BetterEmails 11. 优化邮件
Email lists are the lifeblood of online engagement, where each subscriber is a valuable member of your digital community. They form the core of successful digital marketing, connecting you directly with your audience.
邮件列表是在线互动的命脉,每个订阅者都是你数字社区中的宝贵成员。它们构成了成功数字营销的核心,让你能够直接与受众建立联系。
As a digital influencer, maintaining constant engagement with your followers is key — but doing it manually can quickly become overwhelming, and the cost of third-party tools can drain your budget.
作为一名数字博主,与粉丝保持持续互动至关重要——但手动操作很快就会让人不堪重负,而使用第三方工具的成本又会消耗预算。
This automation taps into Gmail’s SMTP server to send bulk emails in just minutes. With full customization at your fingertips, you have complete control over your outreach — without the hefty price tag.
这个自动化工具利用 Gmail 的 SMTP 服务器,只需几分钟就能发送批量邮件。您可以完全自定义各项设置,轻松掌控外联工作,而且无需支付高额费用。
Make sure you are not spamming your recipients or you’ll get blacklisted from Gmail. Try to limit your emails to <100 a day.
请确保你不会向收件人发送垃圾邮件,否则会被 Gmail 列入黑名单。尽量将每天的邮件数量控制在 100 封以内。
12. FilterText 12. 筛选文字
Handling social media content and gaining meaningful insights can feel overwhelming, especially when dealing with a lot of text data. That’s where this automation script can step in and save you time. Using the power of Natural Language Processing (NLP), it filters your text and automatically pulls out key elements like hashtags, mentions, and keywords, so you don’t have to go through it all manually and write tons of code.
处理社交媒体内容并获取有意义的见解可能会让人感到不知所措,尤其是在处理大量文本数据时。这就是这个自动化脚本可以介入并为您节省时间的地方。通过自然语言处理(NLP)的强大功能,它可以过滤文本并自动提取出主题标签、提及和关键词等关键要素,这样您就不必手动检查所有内容并编写大量代码。
13. ExifClean
Exif (Exchangeable Image File Format) is a standard that defines the formats for images, sound, and additional tags used by digital cameras, smartphones, scanners, and other devices that handle image and audio files captured by digital cameras.
Exif(可交换图像文件格式)是一种标准,它定义了数码相机、智能手机、扫描仪和其他处理数码相机拍摄的图像和音频文件的设备所使用的图像、声音和附加标签的格式。
The Exif data, embedded within the image file, holds crucial metadata such as camera settings, date and time, geolocation, image orientation, software information, camera model, and more.
Exif 数据嵌入在图像文件中,包含了重要的元数据,如相机设置、日期和时间、地理位置、图像方向、软件信息、相机型号等。
If you’re someone who loves sharing your memories through images on social media, this script is a must-have for you.
如果你是一个喜欢在社交媒体上分享生活记忆的人,这个脚本你一定不能错过。
This automation script allows you to input an image path, extracts all the Exif metadata, and then removes it completely — helping you protect your privacy while still sharing your photos with ease.
这个自动化脚本允许你输入一个图片路径,提取所有的 Exif 元数据,然后完全删除这些数据——帮助你在轻松分享照片的同时保护你的隐私。
14. BugBuster
Writing clean, efficient code isn’t just a good practice — it’s essential for building scalable, maintainable projects. Yet, ensuring code quality can feel like an uphill battle, especially when you’re working with large codebases or tight deadlines. The process of spotting vulnerabilities, linting issues, or logical inconsistencies can quickly become overwhelming without the right tools.
编写整洁、高效的代码不仅仅是一种良好实践 — 这对于构建可扩展、可维护的项目来说是必不可少的。然而,确保代码质量可能会感觉像一场艰难的战斗,尤其是当你在处理大型代码库或面临紧迫的截止日期时。如果没有合适的工具,发现漏洞、代码规范问题或逻辑不一致的过程很快就会变得难以应对。
This automation script makes use of Black, Flake8, and Bandit libraries to scan your code directories for any logical or linting errors by comparing your code against well-defined coding standards. It not only scans your code but also generates logs which you can refer to later and improve your codebase standards.
这个自动化脚本使用 Black、Flake8 和 Bandit 库来扫描你的代码目录,通过将代码与明确定义的编码标准进行比较来检查任何逻辑或代码规范错误。它不仅扫描你的代码,还会生成日志,你可以稍后参考这些日志来改进代码库标准。
15. Port Scanner 🔍 15. 端口扫描器 🔍
Let’s talk some cyber security!!
我们来聊聊网络安全吧!!
In computer networking, a port is a communication endpoint that allows different processes or services to connect and exchange data over a network. Ports are identified by numerical values and are associated with specific protocols.
在计算机网络中,端口是一个允许不同进程或服务通过网络连接并交换数据的通信端点。端口由数值标识,并与特定协议相关联。
Open ports are like windows or doors in a building — each one provides a potential entry point for communication between a website and external networks. However, leaving ports open without proper security measures in place can leave a website vulnerable to cyber attacks.
开放端口就像建筑物中的窗户或门——每个端口都为网站和外部网络之间的通信提供了一个潜在的入口。然而,在没有适当安全措施的情况下开放端口可能会使网站容易受到网络攻击。
This automation script will take a website URL as input and check for any open ports in that website. Whether you’re running the show as part of the Red Team or holding down the fort on the Blue Team, this script can serve as a useful handy tool for you.
这个自动化脚本将网站 URL 作为输入,并检查该网站的任何开放端口。无论你是作为红队成员执行任务,还是作为蓝队成员防守阵地,这个脚本都可以作为一个实用的便捷工具。
Let’s scan itsecgames.com, an extremely buggy web app!
让我们扫描 itsecgames.com,一个极其容易出 bug 的网络应用程序!
16. Readme Generator 16. 说明文档生成器
A README.md file is the first impression of your project — it provides key details and encourages others to dive deeper into what you’ve created. While it’s one of the most important files in your repository, crafting it can often be a time-consuming task.
README.md 文件是你项目的第一印象——它提供了关键细节,并鼓励他人深入了解你所创造的内容。虽然它是你代码仓库中最重要的文件之一,但编写它往往是一项耗时的任务。
This automation script changes that by quickly generating README.md files based on simple inputs like repository names, links, and project descriptions. Save valuable time and focus on what matters most: building your project.
这个自动化脚本通过根据简单的输入(如仓库名称、链接和项目描述)快速生成 README.md 文件来改变这一点。节省宝贵的时间,专注于最重要的事情:构建你的项目。
17. SmartTrading 😎 17. 智能交易 😎
A stock’s price indicates its current value to buyers and sellers. Traders around the world spend most of their time looking at different line, bar, point, figure, and candlestick charts to analyze and make decisions to buy to sell particular stocks. However, people who work 9 to 5 or 12 to 12 (WFH guys) usually don’t have time to keep looking at these dashboards.
股票价格反映了其对买卖双方的当前价值。世界各地的交易者大部分时间都在研究不同的线形图、柱状图、点数图、图形图和蜡烛图,以分析并做出买卖特定股票的决定。然而,朝九晚五或十二点到十二点工作的人(居家办公族)通常没有时间一直盯着这些仪表盘。
Buying premium membership in many trading companies is a way to get notified once stock prices go down below a threshold, but it will cost lots of money. There is a much simpler, easy, and cheaper way (cost 0$) that I will show you using Python. This automation script helps you track stock prices and get notified once the price drops down to a certain threshold percentage.
在许多交易公司购买高级会员是一种在股票价格低于阈值时获得通知的方式,但这会花费大量金钱。我将向你展示一种使用 Python 实现的更简单、更容易且更便宜的方法(花费 0 美元)。这个自动化脚本可以帮助你追踪股票价格,并在价格下跌到某个阈值百分比时获得通知。
18. VoiceNotes 18. 语音笔记
In our fast-paced world, capturing ideas or reminders on the go is essential. Voicenotes are a great way to quickly record thoughts, to-do lists, or creative ideas hands-free. However, managing them can be a hassle, with cluttered storage and missed files.
在我们快节奏的世界里,随时记录想法或提醒至关重要。语音笔记是一种快速记录想法、待办事项或创意的免提方式。然而,管理语音笔记可能会很麻烦,存储杂乱,文件容易丢失。
This automation script simplifies the process by automatically creating, organizing, and saving your Voicenotes, so you never have to worry about losing or searching for them again.
这个自动化脚本通过自动创建、整理和保存语音笔记来简化流程,让您不必再担心丢失或搜索语音笔记。
Bonus Script!! 奖励脚本!!
My Personal Favourite: A MultiTask Reminder App
我的个人最爱:多任务提醒应用
Juggling tasks and deadlines can be overwhelming, especially when things slip through the cracks. Imagine having a personal assistant to remind you of everything at the right time. This Python automation script sends timely reminders for all your tasks, from work deadlines to personal to-dos.
在需要同时应付多项任务和截止日期时,特别是当一些事情被遗漏时,很容易感到不知所措。试想拥有一位能在恰当时机提醒你所有事情的私人助理。这个 Python 自动化脚本可以为你的所有任务发送及时提醒,从工作截止日期到个人待办事项。
You can check out the full code for this automation script here.
您可以在此处查看此自动化脚本的完整代码。
Thanks For Reading Till Here, If You Like My Content and Want To Support Me The Best Way is —
感谢你一路阅读到这里,如果你喜欢我的内容并想支持我的话,最好的方式是 —
- Leave a few Claps👋and your thoughts 💬 below.️
留下几个掌声👋和您的想法💬在下方。 - Follow Me On Medium. 在 Medium 关注我。
- Connect With Me On LinkedIn.
在领英上与我联系。 - Attach yourself to My Email List to never miss reading another article of mine
订阅我的邮件列表,永远不会错过我的任何一篇文章