Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Add more options to the config for filtering posts. #4

Closed
Wulfre opened this issue Apr 25, 2017 · 9 comments
Closed

Add more options to the config for filtering posts. #4

Wulfre opened this issue Apr 25, 2017 · 9 comments
Assignees

Comments

@Wulfre
Copy link
Owner

Wulfre commented Apr 25, 2017

As commented by @gjennks here.

I added some options to the config for filtering posts.

I dont know how well I coded it as I dont know a massive amount, but I have made it so it can filter posts by file type, rating and score as well as tags (more info in const.py).

More filters.zip

@Wulfre
Copy link
Owner Author

Wulfre commented Apr 25, 2017

I just leave the rating and score to the tags: score:</>/=x rating:s/q/e. I feel like its unnecessary to implement something twice. The score filter might work, as it will save a tag, but the rating filter limits someone who wants to have safe images in one search, and explicit images in another, same with the file type.

@ghost
Copy link

ghost commented Apr 25, 2017

Have a look in the files, its is not global filters, its like the tags, tailored to each filter group.

@Wulfre
Copy link
Owner Author

Wulfre commented Apr 25, 2017

Sorry for the misunderstanding, I skimmed over everything between classes. That sounds like a great idea, no clue why I didn't think of that myself. It would slightly increase the time it takes to search and filter through the posts, but I think that is worth the two extra tags.

@ghost
Copy link

ghost commented Apr 25, 2017

It also helps lower download amount if you filter out swf and webm as they can be considerably larger than just image files (gif can be large too).

@Wulfre
Copy link
Owner Author

Wulfre commented Apr 25, 2017

I personally just use the -animated tag, assuming that they are tagged correctly. It might be better to group swf and webm together as 'animated' and group the rest as 'images' and filter between those. Gifs are a bit of a grey area.

@ghost
Copy link

ghost commented Apr 25, 2017

But then some post have a webm and a swf version, maybe some would only want to get one of the versions.

@Wulfre
Copy link
Owner Author

Wulfre commented Apr 25, 2017

The only real issue would be dealing with jpg, png, and single frame gifs. I can see separating webm and swf, but separating the 3 image types would be tedious for the end user.

EDIT: I just noticed that filtering is currently done in serial. Ill probably rewrite it to be multiprocessed, or at least multithreaded and then I can fit in your ideas.

@ghost
Copy link

ghost commented Apr 25, 2017

Ye, my coding knowledge is minimal so I basically just did it as simple as possible.
Well tbh the main reason I wanted it there was for separating webm and swf, as its excluding what is listed it might be nice to have the option of 'images' that would be equivalent to 'jpg, png, gif'

@Wulfre
Copy link
Owner Author

Wulfre commented Apr 25, 2017

To be honest, my coding isn't the best either. I learned all my python from reading the original version of this script and researching how to improve it little by little.

Right now I need to figure out how to clean up some of the individual variables in the filter while keeping it easy to read, so hopefully I can speed it up and add in more options.

@Wulfre Wulfre self-assigned this Jun 22, 2017
@Wulfre Wulfre closed this as completed Jul 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant