Giter Site home page Giter Site logo

rhettbull / autofile Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 0.0 13.44 MB

Mac command line app to automatically move or copy files based on metadata associated with the files. For example, file your photos based on EXIF metadata or use MP3 tags to file your music files.

License: MIT License

Python 100.00%
cli exif exiftool file-manager macos metadata mp3

autofile's People

Contributors

rhettbull avatar

Stargazers

 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

autofile's Issues

Add a regex filter

A filter that could use regex to pull value(s) out of the filtered value would be very useful. E.g. pulling dates out of filenames (e.g. filename_2020_01_01.jpg)

Pull out the metadata plugins into separate mdinfo package

If the metadata plugins were pulled into a separate mdinfo package, could have a tool like this:

mdinfo "comment: {finder:comment}" "title: {exiftool:title}" --json file.jpg

and get something like this:

{
    "title": "Title",
    "comment": "My Comment"
}

Or

$ mdinfo {docx:author} file.docx
John Doe

Add slice, splice filters

slice(1:), slice(:4) -- similar to Python list slice, works on strings and lists
splice(start, deleteCount, item1) -- similar to javascript Array.splice() -- apply to both strings and list values

Pull out the MTL parser into a separate class so it can easily be reused

The MLT parser is used today in osxphotos, exif2findertags and autofile. I'll likely use it again. Rather than maintain 3 separate versions, the common parser engine could be pulled out into it's own package, mtlparser

class MTLParser:

    def __init__(self, get_field_value: Callable):
        ...

get_field_value would get passed the current field,subfield, default, options and return the field value so that could be implemented separately from the parser.

common things like punctuation and filters would be part of the parser class but could be overridden to implement custom filters, etc.

Sanitize unicode output

Need to sanitize template output for unicode to filesystem conversion before creating paths

Combine --target and --directory

Instead of autofile --target ~/Music --directory "{audio:Artist}"

Just combine these to ~/Music/{audio:Artist}

If this is done, could possibly eliminate both --target and --directory and place the target as the last argument like mv or cp

Change filters to match all, not any

Currently regex, glob, filter all match AND between each other (e.g. if specified, a glob AND a regex must match for a file to match) but match OR (any) if more than one of each specified. E.g. two --filter args will match True if either matches. This is not intuitive. Make all filters cumulative (e.g. all must match for a file to match)

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.