Back to browse
OpenXMW Plugin Inquiry
Introduction Hjfunny and MarkChai ... About 3 minutes This page content What is OpenXMW Principle Principle An example Check the weather # What is OpenXMW Open…
Added May 19, 20260 views0 copies
Prompt
Introduction
Hjfunny and MarkChai
...
About 3 minutes
This page content
What is OpenXMW
Principle
Principle
An example
Check the weather
#
What is OpenXMW
OpenXMW is a communication interface between Scratch and Python developed by hjfunny and Markchai. It allows Scratch and Python to interact with each other! Therefore, it can easily achieve some operations that the original Scratch cannot do, such as calling external HTTP interfaces, AI, etc. OpenXMW provides an open and universal interface for anyone to use Python to write plugins and easily implement the functions users need. In other words, you may not need to wait for the official Scratch extension in the future, because you can write plugins to achieve the desired functions by yourself or use plugins written by others. (That is to say, our competitor is the official Scratch (not
In a sense, OpenXMW is an engine for cloud computing of Scratch (currently), or a form of SaaS.
Browse the plugin community and download useful plugins: click here
#
Principle
OpenXMW listens to the cloud data of Scratch and uses the idea of "cloud channel" (or "cloud channel") to realize the interaction and communication between Scratch and Python. It plays the role of a data interaction channel and intermediary between Scratch and Python.
#
Principle
We adhere to the principle of contributing to the community and community users, and have developed the OpenXMW project. OpenXMW should not be used for any operations that may disrupt the stability of the community. OpenXMW should only be used in one's own works, and it is forbidden to use OpenXMW in other people's works, otherwise serious consequences may occur.
For the safety of the community, the source code and core functions of OpenXMW will not be made public. It is strictly prohibited to crack, modify, disclose, or use OpenXMW in any form in violation of regulations, or deliberately/maliciously copy its working mode and write similar programs, otherwise it will be regarded as infringement. Violators will be severely punished and prohibited from using OpenXMW.
Please do not obtain or tamper with OpenXMW's communication data through illegal means. Violators will be punished and prohibited from using OpenXMW.
OpenXMW complies with the user agreement of the Scratch community. With the user's compliance with these principles and the provisions in the documentation, OpenXMW is explicitly supported by the official Scratch community. In order to prevent user violations, we have added corresponding preventive measures in the OpenXMW program.
#
An example
Check the weather
Example
Example
You can write a weather checking plugin to support the execution of this command (this plugin can be found in the plugin community, click to jump
.
Create a weather.py file in the ./plugins/files/ folder:
def weather(parameters):
try:
from requests import get
import json
city = parameters['city']
url = 'https://v.api.aa1.cn/api/api-tianqi-3/index.php?msg=%s&type=1' % city
resp = json.loads(get(url).text)['data']
for data in resp:
if data['riqi'] == parameters['week']:
result = data
return {
"temperature": result['wendu'],
"weather": result['tianqi'],
"wind": result['fengdu'],
"air": result['pm']
}
except Exception as e:
print(str(e))
return {"error": str(e)}
Then, run the Scratch blocks, and you will receive a response containing temperature, weather, wind, and air. You can click here
to jump to the project that includes this example.
Return
Return
Using OpenXMW, you can easily achieve various functions that are connected to Scratch, such as a QQ bot. For example, the project "Cloud Channel: Forward Messages to QQ Official Group"
You can also modify the plugin name arbitrarily, but you need to correspondingly modify the instruction name in the Scratch project and the file name in ./plugins/files.
You can provide constructive suggestions, privately feedback issues or vulnerabilities to us, and we will distribute 500-50000 gold coins to each special contributor in the Scratch community.
OpenXMW authors hjfunny and Markchai reserve all rights to OpenXMW and are not responsible for any consequences caused by improper operation by users or the influence of others on the software through illegal means. Running OpenXMW represents your agreement to all the provisions in this document.Replace text in [BRACKETS] with your own values before pasting.