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

pappel

v0.2.1

Published

CLI Localization library

Downloads

16

Readme

Pappel Localization and format conversion tooling

A revival of the Babel tower, for your apps.


Please, tell us about your experience with the library on Twitter @pappel_io


Build status Coverage status

Installation

npm install pappel -g

Remove the -g if you do not plan on using the CLI

CLI

Usage

pappel --input <path> --output-format <output-format> [--v] [--w] [--input-format <input-format>] [--lang <lang>] [--output-dir <path>] [--output-file <filename.ext>]

Options

  • input - [source file path]
  • output-format - (pappel|android|ios|xliff|react-native-localization)
  • [input-format] - (xlsx|android|ios|xliff)
  • [lang=''] - [2 letter ISO code]
  • [output-dir='.'] - [output direction path]
  • [output-file] - [name of the output file with extension]
  • [v] - Version of Pappel
  • [w] - Watch your file

Examples

Android (xml) 2 iOS (strings)

pappel --input strings.xml --output-format ios

iOS (strings) 2 Android (xml)

pappel --input Localizable.strings --output-format android

XLSX 2 React Native Localization

pappel --input spreadsheet.xlsx --output-format react-native-localization

XLIFF 2 Android (xml)

pappel --input translation.xliff --output-format android

Please, tell us about your experience with the library on Twitter @pappel_io


API

Examples

Android (xml) 2 iOS (strings)

var Pappel = require('pappel');

var importer = new Pappel.Importer.AndroidXML();
var xmlString = fs.readFileSync('./strings.xml', 'utf8');
var pappelFormat = importer.convert({
  input : xmlString
});

var exporter = new Pappel.Exporter.Strings();
var content = exporter.convert({
  input: pappelFormat
});
var fileContent = exporter.wrapContent({
  content : content
});
fs.writeFileSync('./Localizable.strings', fileContent, 'utf8');

More in the API docs


Please, tell us about your experience with the library on Twitter @pappel_io


Changelog

v.0.2.0

Breaking changes

  • Revamped API

  • Add the "v" flag

  • Watcher option ("w" flag)

  • XLIFF (v2.0) converters

v0.1.3

  • XLIFF (v1.2) converters

v0.1.2

  • CLI: Only the parameters [input] & [output-format] become required
  • AndroidXML & iOS importer language default to 'en'
  • Improved doc

v0.1.1

  • Fix the CLI path

v0.1.0

  • AndroidXML2Pappel
  • Strings2Pappel
  • XLSX2Pappel
  • Pappel2AndroidXML
  • Pappel2Strings
  • Pappel2ReactNativeLocalization

Roadmap

  • [ ] Add XLIFF2 converter
  • [ ] Add SRT converter
  • [ ] Add VTT converter
  • [ ] Add PHP Array converter