Mythos is a collection of command line utils, intended to fulfill a range of different functions. The reason they are collected like this is really just organization. Instead of having ~/.config/util_i_wrote_1, ~/.config/util_i_wrote_2, etc, mythos-utils will be grouped under a shared ~/.config/mythos directory.
The individual utils are mostly projects geared toward learning and filling specific (potentially niche) needs I have. These range from wrappers for commands (plutonian-shores) to system navigation and management (arachne).
Mythos-Core is a library shared between different mythos-utils.
- cli: Provides functions used to parse command line args. This is mostly
clean_cli_args, which turns args into an easier to read format. - conf: Provides functionality for reading values from config files.
- dirs: Provides utils with mythos directories.
Charon is a utility to assist with installing mythos-utils from their source code. It saves a list of files/directories which were created into a charon file. This file can then be used to remove deprecated files and uninstall utilities.
Charon looks for a file with the extension .charon, which contains a list of local files and their destinations.
@ $DIR_CODES_TO_CREATE [target] [destination] [opts]
[target]
- relative/path/to/file
- rel/path/to/dir/*
[destination]
- /abs/path/to/directory
- $HOME/path/to/dir
- ~/path/to/dir
- MYTHOS_DIR/path/to/dir, where MYTHOS_DIR is one of the following:
- A, ALIAS
- B, BIN
- C, CONFIG
- D, DATA,
- LB, LIB,
- LC, LCONFIG, LOCALCONFIG
- LD, LDATA, LOCALDATA NOTE: In the final option, if the path DNE, it will be created.
[opts]
eStrip extensionEDon't strip extensionoOverwrite if existsONo overwrite_Copy files that start with an underscore.Copy dotfiles###Where#is an octal digit, representing file permissions
NOTE: opts can be in any order, however ### must be contiguous.
Opts are 'false' by default.
Charon can check the .charon file output from the last install command and remove any files that weren't included in the current install.
e.g.
In version 1.0 a file named file1 was included.
In version 1.1, this file is no longer needed. It is excluded from the charon install file.
Charon can check the compare outputs of v1.0 and v1.1.
It will see that file1 is now 'orphaned' and will remove it.
Charon can read the install syntax as an uninstall file. Alternatively, the absolute paths for each file installed are listed, separated by newlines. This file is saved at $MYTHOS_DATA_DIR/charon/$UTIL_NAME.charon. It is not recommended to alter the uninstall file.
These are tools intended to be used from the command line, typically from bash.
A bash interface for mythos_core::cli::clean_cli_args(). e.g. cmd -abc --def xyz => cmd -a -b -c --def xyz
A bash interface for mythos_core::conf.
Allows utils to cleanly find valid MYTHOS_DIRS and their subdirs.
The primary use case is as follows. If a UTIL must read its config file, which can exist at
- $MYTHOS_LOCAL_CONFIG_DIR/UTIL/
- $MYTHOS_LOCAL_CONFIG_DIR/
- $MYTHOS_CONFIG_DIR/UTIL/
- $MYTHOS_CONFIG_DIR/
This commands provides a concise method to check for each of these dirs.