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

@ilhamtaufiq/rab-analyzer

v1.1.0

Published

Wrapper for rab_analyzer.py to extract data from Indonesian RAB (PDF/Excel) files.

Downloads

30

Readme

RAB Analyzer (Node.js Wrapper)

This package provides a Node.js wrapper for the rab_analyzer.py tool, which extracts data from Indonesian RAB (Rencana Anggaran Biaya) files in PDF or Excel format.


🛠 System Requirements

Agar package ini dapat berjalan dengan lancar, pastikan sistem Anda memenuhi persyaratan berikut:

1. Lingkungan Node.js (Runtime)

  • Node.js: Versi v14.0.0 atau yang lebih baru.
  • NPM: Terinstal (biasanya sepaket dengan Node.js).

2. Lingkungan Python (Execution Engine)

  • Python 3.7+: Harus terinstal dan terdaftar di PATH (sebagai perintah python).
  • Akses Executable: Alat ini secara otomatis akan mencari file executable Python di folder venv (virtual environment) lokal jika tersedia, atau menggunakan python global sebagai cadangan.

3. Library Python (Dependencies)

Dua library berikut wajib diinstal di environment Python Anda:

  • pdfplumber: Digunakan untuk ekstraksi data dari file PDF.
  • openpyxl: Digunakan untuk membaca file Excel (.xlsx).

Instalasi Library Python: Library Python (pdfplumber dan openpyxl) akan diinstal secara otomatis ke dalam virtual environment (venv) lokal saat Anda menjalankan npm install. Pastikan saja Python 3 sudah tersedia di PATH sistem Anda.

# Otomatis dilakukan saat npm install
node scripts/setup-venv.js

4. Sistem Operasi

  • Windows: Didukung penuh (menggunakan venv\Scripts\python.exe).
  • Linux/macOS: Didukung (menggunakan venv/bin/python).

🚀 Installation

Anda dapat menginstal package ini secara lokal dalam project Anda:

npm install ./path-to-this-folder

Atau gunakan sebagai CLI tool global (menggunakan npm link untuk pengembangan lokal):

cd path-to-this-folder
npm link

📊 Usage

Command Line Interface (CLI)

Setelah diinstal/link, Anda bisa menjalankan perintah berikut dari terminal mana saja:

# Analisis file PDF
rab-analyze "data/document.pdf"

# Analisis file Excel
rab-analyze "data/budget.xlsx"

Programmatic API (Node.js)

Gunakan dalam kode Javascript Anda:

const { analyzeRAB } = require('rab-analyzer');

// Fungsi mengembalikan Promise berisi path ke file CSV hasil ekstrak
analyzeRAB('path/to/my_rab.pdf')
  .then(outputPath => {
    console.log('✅ Analisis Berhasil! File disimpan di:', outputPath);
  })
  .catch(err => {
    console.error('❌ Terjadi Kesalahan:', err.message);
  });

📂 Supported Formats

  • PDF: Format standar RAB dengan kolom Uraian, Satuan, Volume, Harga Satuan, dan Total.
  • Excel (.xlsx): Format Excel dengan berbagai variasi header:
    • Header Uraian / Barang (format lama)
    • Header Item Pekerjaan (format baru, e.g. RAB MCK Terbaru)
    • Auto-detect sheet: RAB, RAB MCK, RAB MCK IND, RAB MCK KOM, atau partial match

⚙️ How it Works

Node.js wrapper ini menggunakan child_process.spawn untuk mengeksekusi script rab_analyzer.py. Komunikasi antar bahasa dilakukan melalui stdout/stderr untuk menangkap log proses dan path file CSV hasil keluaran.


📝 Changelog

v1.1.0

  • Support format RAB baru: Menambah deteksi kolom Item Pekerjaan, Harga Satuan, Jumlah Harga Satuan
  • Fix total calculation: Per-item total sekarang = Volume × Harga (tanpa PPN per item). PPN 11% dihitung sekali di akhir sebagai grand total
  • Sub-section headers: Menambah deteksi header huruf (A, B, C, ...) selain Roman numerals (I, II, III)
  • Smart sheet detection: Auto-detect sheet RAB dengan partial match
  • Summary rows: Output CSV sekarang menyertakan baris JUMLAH, PPN 11%, dan GRAND TOTAL di akhir

v1.0.0

  • Initial release dengan support PDF dan Excel
  • Dynamic column detection
  • CLI dan programmatic API