Skip to content

Conversation

@mattrobenolt
Copy link
Owner

Fixes #85

@braindevices
Copy link

I like this one a lot. Why is is not merged?

@mattrobenolt
Copy link
Owner Author

I think it was just waiting on some outside confirmation. Wanna try it out? :)

@jjsp556
Copy link

jjsp556 commented Sep 8, 2020

I think it was just waiting on some outside confirmation. Wanna try it out? :)

I've been testing out this update, and it works as expected. I successfully tested both single and multiple filters (e.g. jinja2 -f myfilter.myfunction -f ansible.plugins.filter.core.combine test.txt).

@rpersee rpersee mentioned this pull request Jun 21, 2022
@velle
Copy link

velle commented Sep 8, 2022

I hope you will merge this, since I really need this feature :)
I looked through the code, and its very simple and elegant, and its hard for me to see how anything could go wrong.
Sincerely.

@tierpod
Copy link

tierpod commented Nov 23, 2022

Is there any chance to see this PR merged into main branch? It can drastically extend jina2-cli capabilities.

I tested this patch and it works fine. For example, we have hostname and want to add ip address in rendered config file, so it can be one simple filter (filters/ip.py):

import socket

def get_ip(hostname):
    return socket.gethostbyname(hostname)

and in template it can be

{{ hostname }}: {{ hostname | get_ip }}
jinja2 -f filters.ip.get_ip test.j2 test.yaml

@sfc-gh-turbaszek
Copy link

@mattrobenolt any chances to merge this change?

@boonware
Copy link

@mattrobenolt Bump. Can this be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: ipaddr filter

8 participants