Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

pepcmarques/deldup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DD DD - Delete Duplicates

What is this project

It allows you to verify if there are duplicated files in your file system. And, delete them if you want.

How to run this project

  1. Clone this project
git clone git@github.com:pepcmarques/deldup.git
  1. Go to the deldup directory
cd deldup
  1. Install a Python virtualenv
python -m venv .venv
  1. Activate the virtual environment
source .venv/bin/activate     # For Linux or Mac

.venv\Scripts\activate        # For Windows
  1. Install dependencies
pip install -r requirements.txt
  1. Run DelDup
python deldup.py

The configuration file

The configuration file looks like the one below:

{
  "port": 8000,
  "home_dir": "/path/to/your/home/directory",
  "database_url": "sqlite:///./deldup.sqlite3",
  "mode": "none",
  "categories": {
    "images": {
      "code": "img",
      "ext": ["bmp", "gif", "jpg", "jpeg", "png", "tiff"]
    },
    "documents": {
      "code": "doc",
      "ext": ["doc", "docx", "odt", "ods", "ppt", "pptx", "pdf", "txt", "xls", "xlsx"]
    }
  }
}
Key Description
home_dir Directory from which you want to recursively check files.
database_url url to connect to DB
mode DelDup mode (explained below)
categories JSON structure that defines which files will be checked for duplicates

Modes

Mode Description
none Remove file visually only
db Remove file entry from DB.
fs Remove file from the file system.
│ all Remove file entry from DB and remove file from the file system

How to use this project

The first time you run the project, it will create the configuration file and it will stops the execution.

The second time and you run the project, it will recursivelly check all the files and save entries in the database. This process takes a while.

After populating the DB, it will allow you to connect to it using your browser.

Open the browser and connect to http://0.0.0.0:8000 (on Mac) or http://127.0.0.1:8000 (on Linux and Windows). You can also use your machine IP address.

Note: The port must be the same as it is set in the configuration file.

Technologies used in this project

Python HTML CSS JavaScript

How this project is organized

In the project root, you will find the main program deldup.py, services.py, and settings.py. There are other 4 (four) directories where you will find the code app (containing the database engine and models), frontend (not much), backend (api), and static (css, images, and JS code).

How this project was implemented

I used Fastapi for the API and pure JavaScript to be able to run it anywhere. The beauty of it is that it allows you to generate one executable file with pyinstaller. So, it is not necessary to install anything, just run the executable.

I will prepare it asap for Mac, Linux, and Windows.

Dependencies

Python

How to contribute with this project

  • Create an issue
  • Wait for this issue to be assigned to you
  • Develop the feature and make a PR

Who contributed with this project

Contact Me

LinkedIn

Do you need help?

LinkedIn

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors