Coder Social home page Coder Social logo

Comments (14)

jklontz avatar jklontz commented on June 20, 2024

If you enroll from a folder, the command should look like br -enroll /path/to/folder, which will recursively enroll all files in the folder, instead of br -enroll /path/to/folder/* which the shell will expand to a long file list as you've discovered :). If you need to filter your files, a regexp can be specified: br -enroll /path/to/folder(*.jpg) -- see the implementation in EmptyGallery as this syntax of the regexp I provided may be slightly wrong.

from openbr.

sklum avatar sklum commented on June 20, 2024

I'm not thrilled with this response - having every file name appended to the Gallery metadata field in this situation is incorrect.

from openbr.

jklontz avatar jklontz commented on June 20, 2024

I'm open to alternatives, but no elegant ones immediately come to mind for me.

from openbr.

sklum avatar sklum commented on June 20, 2024

That's why I opened an issue?

from openbr.

jklontz avatar jklontz commented on June 20, 2024

K, one suggestion would be to name the gallery after the first and last file in the list. I'm not sure how easy that is to implement though -- I haven't looked at that part of the code in a while though. Another alternative is to detect really long gallery names, and then store an MD5 hash of the name in these cases. I think I'm leaning in favor of the hashing approach...

from openbr.

sklum avatar sklum commented on June 20, 2024

Hashing seems reasonable. Anything above 64 characters?

from openbr.

jklontz avatar jklontz commented on June 20, 2024

Works for me -- I don't think gallery name is used that often anyway.

from openbr.

lbestrowden avatar lbestrowden commented on June 20, 2024

I need to enroll a folder of files and filter them so only jpeg files are enrolled. -enroll path/to/folder/*.jpg works from the shell, but I need to do this from within the YouTube plugin with a list of arguments to execute. Is there a regular expression that can also be used in this case (not from the shell)?

from openbr.

jklontz avatar jklontz commented on June 20, 2024

@lbestrowden Yes, see my first comment. br -enroll '/path/to/folder(*.jpg)' will avoid shell interpretation and be handled within OpenBR. For details, see EmptyGallery in gallery.cpp, in this case EmptyGallery::regexp = *.jpg.

from openbr.

lbestrowden avatar lbestrowden commented on June 20, 2024

The correct syntax ended up being br -enroll '/path/to/folder[regexp=jpg]'. EmptyGallery uses EmptyGallery::regexp to match the suffix of the filenames. Is this the desired functionality, as it's not able to match an arbitrary regular expression?

from openbr.

jklontz avatar jklontz commented on June 20, 2024

Lacey, please feel free to submit a fix -- desired functionality is
dictated by actual encountered needs :)

On Thu, Aug 1, 2013 at 12:52 PM, lbestrowden [email protected]:

The correct syntax ended up being br -enroll '/path/to/folder[regexp=jpg].
EmptyGallery uses EmptyGallery::regexp to match the suffix of the
filenames. Is this the desired functionality, as it's not able to match an
arbitrary regular expression?


Reply to this email directly or view it on GitHubhttps://github.com//issues/72#issuecomment-21951739
.

from openbr.

lbestrowden avatar lbestrowden commented on June 20, 2024

Ok, will do at some point. For my current purposes, matching the suffix is sufficient... say that 5 times fast. :)

from openbr.

sklum avatar sklum commented on June 20, 2024

Made the change in fa4557b.

from openbr.

jklontz avatar jklontz commented on June 20, 2024

Just saw this message, so this can be closed now?

from openbr.

Related Issues (20)

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.