emad-elsaid / dirtree

Visualizing files paths as an interactive tree, works nicely with gnu linux tools such as find, ls, or git ls-files
MIT License
118 stars 11 forks source link

syntax for screenshot? #9

Open jonnyhtw opened 1 year ago

jonnyhtw commented 1 year ago

hi there,

i have the html output version of dirtree working and it looks great!

i can't work out the syntax for the screenshot option though and have tried a few things, for example...

> dirtree -s $PWD
/usr/share/ruby/tempfile.rb:128:in `initialize': wrong number of arguments (0 for 1+) (ArgumentError)
        from /home/williamsjh/.gem/ruby/gems/dirtree-1.0.0/exe/dirtree:111:in `new'
        from /home/williamsjh/.gem/ruby/gems/dirtree-1.0.0/exe/dirtree:111:in `<top (required)>'
        from /home/williamsjh/bin/dirtree:23:in `load'
        from /home/williamsjh/bin/dirtree:23:in `<main>'

thanks for any tips!

emad-elsaid commented 1 year ago

I think ruby changed the function that creates temp file in some version to require a parameter, so the code doesn't get past that line, if you can fix it by passing any string to this function in line 111. it should get past that line and run google chrome to create a screenshot