npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

convert-yaml-to-csv

v1.0.3

Published

A tool to convert YAML files to CSV format

Downloads

16

Readme

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"