Skip to content
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

Update the maintenance scripts #103

Open
kymckay opened this issue Aug 5, 2018 · 6 comments
Open

Update the maintenance scripts #103

kymckay opened this issue Aug 5, 2018 · 6 comments
Labels

Comments

@kymckay
Copy link
Member

kymckay commented Aug 5, 2018

I said I'd look into the scripts that retrieve SQF commands. My initial plan was to scrape the intercept pointers deceleration file the same way I did for the sqf repository (this is still an option as far as that is concerned). However I've realised that this package also reads the description and other information of each command so I'm in the process of checking why the scripts aren't working.

The first thing I notice is that armadoc.py only processes (alphabetically) up to curatorEditingArea.

Here is the information initially queried by the armadoc.py script. It seems that the code to continue requesting more information (I assume that's what this is meant to do) isn't working:

while 'query-continue' in content:
data = data + content['query']['categorymembers']
params['cmcontinue'] = content['query-continue']['categorymembers']['cmcontinue']
f = urllib.request.urlopen("https://community.bistudio.com/wikidata/api.php?%s" % urllib.parse.urlencode(params))
content = json.loads(f.read().decode('utf-8'));

@kymckay kymckay added the task label Aug 5, 2018
@ShadowRanger
Copy link
Member

It's very strange how it suddenly doesn't work though, as I know this script originally ran with no issues. It could be some sort of flood detection on the wiki perhaps? Honestly not sure.

@haztakki
Copy link

haztakki commented Aug 6, 2018

Does this need to be done in Python? I can throw something together in PHP to copy all commands / functions on the Wiki if needed,

@ShadowRanger
Copy link
Member

It can honestly be in whatever language as long as it ends up doing the same thing.

@haztakki
Copy link

haztakki commented Aug 6, 2018

I just quickly threw this together, it is 11 lines and was done very fast as you will see. Just showing how easy it is to achieve this. I have to go out soon but I can finish it later this evening. I assume you don't care about the visual output but how it copies it so I was thinking if you run it via command line (batch file) then it would generate a .txt file with the following format:
command|command|command|etc
Can you just apply all commands again or do you actually need comparison of new commands added? You don't want the operators either, right?
Made using PHP, DOMDocument.
https://youtu.be/4Hx2zmxdH1w

@ShadowRanger
Copy link
Member

The existing Python scripts have been made to automate the full process of retrieving the commands and then generating the required JSON contents to be placed into the relevant files for Atom to read. Any implementation of this same system would be fantastic, and would be even better if it supported doing the same for BIS functions as well as the current scripts don't do that. I personally don't have any experience in Python or PHP, so its much appreciated that you guys @SilentSpike @hazj are helping and would be awesome if either the current scripts could be fixed or new ones made to do the same thing.

@haztakki
Copy link

Hello. I have bene extremely busy the last week or so. Real issues and working on web app / other stuff. I assume this is still need of some attention? I'll get back on it this weekend. @ShadowRanger Regarding your point about JSON and Atom? What is the specific format that you need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants