organize icon indicating copy to clipboard operation
organize copied to clipboard

Possibility to use vars instead of absolute paths when using certain location features

Open telometto opened this issue 3 years ago • 0 comments

Is your feature request related to a problem? Please describe. It doesn't seem to be possible to use variables along with certain options, like exclude_dirs.

E.g. this works:

folderpath: &mypath
  - "/run/media/myuser/samsung/"

excl_dirs: &excldirs
  - "github"
  - "backups"

rules:
  - name: "Finding audio"
    locations: *mypath
    subfolders: true
    filters:
        - extension
            - *aud
    actions:
        - echo: "File: {relative_path}"

This doesn't (it keeps asking for a [str]):

folderpath: &mypath
  - "/run/media/myuser/samsung/"

excl_dirs: &excldirs
  - "github"
  - "backups"

rules:
  - name: "Finding audio"
    locations:
      - path: *mypath
        exclude_dirs: *excldirs
    subfolders: true
    filters:
        - extension
            - *aud
    actions:
        - echo: "File: {relative_path}"

In order for that to work, you have to provide an absolute path:

rules:
  - name: "Finding audio"
    locations:
      - path: "/run/media/myuser/samsung/"
        exclude_dirs:
          - "github"
          - "backups"
    subfolders: true
    filters:
        - extension
            - *aud
    actions:
        - echo: "File: {relative_path}"

Describe the solution you'd like Just the possibility to use variables instead of having to use absolute paths 😊

Describe alternatives you've considered I'm just making do with the available options

Additional context It could very well be that it is I that's doing something wrong.

telometto avatar Nov 30 '22 20:11 telometto