Skip to content

cyrus07424/fileUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FILEUTILS

Empowering file management with precision and ease.

license last-commit repo-top-language repo-language-count


Table of Contents


Overview

**fileUtils Project Overview:

**Solving the Chaos of File Management

Key Features: Simplify file operations, extract metadata, bulk rename, organize MP3 files, and automate dependency updates and Java builds.

Benefits: Enhance file processing efficiency, streamline organization, and automate routine tasks for developers and project maintainers.

Target Audience: Developers seeking streamlined file handling and automation in Java projects.


Features

Feature Summary
⚙️ Architecture
  • Centralizes environment configurations in Configurations.java for consistent settings across modules.
  • Enables metadata extraction from image files using MetadataExtractorHelper.java and TikaHelper.java.
  • Facilitates bulk renaming and GPS coordinate extraction in AdvancedBulkRename.java and ExtractGpsCoordinates.java.
🔩 Code Quality
  • Well-structured code files with clear functionalities and responsibilities.
  • Utilizes utility functions for specific tasks, enhancing code readability and maintainability.
  • Follows Java coding conventions and best practices.
📄 Documentation
  • Comprehensive documentation in Java files for understanding key functionalities.
  • Automated dependency updates and Maven build workflows documented in .github files.
  • Clear explanations of file processing capabilities and directory organization.
🔌 Integrations
  • Automated dependency updates using dependabot.yml for Maven and GitHub Actions.
  • CI/CD workflows automated with Maven using GitHub Actions in maven.yml.
  • Integration of Apache Tika library for file content extraction.
🧩 Modularity
  • Modular design with separate files for specific functionalities like metadata extraction, bulk renaming, and GPS coordinate extraction.
  • Encapsulates related functionalities within individual classes for better organization.
  • Promotes reusability and extensibility of code components.
🧪 Testing
  • Testing details not explicitly mentioned in the provided context.
  • Recommendation: Implement unit tests for critical functionalities to ensure code reliability and robustness.
  • Consider incorporating testing frameworks like JUnit for automated testing.
⚡️ Performance
  • Efficient file processing capabilities for metadata extraction, bulk renaming, and GPS coordinate extraction.
  • Optimized code for handling large volumes of files within specified directories.
  • Performance enhancements through streamlined directory organization and metadata extraction processes.
🛡️ Security
  • Security details not explicitly mentioned in the provided context.
  • Recommendation: Implement secure coding practices to prevent vulnerabilities like directory traversal attacks.
  • Ensure input validation and sanitization to mitigate potential security risks.
📦 Dependencies
  • Dependencies managed through dependabot.yml for automated updates.
  • Utilizes Java and Maven for project development and build processes.
  • Relies on Apache Tika library for content extraction functionalities.

Project Structure

└── fileUtils/
    ├── .github
    │   ├── dependabot.yml
    │   └── workflows
    ├── LICENSE
    ├── README.md
    ├── pom.xml
    └── src
        └── main

Project Index

FILEUTILS/
__root__
src
main
java
constants
Configurations.java - Defines environment configurations for the project, ensuring consistent settings across modules
- This interface centralizes key parameters for easy access and modification, promoting maintainability and scalability in the codebase architecture.
utils
MetadataExtractorHelper.java - Enables extraction of metadata from image files, including retrieving all EXIF tags, orientation, timezone, capture date, and GPS information
- The code provides methods to access and process various metadata details for a given file, contributing to comprehensive data extraction capabilities within the project's architecture.
TikaHelper.java - Provides utility functions to extract content type, metadata, and file extension based on file input using Apache Tika library
- The `getContentType` method detects the content type of a file, while `getMetadata` retrieves metadata
- `getExtention` maps content types to file extensions
- These functions enhance file processing capabilities within the project architecture.
mains
AdvancedBulkRename.java - The code file `AdvancedBulkRename.java` facilitates bulk renaming of files within a specified directory
- It iterates through files, extracts metadata, and generates new filenames based on timestamps or parent directory names
- The script offers options for recursive processing and customization of the renaming process.
ExtractGpsCoordinates.java - ExtractGpsCoordinates.java processes directories and files to extract GPS coordinates from images' EXIF data
- It recursively navigates directories, reads EXIF tags, and retrieves latitude and longitude information
- This functionality aids in geolocating images within the project's architecture.
Mp3FileGroupingDirectory.java - Reorganizes MP3 files based on album names, creating directories for each album and moving files accordingly
- Parses audio file tags to extract album information for directory structuring
- Handles various exceptions during the process.
RemoveDirectorySuffix.java - The code file `RemoveDirectorySuffix.java` integrates directories by removing specified suffixes from their names
- It processes subdirectories within a target directory, moving files to new directories with modified names
- This functionality streamlines directory organization by eliminating specific suffix patterns.
.github
dependabot.yml - Automates daily dependency updates for Maven and GitHub Actions, ensuring project dependencies are regularly checked and updated within set limits
- Scheduled to run daily at midnight in the Asia/Tokyo timezone, limiting open pull requests to 10 for each ecosystem.
workflows
maven.yml - Automate Java project builds with Maven using GitHub Actions
- Ensure JDK 8 setup, build with Maven, and add labels based on pull request events
- Optimize CI/CD workflows for efficient project development and collaboration.

Getting Started

Prerequisites

Before getting started with fileUtils, ensure your runtime environment meets the following requirements:

  • Programming Language: Java

Installation

Install fileUtils using one of the following methods:

Build from source:

  1. Clone the fileUtils repository:
❯ git clone https://github.com/cyrus07424/fileUtils
  1. Navigate to the project directory:
cd fileUtils
  1. Install the project dependencies:

echo 'INSERT-INSTALL-COMMAND-HERE'

Usage

Run fileUtils using the following command: echo 'INSERT-RUN-COMMAND-HERE'

Testing

Run the test suite using the following command: echo 'INSERT-TEST-COMMAND-HERE'


Project Roadmap

  • Task 1: Implement feature one.
  • Task 2: Implement feature two.
  • Task 3: Implement feature three.

Contributing

Contributing Guidelines
  1. Fork the Repository: Start by forking the project repository to your github account.
  2. Clone Locally: Clone the forked repository to your local machine using a git client.
    git clone https://github.com/cyrus07424/fileUtils
  3. Create a New Branch: Always work on a new branch, giving it a descriptive name.
    git checkout -b new-feature-x
  4. Make Your Changes: Develop and test your changes locally.
  5. Commit Your Changes: Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push to github: Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.
  8. Review: Once your PR is reviewed and approved, it will be merged into the main branch. Congratulations on your contribution!
Contributor Graph


License

This project is protected under the MIT License License. For more details, refer to the LICENSE file.


Acknowledgments

  • List any resources, contributors, inspiration, etc. here.

Releases

No releases published

Packages

No packages published

Languages