mgoodings / language-sqf

Syntax highlighting and completions for Sqf files in Atom
6 stars 0 forks source link

Added BIS's functions #2

Closed CorruptedHeart closed 9 years ago

CorruptedHeart commented 9 years ago

As scrapped from https://community.bistudio.com/wiki/Category:Arma_3:_Functions

Python script used to scrap

import urllib.request
from bs4 import BeautifulSoup

#url = "https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3"
#file = "a3_methods.txt"
# BIS functions
url = "https://community.bistudio.com/wiki/Category:Arma_3:_Functions"
file = "a3_functions.txt"

response = urllib.request.urlopen(url)

html = response.read()

response.close()

content = BeautifulSoup(html)

links = content.find(id="mw-pages").findAll("a")
outputFile = open(file, 'w')
for link in links:
    outputFile.write(link.string.replace(' ', '_') + "|")

outputFile.close()
mgoodings commented 9 years ago

Cheers