GithubHelp home page GithubHelp logo

eikek / chee Goto Github PK

View Code? Open in Web Editor NEW
26.0 2.0 3.0 1.97 MB

A command line tool for managing photos.

Home Page: https://eknet.org/main/projects/chee/

License: GNU General Public License v3.0

Scala 88.23% Nix 0.38% Emacs Lisp 10.37% Shell 0.01% HTML 1.00%
photo-manager scala photo-organizer command-line exif bouncy-castle

chee's People

Contributors

arvindsv avatar eikek 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

Watchers

 avatar  avatar

chee's Issues

Problem with bin/chee and local repositories

When building locally using sbt make-zip, the generated zip file creates the chee script which is supposed to work when placed somewhere in the path. The script generated is this:

#!/bin/sh

cd $(dirname $(readlink -e $0))

java -cp lib/fastparse_2.11-0.4.1.jar:lib/scala-library-2.11.8.jar:lib/fastparse-utils_2.11-0.4.1.jar:lib/sourcecode_2.11-0.1.1.jar:lib/better-files_2.11-2.16.0.jar:lib/scala-logging_2.11-3.5.0.jar:lib/logback-classic-1.1.7.jar:lib/logback-core-1.1.7.jar:lib/slf4j-api-1.7.20.jar:lib/scopt_2.11-3.5.0.jar:lib/scrimage-core_2.11-2.1.7.jar:lib/imageio-core-3.2.1.jar:lib/common-lang-3.2.1.jar:lib/common-io-3.2.1.jar:lib/common-image-3.2.1.jar:lib/imageio-jpeg-3.2.1.jar:lib/imageio-metadata-3.2.1.jar:lib/metadata-extractor-2.8.1.jar:lib/xmpcore-5.1.2.jar:lib/commons-io-2.4.jar:lib/pngj-2.1.0.jar:lib/sqlite-jdbc-3.14.2.1.jar:lib/config-1.3.1.jar:lib/bcpg-jdk15on-1.55.jar:lib/bcprov-jdk15on-1.55.jar:lib/mime-util-2.1.3.jar:lib/chee_2.11-0.3.0-SNAPSHOT.jar  $CHEE_OPTS chee.cli.Main "$@"

However, when you try to use this with a non-global (erm, local) repository as mentioned in this post - like this - chee add -r *, it fails:

$ chee add -r *
Error: Path `/path/to/chee-0.3.0-SNAPSHOT/pictures' does not exist!
Try `chee help' for detailed help topics or `--usage' for usage information.
Error: Invalid options

If you try it with this: chee add -r pwd/*, it works, but it no longer uses the local .chee directory. All of this is happening because of the generated .chee script changing the working directory before it starts. When I change the "chee" script to be this, it works:

#!/bin/sh

libdir=$(dirname $(readlink -e $0))

java -cp "${libdir}":"${libdir}/lib/fastparse_2.11-0.4.1.jar":"${libdir}/lib/scala-library-2.11.8.jar":"${libdir}/lib/fastparse-utils_2.11-0.4.1.jar":"${libdir}/lib/sourcecode_2.11-0.1.1.jar":"${libdir}/lib/better-files_2.11-2.16.0.jar":"${libdir}/lib/scala-logging_2.11-3.5.0.jar":"${libdir}/lib/logback-classic-1.1.7.jar":"${libdir}/lib/logback-core-1.1.7.jar":"${libdir}/lib/slf4j-api-1.7.20.jar":"${libdir}/lib/scopt_2.11-3.5.0.jar":"${libdir}/lib/scrimage-core_2.11-2.1.7.jar":"${libdir}/lib/imageio-core-3.2.1.jar":"${libdir}/lib/common-lang-3.2.1.jar":"${libdir}/lib/common-io-3.2.1.jar":"${libdir}/lib/common-image-3.2.1.jar":"${libdir}/lib/imageio-jpeg-3.2.1.jar":"${libdir}/lib/imageio-metadata-3.2.1.jar":"${libdir}/lib/metadata-extractor-2.8.1.jar":"${libdir}/lib/xmpcore-5.1.2.jar":"${libdir}/lib/commons-io-2.4.jar":"${libdir}/lib/pngj-2.1.0.jar":"${libdir}/lib/sqlite-jdbc-3.14.2.1.jar":"${libdir}/lib/config-1.3.1.jar":"${libdir}/lib/bcpg-jdk15on-1.55.jar":"${libdir}/lib/bcprov-jdk15on-1.55.jar":"${libdir}/lib/mime-util-2.1.3.jar":"${libdir}/lib/chee_2.11-0.3.0-SNAPSHOT.jar" $CHEE_OPTS chee.cli.Main "$@"

With this change, it uses the local repository and the example in the documentation of "add" command works.

The generated file target/bin/chee does the right thing. I guess this line needs to be changed.

format parser cannot parse identifiers containing `-`

Parsing identifiers with a - in format patterns doesn't work:

% chee scale -l 1200  -p '~:origin-filename~%' 'len>0'
Error: Identifier `origin' is ambiguous. Possible candidates are: origin-tag, origin-lastmodified, origin-mimetype, origin-added, origin-orientation, origin-make, origin-width, origin-model, origin-checksum, origin-iso, origin-height, origin-encrypted, origin-location, origin-filename, origin-created, origin-pixel, origin-path, origin-length, origin-extension, origin-comment.

chee add has problems with symlinks

This may be best shown through a series of commands run in the shell:

$ tree .
.
├── dir-with-photos
│   ├── img1.png
│   └── subdir
│       └── img2.jpg
└── link-to-dir-with-photos -> dir-with-photos/

3 directories, 2 files

$ mkdir .chee

# Works fine when using the directory directly (not through a symlink)
$ chee add -r dir-with-photos
Add /tmp/dir/dir-with-photos/img1.png … Added
Add /tmp/dir/dir-with-photos/subdir/img2.jpg … Added
Added: 2 files; in 0:00:00.702

# Uses one location for the whole thing
$ chee info
/tmp/dir/dir-with-photos: 2
All: 2

$ rm -rf .chee/
$ mkdir .chee

# Does not work when using the same directory through a symlink
$ chee add -r link-to-dir-with-photos
in 0:00:00.0

# Does not work when using the same directory through a symlink, even when adding a / at the end
$ chee add -r link-to-dir-with-photos/
in 0:00:00.0

# Works when providing subdirs through the symlink
$ chee add -r link-to-dir-with-photos/*
Add /tmp/dir/link-to-dir-with-photos/img1.png … Added
Add /tmp/dir/link-to-dir-with-photos/subdir/img2.jpg … Added
Added: 2 files; in 0:00:00.870

# But creates two locations. :(
$ chee info
/tmp/dir/link-to-dir-with-photos: 1
/tmp/dir/link-to-dir-with-photos/subdir: 1
All: 2

Can't install with nix

Hi, I realize you are not doing much with this, but maybe you'll find some time to help me? It would be great. I really like the software!

The issue is: I am unable to install it using nix. I tried both nix-env command you suggest and downloading the source and running nix-build within the project dir. Both end up in an sbt error:

Error: Could not retrieve sbt 0.13.13
builder for '/nix/store/a9h2rax4ccx3lwnnmbqkjr52a2ks05jg-chee-0.3.0.drv' failed with exit code 1
error: build of '/nix/store/a9h2rax4ccx3lwnnmbqkjr52a2ks05jg-chee-0.3.0.drv' failed

(stack trace: https://pastebin.com/GAVAcP2B)
Most probably caused by:
You probably access the destination server through a proxy server that is not well configured.

What I find weird is that when I downloaded the source, installed jdk and sbt, I was able to build the program by issuing: sbt make-zip as you describe. This makes me think that maybe the issue is with some variables being set by nix but I was unable to track down the specifics.

EDIT:
Not sure how useful this is but I realized that when issuing sbt make-zip it downloads from: downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.13/jars/sbt.jar while in the error case it doesn't use the typesafe repo.

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.