Skip to content

easy-node-pro/csvsplitter

Repository files navigation

EasyNodePro.com CSV Splitter

A powerful CSV processing tool for splitting large airdrop files into manageable chunks of 797 records each, with optional address replacement functionality. Perfect for processing thirdweb airdrop CSV files from airdrop.easynodepro.com for large validator operations.

Features

  • 📁 Multiple Input Options: Process single files or multiple files at once
  • 🔄 Address Replacement: Automatically replace addresses using mapping configuration
  • 📊 Smart Chunking: Splits data into optimal 797-record chunks
  • 🗂️ Organized Output: Creates timestamped folders in /reports/YYYY-MM/ structure
  • 🧪 Built-in Testing: Comprehensive test suite with validation
  • 🎨 User-friendly GUI: Clean, intuitive interface

Installation

  1. Clone the repository:

    git clone https://github.com/easy-node-pro/csvsplitter.git
    cd csvsplitter
  2. Install requirements (Ubuntu/Debian):

    sudo apt-get install python3-tk
  3. Set up address mapping (optional):

    cp mapping.csv.example mapping.csv
    # Edit mapping.csv with your address replacements

Address Mapping Configuration

The CSV processor can automatically replace addresses during processing using a mapping file.

Setup

  1. Copy the example mapping file:

    cp mapping.csv.example mapping.csv
  2. Edit mapping.csv with your actual address mappings:

    Find,Replace
    0xOLD_ADDRESS_1,0xNEW_ADDRESS_1
    0xOLD_ADDRESS_2,0xNEW_ADDRESS_2
    

File Format

  • File name: mapping.csv
  • Required columns:
    • Find - The address to find and replace
    • Replace - The new address to use as replacement
  • Format: Standard CSV with header row
  • Case sensitivity: Address matching is case-insensitive

Usage

The mapping file is automatically detected when placed in the same directory as app.py. You can also select a different mapping file using the UI.

Security Note: The mapping.csv file is ignored by git to keep your private address mappings local.

Usage

GUI Application

Run the main application:

python3 app.py

Processing Options

  1. Single File: Select one CSV file for processing
  2. Multiple Files: Select multiple CSV files to combine and process as one dataset

Test Suite

Validate functionality with the comprehensive test suite:

python3 test_comprehensive.py

Output Structure

Processed files are saved to:

reports/
└── YYYY-MM/
    └── filename_split/
        ├── filename_part_1.csv (797 records + header)
        ├── filename_part_2.csv (797 records + header)
        └── filename_part_N.csv (remaining records + header)

Interface Preview

CSV Splitter Application

Development

The application uses a modular structure:

  • app.py - Main GUI application
  • utils/ - Utility modules for file handling, CSV processing, and data combination
  • test_data/ - Reference test files with known address mappings
  • test_comprehensive.py - Full validation test suite

License

This project is developed for EasyNodePro.com operations.

About

A python app for splitting our airdrop files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages