Skip to content

X-Projetion/split-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

split files


FeaturesHow to UseUsageFollow the PromptsInstallation via PyPIHelp License

File Splitter by Lines

This Python script provides a simple yet powerful way to split large text files into smaller files based on the specified number of lines per file. It is designed to facilitate easier management and processing of large datasets by breaking them down into manageable chunks.

Features

  • Command-line Interface: Easily specify the input file and the number of lines per output file using command-line arguments (-f/--files and -l/--lines).
  • Clear Feedback: Error messages are displayed in red for quick identification of issues, while success messages are shown in green upon successful file creation.
  • Cross-platform Compatibility: Works seamlessly on Windows, Unix, and Linux systems.
  • Automatic Folder Creation: Automatically creates a 'results' folder to store the split files if it doesn't already exist.
  • User-friendly Interface: Includes an ASCII art banner for visual appeal and clear prompts for user interaction.

How to Use

Clone the Repository

git clone https://github.com/X-Projetion/split-files.git
cd split-files

Usage

  • python file_splitter.py -f input_file.txt -l 100
  • Replace input_file.txt with your desired input file and 100 with the number of lines per output file.

Follow the Prompts

  • The script will create a 'results' folder (if not already present) and split the file accordingly.
  • Follow on-screen instructions to exit or continue after completion.

Installation via PyPI

You can also install split-files via PyPI for easy access:

  • pip install split-files

Help

python3 main.py -h
   _____       ___ __  _______ __
  / ___/____  / (_) /_/ ____(_) /__  _____
  \__ \/ __ \/ / / __/ /_  / / / _ \/ ___/
 ___/ / /_/ / / / /_/ __/ / / /  __(__  )
/____/ .___/_/_/\__/_/   /_/_/\___/____/v1
    /_/        x-projetion.org

usage: main.py [-h] -f INPUT_FILE -l LINES_PER_FILE

File Splitter by Lines

optional arguments:
  -h, --help            show this help message and exit
  -f INPUT_FILE, --files INPUT_FILE
                        Input file name
  -l LINES_PER_FILE, --lines LINES_PER_FILE
                        Number of lines per file

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

File Splitter by Lines

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages