A simple PoshBot plugin for asking WolframAlpha a question.
To install the module from the PowerShell Gallery:
PS C:\> Install-Module -Name PoshBot.Wolfram -Repository PSGallery
To install the plugin from within PoshBot:
!install-plugin --name poshbot.wolfram
- askwolfram
WolframAlpha requires an API key in order to query against their API.
To get an API key, you need to register at http://products.wolframalpha.com/api/.
Once you have the API key, edit your PoshBot configuration file and add a new hashtable entry under PluginConfiguration
for PoshBot.Wolfram
and restart PoshBot. The plugin will read this configuration item and use the API key when querying the WolframAlpha API.
@{
# Other options ommitted for brevity
PluginConfiguration = @{
'PoshBot.Wolfram' = @{
ApiKey = '<my-api-key>'
}
}
}
!askwolfram '34th president of the united states'
Dwight D. Eisenhower (from January 20, 1953 to January 20, 1961)