diff --git a/getWikiAssets.py b/getWikiAssets.py new file mode 100644 index 0000000..8cab713 --- /dev/null +++ b/getWikiAssets.py @@ -0,0 +1,6 @@ +import requests + +r = requests.get('https://wiki.claremontmakerspace.org/api.php?action=askargs&conditions=Asset Tag::%2B&printouts=Asset Tag|Requires Certification|Has Reservation URL&format=json&api_version=2') + +with open('wiki-tools.json', 'w') as f: + f.write(r.text) diff --git a/src/ToolsLabelText.vue b/src/ToolsLabelText.vue new file mode 100644 index 0000000..11a1f9b --- /dev/null +++ b/src/ToolsLabelText.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/mediawiki.d.ts b/src/mediawiki.d.ts new file mode 100644 index 0000000..ce6ba44 --- /dev/null +++ b/src/mediawiki.d.ts @@ -0,0 +1,36 @@ +export interface PrintRequest { + label: string; + key: string; + redi: string; + typeid: string; + mode: number; +} + +export interface PageValue { + fulltext: string; + fullurl: string; + namespace: number; + exists: string; // TODO: might be '0'|'1' + displaytitle: string; +} + +// TODO: more prop types exist +export type PropValue = string | PageValue; + +export interface AskResult { + printouts: { + [prop: string]: PropValue[]; + }; + fulltext: string; + fullurl: string; + namespace: number; + exists: string; // TODO: might be '0'|'1' + displaytitle: string; +} + +export interface apiAsk { + query: { + printrequests: PrintRequest[]; + results: { [name: string]: AskResult }; + }; +}