Giter Club home page Giter Club logo

bi-directional-csv-yaml-converter's Introduction

Logo

Bi-directional CSV-YAML Converter

Effortlessly convert between CSV and YAML formats using either a Python script or a command-line interface (CLI).


Table of Contents

Description

This repository provides two utilities for bi-directional conversions between CSV and YAML formats:

  1. Script-based Conversion: An interactive Python script that prompts the user to choose a conversion direction and then to provide the appropriate input and output file paths.
  2. CLI-based Conversion: A command-line utility that allows users to specify the conversion direction and file paths as arguments, offering a streamlined conversion process suitable for automation and batch processing.

Installation

  1. Clone the repository:
    git clone https://github.com/javedali99/bi-directional-csv-yaml-converter.git
    cd csv-yaml-converter

Requirements

  • Python 3.8 or newer
  • PyYAML package

Environment Setup

Using pip and venv

  1. Create a virtual environment:

    python -m venv env
    source env/bin/activate  # On Windows, use `env\Scripts\activate`
  2. Install the required packages:

    pip install PyYAML

Using conda

  1. Create a conda environment:

    conda create --name csv_yaml_converter_env python=3.9
  2. Activate the conda environment:

    conda activate csv_yaml_converter_env
  3. Install the required packages:

    conda install -c conda-forge pyyaml

Usage

Script-based Conversion

  1. Run the script:
    python bi_directional_csv_yaml_script.py
  2. Follow the on-screen prompts to choose the conversion mode and provide file paths.

CLI-based Conversion

For CSV to YAML:

python bi_directional_csv_yaml_cli.py csv-to-yaml path_to_input.csv path_to_output.yaml

For YAML to CSV:

python bi_directional_csv_yaml_cli.py yaml-to-csv path_to_input.yaml path_to_output.csv

Contributing

  1. Fork the repository on GitHub.
  2. Clone the forked repository and make the necessary changes.
  3. Push your changes to your GitHub repository.
  4. Submit a pull request, providing a detailed description of your changes.

License

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

bi-directional-csv-yaml-converter's People

Contributors

javedali99 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.