fs

package
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 21 Imported by: 0

README

fs

Table of contents

Summary

A tool for scanning and analysing the file system.

Manual

$ notatio fs --help
NAME:
   notatio fs

USAGE:
   notatio fs [command options]

DESCRIPTION:
   File System tool

COMMANDS:
   scan     
   table    
   help, h  Shows a list of commands or help for one command

OPTIONS:
   --help, -h  show help

Subcommands

scan
$ notatio fs scan --help
NAME:
   notatio fs scan

USAGE:
   notatio fs scan [command options]

DESCRIPTION:
   Scan a file or directory and output file system metadata as JSON or CSV

OPTIONS:
   --path value                               path to a file or directory to scan
   --output-format value                      output format (json or csv)
   --skip-path value [ --skip-path value ]    path to a file or directory to exclude from the scan (repeatable)
   --skip-regex value [ --skip-regex value ]  regular expression matched against file/directory base names to skip (repeatable)
   --skip-field value [ --skip-field value ]  exclude a metadata field from the output
   --recursive                                recursively scan directories (default: false)
   --help, -h                                 show help
table
$ notatio fs table --help
NAME:
   notatio fs table

USAGE:
   notatio fs table [command options]

DESCRIPTION:
   Render scanned file system metadata as an interactive HTML table

OPTIONS:
   --input value                                              path to the JSON file produced by the scan command
   --http                                                     serve the HTML table over HTTP on localhost (see --http-port) (default: false)
   --http-port value                                          port to listen on when --http is enabled (default: 8080)
   --display-field value [ --display-field value ]            field to include in the table (defaults to all fields present in input)
   --heat-map-field value [ --heat-map-field value ]          a field to use for temperature indication
   --exclude-date-field value [ --exclude-date-field value ]  date field to filter on when excluding rows (e.g. createdAt, modifiedAt)
   --exclude-date-value value [ --exclude-date-value value ]  date prefix to exclude rows by; accepts YYYY, YYYY-MM, or YYYY-MM-DD (e.g. 2024, 2024-03, 2024-03-15)
   --help, -h                                                 show help

Usage

notatio fs scan --path=. --output-format=json --recursive | notatio fs table --http

Documentation

Index

Constants

This section is empty.

Variables

View Source
var App = cli.Command{
	Name:         "fs",
	Aliases:      nil,
	Usage:        "",
	UsageText:    "",
	Description:  "File System tool",
	ArgsUsage:    "",
	Category:     "",
	BashComplete: nil,
	Before:       nil,
	After:        nil,
	Action:       nil,
	OnUsageError: nil,
	Flags:        []cli.Flag{},
	Subcommands: []*cli.Command{
		{
			Name:         "scan",
			Aliases:      nil,
			Usage:        "",
			UsageText:    "",
			Description:  "Scan a file or directory and output file system metadata as JSON or CSV",
			ArgsUsage:    "",
			Category:     "",
			BashComplete: nil,
			Before:       nil,
			After:        nil,
			Action:       scan,
			OnUsageError: nil,
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:     "path",
					Usage:    "path to a file or directory to scan",
					Required: true,
				},
				&cli.StringFlag{
					Name:     "output-format",
					Usage:    "output format (json or csv)",
					Required: true,
				},
				&cli.StringSliceFlag{
					Name:     "skip-path",
					Usage:    "path to a file or directory to exclude from the scan (repeatable)",
					Required: false,
				},
				&cli.StringSliceFlag{
					Name:     "skip-regex",
					Usage:    "regular expression matched against file/directory base names to skip (repeatable)",
					Required: false,
				},
				&cli.StringSliceFlag{
					Name:     "skip-field",
					Usage:    "exclude a metadata field from the output",
					Required: false,
				},
				&cli.BoolFlag{
					Name:     "recursive",
					Usage:    "recursively scan directories",
					Required: false,
				},
			},
		},
		{
			Name:         "table",
			Aliases:      nil,
			Usage:        "",
			UsageText:    "",
			Description:  "Render scanned file system metadata as an interactive HTML table",
			ArgsUsage:    "",
			Category:     "",
			BashComplete: nil,
			Before:       nil,
			After:        nil,
			Action:       table,
			OnUsageError: nil,
			Flags: []cli.Flag{
				&cli.StringFlag{
					Name:     "input",
					Usage:    "path to the JSON file produced by the scan command",
					Required: false,
				},
				&cli.BoolFlag{
					Name:     "http",
					Usage:    "serve the HTML table over HTTP on localhost (see --http-port)",
					Required: false,
				},
				&cli.IntFlag{
					Name:     "http-port",
					Usage:    "port to listen on when --http is enabled",
					Required: false,
					Value:    port,
				},
				&cli.StringSliceFlag{
					Name:     "display-field",
					Usage:    "field to include in the table (defaults to all fields present in input)",
					Required: false,
				},
				&cli.StringSliceFlag{
					Name:     "heat-map-field",
					Usage:    "a field to use for temperature indication",
					Required: false,
				},
				&cli.StringSliceFlag{
					Name:     "exclude-date-field",
					Usage:    "date field to filter on when excluding rows (e.g. createdAt, modifiedAt)",
					Required: false,
				},
				&cli.StringSliceFlag{
					Name:     "exclude-date-value",
					Usage:    "date prefix to exclude rows by; accepts YYYY, YYYY-MM, or YYYY-MM-DD (e.g. 2024, 2024-03, 2024-03-15)",
					Required: false,
				},
			},
		},
	},
}

Functions

This section is empty.

Types

type Info

type Info struct {
	File       string `json:"file"`
	CreatedAt  string `json:"createdAt"`
	ModifiedAt string `json:"modifiedAt"`
	AccessedAt string `json:"accessedAt"`
	ChangedAt  string `json:"changedAt"`
	Size       int64  `json:"size"`
	Lines      int    `json:"lines"`
	Mode       string `json:"mode"`
	IsLink     bool   `json:"isLink"`
	IsDir      bool   `json:"isDir"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL