{"id":13815244,"url":"https://github.com/ab-anand/Filezen","last_synced_at":"2025-05-15T07:32:17.565Z","repository":{"id":57429486,"uuid":"292086377","full_name":"ab-anand/Filezen","owner":"ab-anand","description":"A cross-platform file organizer that reads your file storing pattern 🗂","archived":false,"fork":false,"pushed_at":"2020-10-26T16:26:32.000Z","size":140,"stargazers_count":68,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-19T10:49:07.267Z","etag":null,"topics":["automation","filesystem","heap","os","python","python3","utility"],"latest_commit_sha":null,"homepage":"https://filezen.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ab-anand.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-01T19:15:22.000Z","updated_at":"2024-11-16T22:26:28.000Z","dependencies_parsed_at":"2022-08-27T16:50:41.898Z","dependency_job_id":null,"html_url":"https://github.com/ab-anand/Filezen","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ab-anand%2FFilezen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ab-anand%2FFilezen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ab-anand%2FFilezen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ab-anand%2FFilezen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ab-anand","download_url":"https://codeload.github.com/ab-anand/Filezen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254296003,"owners_count":22047184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","filesystem","heap","os","python","python3","utility"],"created_at":"2024-08-04T04:03:11.966Z","updated_at":"2025-05-15T07:32:12.552Z","avatar_url":"https://github.com/ab-anand.png","language":"Python","funding_links":["https://www.buymeacoffee.com/abhiinav"],"categories":["Python"],"sub_categories":[],"readme":".. figure:: https://i.imgur.com/opeYy4q.jpg\n    :figclass: align-center\n    :alt:\n\nFilezen\n=======\n\n|version| |readthedocs.org| |codecov| |build| |pypi| |license| |deepsource| |coffee|\n\n\n*An Intelligent file organizer module which reads your file storing pattern \u0026 move\nthe cluttered files accordingly!*\n\n:Author: Abhinav Anand\n\n.. contents::\n    :backlinks: none\n\n.. sectnum::\n\nWhat is it\n---------------\n`[back to top] \u003chttps://github.com/ab-anand/Filezen#filezen\u003e`__\n\n*Let's accept, no one likes to organize files on a regular basis. Even if you do, you\nwouldn't want to do it everytime you download a new file.*\n\nGuess what! Filezen got you covered.\n\nGiven a folder of your cluttered/unorganized files, using ``Filezen``, you can achieve\nthe following\n\n- If you've never maintained specific directories for your files. Then ``Filezen's Basic Scanner`` can create suitable folders and organize your file into them.\n\n- If you already have a pattern of directories for storing different files. Then ``Filezen's Advanced Scanner`` can read your file storing pattern and move your files accordingly.\n\nFeatures\n--------\n`[back to top] \u003chttps://github.com/ab-anand/Filezen#filezen\u003e`__\n\n- **Advanced Scanning**\n- **Basic Scanning**\n- Minimum dependencies ( just uses ``Pathlib`` if only you're working with Python 2.x )\n- Easy to use\n- Fast!\n- Returns ``JSON`` objects\n- Support\n    - **OS Support**: Linux, Windows, Mac\n    - **Language Support**: Python 2.x, 3.x\n\nInstallation\n------------\n`[back to top] \u003chttps://github.com/ab-anand/Filezen#filezen\u003e`__\n\nOption 1: installing through `pip \u003chttps://pypi.org/project/Filezen/\u003e`__ (Recommended)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n`pypi package link \u003chttps://pypi.org/project/Filezen/\u003e`__\n\n``$ pip install Filezen``\n\nIf you are behind a proxy\n\n``$ pip --proxy [username:password@]domain_name:port install Filezen``\n\n**Note:** If you get ``command not found`` then\n``$ sudo apt-get install python-pip`` should fix that\n\nOption 2: Installing from source (Only if you must)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n.. code:: bash\n\n    $ git clone https://github.com/ab-anand/Filezen.git\n    $ cd Filezen/\n    $ pip install -r requirements.txt\n    $ python setup.py install\n\n**Note:** If you get ``permission denied`` then\n``$ sudo python setup.py install`` should fix that\n\n\nUsage\n-----\n`[back to top] \u003chttps://github.com/ab-anand/Filezen#filezen\u003e`__\n\nSimple Scanner\n~~~~~~~~~~~~~~\n.. figure:: https://i.imgur.com/KEOFHQn.gif\n   :alt:\n\n- ``Simple Scanner`` uses a predefined `mapping \u003chttps://github.com/ab-anand/Filezen/blob/master/filezen/simpleScanner/extensionMapper.py/\u003e`__ of filetypes to folder ``e.g. \".csv\": \"Documents\"``.\n- Based on this mapping it creates directories(only if they don't exist already) and organizes files into them as shown in the above Fig.\n- Using ``Simple Scanner``\n\n.. code:: python\n\n    \u003e\u003e\u003e from filezen import SimpleScanner as scanner\n    \u003e\u003e\u003e input_directory = \"/home/abhinav/Downloads\"\n    \u003e\u003e\u003e output_directory = \"/home/abhinav/Documents\"\n    \u003e\u003e\u003e result = scanner.cleanDirectory(input_directory, outputPath=output_directory)\n    \u003e\u003e\u003e print(result)\n    '{\n        \"Moved\": [\n            \"FileA.pdf\",\n            \"FileB.txt\",\n            \"FileC.mp4\",\n            \"FileD.log\",\n            \"FileB.xyz\"\n        ],\n        \"NotMoved\": [\n        ]\n    }'\n\n- If no **Output Directory** is specified, then ``Simple Scanner`` would treat **Input Directory** as the **Output Directory**  thus creating folders in the **Input Directory** itself.\n\nAdvanced Scanner\n~~~~~~~~~~~~~~~~\n.. figure:: https://i.imgur.com/L2aARhU.gif\n   :alt:\n\n- ``Advanced Scanner`` maintains a ``heap`` for each filetype/file-extension it encounters while scanning the **Output Directory**.\n- This ``heap`` contains all the directory addresses where a particular filetype(``e.g. \"pdf\"``) occurs.\n- The address having the highest number of occurrence of that filetype is at the **top** of the ``heap``\n- With the help of this heap it finally decides the directory where a particular filetype has mostly occurred and thus moving the all such files into that directory.\n- As shown in the above image, ``Advanced Scanner`` scans the ``child`` as well as ``sibling directories`` (at the same level).\n- The level of child directories to scan is decided by ``depth`` parameter as shown in the example below.\n- By default, ``depth = 5``\n- Using ``Advanced Scanner``\n\n.. code:: python\n\n    \u003e\u003e\u003e from filezen import AdvancedScanner as scanner\n    \u003e\u003e\u003e input_directory = \"/home/abhinav/Downloads\"\n    \u003e\u003e\u003e output_directory = \"/home/abhinav/Documents\"\n    \u003e\u003e\u003e depth = 3\n    \u003e\u003e\u003e result = scanner.cleanDirectory(input_directory, outputPath=output_directory, depth=depth)\n    \u003e\u003e\u003e print(result)\n    '{\n        \"Moved\": [\n            \"FileA.pdf\",\n            \"FileB.txt\",\n            \"FileC.mp4\",\n            \"FileD.log\",\n            \"FileE.xyz\"\n        ],\n        \"NotMoved\": [\n        ]\n    }'\n\n- If no **Output Directory** is specified, then ``Advanced Scanner`` would read the folders in the **Input Directory** itself and move accordingly.\n\n**Note:** If a file with the same name is already present in the **Output Directory** then ``Filezen`` would\nignore the file and leave it to the user. In the resulting JSON, you'll get the all such filenames which\nwere not moved in the ``NotMoved`` list.\n\n\nApplications\n~~~~~~~~~~~~\n\n- `KRETA  \u003chttps://github.com/ab-anand/Kreta/\u003e`__ - It is a command line application which uses ``Filezen`` to organize file.\n\n.. figure:: https://i.imgur.com/PPiTMY6.gif\n    :alt:\n\n- `Watch Simple Scanner in action with Kreta \u003chttps://github.com/ab-anand/Filezen/blob/master/SIMPLESCANNER.rst\u003e`__.\n- `Watch Advanced Scanner in action with Kreta \u003chttps://github.com/ab-anand/Filezen/blob/master/ADVANCEDSCANNER.rst\u003e`__.\n\n\nDocumentation\n-------------\n`[back to top] \u003chttps://github.com/ab-anand/Filezen#filezen\u003e`__\n\nFor a detailed usage example, refer the `documentation at Read the Docs \u003chttps://filezen.readthedocs.io/en/latest/\u003e`__\n\n\nContributing\n------------\n`[back to top] \u003chttps://github.com/ab-anand/Filezen#filezen\u003e`__\n\nPlease refer `Contributing page for details \u003chttps://github.com/ab-anand/Filezen/blob/master/CONTRIBUTING.rst\u003e`__\n\n\nBugs\n----\n`[back to top] \u003chttps://github.com/ab-anand/Filezen#filezen\u003e`__\n\nPlease report the bugs at the `issue\ntracker \u003chttps://github.com/ab-anand/Filezen/issues\u003e`__\n\n\n\nLicense\n-------\n`[back to top] \u003chttps://github.com/ab-anand/Filezen#filezen\u003e`__\n\n\nBuilt with ♥ by `Abhinav Anand \u003chttps://github.com/ab-anand/\u003e`__ under the `MIT License \u003chttps://github.com/ab-anand/Filezen/blob/master/LICENSE/\u003e`__ ©\n\nYou can find a copy of the License at `http://abhinav.mit-license.org/ \u003chttp://abhinav.mit-license.org/\u003e`__\n\n\n|producthunt|\n\n.. |readthedocs.org| image:: https://readthedocs.org/projects/filezen/badge/?version=latest\n   :target: https://filezen.readthedocs.io/en/latest/index.html\n.. |license| image:: https://img.shields.io/github/license/ab-anand/FileZen?color=red\n   :target: https://github.com/ab-anand/FileZen/blob/master/LICENSE\n.. |build| image:: https://travis-ci.com/ab-anand/Filezen.svg?branch=master\n   :target: https://github.com/ab-anand/FileZen\n.. |pypi| image:: https://img.shields.io/pypi/pyversions/Filezen\n    :target: https://pypi.org/project/Filezen/\n.. |version| image:: https://img.shields.io/pypi/v/Filezen?color=orange\n    :target: https://pypi.org/project/Filezen/\n.. |codecov| image:: https://codecov.io/gh/ab-anand/Filezen/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/ab-anand/Filezen\n.. |deepsource| image:: https://deepsource.io/gh/ab-anand/Filezen.svg/?label=active+issues\u0026show_trend=true)](https://deepsource.io/gh/ab-anand/Filezen/?ref=repository-badge\n    :target: https://github.com/ab-anand/FileZen\n.. |producthunt| image:: https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=267022\u0026theme=dark\n    :target: https://www.producthunt.com/posts/filezen\n    :scale: 10 %\n.. |coffee| image:: https://i.imgur.com/qeNEiac.png?1\n    :target: https://www.buymeacoffee.com/abhiinav\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fab-anand%2FFilezen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fab-anand%2FFilezen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fab-anand%2FFilezen/lists"}