add python

This commit is contained in:
tuz 2025-11-23 15:41:35 -05:00
commit ea05d7ccfe
10 changed files with 1472 additions and 0 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto

View File

@ -0,0 +1,35 @@
import os
import shutil
print("!Warning this script delete all empty folders in the directory it was executed in [v0.9")
print("1 Start")
print("0 Close")
x = input("")
if x == "1":
index_list = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "ñ", "o", "p", "q", "r", "s",
"t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
"N", "Ñ", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", ]
while True:
for x in index_list:
if os.path.exists(f"{x}"):
pass
else:
os.mkdir(f"{x}")
print(f"{x}")
break
while True:
for x in index_list:
home_letter = x
container = [_ for _ in os.listdir() if _.startswith(home_letter)]
for i in container:
shutil.move(i, x)
break
for item in os.listdir(os.getcwd()):
if os.path.isdir(item):
if not os.listdir(item):
os.removedirs(os.path.join(os.getcwd(), item))
else:
pass

View File

@ -0,0 +1,115 @@
import os
import shutil
print("!Warning this script delete all empty folders in the directory it was executed in [v0.9")
print("1 Start")
print("0 Close")
x = input("")
if x == "1":
index_list = {"documents", "photos", "videos", "music", "compressed", "software", "programming", "others"}
documents = [".afpub", ".pdf", ".doc", ".docx", ".txt", ".odt", ".odp", ".odg", ".ods", ".xlsx", ".ppt", ".pptx"]
photos = [".jpg", ".png", ".gif", ".webp", ".pdf", ".afdesign", ".afphoto", ".sai2", ".sai", ".bmp", ".tiff"]
videos = [".mp4", ".mkv", ".avi", ".mov", ".flv", ".divx", ".webm", ".swf"]
music = [".mp3", ".aac", ".wav", ".aiff", ".wma", ".opus", ".ogg"]
compressed = [".rar", ".7z", ".zip", ".msi", ".bz2", ".gz", ".tar", ".wim", ".xz"]
software = [".deb", ".exe"]
programming = [".go", ".py", ".html", ".css", ".php", ".js", ".rs", ".md", ".json", ".gitattributes"]
others = [".tmp", ".dat", ".dmg"]
while True:
for x in index_list:
if os.path.exists(f"{x}"):
pass
else:
os.mkdir(f"{x}")
break
while True:
for x in documents:
extension_name = x
container = [_ for _ in os.listdir() if _.endswith(extension_name)]
for i in container:
shutil.move(i, "documents")
break
while True:
for x in photos:
extension_name = x
container = [_ for _ in os.listdir() if _.endswith(extension_name)]
for i in container:
shutil.move(i, "photos")
break
while True:
for x in videos:
extension_name = x
container = [_ for _ in os.listdir() if _.endswith(extension_name)]
for i in container:
shutil.move(i, "videos")
break
while True:
for x in music:
extension_name = x
container = [_ for _ in os.listdir() if _.endswith(extension_name)]
for i in container:
shutil.move(i, "music")
break
while True:
for x in compressed:
extension_name = x
container = [_ for _ in os.listdir() if _.endswith(extension_name)]
for i in container:
shutil.move(i, "compressed")
break
while True:
for x in software:
extension_name = x
container = [_ for _ in os.listdir() if _.endswith(extension_name)]
for i in container:
shutil.move(i, "software")
break
while True:
for x in programming:
extension_name = x
container = [_ for _ in os.listdir() if _.endswith(extension_name)]
for i in container:
shutil.move(i, "programming")
break
while True:
for x in others:
extension_name = x
container = [_ for _ in os.listdir() if _.endswith(extension_name)]
for i in container:
shutil.move(i, "others")
break
while True:
for item in os.listdir(os.getcwd()):
if os.path.isdir(item):
if not os.listdir(item):
os.removedirs(os.path.join(os.getcwd(), item))
break
for item in os.listdir(os.getcwd()):
if os.path.isdir(item):
if not os.listdir(item):
os.removedirs(os.path.join(os.getcwd(), item))
else:
pass

View File

@ -0,0 +1,24 @@
# A-Z_Archives_OrderScriptPython
This is a test of python file manager
### ⚠Warning this script delete all empty folders in the directory it was executed in [v0.9]⚠️
#### Category | Python script
Sorts files by the extencion and put it in a category in the directory [Example: document]
[CategoryPythonScript.py]
#### A-Z | Python script
Sorts files by the first letter of the and move them to a folder with their first letter in the directory [A-Z]
[A-ZPythonFoldersScript.py]
#### RemoveEmptyFolders | Python script
RemoveEmptyFolders in the directory
[RemoveEmptyFolders.py]

View File

@ -0,0 +1,17 @@
import os
print("!Warning this script delete all empty folders in the directory it was executed in [v0.9")
print("1 Start")
print("0 Close")
x = input("")
if x == "1":
while True:
for item in os.listdir(os.getcwd()):
if os.path.isdir(item):
if not os.listdir(item):
os.removedirs(os.path.join(os.getcwd(), item))
break
else:
pass

BIN
calculadora/Aplicacion.exe Normal file

Binary file not shown.

1262
calculadora/App.py Normal file

File diff suppressed because it is too large Load Diff

18
calculadora/Readme.md Normal file
View File

@ -0,0 +1,18 @@
# Calculadora py
![calculadora](./app.png)
## Exe
```sh
pip install pyinstaller
pyinstaller --onefile -w App.py -i calculadora.ico
```
## Ref
[PYINSTALLER: CREANDO EJECUTABLES EN PYTHON | TUTORIAL](https://www.youtube.com/watch?v=4zPS8oQma4k)

BIN
calculadora/app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

BIN
calculadora/calculadora.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB