-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show more map properties, handle map keywords, filter by map size, latest version and keywords, minor refactoring #85
Conversation
…test version and keywords, minor refactoring - show metadata properties for maps (author,size,wind,etc.) - map size filter - "latest version only" filter - handle map keywords/categories - increase max limit of search result items from 64 to 6400 (server side) - client side limit of search results no longer capped to 60, it increases by 60 every time "more..." is clicked - minor refactoring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't say much to the html / js changes.
basicly the bash script should be python and the keyword list should be a plain text file in this git repo and directly beeing accessed when needed.
wrt to "disscussion on discord". if it was discussed there, it didn't happen. please use github or springrts.com server or the official lobby server for that. |
i've stashed the changes on springfiles.springrts.com. thats not how it works. please ALWAYS use git when you change stuff: no changes without commiting afterwards. |
I did make the commit and PR after testing the set of changes. I tested the html/js changes locally, but as i don't have a springfiles "clone" set up, the only effective way for me to test the server-side changes was live over a few days and reverting/fixing as necessary if issues are found. Took a bit longer, but they've been working : you shouldn't have reverted them. Can i test the requested changes on the springfiles server or not? |
btw, i added the name_without_version to work around the fact that the name and version attributes of files are inconsistent across content types, map names include version in most cases and the version attributes are empty. Some game entries have version in the name and some don't. The naming conventions game and map devs use for versions are inconsistent. |
- replaced bash script to process keywords for python script - load keywords from a local text file instead of scraping the wiki
i've made the change to the keyword processing to use a .py and read a local txt file (and tested on the server :3) and updated the wiki. it still takes about a minute to process all the maps but it shouldn't be a problem as it'll only be run when changes are made. |
i'm working on the other requested changes. It seems that queries aren't using prepared statements properly. In a lot of cases it's irrelevant as they have no external parameters or the variables used are sanitized before building the query string. From googling python and sql prepared statements i expect something like "db.query(queryString,parametersTuple)" instead of "db.query(queryString)" |
- added version_sort_number column to improve "latest only" queries - added new table and column creation commands to upqdb.py - removed sql triggers and commands to fill new attributes, replaced with changes on extract_metadata.py - added reloadMapExtraInfo.py to reload the new attributes/keywords for first time or when criteria changes
- moved keywords conditions code to separate function on search.py - removed/renamed sql file and kept only the foreign key cascade commands
- moved logic to get name_without_version to specific functions to specify the regex only once (and fixed it to avoid replacing lone "v" in the map name) - updated keywords for about half the maps
note @abma i've fixed many of the issues you raised. The changes from this PR have been deployed on the server as they were developed and stuff seems to be working, so this should be merged in. Further changes would get new PRs. I don't plan to do any more code changes on this PR other than adding the manually set keywords for the remaining half of the map pool (i've covered up to maps starting in I). |
- set keywords for most remaining maps - added description for nometal keyword
- set keywords for new maps
@abma I've been asked to delete some maps. It's best to just code/deploy that feature, but do I do it as part of this PR? I don't think it's a good idea to make a separate PR while this one is still pending. |
thank you + sorry for the delay! |
There's a thread about this on the forum:
https://springrts.com/phpbb/viewtopic.php?f=1&t=47144
I've updated the DB and relevant files on the server. (can be reverted by dropping the new colums and trigger and reverting the modified files). The increase of max limit for search result items on search.py had been done months ago after discussion on discord.
The sql changes made were added through the
sql/fileKeywordsSchemaTriggers.sql