elf

command module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 1 Imported by: 0

README

elf - a helper for trivial things

GitHub release (with filter) go.mod GitHub License Common Changelog wakatime

CodeQL Coverage Code Smells Security Rating

`elf`` is a helper app for several programming practice sites that attempts to reduce the overhead needed to test and solve puzzles.

Currently supporting:

Features

  • Download challenge information with local caching
  • Solve challenge with multiple language implementations
  • Test solution with implementation-agnostic test cases
  • Show debug output inline with solution output
  • Write visualization for solutions to disk
  • Benchmark with graphs to compare implementations

Demo

TBD

Requirements

See site-specific sections for details on unique requirements.

  • Toolchain must be maintained separately (compiler installation, etc.)
  • Site-specific authorization may need to be set in config file or ENV

Install

Manually download and unpack the elf binary into your preferred location.

Configuration

The default location for this data may vary based on OS and personal settings.

  • Windows: %AppData%/elf
  • Unix: $XDG_CONFIG_HOME/elf (if non-empty), else $HOME/.config/elf
  • Darwin: $HOME/Library/Application Support/elf

Site-specific details

Advent of Code
.
└─ exercises
   └─ <year>
     └─ <day>-<title>
       ├─ go
       │  └─ exercise.go
       ├─ info.json
       ├─ input.txt
       ├─ README.md
       └─ benchmark.json

Caching

Elf caches downloaded information from source sites to reduce load on their servers. The default location for this data may vary based on OS and personal settings.

  • Windows: %AppData%/elf
  • *nix: $XDG_CONFIG_HOME/elf (if non-empty), else $HOME/.config/elf
  • Darwin: $HOME/Library/Application Support/elf

Build

Build scripts use Task. There is a Makefile and justfile with similar arguments. These may be removed at some point though.

Install the necessary dependencies with task install. This should only be necessary to do once.

task snapshot will create a local build for your OS in ./dist/elf-<OS name>/.

Documentation

Overview

Package main is the entry point for the CLI

Directories

Path Synopsis
cmd
Package cmd contains all CLI commands used by the application.
Package cmd contains all CLI commands used by the application.
man
internal
common
Package common contains the base struct for all exercises.
Package common contains the base struct for all exercises.
mocks
cmd
pkg
advent
Package advent contains all advent of code related functionality.
Package advent contains all advent of code related functionality.
analysis
Package analysis provides functions for analyzing run-time metrics.
Package analysis provides functions for analyzing run-time metrics.
euler
Package euler contains all project euler related functionality.
Package euler contains all project euler related functionality.
runners
Package runners provides abstractions and utilities for working with different runner implementations.
Package runners provides abstractions and utilities for working with different runner implementations.
tasks
Package tasks provides types and functions to execute tasks for implementation.
Package tasks provides types and functions to execute tasks for implementation.
utilities
Package utilities contains helper functions used by the application.
Package utilities contains helper functions used by the application.

Jump to

Keyboard shortcuts

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