Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement complex file filters #1

Open
bgaillard opened this issue Apr 9, 2014 · 0 comments
Open

Implement complex file filters #1

bgaillard opened this issue Apr 9, 2014 · 0 comments
Assignees
Milestone

Comments

@bgaillard
Copy link
Member

It would be very useful to pick files using more complex file filters.

Filters for a set of files :

{
    "id" : "archive",
    "cwd" : "dir",
    "dst" : "archive.zip",
    "src" : {
        "patterns" : ["**/*.png", "**/*.gif"],
        "filters : {
            "creationDate" : {
                "olderThan" : "3D",
                "youngerThan" : "15D" 
            }
            "lastModificationDate" : {
                "olderThan" : "3D",
                "youngerThan" : "15D"
            },
            "mimeTypes" : ["image/gif", "image/png"]
        }
    }
}

Very complex file set, take all PDF file which are not inside the a directory and all the PNG files which have a creation date older than 3 days and all the JPG files which have a creation date younger than 15 days.

{
    "id" : "archive",
    "cwd" : "dir",
    "dst" : "archive.zip",
    "src" : [
        "**/*.pdf",
        "!a/**/.pdf",
        {
            "patterns" : ["**/*.png"],
            "filters : {
                "creationDate" : {
                    "olderThan" : "3D"
                }
            }
        }, 
        {
            "patterns" : ["**/*.jpg"],
            "filters : {
                "creationDate" : {
                    "youngerThan" : "15D"
                }
            }
        }
    ]
}
@bgaillard bgaillard added this to the 0.1.0 milestone Apr 9, 2014
@bgaillard bgaillard self-assigned this Apr 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant