Skip to content

Commit f043f79

Browse files
sorted this project into folders
1 parent 5f67cc6 commit f043f79

File tree

10 files changed

+64
-45
lines changed

10 files changed

+64
-45
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
.vscode/
33
build_windows/
44
__pycache__/
5-
/.idea/
5+
/.idea/
6+
Auto Download Sorter.aip
7+
Auto Download Sorter.zip

README.md

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,38 @@
11
## Auto Download Sorter - Simplify Your Download Organization
22

3-
Auto Download Sorter is a practical and efficient download management tool designed to simplify the process of organizing your files. If you find yourself frustrated with a cluttered download folder, struggling to locate specific files, this application is the perfect solution.
3+
Auto Download Sorter is a practical and efficient download management tool designed to simplify the process of
4+
organizing your files. If you find yourself frustrated with a cluttered download folder, struggling to locate specific
5+
files, this application is the perfect solution.
46

5-
![Auto Download Sorter Demo](link-to-demo-gif)
7+
![Auto Download Sorter Demo](icon.jpg)
68

79
### Key Features:
810

9-
1. **Automatic Sorting:** Auto Download Sorter takes the manual work out of organizing your downloads. It automatically recognizes various file types and sorts them into appropriate folders, making it easy to locate files based on their categories.
10-
2. **Customizable Rules:** Tailor the sorting process to fit your preferences. Customize rules and filters to ensure files are sorted exactly the way you want them.
11+
1. **Automatic Sorting:** Auto Download Sorter takes the manual work out of organizing your downloads. It automatically
12+
recognizes various file types and sorts them into appropriate folders, making it easy to locate files based on their
13+
categories.
14+
2. **Customizable Rules:** Tailor the sorting process to fit your preferences. Customize rules and filters to ensure
15+
files are sorted exactly the way you want them.
1116

12-
3. **Intuitive Folder Structure:** Say goodbye to the chaotic mess of files. Auto Download Sorter creates a clean and intuitive folder structure, allowing you to find what you need quickly and effortlessly.
17+
3. **Intuitive Folder Structure:** Say goodbye to the chaotic mess of files. Auto Download Sorter creates a clean and
18+
intuitive folder structure, allowing you to find what you need quickly and effortlessly.
1319

14-
4. **Real-Time Organization:** No need to worry about sorting files yourself. Auto Download Sorter organizes files as soon as they are downloaded, providing you with an organized folder in real time.
20+
4. **Real-Time Organization:** No need to worry about sorting files yourself. Auto Download Sorter organizes files as
21+
soon as they are downloaded, providing you with an organized folder in real time.
1522

16-
5. **User-Friendly Interface:** With its user-friendly interface, Auto Download Sorter is easy to use for everyone. Simplify your file management with just a few clicks.
17-
18-
6. **Backup and Undo:** Your files are safe with Auto Download Sorter. The application provides backup options and an "Undo" feature to revert any accidental sorting changes.
23+
~~5. **User-Friendly Interface:** With its user-friendly interface, Auto Download Sorter is easy to use for everyone.
24+
Simplify your file management with just a few clicks.~~
25+
**Currently, the only way to change the sort location is by going to the `%appdata%/Auto-Download-Sorter/config.json`**
1926

2027
### Installation:
2128

29+
#### For Users
30+
31+
Click on the link below and download the latest version <br>
32+
[Latest Release](https://github.com/CodeCraftPlugin/Auto-Cleanup-File/releases)
33+
34+
#### For Contributing
35+
2236
1. Clone the repository: `git clone https://github.com/CodeCraftPlugin/Auto-Cleanup-File.git`
2337
2. Install the required dependencies: `pip install -r requirement.txt`
2438
3. Run Auto Download Sorter: `python auto_download_cleaner.py`
@@ -31,7 +45,8 @@ Auto Download Sorter is a practical and efficient download management tool desig
3145

3246
### Contributing:
3347

34-
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
48+
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a
49+
pull request.
3550

3651
### License:
3752

@@ -41,4 +56,5 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE.md) f
4156

4257
We would like to thank all the contributors who made this project possible.
4358

44-
Take control of your download folder and eliminate the hassle of manual organization. Experience a more organized and efficient file management process with Auto Download Sorter. Simplify your life with Auto Download Sorter today.
59+
Take control of your download folder and eliminate the hassle of manual organization. Experience a more organized and
60+
efficient file management process with Auto Download Sorter. Simplify your life with Auto Download Sorter today.

auto_download_sorter.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import os
22
import shutil
3-
import variable as var
4-
import tray_icon as ti
5-
import save as sv
3+
from library import variable as var, save as sv, tray as tray
64
import time as time
75
import json
86

@@ -26,7 +24,8 @@ def move_file(main_directory, move_folder, filename):
2624
if not os.path.exists(move_folder):
2725
os.makedirs(move_folder)
2826

29-
shutil.move(os.path.join(main_directory, filename), os.path.join(move_folder, filename))
27+
# noinspection PyTypeChecker
28+
shutil.move(os.path.join(main_directory, filename),os.path.join(move_folder, filename))
3029

3130

3231
def check_file_extension(file_ext, mov_dir, filename):
@@ -42,7 +41,6 @@ def main_stuff():
4241
print(sv.get_default_download_folder())
4342
print('Program started.')
4443
while var.run:
45-
print("running")
4644
try:
4745
folder_content = os.listdir(sv.get_default_download_folder())
4846
except PermissionError:
@@ -60,5 +58,5 @@ def main_stuff():
6058

6159

6260
if __name__ == "__main__":
63-
ti.start()
61+
tray.start('icon.ico')
6462
main_stuff()

icon.jpg

39.2 KB
Loading

library/__init__.py

Whitespace-only changes.

save.py renamed to library/save.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import os
22
import json
33
import getpass
4-
import variable
4+
5+
from library import variable
56

67

78
def get_default_download_folder():
@@ -52,10 +53,10 @@ def create_default_directories():
5253

5354
def save_variables_to_json(vars_dict):
5455
appdata = os.getenv("APPDATA")
55-
appdir_config = os.path.join(appdata, "Auto-Download-Cleaner")
56-
if not os.path.exists(appdir_config):
57-
os.makedirs(appdir_config)
58-
filename = os.path.join(appdir_config, "config.json")
56+
app_config = os.path.join(appdata, "Auto-Download-Sorter")
57+
if not os.path.exists(app_config):
58+
os.makedirs(app_config)
59+
filename = os.path.join(app_config, "config.json")
5960
with open(filename, "w") as json_file:
6061
json.dump(vars_dict, json_file, indent=4)
6162

@@ -66,5 +67,5 @@ def main():
6667
default_directories = create_default_directories()
6768

6869
# Save the variables to a JSON file
69-
if (os.path.exists("config.json")) == False:
70+
if not (os.path.exists("config.json")):
7071
save_variables_to_json(default_directories)

library/tray.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import pystray
2+
import PIL.Image
3+
from library import variable as vars
4+
5+
# image = PIL.Image.open('icon.ico')
6+
7+
8+
def on_click(main_icon, item):
9+
if str(item) == 'Quit':
10+
print('Closing the app.')
11+
main_icon.stop()
12+
vars.run = False
13+
14+
15+
# icon = pystray.Icon("name", image, "Auto Download Cleanup", menu=pystray.Menu(pystray.MenuItem("Quit", on_click)))
16+
17+
18+
def start(icon_path):
19+
image = PIL.Image.open(icon_path)
20+
icon = pystray.Icon("name", image, "Auto Download Cleanup", menu=pystray.Menu(pystray.MenuItem("Quit", on_click)))
21+
icon.run_detached()
File renamed without changes.

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
# Dependencies are automatically detected, but it might need
55
# fine tuning.
6-
build_options = {'packages': ['os', 'getpass'], 'excludes': [], 'build_exe': 'build_windows',
7-
'include_files': ['icon.ico']}
6+
build_options = {'packages': ['os', 'getpass', 'library'], 'excludes': [], 'build_exe': 'build_windows',
7+
'include_files': ['icon.ico', 'README.md', 'Licence.md', 'icon.jpg']}
88

99
base = 'Win32GUI' if sys.platform == 'win32' else None
1010

tray_icon.py

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)