Crates.io | emlop |
lib.rs | emlop |
version | 0.7.1 |
source | src |
created_at | 2018-12-06 23:04:38.064763 |
updated_at | 2024-09-30 15:17:42.233582 |
description | A fast, accurate, ergonomic emerge.log parser |
homepage | https://github.com/vincentdephily/emlop |
repository | https://github.com/vincentdephily/emlop |
max_upload_size | |
id | 100475 |
size | 8,544,369 |
Emlop parses emerge logs (as generated by portage, the Gentoo package manager) to yield useful info like merge history and merge time prediction.
It draws inspiration from genlop and qlop but aims to be faster, more accurate, and more ergonomic, see comparison.
Emlop is split into commands. Command names and arguments can be abbreviated (so emlop log --from '1 day' --duration human
is the same as emlop l -f1d --dur h
), and shell completion is
available. See emlop --help
and emlop <command> --help
for complete and up to date usage info.
All commands share these arguments, affecting parsing and output:
Options:
-F, --logfile <file> Location of emerge log file
-v... Increase verbosity (can be given multiple times)
-h, --help Print help (see more with '--help')
-V, --version Print version
Filter:
-f, --from <date> Only parse log entries after <date>
-t, --to <date> Only parse log entries before <date>
Format:
-H, --header [<bool>] Show table header
--duration <format> Output durations in different formats
--date <format> Output dates in different formats
--utc [<bool>] Parse/display dates in UTC instead of local time
--color [<bool>] Enable color (yes/no/auto)
-o, --output <format> Ouput format (columns/tab/auto)
log
Log-specific options:
Format:
--starttime [<bool>] Display start time instead of end time
Filter:
[search]... Show only packages/repos matching <search>
-e, --exact Match <search> using plain string
-s, --show <m,u,s,a> Show (m)erges, (u)nmerges, (s)yncs, and/or (a)ll
-N, --first [<num>] Show only the first <num> entries
-n, --last [<num>] Show only the last <num> entries
Note that emaint sync
currently doesn't write to emerge.log, so
emlop l --show s
will appear empty if you use emaint
. Use emerge --sync
or eix-sync
instead.
predict
Predict-specific arguments:
Options:
--tmpdir <dir> Location of portage tmpdir
Filter:
-s, --show <e,m,t,a> Show (e)emerge processes, (m)erges, (t)otal, and/or (a)ll
-N, --first [<num>] Show only the first <num> entries
-n, --last [<num>] Show only the last <num> entries
--resume [<source>] Use main, backup, either, or no portage resume list
Stats:
--limit <num> Use the last <num> merge times to predict durations
--avg <fn> Select function used to predict durations
--unknown <secs> Assume unkown packages take <secs> seconds to merge
stats
Stats-specific arguments:
Filter:
[search]... Show only packages/repos matching <search>
-e, --exact Match <search> using plain string
-s, --show <p,t,s,a> Show (p)ackages, (t)otals, (s)yncs, and/or (a)ll
Stats:
-g, --groupby <y,m,w,d,n> Group by (y)ear, (m)onth, (w)eek, (d)ay, (n)one
--limit <num> Use the last <num> merge times to predict durations
--avg <fn> Select function used to predict durations
complete
: shell completion helperaccuracy
: analize predictions accuracyEmlop reads default settings from $HOME/.config/emlop.toml
. Set $EMLOP_CONFIG
env var to change
the file location, or set it to ""
to disable.
This example file documents the format, and lists supported options. Command-line arguments take precedence over the config file.
emerge emlop
The ebuild is also maintained in the moltonel overlay, which you can enable using eselect-repository.
Install Rust and using portage or
rustup. Make sure ~/.cargo/bin/
, is in your
$PATH
.
The current Minimum Supported Rust Version is 1.71. When building emlop
with an old rustc version,
you might need to pass --locked
to cargo install
, to use explicitly tested dependency versions.
cargo install -f emlop
git clone https://github.com/vincentdephily/emlop
cd emlop
cargo test
cargo install -f --path .
Cargo only installs the binary, which is all you really need, but you may want to manualy install some files fetched from github or the crates.io page: bash completion, zsh completion, fish completion, and example config file.
Thanks in advance. See contributing for pointers. Emlop is licensed as GPLv3.