Skip to content

The merger script is a versatile tool designed to merge either text data or files using a specified symbol

License

Notifications You must be signed in to change notification settings

Cyber-Programer/Merger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Merger

Description:

The merge.py script is a versatile tool designed to merge either text data or files using a specified symbol. It offers flexibility in merging text or file content seamlessly. This script is particularly useful when you need to combine different sets of data, such as logs, CSV files, or any textual information, into a unified format.

Features:

  • Merges text or files seamlessly.
  • Allows customization of the merging symbol.
  • Handles both text and file inputs intelligently.
  • Simple and easy-to-use command-line interface.

User Guide:

  1. Installation:
  • Ensure you have Python installed on your system.
  • Run:
    apt update -y && apt upgrade -y 
    git clone https://github.com/Cyber-Programer/Merger.git
    cd Merger
  1. setup:
    pip install .
  • if the code exicute proparly then, Typing merge in the terminal from anywhere in your system to starts the script.
  • also you can use this script as a normal script
    • Open your terminal or command prompt.
    • Navigate to the directory containing the merge.py script.
    • then run the marge.py file with python
          python merge.py

Commands:

  • Get Help:

        python merge.py --help
        merge --help

    Displays the help message, providing information on how to use the script along with examples.

  • Merge Files:

        python merge.py -f file1.txt file2.txt
       merge -f file1.txt file2.txt

    Merges the content of file1.txt and file2.txt, displaying the merged output with a default symbol ( : ) .

  • Merge Texts:

        python merge.py -t text1,text2 text1,text2
        merge -t text1,text2 text1,text2

    Merges the provided text strings (text1 and text2) with a default symbol ( : ).

  • Custom Symbol:

        python merge.py -f file1 file2 -sy :
        merge -f file1 file2 -sy :

    Merges files file1 and file2, using the specified custom symbol :.

Note: You can use either -f or -t options but not both at the same time.

  1. Examples:
  • Merge two files data1.txt and data2.txt using the default symbol :.

       python merge.py -f data1.txt data2.txt  
  • Merge two text strings "Hello" and "World" with a custom symbol ~.

        python merge.py -t Hello,World Hello,World -sy ~

    Enjoy exploring the capabilities of this tool!

  1. Save Output In file:
  • use -o to saved output in any file
    python merge.py -f x.txt y.txt -o output.txt
    merge.py -f x.txt y.txt -o output.txt

About

The merger script is a versatile tool designed to merge either text data or files using a specified symbol

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages