Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rM-self-serve committed Jul 1, 2024
1 parent a5f2eac commit 3110169
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
![Static Badge](https://img.shields.io/badge/reMarkable-v3.10.2-green)
![Static Badge](https://img.shields.io/badge/reMarkable-v3.11.3+-green)
[![rm1](https://img.shields.io/badge/rM1-supported-green)](https://remarkable.com/store/remarkable)
[![rm2](https://img.shields.io/badge/rM2-supported-green)](https://remarkable.com/store/remarkable-2)
[![opkg](https://img.shields.io/badge/OPKG-webinterface--upload--button-blue)](https://toltec-dev.org/)
[![Discord](https://img.shields.io/discord/385916768696139794.svg?label=reMarkable&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/ATqQGfu)

# WebInterface-Upload-Button
Add a button that will open a file explorer window on your phone or computer and allow you to upload a file, for the ReMarkable Tablet's Web Interface. Alternative to drag and drop.
Add a button that will open a file explorer window on your phone or computer and allow you to upload a file, for the ReMarkable Tablet's Web Interface. Alternative to drag and drop.

### As of v3.12 the Web Interface has an import button, thus this program is no longer necessary.

![demo](https://github.com/rM-self-serve/webinterface-upload-button/assets/122753594/609178f3-b6ae-4cb2-89cf-bfb77f639c7e)

Expand Down Expand Up @@ -36,4 +38,8 @@ Then open http://10.11.99.1/

---

### Thanks for 3.11 support

> [<img src="https://github.com/Scoder12.png" alt="Scoder12" width="60"/>](https://github.com/Scoder12)
![cli](https://github.com/rM-self-serve/webinterface-upload-button/assets/122753594/8206a208-9a04-47e7-a9c7-0565ed54a73a)
6 changes: 3 additions & 3 deletions install-webint-upldbtn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Copyright (c) 2023 rM-self-serve
# SPDX-License-Identifier: MIT

upldbtn_sha256sum='c2c873b0a4859e2fd038ed9fb9889ca0c70ec530dda33c00adb17c00312d2fd7'
js_sha256sum='c632e8095b9640bc76c4219de987415aba183f3ceb5c23321578459d8d6ef8b5'
upldbtn_sha256sum='6cc1c350fbcaf599f8a498050a1cb843501bd8615dc29449a15b303e08f88e4e'
js_sha256sum='6488bfce61b20912e097029942b8a77a4d8fabbafc69f53cbf1dbd634ecd6711'

release='v1.1.2'
release='v1.2.0'

installfile='./install-webint-upldbtn.sh'
pkgname='webinterface-upload-button'
Expand Down
19 changes: 19 additions & 0 deletions webinterface-upload-button
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: MIT

main() {
inapplicable_version_exit
# collect options before or after command
no_prompt=false
cmd=()
Expand Down Expand Up @@ -37,6 +38,22 @@ main() {
true
}

inapplicable_version_exit() {
conf_file='/usr/share/remarkable/update.conf'
if ! [ -f $conf_file ]; then
echo >&2 "Error: Can't find ${conf_file}"
exit 1
fi
xo_version=$(grep 'REMARKABLE_RELEASE_VERSION' $conf_file | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+')
IFS=. read -r versA versB _ _ <<<"$xo_version"

if [ "$versA" -eq 3 ] && [ "$versB" -ge 12 ] || [ "$versA" -ge 4 ]; then
echo 'webinterface-upload-button is no longer necessary as of v3.12,'
echo 'please uninstall.'
exit
fi
}

checkspace() {
needed=20
available=$(df '/' | tail -n1 | awk '{print $4}')
Expand Down Expand Up @@ -69,6 +86,8 @@ cli_info() {
echo ' -h, --help Show help'
}



refresh_html() {
ndx_content=$(cat $index_file)
}
Expand Down

0 comments on commit 3110169

Please sign in to comment.