berdav / greenpass

Scriptable green pass / Digital Covid Certificate verifier.
GNU Lesser General Public License v3.0
53 stars 21 forks source link

Fixed input from zbarcam #7

Closed rbicelli closed 3 years ago

rbicelli commented 3 years ago

With these changes zbarcam input is processed correctly. Needs to read standard input line by line and leave the program running while zbarcam is running.

berdav commented 3 years ago

Thank you for your interest, the problem is still present using the -1 switch of zbarcam? (as stated in https://github.com/berdav/greenpass/issues/4 and https://github.com/berdav/greenpass/issues/6 )

If this is not the case I think that using a special file input will introduce some clashes if someone uses a file called "loopinput". I would prefer to use a switch to the script.

rbicelli commented 3 years ago

Yes, it's a dirty fix, maybe an --feed switch or similar would be better.

(Greetings for is_aladeen test case, I laughed)

Il Mar 21 Set 2021, 13:00 Davide Berardi @.***> ha scritto:

Thank you for your interest, the problem is still present using the -1 switch of zbarcam? (as stated in #4 https://github.com/berdav/greenpass/issues/4 and #6 https://github.com/berdav/greenpass/issues/6 )

If this is not the case I think that using a special file input will introduce some clashes if someone uses a file called "loopinput" but I would prefer to use a switch to the script.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/berdav/greenpass/pull/7#issuecomment-923870404, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA5YCLW7624PJUQ3W3TUQN3UDBQUDANCNFSM5EN7MQTA .

berdav commented 3 years ago

I think that using the current master (5b74940aeb2e5b4c7c0ef7d07fca25e89953cc16) would be sufficient, can you check it?

that invalidates the behaviour having a feed of greenpass on the pipe but I think it will be sufficient.

I'm also posting this in the issue.

(thank you for the is_aladeen, I think it should be included in every test ;D)

rbicelli commented 3 years ago

I made that fix for a protoype I was writing. Reading through your code I found that I have to make some changes to adapt to my needs:

With these small chenges it could be used also as a library for other python programs, or at least for mine.

So for now I'll keep my fork.

berdav commented 3 years ago

That are some nice ideas,

I'll open two issues with that ideas, if you want to work on them you're really welcome to do so.

berdav commented 3 years ago

Closing, the current master is now a library, should be possible to do what you're describing in this pull request.

Thank you, if something do not work let me know.