journal

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package journal scans journal directories for the newest file modification time and manages journal state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountNewerFiles

func CountNewerFiles(dir, ext string, refTime int64) int

CountNewerFiles recursively counts files with the given extension that are newer than the reference timestamp.

Parameters:

  • dir: absolute path to the root directory to walk
  • ext: file extension to match (e.g. ".jsonl")
  • refTime: Unix timestamp threshold; only files newer than this are counted

Returns:

  • int: number of matching files newer than refTime

func CountUnenriched

func CountUnenriched(dir string) int

CountUnenriched counts journal .md files that lack an enriched date in the journal state file.

Parameters:

  • dir: absolute path to the journal directory

Returns:

  • int: number of unenriched journal entries

func NewestMtime

func NewestMtime(dir, ext string) int64

NewestMtime returns the most recent mtime (as Unix timestamp) of files with the given extension in the directory. Returns 0 if none is found.

Parameters:

  • dir: absolute path to the directory to scan
  • ext: file extension to match (e.g., file.ExtMarkdown)

Returns:

  • int64: Unix timestamp of the newest matching file, or 0

Types

This section is empty.

Jump to

Keyboard shortcuts

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