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 🙏

© 2026 – Pkg Stats / Ryan Hefner

auto-hwpx

v0.1.2

Published

TypeScript utility for replacing text and image placeholders in HWPX files.

Readme

auto-hwpx

Utility to replace {{key}} and {{@imgKey}} placeholders in .hwpx files and emit a new .hwpx.

Note: Written by Codex.

Install

npm install -g auto-hwpx@latest

Usage

$ auto-hwpx template.hwpx -o output.hwpx title="아무도안읽음" @img1="어린왕자.jpg"

The above command will replace the following placeholders in template.hwpx:

  • {{title}} into "아무도안읽음",
  • and image right after {{@img1}} into user given image "어린왕자.jpg".

Placeholder syntax

  • Text placeholder: {{key}}
  • Text placeholder with default: {{key=default text}}
  • Image placeholder: {{@imgKey}}

Demo

Overview

Command:

auto-hwpx \
  template.hwpx \
  -o output.hwpx \ # or output/directory (same file name as input)
  title="아무도안읽음" \ 
  name="차 은 우" \
  content_line1="줄바꿈 지원은 하지 않습니다. 따로 placeholder를 사용해야 합니다." \
  content_line2="HWPX 포맷이 좀 까다롭고, 대단한걸 원하는게 아니여서 구현하기 귗낳습니다." \
  content_line3="**주의**: {{key}} 치환이후에 포맷이 바뀌어버리면 문제가 발생합니다." \
  content_line4="예를들어, {{very_long_long_ 다음줄 long_long_key}} -> 토마토 의 경우 " \
  content_line5="두줄에서 한줄이 되어버리므로 변환이 실패합니다." \
  location="한강뷰 아파트" \
  caption1="캡션도 가능!" \
  @img1="어린왕자.jpg"

Programmatic API

import { replaceHwpxPlaceholdersV2 } from "./src/render-hwpx-v2.js";

const result = await replaceHwpxPlaceholdersV2({
  inputPath: "demo-assets/example.hwpx",
  outputPath: "/tmp/output.hwpx",
  replacements: {
    name: "홍길동",
    content: "작업 내용",
    "@img1": "/absolute/path/to/image.png",
  },
  removeUnresolvedPlaceholders: true, // default true
});

console.log(result);

Return shape:

interface ReplaceHwpxV2Result {
  replacements: number;
  imageReplacements: number;
  unresolvedPlaceholders: string[];
}

List keys API:

import { listHwpxPlaceholderKeysV2 } from "./src/render-hwpx-v2.js";

const keys = await listHwpxPlaceholderKeysV2({
  inputPath: "demo-assets/example.hwpx",
});