Directory Revamp

Before making changes to the update-channels-from-git.sh file, I wanted to have everything stored in such a way that it made logical sense where it went.

Anything that goes to the root folder is in "main-dir", channel specific files are in "channel-dir", and the files for both sections are in "both-dir".  These directories will eventually be referenced in the new version of "update-channels-from-git.sh".
This commit is contained in:
mutto233
2018-06-29 16:27:29 -04:00
parent 6a604960f0
commit ea70ed38ce
32 changed files with 161 additions and 798 deletions

View File

@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
"""
Created on Tue Jun 26 23:31:00 2018
@author: Matt
"""
import re
import sys
def atoi(text):
return int(text) if text.isdigit() else text
def natural_keys(text):
'''
alist.sort(key=natural_keys) sorts in human order
http://nedbatchelder.com/blog/200712/human_sorting.html
(See Toothy's implementation in the comments)
'''
return [ atoi(c) for c in re.split('(\d+)', text) ]
temp_hold = list(sys.argv[1:])
temp_hold.sort(key=natural_keys)
file = open('Channels_Sorted.txt','w')
for item in temp_hold:
file.write(item + '\n')
file.close()