Categorygithub.com/ortfo/db
modulepackage
1.6.1
Repository: https://github.com/ortfo/db.git
Documentation: pkg.go.dev

# README

ortfo/db

A readable, easy and enjoyable way to manage portfolio databases using directories and text files.

Installation

Pre-compiled binaries are available in the Releases page.

See the documentation on installation for more information

Usage

See documentation

Manage your portfolio's database — See https://github.com/ortfo/db for more information.

Usage:
  ortfodb [command]

Examples:
  $ ortfodb --config .ortfodb.yaml build database.json
  $ ortfodb add my-project

Available Commands:
  add         Add a new project to your portfolio
  build       Build the database
  completion  Generate the autocompletion script for the specified shell
  exporters   Commands related to ortfo/db exporters
  help        Help about any command
  lsp         Start a Language Server Protocol server for ortfo
  replicate   Replicate a database directory from a built database file.
  schemas     Output JSON schemas for ortfodb's various resources

Flags:
  -c, --config string   config file path (default "ortfodb.yaml")
  -h, --help            help for ortfodb
      --scattered       Operate in scattered mode. In scattered mode, the description.md files are searched inside `.ortfo' folders in every folder of the database directory, instead of directly in the database directory's folders. See https://github.com/ortfo/
  -v, --version         version for ortfodb

Use "ortfodb [command] --help" for more information about a command.

# Packages

No description provided by the author

# Functions

AcquireBuildLock ensures that only one process touches the output database file at the same time.
AnalyzeAudio takes in an os.File and returns the duration of the audio file in seconds.
AnalyzePDF returns an ImageDimensions struct for the first page of the PDF file at filename.
AnalyzeVideo returns an ImageDimensions struct with the video's height, width and aspect ratio and a duration in seconds.
No description provided by the author
BuildLockFilepath returns the path to the lock file for the given output database file.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DisplayValidationErrors takes in a slice of json schema validation errors and displays them nicely to in the terminal.
No description provided by the author
DownloadExporter loads an exporter from a URL.
No description provided by the author
No description provided by the author
No description provided by the author
ExtractAttributesFromAlt extracts sigils from the end of the alt atetribute, returns the alt without them as well as the parse result.
ExtractColors extracts the 3 most proeminent colors from the given image-decodable file.
No description provided by the author
GetExporterOptions returns the options for the given exporter.
GetImageDimensions returns an ImageDimensions object, given a pointer to a file.
GetSVGDimensions returns an ImageDimensions object, given a pointer to a SVG file.
HandleAltMediaEmbedSyntax handles the >[...](...) syntax by replacing it in htmlRaw with ![...](...).
No description provided by the author
LoadConfiguration loads the given configuration YAML file and puts it contents into loadInto.
No description provided by the author
LoadExporter loads an exporter from a manifest YAML file's contents.
No description provided by the author
LogCustomNoColor logs a message without applying colorstring syntax to message.
No description provided by the author
LogDebug logs debug information.
LogDebugNoColor logs debug information without applying colorstring syntax to message.
LogError logs non-fatal errors.
LogInfo logs infos.
LogTiming logs timing debug logs.
LogWarning logs warnings.
MarkdownToHTML converts markdown markdownRaw into an HTML string.
NewConfiguration loads a YAML configuration file.
ParseDescription parses the markdown string from a description.md file.
ParseYAMLHeader parses the YAML header of a description markdown file and returns the rest of the content (all except the YAML header).
No description provided by the author
Print is like fmt.Print but automatically strips ANSI color codes if colors are disabled.
Printf is like fmt.Printf but automatically strips ANSI color codes if colors are disabled.
Println is like fmt.Println but automatically strips ANSI color codes if colors are disabled.
ReadDescriptionFile reads the description.md file in directory.
No description provided by the author
ReplaceAbbreviations processes the given Paragraph to replace abbreviations.
ResolveBlockID returns the ID of a block, given its ref (user-facing content block references comprising of a content block type shorthand and an index).
ResolveLayout returns a layout, given the parsed description.
ShowingColors returns true if colors (ANSI escape codes) should be printed.
No description provided by the author
SplitOnLanguageMarkers returns two values: 1.
No description provided by the author
No description provided by the author
TimeTrack logs the time taken for a function to execute, and logs out the time taken.
No description provided by the author
ValidateConfiguration uses the JSON configuration schema ConfigurationJSONSchema to validate the configuration file at configFilepath.
No description provided by the author

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
EmptyLayoutCell is a special value that represents an empty cell (used as a spacer, for example).
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
ColorPalette reprensents the object in a Work's metadata.colors.
Configuration represents what the ortfodb.yaml configuration file describes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ImageDimensions represents metadata about a media as it's extracted from its file.
Link represents an (isolated) link declaration in a description.md file.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Media represents a media object inserted in the work object's media array.
MediaAttributes stores which HTML attributes should be added to the media.
No description provided by the author
Paragraph represents a paragraph declaration in a description.md file.
No description provided by the author
ProgressInfoEvent represents an event that is appended to the progress JSONLines file.
Project represents a project.
RunContext holds several "global" references used throughout all the functions of a command.
No description provided by the author
No description provided by the author
Tag represents a category that can be assigned to a work.
No description provided by the author
No description provided by the author
Technology represents a "technology" (in the very broad sense) that was used to create a work.
Work represents a given work in the database.
No description provided by the author

# Interfaces

No description provided by the author

# Type aliases

Abbreviations represents the abbreviations declared in a description.md file.
No description provided by the author
ContentBlockType is one of "paragraph", "media" or "link".
No description provided by the author
No description provided by the author
FilePathInsideMediaRoot is a path relative to the media root directory.
FilePathInsidePortfolioFolder is a path relative to the scattered mode folder inside of a work directory.
Footnotes represents the footnote declarations in a description.md file.
No description provided by the author
Layout is a 2D array of content block IDs.
LayoutCell is a single cell in the layout.
No description provided by the author
ParsedWork represents a work, but without analyzed media.
No description provided by the author
No description provided by the author