python-apps icon indicating copy to clipboard operation
python-apps copied to clipboard

improve/fix filter_list action in shuffle-tools

Open dadokkio opened this issue 4 years ago • 3 comments

I'm doing some test with some nested list that requires some filtering and I'm having some issue.

The first issue is that json.loads fails to parse valid json (eg. one returned from extracted_archive results). I've added an eval() as workaround as done in other action and this behavior is somehow fixed.

Then I put 2 filter_list block and the second one was like this [notice the #] image

This caused an error because - I think - shuffle considered that as a loop and wrapped the list in []. So, I moved this block to a new subflow.

Now the block in the subflow is receiving directly a simple list of uid. But the block requires a field as required parameter so it seems that works only for list of dict :disappointed:

Should I change if to accept also blank field to operate on simple list? Meanwhile I've seen that an opposite parameter has been added, should we remove duplicated possibilities? [eg, equal opposite - not equal]

dadokkio avatar Jan 28 '21 11:01 dadokkio

I made a pull #54 that address some of previous issues.

dadokkio avatar Jan 28 '21 14:01 dadokkio

I forgot to upadte also yaml file.. so new pull here https://github.com/frikky/Shuffle-apps/pull/57

dadokkio avatar Feb 01 '21 07:02 dadokkio

Hey! Sorry I didn't address this yet.

1: We should build in anything that's relevant to be able to filter a single list, and use subflows for multi-lists. If there's a problem with strings or [] wrapping, that's a coding issue we'll have to fix 2 - Opposites: I think we CAN remove them, but they're also ok to have there for now. Let's not touch it until we feel like we need to, or it gets confusing with too many.

frikky avatar Feb 01 '21 08:02 frikky