Skip to content

A filename generator based on formatted CSV data for images.

Notifications You must be signed in to change notification settings

kylebowen/heartland-photos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heartland - Photo List Converter

This project contains a simple class to aid in parsing CSV formatted data from a string to generate new filenames for the referenced image files.

Getting Started

Prerequisites

  • A current version of Ruby installed & available. (Tested with 3.2.2 & 2.7.8)

Installation

  1. Clone the repository:

    git clone https://github.com/kylebowen/heartland-photos.git

Testing

  1. Navigate to the project directory:

    cd heartland-photos
  2. Install dependencies:

    bundle install
  3. Run the specs:

    bundle exec rspec spec/

Usage

  1. Open IRB while sourcing the PhotoListConverter class:

    irb -r "./lib/photo_list_converter.rb"
  2. Create a new instance of the PhotoListConverter class:

    converter = PhotoListConverter.new
  3. Import the string containing your CSV list:

    list = File.read("sample_list.txt")
  4. Process the list with the converter:

    new_names = converter.process(list)
  5. Display the list of new filenames:

    print new_names
  6. (Optional) Save the list of new filenames to a text file:

    File.write("my_new_filename.txt", new_names)

About

A filename generator based on formatted CSV data for images.

Resources

Stars

Watchers

Forks

Languages