Created
February 23, 2018 13:51
-
-
Save elanozturk/bc6486dad6de03d2b5e1af0efbacd0e4 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
import os | |
import time | |
print('removing old url.xlsx file') | |
time.sleep(1) | |
os.system("rm /root/Desktop/Docs/linux/url.xlsx >/dev/null 2>&1") | |
print('downloading new url.txt file from github') | |
os.system("cd /root/Desktop/Docs/linux/ && wget https://raw.githubusercontent.com/elanozturk/personal-backup/master/elan.txt >/dev/null 2>&1") | |
time.sleep(1) | |
os.system("sed 's/ \+/,/g' /root/Desktop/Docs/linux/elan.txt > /root/Desktop/Docs/linux/url.csv") | |
print('current song url :') | |
os.system("cat /root/Desktop/Docs/linux/url.csv | lolcat") | |
time.sleep(2) | |
print('converting url.txt file to url.xlsx file') | |
os.system("libreoffice --headless --convert-to xlsx /root/Desktop/Docs/linux/url.csv > /dev/null 2>&1") | |
time.sleep(2) | |
os.system("rm /root/Desktop/Docs/linux/elan.txt /root/Desktop/Docs/linux/url.csv >/dev/null 2>&1") | |
os.system("echo 'url.xls file is ready' | lolcat") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment