I wrote a simple python program for Haiku that allows the creation of QRs from a text.
I realized I needed a way to share links with my cellphone so I created this graphical app that generates the QR, displays it and, at your will, saves it on the disk.
It uses Bethon 0.5.4.1 which works only on Haiku 32bit, bethon is the wrapper for BeOS API and python.
There’s also a bash installation script
you can obtain it typing:
`git clone https://github.com/tmtfx/HaiQR.git`
The program looks like this:
if you like it you can also try the BGator feed aggregator (which uses Bethon too)
Looks great! Hopefully we can figure out a way to have it run on 64-bit too.
Looks nice! A port for haikuports in mind? (although I see that for the Bethon source there is no license mentioned?)
Maybe Bethon would be a good candidate to have at haikuarchives also?
Well if someone can address me to a quite compete python wrapper to Haiku API I will be happy to use it on 64 bit too. I know some important functions do not work for python like replicants, the deskbar tray integration, (the Clipboard?)… this limits the range of operability but as you can see it works nice and the UI is lighter than QT. I know that some time ago someone started a new wrapper, but I have not received any news about that. Are those projects stalled?
I’m not familial with haikuporter, I should start looking at it (as being an importart part of Haiku environment), but until I start looking at it if someone desires having it in haikuports I’ll be grateful for his “haikuports” work
Single source code files have this Copyright inside:
Copyright 1999 by Donn Cave, Seattle, Washington, USA.
All rights reserved. Permission to copy, modify and distribute this
material is hereby granted, without fee, provided that the above
copyright notice appear in all copies.
no other license files I found on previous version of Bethon
in any case this version is a refined version of 0.5.4 adapted to latest changes in Haiku by Donn Cave itself after I asked him about an (installation?) problem (don’t remember exactly what problem was)
Guess that makes it MIT which should go nice, should give it a spin with haikuporter here
Seeing the history (remembered it was around for BeOS back in the days), having it at haikuarchives could be a good candidate (easier find and maybe someone can pick up a 64bit for it there)?
I guess you were granted to share the source on github, so it’s your call, either way fine with where it is now
Yes I’ve asked him and he agreed!
Created a recipe for the python module qrcode, seems to be working fine (HaiQR is ok also, but it downloads seperate packages for some modules)
Open PR at haikuports (tested on 32bit):
qrcode: qrcode, new recipe by Begasus · Pull Request #6126 · haikuports/haikuports · GitHub
backports (tempfile and weakref): backport (tempfile and weakref) new recipes by Begasus · Pull Request #6127 · haikuports/haikuports · GitHub
These are all set to use python version 3+, python2.7 doesn’t work for qrcode, maybe you can check your code to them? (six and pillow are already available in haikuports)
From some quick looks in the source it still uses python2.7, maybe it could be revived to use python3.7?
Actually I don’t know what you mean, as you can see in install.sh file, after installing pip_python with pkgman I use it to install the modules needed, and python 2.7 loads them otherwise HaiQR won’t load… And actually backports.tempfile is a backport for python 2.7 of tempfile module for python 3.
For Bethon I don’t think I’m skilled enough to port it to Python3, but I can try, I don’t know how much hard is that job… Anyway the real problem is that there’s not an official and complete Haiku specific python wrapper, so Bethon is still limited to the BeOS 32-bit API which will last 'till R1, and then… Who knows…will 32 bit Haiku be maintained? And even if it will be maintained, the code written for Bethon will be limited to run only in one platform (32-bit)
But take my thoughts as the ones of a not competent person, I’m not a programmer. And I hope to be wrong about this subject.
I’m not too familiar with python (aside from the recipes), guessed that backports_tempfile had something to do with it, didn’t investigate further there (yet)
PS totally not a programmer/developer here also
It seems Porting Bethon to python3 is more a c++ matter rather than python one, as porting Bethon to Haiku 64 bit and the newer c++ platform
Please can you double check about qrcode for python2.7? doing a pip install it succeds (with some errors?) but in the end it works.
→ pip install qrcode
Installing collected packages: qrcode
ERROR: Could not install packages due to an EnvironmentError: [Errno -2147459064] Read-only file system: ‘/packages/python-2.7.18-2/.self/non-packaged’
but it installs it correctly
Seeing it also, for this python2.7 is needed (which is deprecated), also some depending recipes are missing ports to python2.7, and I don’t think any one is really looking into creating recipes for 2.7 anymore.
a pity as there’s no nearly complete BeAPI implementation to Python 3 AFAIK.
As I’m used to python I have no choices to use anything more than python 2.7