Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Adding delay slider to QR and other small changes #6

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4ab5dc2
Adding delay slider to QR and other small changes
tadeubas Jul 24, 2024
48376f1
changed file windows line endings
tadeubas Jul 24, 2024
5a6674a
Update seedqreader.py by pythcoiner
tadeubas Aug 10, 2024
2daac8a
Update seedqreader.py by pythcoiner
tadeubas Aug 10, 2024
aec0370
Revert "Update seedqreader.py by pythcoiner"
tadeubas Aug 10, 2024
21b4f8f
Revert "Update seedqreader.py by pythcoiner"
tadeubas Aug 10, 2024
8894c96
simplified display_qr thread
tadeubas Aug 20, 2024
775a9c3
UI/UX review to disable/enable options depending on current state
tadeubas Aug 21, 2024
478cfb0
error msg
tadeubas Aug 21, 2024
84dfea6
Fix starting number and QR for SPECTER pMoFN
tadeubas Aug 21, 2024
0c6c9e4
added extra delay on first frame for animated QRs to capture it better
tadeubas Aug 21, 2024
ceb65bb
set delay using mouse wheel
tadeubas Aug 26, 2024
6f30972
update Pillow dependency for Python 3.12
tadeubas Dec 13, 2024
84148b3
update libs, README and other small changes
tadeubas Apr 28, 2025
1cfc34f
Icon
tadeubas Apr 28, 2025
9e886b7
readme binaries
tadeubas Apr 29, 2025
fe58261
Build exe for windows
tadeubas Apr 29, 2025
e541f70
Disable QR format change when QR is active or no_split
tadeubas May 5, 2025
17be881
Added basic support for BBQR
tadeubas May 5, 2025
88312e2
readme
tadeubas May 5, 2025
e1a2642
readme update
tadeubas May 13, 2025
30a1d02
lib urtypes now uses PyPI latest version instead of github
tadeubas May 16, 2025
3ba23d5
Added support for screen / monitor QR code scan
tadeubas May 18, 2025
c996bea
Fix UR multipart QR parts / progress estimation
tadeubas Jun 26, 2025
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
129 changes: 129 additions & 0 deletions .ci/create-spec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
# The MIT License (MIT)

# Copyright (c) 2021-2024 Krux contributors

# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:

# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
"""
build.py
"""
from re import findall
from os import listdir
from os.path import join, isfile
from pathlib import Path
from platform import system
import argparse
import PyInstaller.building.makespec

import sys
sys.path.append(".")
from seedqreader import VERSION

if __name__ == "__main__":
p = argparse.ArgumentParser()
PyInstaller.building.makespec.__add_options(p)
PyInstaller.log.__add_options(p)

SYSTEM = system()

# build executable for following systems
if SYSTEM not in ("Linux", "Windows", "Darwin"):
raise OSError(f"OS '{system()}' not implemented")

# Get root path to properly setup
DIR = Path(__file__).parents
ROOT_PATH = Path(__file__).parent.parent.absolute()
PYNAME = "seedqreader"
PYFILE = f"{PYNAME}.py"
KFILE = str(ROOT_PATH / PYFILE)
ASSETS = str(ROOT_PATH / "assets")
ICON = join(ASSETS, "icon.png")
# I18NS = str(ROOT_PATH / "src" / "i18n")

BUILDER_ARGS = [ ]

# The app name
BUILDER_ARGS.append(f"--name={PYNAME}_{VERSION}")

# The application has window
BUILDER_ARGS.append("--windowed")

# Icon
BUILDER_ARGS.append(f"--icon={ICON}")

# Specifics about operational system
# on how will behave as file or bundled app
if SYSTEM == "Linux":
# Tha application is a GUI
BUILDER_ARGS.append("--onefile")

elif SYSTEM == "Windows":
# Tha application is a GUI with a hidden console
# to keep `sys` module enabled (necessary for Kboot)
BUILDER_ARGS.append("--onefile")
BUILDER_ARGS.append("--console")
BUILDER_ARGS.append("--hidden-import=win32timezone")
BUILDER_ARGS.append("--hide-console=minimize-early")
BUILDER_ARGS.append("--add-binary=assets/libiconv.dll:.")
BUILDER_ARGS.append("--add-binary=assets/libzbar-64.dll:.")

elif SYSTEM == "Darwin":
# Tha application is a GUI in a bundled .app
BUILDER_ARGS.append("--onefile")
BUILDER_ARGS.append("--noconsole")

# For darwin system, will be necessary
# to add a hidden import for ssl
# (necessary for request module)
BUILDER_ARGS.append("--hidden-import=ssl")
BUILDER_ARGS.append("--hidden-import=pillow")
BUILDER_ARGS.append("--optimize=2")

# Necessary for get version and
# another infos in application
# BUILDER_ARGS.append("--add-data=pyproject.toml:.")
BUILDER_ARGS.append("--add-data=form.ui:.")

# some assets
for f in listdir(ASSETS):
asset = join(ASSETS, f)
if isfile(asset):
if asset.endswith("png") or asset.endswith("gif") or asset.endswith("ttf"):
BUILDER_ARGS.append(f"--add-data={asset}:assets")

# Add i18n translations
# for f in listdir(I18NS):
# i18n_abs = join(I18NS, f)
# i18n_rel = join("src", "i18n")
# if isfile(i18n_abs):
# if findall(r"^[a-z]+\_[A-Z]+\.UTF-8\.json$", f):
# BUILDER_ARGS.append(f"--add-data={i18n_abs}:{i18n_rel}")


args = p.parse_args(BUILDER_ARGS)

# Now generate spec
print("============================")
print("create-spec.py")
print("============================")
print()
for k, v in vars(args).items():
print(f"{k}: {v}")

print()
PyInstaller.building.makespec.main([PYFILE], **vars(args))
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,9 @@
__pycache__/
venv/
config
.seedqrenv/
.venv/
.env/
build/
*.spec
dist/
73 changes: 61 additions & 12 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,34 +1,83 @@
SeedQReader
---
# SeedQReader

SeedQReader is a simple tool made for communicate with airgapped Bitcoin Signer.
<img src="assets/icon.png" width="64"/>

**SeedQReader** is a simple tool made for communicate with airgapped Bitcoin Signer.

![SeedQReader](screenshot.png)

It actually can send/receive:
- 1 Frame QRCodes
- Multiframes QRCodes using the `Specter` format (_of_)
- Multiframes QRCodes using the `Specter` format (_p M of N_)
- Multiframes QRCodes using the `UR` format are partially supported (PSBT and Bytes)
- Multiframes QRCodes using the `BBQR` format are partially supported (PSBT)

## Download the latest releases
[<img src="assets/badge_github.png" alt="github releases page" width="186">](https://github.com/tadeubas/seedQReader/releases)

Dependencies:
opencv might be installed
## Install

Install:
Go into this repo and run:
To install on **Linux**, enter the repo folder and run:
```
# create environment to install dependencies
python3 -m venv .seedqrenv

# activate the environment on the current terminal
source .seedqrenv/bin/activate

# install python dependencies on this environment
pip install -r requirements.txt
```

Run under Linux/MacOS:
If you get this error on **Linux**, please install libxcb-cursor:
```
# qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
sudo apt install libxcb-cursor0
```

To install on **Windows**:
```
# create environment to install dependencies
python -m venv .seedqrenv

# activate the environment on the current cmd
.seedqrenv\Scripts\activate

# install python dependencies on this environment
pip install -r requirements.txt
```

If you get this error on **Windows**, install `vcredist_x64.exe` [Visual C++ Redistributable Packages for Visual Studio 2013](https://www.microsoft.com/en-US/download/details.aspx?id=40784). Then uninstall and install `pyzbar` lib again:
```
FileNotFoundError: Could not find module 'libiconv.dll' (or one of its dependencies). Try using the full path with constructor syntax.
pyimod03_ctypes.install.<locals>.PyInstallerImportError: Failed to load dynlib/dll 'libiconv.dll'. Most likely this dynlib/dll was not found when the application was frozen.
[PYI-5780:ERROR] Failed to execute script 'seedqreader' due to unhandled exception!
```

## Run

**Linux/MacOS**:
```
python3 seedqreader.py
```

Run under Windows:
**Windows**:
```
python seedqreader.py
```

If you want i build more cool tools you can support me with bitcoin:
`bc1q5pgfrt09f4vuxyryg95erge38nw94usvpe5gg0`

## Build binaries

```
pip install PyInstaller
rm seedqreader_*.spec
python3 .ci/create-spec.py
python3 -m PyInstaller seedqreader_*.spec
```

## Acknowledgements & Alternatives

Big thanks to [pythcoiner](https://github.com/pythcoiner) for originally creating SeedQReader! 🙌

If SeedQReader isn’t your vibe, check out [bitcoin-qr-tools](https://github.com/andreasgriffin/bitcoin-qr-tools) for another awesome QR code tool for BTC stuff. 😄
Binary file added assets/badge_github.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/libiconv.dll
Binary file not shown.
Binary file added assets/libzbar-64.dll
Binary file not shown.
Loading