A CLI for Johnny Decimal johnny.bpev.me
0

Configure Feed

Select the types of activity you want to include in your feed.

TypeScript 52.7%
HTML 45.4%
Shell 1.9%
Other 0.1%
56 1 0

Clone this repository

https://tangled.org/bpev.me/Johnny https://tangled.org/did:plc:7yxuhtn7nvd3va6n7ci3geyj
git@knot.bpev.me:bpev.me/Johnny git@knot.bpev.me:did:plc:7yxuhtn7nvd3va6n7ci3geyj

For self-hosted knots, clone URLs may differ based on your setup.



README.md

Johnny Decimal#

Importable utilities built with Typescript, for interacting with a Johnny Decimal filing system.

This document is geared for using our modules for your own Johnny Decimal javascript applications. For CLI usage and Plugin Development information, use our CLI guide

API Documentation#

Mostly, the code comments should be sufficient; these are used to generate our Deno Docs

Getting Started#

You can import the utilities used in the CLI from deno.land:

import {
  // Directory and Location are Deno-specific imports are good for fs usecases
  Directory,
  DirectoryCore,
  // Commands exported from johnny_decimal are all Deno-specific.
  // These are the apis used for the Johnny Decimal CLI
  helpCommand,
  Location,
  // LocationCore and DirectoryCore are much more bare, but are pure javascript.
  // Better when aiming to compile for web
  LocationCore,
} from "https://deno.land/x/johnny_decimal/mod.ts";

const directory = new Directory({
  $HOME: $HOME,
  $JD_HOME: $JD_HOME,
  $JD_DIR: $JD_DIR,
});

// DirectoryCore still includes command-management functionality.
directory.registerCommand(defaultCommand);

// LocationCore still includes lots of utility functions
console.log(LocationCore.isAreaId("21.04")); // false

directory.runCommand("default", []);