Skip to content

Zohaib-Amir/rename-image-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rename Image Files

This project is designed to rename image files based on specific criteria. It supports various image formats and integrates with the OpenAI API.

Table of Contents

Installation

To install the necessary dependencies, run:

pnpm install

Usage

To start the project, use the following command:

pnpm start

This will compile the TypeScript files and run the main script.

Configuration

Ensure you have a .env file in the root directory with the necessary environment variables. The project uses the following environment

variables

  • OPENAI_API_KEY: Your OpenAI API key.

Supported Image Formats

These formats are defined in the SUPPORTED_IMAGE_FORMATS constant.

Directory Structure

  • image-files/: Directory containing the image files to be renamed.
  • src/: Source code directory.
    • OpenAIHandler.ts: Handles interactions with the OpenAI API.
    • ImageDirectory.ts: Contains the ImageDirectory class for managing image files and all fine handling operations
    • ImageFileRenamer.ts: Main class that utilizes rest of the classes to rename the files.
    • index.ts: Main entry point of the application.

About

A test project for OpenAI Vision api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published