Created
June 16, 2020 04:53
-
-
Save OKsign/9c04db86de25ee00b4d4ba9579e48c81 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# user input | |
days = ['Mon','Tue','Wed','Thu'] | |
# Monday = 'Mon' | Tuesday = 'Tue' | Wednesday = 'Wed' | Thursday = 'Thu' | Friday = 'Fri' | Saturday = 'Sat' | Sunday = 'Sun' | |
apps = ['gnome-calendar','audacity'] | |
files_folders = ['/home/john/Desktop/abc','/usr/share/applications'] | |
# end of user input | |
from datetime import datetime | |
import time | |
import os | |
date_en_today = datetime.today().strftime('%A') | |
first_3_chars = date_en_today[0:3] | |
list_done = [] | |
for d in days: | |
if d != '': | |
if d == first_3_chars: | |
for a in apps: | |
if a != '': | |
os.system("%s &" % a) | |
list_done.append(1) | |
for f in files_folders: | |
if f != '': | |
os.system("xdg-open %s" % f) | |
list_done.append(1) | |
if len(list_done) >= 1: | |
ff = len(files_folders) | |
aa = len(apps) | |
ff_aa_and4 = 4 + ff + aa | |
time.sleep(ff_aa_and4) | |
os.system("notify-send 'Linux Mint - Python Script 3' 'Done!'") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment