Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

convert-yaml-to-csv

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

convert-yaml-to-csv

A tool to convert YAML files to CSV format

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

convert-yaml-to-csv

convert-yaml-to-csv is a command-line tool that converts YAML files into CSV format. It flattens nested YAML structures into a simple CSV format, making it easy to work with YAML data in spreadsheet applications.

Installation

You can install convert-yaml-to-csv globally using npm:

npm install -g convert-yaml-to-csv

Usage

Once installed, you can use the tool from the command line to convert a YAML file to a CSV file.

The command syntax is:

convert-yaml-to-csv <path_to_yaml_file>

Example

Give a file en.yaml with the following content

greeting:
  welcomeMessage: "This is a general \"welcome\" message"
  user:
    welcome: "Welcome, user!"
    goodbye: "Goodbye, user!"
    profile:
      update: "Your profile has been updated"
      delete: "Your profile has been deleted"
  admin:
    welcome: "Welcome, admin!"
    goodbye: "Goodbye, admin!"
    settings:
      update: "Admin settings have been updated"
      reset: "Admin settings have been reset"
errors:
  client:
    notFound: "Client page not found"
    forbidden: "Client access denied"
    timeout: "Client request timed out"
  server:
    notFound: "Server page not found"
    forbidden: "Server access denied"
    internal: "Internal server error occurred"
convert-yaml-to-csv en.yaml

Will generate the following file named en.cvs witht the following content

key,en
greeting.welcome_message,"This is a general ""welcome"" message"
greeting.user.welcome,"Welcome, ""user""!"
greeting.user.goodbye,"Goodbye, user!"
greeting.user.profile.update,"Your profile has been updated"
greeting.user.profile.delete,"Your profile has been deleted"
greeting.admin.welcome,"Welcome, admin!"
greeting.admin.goodbye,"Goodbye, admin!"
greeting.admin.settings.update,"Admin settings have been updated"
greeting.admin.settings.reset,"Admin settings have been reset"
errors.client.not_found,"Client page not found"
errors.client.forbidden,"Client access denied"
errors.client.timeout,"Client request timed out"
errors.server.not_found,"Server page not found"
errors.server.forbidden,"Server access denied"
errors.server.internal,"Internal server error occurred"

FAQs

Package last updated on 09 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc