• Features • How to Use • Usage • Follow the Prompts • Installation via PyPI • Help 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/--filesand-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.
Metadata
Release files for split-files 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| split_files-1.0.tar.gz | 3.0 kB | Without provenance | Details |
Release files / split_files-1.0.tar.gz
| Download URL | split_files-1.0.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6bff72d9224e3e4f2dd480125dcc144998d723db648886c862b45550dec93c9
|
|
BLAKE2b-256 checksum How to use checksums |
9739c061192b7137f6fb0613c0ed643f51aa3a722c5c8098568822a90d5b99d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.9.6
|
Security for split-files 1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.