Code Monkey home page Code Monkey logo

godu's People

Contributors

abitrolly avatar kanlac avatar leonklingele avatar leslie-wang avatar viktomas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

godu's Issues

`?` key for help

Now I need a keyboard shortcuts help. ) Like pressing '?' in GitHub to remind that are the abilities that godu provides beyond fat dir navigation.

Add colors

If this program have colors, as in gdu (for example), it would be very beautiful.

Space between columns

Right now are the file view columns right next to each other. If the filename is too long it pretty much joins the 2 columns in one long line.

There should be one or two cell margin between columns

Wild card matching in .goduignore

Just thought I'd open an issue for what's mentioned in the readme. This should behave similar to .gitignore.

Perhaps have a look at gobwas/glob. It should allow matching directories and file names.

Parsing of user input + better user interface

Right now godu takes user input line by line, If the line is a number, it will parse it as Enter command otherwise it a GoBack.

There should be first an investigation of what UI would bring the most bang for the buck.

  • Bringing only colors?
  • Bringing and implementing Termbox?
  • Introduction some one key controls (options might be numbers and other characters so user can enter folder with just one key)

After this is clear it can be either implemented as a part of this issue or split into more issues.

Possible race codition

WaitGroup.Add method should be called only from the main goroutine.

// Note that calls with a positive delta that occur when the counter is zero
// must happen before a Wait. Calls with a negative delta, or calls with a
// positive delta that start when the counter is greater than zero, may happen
// at any time.

This is not true in walkSubFolderConcurrently since it's called recursivelly from the nested goroutines.

Fails to launch in kitty terminal

Just get "2021/05/14 15:52:45 terminal entry not found" when launched in kitty [https://github.com/kovidgoyal/kitty]. Runs correctly in urxvt, termite, etc.

go1.16.4 linux/amd64
kitty 0.20.3

Unify naming for tree/file/folder

This is note from #39

We are now using folder/tree/file, often interchangeably. I think we should come up with naming convention going forward. I was thinking about calling everything file, but that might be more confusing. Maybe we can say that folder is a special case of file and stop using tree completely.

I'm going to have a look into unifying the naming convention before moving onto tackling #14

Publish godu through homebrew and apt-get

I'd like to make the installation of godu easier and hence more accessible to broader public. It's very simple if the user uses golang but for others the process of downloading a binary and putting it on path might be more complicated.

  • Investigate how to create a custom PPA repository to allow easier installation for debian users
  • Investigate how to add godu to homebrew (probably custom cask)

Feature Request: Save state for use without walking directories again

Would it be possible to save the result of the run to a file that can be displayed with the same user interface (like how atop does it) ? My runs take quite a long time and I lose the whole session when I leave. I know the results would not be live but it would still be a lot of help identifying large files and directories (which I can double check manually) especially on a slow moving server.

(I do not strictly need this but I am posting it as a nice feature to have depending on the scope you have in mind)

Show last access date

While clearing .cache it is nice to see the time of the last access for files inside of each dir.

Needs sudo to install?

godu fails to install without sudo

$ go get -u github.com/viktomas/godu
go install os/user: open /usr/local/go/pkg/linux_amd64/os/user.a: permission denied
$ go version
go version go1.8 linux/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/anatoli/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build539612467=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

Add `q` key to quit

I am quite used to less way of quitting from console programs by just pressing q key. It would be great if godu supported that as well.

Scrolling in columns

The columns are now having fixed height with showing only first x files in a folder. All other files are overflowing past the screen and nobody can ever see them.

The expected behavior would be something like the ranger where the columns starts scrolling when the cursor is 9 rows from the edge of the screen.

It starts scrolling past this padding when we approach end/beginning of the list.

If screen has lest then 18 rows we are showing the cursor in the middle.

Does godu support sparse files?

It appears that godu does not recognize sparse files such as the Docker.raw file used by Docker on macOS. This file is a sparse file which is usually defaulted to 64 GB. It only takes up a few GB of used space though. Disk utilities such as du and dust recognize this as a sparse file and do not report the unallocated size. It would be nice if godu also supported sparse files.

Allow keystroke to remove/rescan selected file/dir

The idea is to have a shortcut like 'x' or 'r' to remove the selected file/dir when scrolling trough
the view and have the view jump to the upper directory and refresh this one as well as every directory above by a simple substraction (without a scan).

Also a shortcut to rescan the selected directory would be cool (if other apps changed it).

Apt package?

Is there an APT version, or a PPA? (for debian/ubuntu)

unicode support

seems like chinese character is not well-supported. Only display partial string.

Screen Shot 2020-01-20 at 11 27 55 PM

Error on go get, package does not exist - readme info is wrong

# cd .; git clone https://github.com/tomasvik/godu /Users/me/gopath/src/github.com/tomasvik/godu Cloning into '/Users/me/gopath/src/github.com/tomasvik/godu'... remote: Repository not found. fatal: repository 'https://github.com/tomasvik/godu/' not found package github.com/tomasvik/godu: exit status 128

you have the wrong path to the repo in the readme.

make size limit configurable

godu supports pruning a folder structure from files/folders that are less than some limit. The main benefit of which is that the output is not necessarily long. My use case is finding files that have hundreds of MB and I forgot them somewhere on the drive.

This limit is now hardcoded to 10MB, it should be configurable by -l and --limit flag.

godu let's user enter a file

Currently there is no mechanism to differentiate between file and folder in core.File structure. file is just a folder with no files in it. It would be nice to make this dinstinction for two reasons:

  • indicating what is folder and what file
  • not let user enter a file

Writing tests is complicated

The meaning of the test is being lost in initialization of the folder tree. Especially with the change towards bi-directional tree (by introductin File.Parent in #18).

There is increasing need for abstraction over the tree. What I'm thinking is string that would define the whole folder structure.

Example

testFolder = "a(b:50,c:100,d(e:100))"

that would introduce equivalent of

	testFolder := &File{"a", nil, 250, true, []*File{
		&File{"b", nil, 50, false, []*File{}},
		&File{"c", nil, 100, false, []*File{}},
		&File{"d", nil, 100, true, []*File{
			&File{"e", nil, 100, false, []*File{}},
		}},
	}}
// please not that the parent field is not filled in for simplicity

No updates until godu finishes full walk

Once godu is run, there is no update for a while on a big volume.

My suggestion would be to use a one line, in place updating message of what's happening.
Additionally, you could give a cmd line option to list each line output so that somebody can pipe it to a txt file if they want to see it differently.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.