endowdly / cercis

This is a lame .NET 6.0 ripoff of solidiquis/erdtree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cercis

This is a lame .NET 6.0 ripoff of solidiquis/erdtree.

A bLazInGlY sLoW, skinnier version of the ancient tree command which displays a colorful depth indented listing of files with their memory sizes adjacent.

Cercis Screenshot

Installation

dotnet tool install --global endowdly.cercis --version 0.1.0 

Usage

Usage:
    cercis [directory] [options]

Directory:
    Directory to traverse. Defaults to current working directory.

Options:
    -d, --depth            Unsigned integer indicating how any nested directory levels to display. Defaults to all.
    -p, --ignore-patterns  Comma-separated list of prefixes. Directories containing any of
                           these prefixes will not be traversed. Their memory size will be ignored.
    -P, --no-ignore        Do not ignore any directories.
    -s, --sort             Sort tree by memory-size ascending.
    -S, --sort-descending  Sort tree by memory-size descending.
    -h, --help             Displays help prompt.

Build

Snag a dotnet SDK, version 6.0.23 or higher. Clone this repo and run dotnet build. It has no dependencies, so, it should be quick.

You can then dotnet run.

Windows Toolless Build

If you are running a Windows 10 machine and don't want to use dotnet, then git clone https://github.com/endowdly/cercis/tree/oldschool and run the build.cmd file. An executable binary will compile to out, which you can then manually add to your path.

Every Windows 10 build comes with its own csharp compiler. The old-school branch packages an old script w/response file setup I used to build medium-complexity projects on an organizationally limited system with no development tools.

It may not be as performant as this branch due to sketchy native kernel calls and lack of optimization.

Disambiguation about units for memory

As recommended in IEC 80000-13, this utility will report memory sizes using SI units rather than binary units. As such you can expect 1KB = 1000B and not 1KiB = 1024B.

(Good call solidiquis).

Questions you might have

Q: You ripped off erdtree!

It's not a question. But, yes I did. As such, I included the original MIT license instead of my usual preference Unlicense. If you fork this repo, be sure to do the same and credit the original coder. This is not enough of a derivative, in my opinion.

Although, as I work on bugs and make improvements, the code is drifiting from the original implementation. It could be a fork soon.

Q: What the hell is a Cercis anyway?

Erdtree is an homage to Elden Ring. Cercis is a genus of trees (in real life) whose flowers erupt all over. To me, their appearance is similar to the Erdtree, albeit tiny, non-luminous versions.

Q: Cercis hangs when I call it on some folders?

I fixed this. It was a reparse point traversal issue.

Q: Why did you make this? It's totally, TOTALLY unnecessary.

Mostly because I couldn't build erdtree with cargo or rustup in two attempts. Instead of trying to track down the issue with my tooling (or with erdtree's implementation), I decided to just bang it out in C#. Also, I was bored.

Q: Is it any good?

Haha, no. But, it does work! And you don't need Rust. Though you might want to get Rust. Or I may want to rewrite this in C.

Q: Is it cross-platform?

Yes. The main branch is packed with .NET 6 (7 soon) and works wherever .NET 6 does (Win/Linux/macOS).

Q: How do you know that this is blazingly slow?

It's not written in Rust.

But, in all seriousness, cercis is kind of fast. It's a least comparable to tree.com, which doesn't even get size information.

Not a Benchmark

About

This is a lame .NET 6.0 ripoff of solidiquis/erdtree

License:MIT License


Languages

Language:C# 100.0%