매번 같은 일을 반복하면서
“이거 좀 더 쉽게 할 방법 없을까?”
라는 생각, 해본 적 있으시죠?
저도 똑같이 고민하다가, 일상 업무를 몇 분 만에 자동화해주는 파이썬 스크립트들을 발견했습니다.
이 글에서는 제가 직접 사용해본 효율적인 자동화 스크립트 10개를 소개합니다.
개발자든 아니든, 이 스크립트들은 여러분의 시간을 아껴줄 겁니다!
1. SleepNoMore — 컴퓨터 절전 모드 자동 방지
잠깐 자리를 비운 사이 컴퓨터가 슬립 모드로 들어가고,
중요한 회의 중 화면이 꺼져버리는 상황, 겪어본 적 있죠?
이 스크립트는 마우스 커서를 자동으로 움직여서 컴퓨터가 사용 중인 것처럼 인식하도록 만들어줍니다.
화면 잠금이나 자동 로그아웃 방지에 딱!
1 2 3 4 5 6 7 8 9 10 11 12 13
from pyautogui import moveTo from datetime import datetime from time import sleep from random import randint
defmain(): whileTrue: x = randint(1, 1000) y = randint(1, 1000) moveTo(x, y) sleep(1)
main()
2. Headliner — 데스크탑으로 뉴스 알림 받기
바쁜 하루 중에도 중요한 뉴스를 놓치고 싶지 않다면?
이 스크립트는 NewsAPI를 통해 실시간 뉴스 헤드라인을 받아와
데스크탑 알림으로 바로 띄워줍니다.
중간중간 확인하며 정보 흐름을 유지하고 싶은 분께 추천!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
from plyer import notification import requests import json
country_code = input("뉴스 국가 코드 입력: ") api_key = input("뉴스 API 키 입력: ") news = requests.get( f'https://newsapi.org/v2/top-headlines?country={country_code}&apiKey={api_key}') data = json.loads(news.content)
for article in data['articles']: notification.notify( title=article['title'][:20], message=article['description'][:44], timeout=5, toast=False)
“타이핑 하기 귀찮은데…” 할 때 정말 유용한 스크립트입니다. 내 목소리를 마이크로 입력 받아 텍스트로 출력해주는 간단한 음성 인식 도구예요.
회의록 작성, 아이디어 정리, 메모 등에 활용 가능합니다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
import speech_recognition as sr
defconvert_audio_to_text(): r = sr.Recognizer() with sr.Microphone() as source: print("말씀해주세요...") audio = r.listen(source) try: text = r.recognize_google(audio) return text except sr.UnknownValueError: print("음성을 인식할 수 없습니다.") except sr.RequestError as e: print(f"에러: {e}")
audio_text = convert_audio_to_text() if audio_text: print("입력된 음성:", audio_text)
SpeechRecognition 라이브러리와 마이크가 필요합니다.
🖼️ 4. ToonifyMe — 사진을 만화 스타일로 변환
사진을 만화처럼 바꿔주는 필터를 직접 구현해보세요!
이 스크립트는 OpenCV와 k-means 알고리즘을 활용해 이미지를 간단한 카툰 스타일로 변환합니다.
간단한 리프레시 용도로도 좋고, 프로필 이미지로도 활용 가능해요.
# 엑셀에서 정보 추출 for k in range(1, sheet.nrows): student = sheet.cell_value(k, 0) email = sheet.cell_value(k, 1) passed = sheet.cell_value(k, 3) interviewer = sheet.cell_value(k, 4)
if passed == 'Yes': mail_list.append(email) interviewerlist.append(interviewer) name.append(student)
# 발신자 정보 입력 email = 'example@gmail.com'# 보내는 이메일 password = '*****'# 앱 비밀번호 또는 이메일 비밀번호
# SMTP 서버 설정 server = smtplib.SMTP('smtp.gmail.com', 587) server.starttls() server.login(email, password)
# 메일 전송 for i in range(len(mail_list)): receiver = mail_list[i] student_name = name_list[i] interviewer = interviewer_list[i]
subject = f'Congratulations {student_name}!! You are selected for further interviews.' message = f'''Dear {student_name}, We are pleased to inform you that you will be interviewed by {interviewer}. Please wait for further instructions via email from your interviewer. Best Regards '''