Memobird Agent is an open-source API designed to print documents on Memobird. This API is accomplished by reverse engineering of its official APP.
Texts, pictures, QR Codes and internal stickers can be printed using only a few lines of code.
pip install memobird_agent
import memobird_agent
document = memobird_agent.Document()
document.add_text(text="Test Text", bold=0, font_size=1, underline=0)
document.add_picture(path_to_image)
document.add_qrcode("Text to be encoded into the QR Code")
document.add_text(sticker_id)
user_id = memobird_agent.Util.get_user_id(username="username", password="password")
memobird_agent.Util.bind_machine(smart_guid=smart_guid, user_id=user_id)
document.print(smart_guid, user_id, to_user_id)
import memobird_agent
document = memobird_agent.Document()
document.add_text("Text to print")
document.print(smart_guid, user_id, to_user_id)
A: Those are information about the sender and the receiver. Detailed descriptions are listed below:
smart_guid
is the 16-hex-digit hardware ID of the printer which can be found by long-pressing the button on the machine for six seconds.
user_id
is the user ID of the sender, which can be obtained by using memobird_agent.Util.get_user_id(username, password)
.
to_user_id
is an optional parameter which represents the receiver's machine ID. (Defaults to be same as the user_id
)
A: To print a document on a specific machine, that machine must be binded to the user. Two methods are available: Use the official APP, or use the builtin function memobird_agent.Util.bind_machine(smart_guid, user_id)
.
Issues and Pull Requests are welcomed.
- Provide API to change status of the LED and buzzer.
- Provide more functionalities.