simple split/filter by text?

   1998   3   1
User Avatar
Member
1736 posts
Joined: 5月 2006
Offline
I have a file pattern top returning a bunch of files. I want to split all the files that are webp images to convert them to a more standard format.

I put down a split top, and try the following, with increasing levels of irritation each time it errors:

@extension=webp
@extension="webp"
`@extension="webp"`
`@extension`="webp"
@extension='webp'

etc.

Eventually I remember there's a labs 'filter by value top', but even that doesn't work unless you remember to set the operation to 'contains', and I realise this is all way harder than it needs to be.

Can the tops expression fields be made more forgiving with text? Especially considering that comes up so often in tops graphs?

Also any kind of help would be appreciated within the UI when constructing tops expressions, and be easy to find in the docs. I always have to search around for too long to get the info I need, in the end its easier and faster to get the Labs team to write a helper top, or to vetch here on the forum.

-matt
http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
260 posts
Joined: 3月 2011
Offline
mestela
I have a file pattern top returning a bunch of files. I want to split all the files that are webp images to convert them to a more standard format.

I put down a split top, and try the following, with increasing levels of irritation each time it errors:

@extension=webp
@extension="webp"
`@extension="webp"`
`@extension`="webp"
@extension='webp'

etc.

Eventually I remember there's a labs 'filter by value top', but even that doesn't work unless you remember to set the operation to 'contains', and I realise this is all way harder than it needs to be.

Can the tops expression fields be made more forgiving with text? Especially considering that comes up so often in tops graphs?

Also any kind of help would be appreciated within the UI when constructing tops expressions, and be easy to find in the docs. I always have to search around for too long to get the info I need, in the end its easier and faster to get the Labs team to write a helper top, or to vetch here on the forum.

-matt

Did you manage to make expressions work with text?
I always have problem with that... Last time I had to deal with text & expressions, I used strcomp HScript expression, to compare strings.
User Avatar
Member
1736 posts
Joined: 5月 2006
Offline
I used the labs 'filter by value', but then I still had to use two of them to get the functionality of a split, and even then its more difficult than it needs to be because the operation mode needs to 'contains' (it fails on 'equal to' because its a string and not a number), and its another gotcha of do you or don't you use an @, or backticks, or make sure to spell the attribute right because it doesn't list the attributes in a combo box etc... too many ways to shoot yourself in the foot.

Looks like this if you're curious. I love that labs is trying to solve this problem, but it shouldn't be up to labs. Tops attribute discovery/comparison/manipulation should be core to tops and idiot-proof (cos I'm a high functioning idiot):

Attachments:
webp_filter_by.png (30.8 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
260 posts
Joined: 3月 2011
Offline
mestela
I used the labs 'filter by value', but then I still had to use two of them to get the functionality of a split, and even then its more difficult than it needs to be because the operation mode needs to 'contains' (it fails on 'equal to' because its a string and not a number), and its another gotcha of do you or don't you use an @, or backticks, or make sure to spell the attribute right because it doesn't list the attributes in a combo box etc... too many ways to shoot yourself in the foot.

Looks like this if you're curious. I love that labs is trying to solve this problem, but it shouldn't be up to labs. Tops attribute discovery/comparison/manipulation should be core to tops and idiot-proof (cos I'm a high functioning idiot):

Image Not Found
I think that's an HScript problem, not just TOPs related. It would be very useful if we could use the "@" syntax with python expressions... I think HS lacks a lot of functions, but python still lacks the speed HS expressions bring to the table.
  • Quick Links