JosephTLyons / JosephTLyons/termifind-rust

File Name Truncation Options

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
required
Dominant language
Rust
Stars
12
Forks
1
PR merge metrics
No merged PRs in 30d

Description

This is my most unorganized item. Here are my notes that I had for this item, but it should be cleaned up at some point.

# Truncation options for DirectoryContainer
- [x] 1. None
- No truncation of file names
- [x] 2. Constant
- Truncates all file names to the same length
- [x] 3. Level
- Level 0 -> does not truncate file names, Level 1 -> truncate longest file name to be length of second longest name, Level 1, truncate longest and second longest file name to be length of third longest name, etc.
- [x] 4. AverageFileNameLength
- Get the average file name length and truncate all files to it
- [x] 5. Outliers
- Using some sort of statistical measurement, identify outliers by some definition and truncate them using Level
- [ ] 6. HorizontalFit
- Perform some sort of calculation on all DirectoryContainers and find the appropriate file length so that all DirectoryContainers can be printing in one line. This will use the Constant mechanism. This should also probably set the `horizontal_spacing_between_directory_containers` to 0

It should be noted that we can choose whether or not the string that is used to denote a file name has been truncated can be customized and it can be included in the overall truncation length or it can be excluded from the overall truncation length.

- [x] If the directory container name is longer than the truncation value, then use container name as the truncation value

## Things to consider, but that have not been decided on:
- [ ] Option to allow truncation of directory name too? Not sure, but leaning towards not allowing it, as the directory name is rather important.

- [ ] Should truncation string be placed at the end of the string or in the middle? If it is decided to put it in the middle, changes need to be made to the underlying utility function and unit tests need to be updated. Maybe there could be an option to switch between placing truncation string at the middle or end of the file name.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.