Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/windows-binary.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: Windows Binary Package

permissions:
contents: write

on:
push:
tags:
Expand Down
64 changes: 36 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

[![Demo](https://raw.githubusercontent.com/bordaigorl/rmview/vnc/screenshot.png)][demo]

<div align="center">

| | |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| CI/CD | [![CD - Build Windows](https://github.com/bordaigorl/rmview/actions/workflows/windows-binary.yml/badge.svg)](https://github.com/bordaigorl/rmview/actions/workflows/windows-binary.yml) |
| Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff) [![code style - Black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![License - GPL-3.0-only](https://img.shields.io/badge/license-GPL-9400d3.svg)](https://spdx.org/licenses/GPL-3.0-only.html) |

</div>

## Features

Expand All @@ -18,10 +26,10 @@

## Compatibility

| | ScreenShare | VNC Server | rm2fb |
| -------------- | :----------------: | :----------------: | :----------------: |
| RM1/2 < v2.9 | :x: | :white_check_mark: | :white_check_mark: |
| RM1/2 >= v2.9 | :white_check_mark: | :x: | :x: |
| | ScreenShare | VNC Server | rm2fb |
| ------------- | :----------------: | :----------------: | :----------------: |
| RM1/2 < v2.9 | :x: | :white_check_mark: | :white_check_mark: |
| RM1/2 >= v2.9 | :white_check_mark: | :x: | :x: |


> :warning: **Update 2.9+ users** :warning::
Expand Down Expand Up @@ -101,19 +109,19 @@ The supported configuration settings are below.
Look in file `example.json` for an example configuration.
All the settings are optional.

| Setting key | Values | Default |
| ------------------------ | ------------------------------------------------------- | ------------- |
| `ssh` | Connection parameters (see below) | `{}` |
| `backend` | `"auto"`, `"screenshare"`, `"vncserver"` | `"auto"` |
| `orientation` | `"landscape"`, `"portrait"`, `"auto"` | `"landscape"` |
| `pen_size` | diameter of pointer in px | `15` |
| `pen_color` | color of pointer and trail | `"red"` |
| `pen_trail` | persistence of trail in ms | `200` |
| `background_color` | color of window | `"white"` |
| `invert_colors` | if true, start the tablet with inverted colors | `false` |
| `hide_pen_on_press` | if true, the pointer is hidden while writing | `true` |
| `show_pen_on_lift` | if true, the pointer is shown when lifting the pen | `true` |
| `forward_mouse_events` | Send mouse events to tablet (see below) | `false` |
| Setting key | Values | Default |
| ---------------------- | -------------------------------------------------- | ------------- |
| `ssh` | Connection parameters (see below) | `{}` |
| `backend` | `"auto"`, `"screenshare"`, `"vncserver"` | `"auto"` |
| `orientation` | `"landscape"`, `"portrait"`, `"auto"` | `"landscape"` |
| `pen_size` | diameter of pointer in px | `15` |
| `pen_color` | color of pointer and trail | `"red"` |
| `pen_trail` | persistence of trail in ms | `200` |
| `background_color` | color of window | `"white"` |
| `invert_colors` | if true, start the tablet with inverted colors | `false` |
| `hide_pen_on_press` | if true, the pointer is hidden while writing | `true` |
| `show_pen_on_lift` | if true, the pointer is shown when lifting the pen | `true` |
| `forward_mouse_events` | Send mouse events to tablet (see below) | `false` |

**PLEASE NOTE:**
When `backend` is `auto`, if the tablet is using version 2.9 and above then `screenshare` is used;
Expand All @@ -129,17 +137,17 @@ This option is only available if using `"backend": "vncserver"`, which in turn i

Connection parameters are provided as a dictionary with the following keys (all optional):

| Parameter | Values | Comments |
| ----------------- | ------------------------------------------------------- | ------------------------------------- |
| `address` | IP of remarkable | tool prompts for it if missing |
| `auth_method` | Either `"password"` or `"key"` | defaults to password if key not given |
| `username` | Username for ssh access on reMarkable | default: `"root"` |
| `password` | Password provided by reMarkable | not needed if key provided |
| `key` | Local path to key for ssh | not needed if password provided |
| `timeout` | Connection timeout in seconds | default: 1 |
| `host_key_policy` | `"ask"`, `"ignore_new"`, `"ignore_all"`, `"auto_add"` | default: `"ask"` (description below) |
| `tunnel` | True to connect to VNC server over a local SSH tunnel | default: `false` (description below) |
| `tunnel_compression` | True to enable compression for SSH tunnel | default: `false` (description below) |
| Parameter | Values | Comments |
| -------------------- | ----------------------------------------------------- | ------------------------------------- |
| `address` | IP of remarkable | tool prompts for it if missing |
| `auth_method` | Either `"password"` or `"key"` | defaults to password if key not given |
| `username` | Username for ssh access on reMarkable | default: `"root"` |
| `password` | Password provided by reMarkable | not needed if key provided |
| `key` | Local path to key for ssh | not needed if password provided |
| `timeout` | Connection timeout in seconds | default: 1 |
| `host_key_policy` | `"ask"`, `"ignore_new"`, `"ignore_all"`, `"auto_add"` | default: `"ask"` (description below) |
| `tunnel` | True to connect to VNC server over a local SSH tunnel | default: `false` (description below) |
| `tunnel_compression` | True to enable compression for SSH tunnel | default: `false` (description below) |

The `address` parameter can be either:
- a single string, in which case the address is used for connection
Expand Down
11 changes: 11 additions & 0 deletions hatch_build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
from PyQt5 import pyrcc_main as pyrcc


class CustomHook(BuildHookInterface):
def initialize(self, version, build_data):
pyrcc.processResourceFile(
filenamesIn=["resources.qrc"],
filenameOut="src/rmview/resources.py",
listFiles=False,
)
120 changes: 119 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,120 @@
[build-system]
requires = ["setuptools", "wheel", "PyQt5"]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "rmview"
description = "rMview: a fast live viewer for reMarkable"
readme = "README.md"
license = "GPL-3.0-only"
requires-python = ">=3.8"
authors = [
{ name = "bordaigorl", email = "emanuele.dosualdo@gmail.com" },
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Framework :: Hatch",
"Framework :: Twisted",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Topic :: System :: Hardware",
"Topic :: Utilities",

]
keywords = [
"reMarkable",
"reMarkable-tablet",
"pyqt5",
"vnc",
"stream",
"mirror",
"ssh",
]
dependencies = [
"paramiko",
"pyjwt",
"pyqt5",
"twisted[tls]",
]
dynamic = ["version"]

[project.optional-dependencies]
tunnel = [
"sshtunnel",
]

[project.urls]
Source = "https://github.com/bordaigorl/rmview"
Tracker = "https://github.com/bordaigorl/rmview/issues"
Discussions = "https://github.com/bordaigorl/rmview/discussions"
Demo = "https://www.reddit.com/r/RemarkableTablet/comments/gtjrqt/rmview_now_with_support_for_vnc/"

[project.gui-scripts]
rmview = "rmview.rmview:rmViewMain"

[tool.hatch.version]
path = "src/rmview/__about__.py"

[tool.hatch.envs.default]
path=".venv"
dependencies = [
"black",
"ruff",
"mypy",
"coverage[toml]",
"pytest",
"pytest-cov",
"pytest-xdist",
]

[tool.hatch.build]
artifacts = [
"src/rmview/resources.py" # Generated by custom build hook below
]

[tool.hatch.build.hooks.custom]
dependencies = ["pyqt5"]

[tool.hatch.build.targets.sdist]
exclude = ["/.github"]

[tool.hatch.build.targets.wheel]
packages = ["src/rmview"]

[tool.pytest.ini_options]
addopts="-n4 --cov"

[tool.ruff]
line-length = 120
select = [
"A",
"B",
"C",
"DTZ",
"E",
"EM",
"F",
"FBT",
"I",
"ICN",
"ISC",
"N",
"PLC",
"PLE",
"PLR",
"PLW",
"Q",
"RUF",
"S",
"SIM",
"T",
"TID",
"UP",
"W",
"YTT",
]
10 changes: 0 additions & 10 deletions setup.cfg

This file was deleted.

54 changes: 0 additions & 54 deletions setup.py

This file was deleted.

1 change: 1 addition & 0 deletions src/rmview/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "3.1.3"