diff --git a/Clear the Clutter/Busy.ani b/Clear the Clutter/Busy.ani new file mode 100644 index 00000000..0b10ce54 Binary files /dev/null and b/Clear the Clutter/Busy.ani differ diff --git a/Clear the Clutter/ClutterTube.mhtml b/Clear the Clutter/ClutterTube.mhtml new file mode 100644 index 00000000..5ab2f8a4 --- /dev/null +++ b/Clear the Clutter/ClutterTube.mhtml @@ -0,0 +1 @@ +Hello \ No newline at end of file diff --git a/Clear the Clutter/coding.jpg b/Clear the Clutter/coding.jpg new file mode 100644 index 00000000..6a27081a Binary files /dev/null and b/Clear the Clutter/coding.jpg differ diff --git a/Clear the Clutter/console.log b/Clear the Clutter/console.log new file mode 100644 index 00000000..245dc641 --- /dev/null +++ b/Clear the Clutter/console.log @@ -0,0 +1 @@ +This is a file with extension of .log named console.log \ No newline at end of file diff --git a/Clear the Clutter/main.js b/Clear the Clutter/main.js new file mode 100644 index 00000000..592f7865 --- /dev/null +++ b/Clear the Clutter/main.js @@ -0,0 +1 @@ +console.log("Hello world"); \ No newline at end of file diff --git a/Clear the Clutter/main.py b/Clear the Clutter/main.py new file mode 100644 index 00000000..51f48458 --- /dev/null +++ b/Clear the Clutter/main.py @@ -0,0 +1,60 @@ +import os + +# createIfNotExist function which makes folder if not created +def createIfNotExist(folder): + if not os.path.exists(folder): + os.mkdir(folder) + +def extractFileCat(dictCat): + return [file for file in files if os.path.splitext(file)[1].lower() in file_extensions[dictCat]] + +def move(folderName, files): + for file in files: + os.replace(file, f"{folderName}/{file}") + + +if __name__ == "__main__": + + # Listing all the files + files = os.listdir() + files.remove("main.py") + + # Creating folder if not exists + createIfNotExist("Images") + createIfNotExist("Text Files") + createIfNotExist("Documents") + createIfNotExist("Media") + createIfNotExist("Code Files") + createIfNotExist("Others") + + # All Extensions + file_extensions = { + "ImageExtensions" : [".jpg", ".png", ".jpeg", ".gif", ".webp"], + "TextExtensions" : [".txt", ".log"], + "DocsExtensions" : [".docs", ".doc", ".docx", ".pptx", ".xlsx", ".csv"], + "MediaExtensions" : [".mp4", ".mp3", ".vlf"], + "CodeExtensions" : [".c", ".cpp", ".js", ".html", ".css", ".java"] + } + + # Extracting Files for particular category + images = extractFileCat("ImageExtensions") + textf = extractFileCat("TextExtensions") + docs = extractFileCat("DocsExtensions") + medias = extractFileCat("MediaExtensions") + codes = extractFileCat("CodeExtensions") + + #Other Files Logic + others = [] + f2 = images + textf + docs + medias + codes + for file in files: + if file not in f2 and os.path.isfile(file): + others.append(file) + +# Adding all the files on its respective folder +move("Images", images) +move("Text Files", textf) +move("Documents", docs) +move("Media", medias) +move("Code Files", codes) +move("Others", others) + diff --git a/Clear the Clutter/ppt.pptx b/Clear the Clutter/ppt.pptx new file mode 100644 index 00000000..fc2286b4 Binary files /dev/null and b/Clear the Clutter/ppt.pptx differ diff --git a/Clear the Clutter/style.css b/Clear the Clutter/style.css new file mode 100644 index 00000000..8663ceb2 --- /dev/null +++ b/Clear the Clutter/style.css @@ -0,0 +1,3 @@ +body{ + background: #000; +} \ No newline at end of file diff --git a/Clear the Clutter/testing.txt b/Clear the Clutter/testing.txt new file mode 100644 index 00000000..02103c6d --- /dev/null +++ b/Clear the Clutter/testing.txt @@ -0,0 +1 @@ +This is a text file \ No newline at end of file diff --git a/Clear the Clutter/testing2.txt b/Clear the Clutter/testing2.txt new file mode 100644 index 00000000..4581336f --- /dev/null +++ b/Clear the Clutter/testing2.txt @@ -0,0 +1 @@ +This is testing 2 clutter \ No newline at end of file diff --git a/Clear the Clutter/text-cursor.cur b/Clear the Clutter/text-cursor.cur new file mode 100644 index 00000000..62aeda48 Binary files /dev/null and b/Clear the Clutter/text-cursor.cur differ diff --git a/Clear the Clutter/website.html b/Clear the Clutter/website.html new file mode 100644 index 00000000..a8b1fa47 --- /dev/null +++ b/Clear the Clutter/website.html @@ -0,0 +1,12 @@ + + + + + + + This is a Clutter + + + This is a clutter html Website + + \ No newline at end of file