You are browsing as a guest. Sign up (or log in) to start making projects!

Sentinel File Organizer

  • 6 Devlogs
  • 7 Total hours

Sentinel File Organizer is a Python desktop application that watches specified folders in real time, automatically sorts files into categorized folders based on user-defined rules, maintains a persistent undo history, and will eventually display a live GUI dashboard built with PyQt6.

Open comments for this post

1h 50m 15s logged

Sentinel File Organizer Devlog #5

Spent way too long on indentation bugs today. The with open nesting issue in add_to_feed and undo_last killed most of the session. I kept mixing up read and write blocks kept and they kept ending up inside each other.

Eventually got there. Rules engine is wired into the GUI, undo button works, dotfile filtering is in. I downloaded a random worksheet to test out my undo function and it did not work.


One bug left: undo moves the file back to Downloads, then the watcher immediately re-detects it and sorts it again. Fix next session.

After that Im going to make the GUI Japanese theme.

0
0
7
Open comments for this post

1h 32m 25s logged

#Sentinel File Organizer Devlog #4

Today I added the basic layout of my GUI:

I implemented the main window layout using PyQt6. The interface is now divided into two panels:

Left Panel:

Activity Feed label
Activity Feed list widget
Displays files detected by the watcher in real time

Right Panel

Status label
Status list widget
Undo button (Currently Does Not Work, Still did not Wire everything)


I used QVBoxLayout, QLabel, QPushButton, Q Widget and QListWidget

0
0
5
Open comments for this post

36m 25s logged

#Sentinel File Organizer Devlog #4

Today I added more rules(after I realized it only sorts .pdf) , before it was only sorting pdf files before and now it is sorting much more.

Now it is sorting:

-Documents: .pdf, .docx, .doc, .txt
-Images: .png, .jpg, .jpeg, .gif, .tiff, .svg
-Archives: .zip, .tar, .gz, .deb, .rar
-Videos: .mp4, .avi, .mov, .wmv, .flv
-Audios: .mp3, .wav, .flac, .aac


There was 2 bugs I had today:

file_type in the config was a single string so in wouldn’t work properly, and .lower was missing its parentheses so it was never actually being called.


I was planing to work on the GUI today but I did not, I will do that tomorrow.

0
0
1
Open comments for this post

54m 54s logged

Phase 1 of Sentinel is done. The entire backend logic is built and working. (Right Now it only sorts .pdf, sorting other types of files is part of phase 2)


Built a file scanner using pathlib. Path that reads a folder and prints each file’s name, extension, and size. Then extended it to move files based on their extension using shutil.move().


Added a JSON config system that loads and saves rules persistently between sessions. Each rule stores a name, file type, and destination folder.
Integrated watchdog to watch a folder in real time. When a new file appears, the rules engine checks its extension, finds a matching rule, creates the destination folder if needed, and moves the file automatically.


Finally built an undo system. Every automated move gets logged to config.json with the source and destination. Calling undo_last() reverses the most recent move and removes it from history.


Phase 2 starts now, replacing the terminal output with a PyQt6 desktop GUI and adding more rules to sort more types of files.

0
0
1
Open comments for this post

1h 56m 37s logged

I had a bug for the past few days that did not let me log hours. Here’s what I did:


part 1 - I created code that scans folders using pathlib.path and printed each files name that got moved.

Part 2 - Takes a hardcoded source file and destination folder, creates the destination if it doesn’t exist using .mkdir(parents = True, exist_ok = True), and moves the file using shutil.move()

Part 3 - Loads rules from config.json using json.load() prints them and has an add_rule() function that function that appends a new rule dict and saves the updated list back using json.dump()

Part 4- A live file watcher using watchdog. Creates a Sentinel Handler class that inherits from FileSystemEventHandler and overrides on_created to print the path of any new file. Uses an Observer to watch the Downloads folder in the background. Keeps the program alive using an while True loop and stops the program using KeyboardInterrupt

Part 5 - Extends Part 4 with a rules engine. When a file is created on_created loads rules from config.json, checks if file’s extensions matches any rules file_type, creates the destination folder if needed and moves the file automatically using shutil.move()

Part 6 - Still in progress. Extends Part 5 with an undo history.

0
0
1

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…