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

pitaka

v0.1.9

Published

Backend for accelon2021

Downloads

11

Readme

Pitaka Database Engine

  • Backend and CLI of Accelon21
  • Accelon21 後端引擎及製作資料庫的工具

功能

  • 純 EMCAScript 全文資料庫引擎,不依賴 filesystem API。
  • 不依賴 http ,可使用 file:// 協議。單機端不必運行服務器。
  • 運行於 https 服務器,支持 Progressive Web Application 離線使用。

警告

  • 本說明文件滯後於源代碼,欲製作 pitaka 資料庫的朋友請與作者連繫。
  • 不經常更新 npm.org 版本

install

npm -g install 或 clone repo ,再從git repo安裝 cli, npm -g install .

usage

  • need pitaka.json in working folder

  • list all available commands

    pitaka

  • build a "pitaka"

    pitaka build

  • example json file https://github.com/accelon/sc/blob/main/pitaka.json

架構

  • 來源不同的數據以不同的repo管理,一律轉換成offtext格式(詳見 https://github.com/accelon/cs )。
  • pitaka build 產生pitaka數據庫
  • 前端程式 消費pitaka數據庫(不必發布offtext源文件)。
  • Offtext 標記格式

pitaka 數據庫

  • 唯讀式
  • 前端無須安裝任何軟件,直接打開 html 即可(不依賴http協議)。
  • 數據庫包含了正文(從多個offtext文件合併)、標題清單、標記群、注釋群、反向索引(非必要)。
  • 每個數據庫一個文件夾,分成若干個js(數據塊) ,000.js 為metadata ,001.js 之後大小相近,最多999.js。每個js約 128K 個字符。
  • 000.js 記錄每個數據塊的起始行(chunkStarts),以及 pitaka.json 。
  • 載入內存的最小單元是數據塊。換言之,即使只要求一行文字,也會載入該行所在的數據塊。