Skip to content
polygonstewPublic

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

30 Commits

Folders and files

Repository files navigation

read.tre

C# status


download

Grab the latest tre.exe from releases, drop it in a folder on PATH. Bidirectional CLI for the .tre format. Companion to my create.tre VS Code extension.(in dev)

OR

install via

scoop

scoop install https://raw.githubusercontent.com/polygonstew/read.tre/main/read.tre.json

winget

winget install polygonstew.read.tre <1.0.3 in review>

usage

tre .                  # current dir -> <foldername>.tre
tre <folder>           # that folder -> <foldername>.tre
tre <file.tre>         # build folder structure from a .tre
tre --hidden <folder>  # include hidden folders (.git, .vscode, etc)
tre -h                 # help

The reverse mode also reads Windows tree /F /A output, so this works:

tree /F /A > sample.txt
tre sample.txt

format

Simple 2-space indent. Folders end with /. Files don't.

demo/
  readme.md
  src/
    main.py
    utils/
      helper.py
  tests/
    test_main.py

encoding gotcha

If you redirect tree /F through PowerShell's >, older versions write UTF-16 without a BOM and the parser misreads it. Workaround:

tree /F /A | Out-File -Encoding utf8 sample.txt

cmd's > writes ANSI/UTF-8 and works fine.

build

dotnet publish -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true

Drop the exe somewhere on PATH (C:\tools\ works) and call it from any terminal.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages