Code Monkey home page Code Monkey logo

harvest's People

Contributors

g-gundam avatar jaromil avatar puria 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

harvest's Issues

hanging while scanning a dir with 200_000 images

Hi guys!

I tried and scan a dir with 200k image file with the command:

harvest -p DIR_PATH -t image --file

I get the prompt

Harvest DIR_PATH
type: image

and then it hangs indefinitely.

For comparison, ls DIR_PATH takes 0m1,543s to execute (and prompt all 200k files).

Am I doing something wrong?

can't compile fatal error: harvest.lua.c: No such file or directory

After the first attempt I needed to install luastatic then I'am getting the next error:

$ git submodule update --init --recursive
$ make                                                                                                                                ✔ 
CC=cc AR=ar INCLUDE="-I /usr/include/luajit-2.1" LDADD="/usr/lib/x86_64-linux-gnu/libluajit-5.1.a -lm -ldl" CFLAGS="-O3 --fast-math" make -C src
make[1]: Entering directory '/home/sliss/source/harvest/src'
cc -c -I /usr/include/luajit-2.1 -O3 --fast-math lfs.c -o lfs.o
ar rcs lfs.a lfs.o
CC="" luastatic harvest.lua cliargs.lua cliargs/*.lua cliargs/utils/*.lua align.lua lfs.a
cc -c -I /usr/include/luajit-2.1 -O3 --fast-math harvest.lua.c
cc1: fatal error: harvest.lua.c: No such file or directory
compilation terminated.
make[1]: *** [Makefile:9: all] Error 1
make[1]: Leaving directory '/home/sliss/source/harvest/src'
make: *** [Makefile:24: luastatic] Error 2

mv and cp are not implemented so I wrote a wrapper

harvest/src/harvest.lua

Lines 168 to 178 in a9466f9

cli:command("mv", "move the selection to destination")
:argument('dest','folder to which the selection will be moved')
:action(function(options)
print("TODO: mv to destination: "..options.dest)
end)
cli:command("cp", "copy the selection to destination")
:argument('dest','folder to which the selection will be moved')
:action(function(options)
print("TODO: mv to destination: "..options.dest)
end)

I like the idea behind harvest, and it was pretty close to what I needed for my ~/Downloads cleanup project, but I saw that the mv and cp commands were not implemented yet. However, it seemed like I could make a wrapper around the current unfinished harvest and implement cp and mv myself. The result was hvst.

Usage:
  hvst
  hvst help
  hvst cp <TYPE> <DEST> [OPTION]...
  hvst mv <TYPE> <DEST> [OPTION]...

Examples:

  # Display help message.
  hvst help

  # List files in current directory.
  hvst

  # Copy all images to ~/Pictures.
  hvst cp image ~/Pictures

  # Copy all images to ~/Pictures and be verbose.
  hvst cp image ~/Pictures --verbose

  # Show what would happen if we tried to move all images to ~/Pictures/YYYY/MM.
  hvst mv image '@"~/Pictures/$_->{year}/$_->{month}"' --recon

  # Move all images to ~/Pictures/YYYY/MM.
  hvst mv image '@"~/Pictures/$_->{year}/$_->{month}"'

  # Both cp and mv commands take --verbose and --recon (or -v and -r for short).

I'm posting here in case someone finds this useful.

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.