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

@xml-locales/cli

v1.0.0

Published

[![NPM](https://img.shields.io/npm/v/xml-locales.svg)](https://www.npmjs.com/package/xml-locales)

Downloads

36

Readme

@xml-locales/cli

NPM

This is cli tool to work with localization files in xml.

Installation

npm install -g @xml-locales/cli
yarn global add @xml-locales/cli
pnpm add -g @xml-locales/cli

[!IMPORTANT] This package, which works with XML files, has one root node named resources. This root node has child nodes named string. For example:

<resources>
  <string name="key1">value1</string>
  <string name="key2">value2</string>
</resources> 

Or use without

npx @xml-locales/cli <command> [...args]

Commands

Add Command

The add command is used to add a new key(s)-value(s) pair to the XML localization file or files from directory.

xml-locales add --path path/to/file_or_directory --keys newKey --values newValue

| Flag | Alias | Default | Description | |---------|-------|---------|-----------------------------------------------------------------------------| | --path| -p | process.cwd() | The path to the XML localization file or directory where the key-value pair will be added. | | --keys | -k | None | The new key(s) to be added. | | --values| -v | None | The value(s) to be associated with the new key. |

Remove Command

The remove command is used to remove a key(s)-value(s) pair from the XML localization file or files from directory.

xml-locales remove --path path/to/file_or_directory --keys keyToRemove --values valueToRemove

| Flag | Alias | Default | Description | |---------|-------|---------|-----------------------------------------------------------------------------| | --path| -p | process.cwd() | The path to the XML localization file or directory where the key-value pair will be removed. | | --keys | -k | None | Removed string by the key(s). | | --values| -v | None | Or removed string by the value(s). |

Update Command

The update command is used to update a key(s)-value(s) pair in the XML localization file or files from directory.

xml-locales update --path path/to/file_or_directory --old oldValue --new newValue

| Flag | Alias | Default | Description | |------------|-------|---------|-----------------------------------------------------------------------------| | --path | -p | process.cwd() | The path to the XML localization file or directory where the key-value pair will be updated. | | --old | -o | None | The old key(s) or value(s) to be updated. | | --new| -n | None | The new key(s) or value(s) to replace the old one. |

Sort Command

The sort command is used to sort the keys in the XML localization file or directory in ascending or descending order.

xml-locales sort --path path/to/file_or_directory --direction asc_or_desc

| Flag | Alias | Default | Description | |------------|-------|---------|-----------------------------------------------------------------------------| | --path | -p | process.cwd() | The path to the XML localization file or directory where the keys will be sorted. | | --direction | -d | 'asc' | The sort direction. Can be 'asc' for ascending order or 'desc' for descending order. |

Packages

| Package | version | | ------- | -------- | | 📦xml-locales | NPM | | 💻@xml-locales/cli | NPM |