Skip to main content

Python library for easy development of apps for reMarkable tablet in Python.

Project description

rm-pySAS - Python library for easy development of apps for reMarkable tablet in Python.

The goal of this library is to make it as easy as possible to create applications for reMarkable tablet using Python.

It works as a wrapper around SAS and it must be installed separately.

All types of widgets are assumed from SAS and all have same behavior. It's good idea to read about them before using this library here.

Dependencies

  • Simple - SAS (simple app script) package
  • Python3
  • pip

All dependencies can be install via Toltec with command:

opkg install python3 simple python3-pip

Installation

From PIP

pip install rm_pysas

Build from source

  1. Download repository and enter it's directory

    $ git clone https://github.com/tenJirka/rm-pySAS.git
    $ cd rm-pySAS
    
  2. Install building package build

    $ python3 -m pip install --upgrade build
    
  3. Create package

    $ python3 -m build
    

    Package files will be located in dist/ file

  4. Install package

    $ python3 -m pip install dist/rm_pysas-*-py3-none-any.whl
    

Uninstallation

python3 -m pip uninstall rm_pysas

Examples

All examples can be found in examples/ directory.

Simple two buttons screen:

from rm_pySAS import *

# Create object representing current scene on display
scene = Scene()

# Add text label to current scene on coordinates x = 500, y = 400, weight = 100 and height = 50
# Text of the label is "Testing scene", font size is 40 and text is alight to center
# All last three parameters are optional
scene.add(Label(500, 400, 100, 50, "Testing scene", fontSize=40, justify="center"))

# Add exit button to current scene with id=exit
# When no fontSize or justify is specified, it assume last value given from previous
# widgets or default SAS will be used.
scene.add(Button(300, 800, 100, 50 , "Exit", id="exit"))

# Create second button, that will do anything.
scene.add(Button(800, 800, 100, 50, "Button that does nothing", id="button"))

# Creating event loops tha will end only when exit button is clicked
while(True):
    scene.display()

    # scene.input represent output from SAS and is actually scripts input
    # It's list of id of widget interacted with and, if exists, value entered.

    # When exit button is pressed, the cycle will break.
    if scene.input[0] == "exit":
        break

Credits

  • rmkit - reMarkable app framework on which this library stands

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rm_pysas-0.0.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rm_pysas-0.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file rm_pysas-0.0.1.tar.gz.

File metadata

  • Download URL: rm_pysas-0.0.1.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for rm_pysas-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b8db8814b7d13579f90fe77660d78dde9871e55f9f42699085a9032e3764da5a
MD5 bf4225ab2cedb56d1c906946fb070ac6
BLAKE2b-256 3a34d791a4af873c9f9d3d9f6cff70de3a19eb7ad3ce10620cdbf6bbe37f0821

See more details on using hashes here.

File details

Details for the file rm_pysas-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: rm_pysas-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for rm_pysas-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5d84d59d7992e3ce218be5cb98de8d17926a61df7b72eb09c43d56ef7438ca4d
MD5 97d60759e4b40582d874a0464f84fb1e
BLAKE2b-256 fb39a47652f6d863d905c2573e064cc234994f391856ef4e0f0f61fe970f26c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page