maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   mbarcode (https://talk.maemo.org/showthread.php?t=34996)

LordVan 2010-11-18 08:52

Re: mbarcode
 
Quote:

Originally Posted by lardman (Post 876847)
Yes we could really do with a plugin that takes the EAN, and then does a lookup and search for where and what price you can buy the item. Android has had one of these for ages (and in fact was what prompted me to start writing mBarcode, unfortunately it's taken a while!). i.e. http://scan.jsharkey.org/

Now that we have working Python plugins, it should be significantly easier to do the weblookups/scraping required to do this. If there's any exsiting Python code out there that we could start with to save writing the whole thing from scratch, that would be good :)

basically an extension of the amazon plugin? btw .. that always looks on amazon.com .. but i'd rather have it use amazon.at/.de or .co.uk can u set that ? i didn'T see anything about that

systemcrash 2010-11-18 09:59

Re: mbarcode
 
Quote:

Originally Posted by LordVan (Post 876860)
btw .. that always looks on amazon.com .. but i'd rather have it use amazon.at/.de or .co.uk can u set that ? i didn'T see anything about that

I seconds this request. A configurable country-site for the amazon plugin. I would like to use amazon.fr.

LordVan 2010-11-18 10:06

Re: mbarcode
 
Quote:

Originally Posted by systemcrash (Post 876895)
I seconds this request. A configurable country-site for the amazon plugin. I would like to use amazon.fr.

well afaik it just pastes the EAN/ISBN/.. into a link for amazon.com anyway why not rename it and make so that one can specify (maybe even different ones for choice) the url with a placeholder for EAN/ISBN=

e.g. amazon plugin -> urlopenenr plugin

then have config options with a few presets for example for amazon:

and any number of custom urls with the type u want them for

http://www.amazon.de/%CODE% type ISBN, EAN
http://www.thalia.at/shop/ama_homest...=21&submit.y=1 Type ISBN
(this should work i used it from http://www.thalia.at/shop/ama_homest...=21&submit.y=1 ;) )

systemcrash 2010-11-18 10:20

Re: mbarcode
 
Quote:

Originally Posted by LordVan (Post 876900)
well afaik it just pastes the EAN/ISBN/.. into a link for amazon.com anyway why not rename it and make so that one can specify (maybe even different ones for choice) the url with a placeholder for EAN/ISBN=

Even a better idea.

In that case, is it possible to have multiple instances of a plugin at the same time? Usually I'm not interested in looking at two different amazon sites (.fr and .co.uk), but it could be interesting to be able to look at two different book vendors (amazon and Barnes & Noble, for example).

LordVan 2010-11-18 10:37

Re: mbarcode
 
Quote:

Originally Posted by systemcrash (Post 876916)
Even a better idea.

In that case, is it possible to have multiple instances of a plugin at the same time? Usually I'm not interested in looking at two different amazon sites (.fr and .co.uk), but it could be interesting to be able to look at two different book vendors (amazon and Barnes & Noble, for example).

i think one plugin can show more than one like (like the informed individual one does i think)

-- just checked ^^ with informed individual u have 2 lines per code one for getting rating other one for making one ..

so having multiple lines would be quite possible and perfect to use :D

lardman 2010-11-18 11:12

Re: mbarcode
 
Sure, there's no issue (and it would be trivial) with either giving the user the option to change the country code of the Amazon plugin url (or even obtaining that info automatically and doing it for the user) or just allowing the user to change the list of URLs used.

Patches welcome :)

lardman 2010-11-18 11:13

Re: mbarcode
 
Quote:

Originally Posted by LordVan (Post 876929)
i think one plugin can show more than one like (like the informed individual one does i think)

-- just checked ^^ with informed individual u have 2 lines per code one for getting rating other one for making one ..

so having multiple lines would be quite possible and perfect to use :D

Would you prefer multiple buttons on the Resuls Window page or the current setup where you click the "Search the web" button and it opens a list? IMO the latter (current) setup is preferable given the lack of screen space.

lardman 2010-11-18 11:16

Re: mbarcode
 
Quote:

Originally Posted by systemcrash (Post 876916)
Even a better idea.

In that case, is it possible to have multiple instances of a plugin at the same time? Usually I'm not interested in looking at two different amazon sites (.fr and .co.uk), but it could be interesting to be able to look at two different book vendors (amazon and Barnes & Noble, for example).

I would prefer to be presented with a window that summaries the contents of these websites. So it says what the item is, gives links to reviews and then gives a list of prices derived from various websites. I think that would be more useful and usable than needing to start multiple browser windows and scroll around in them. Just my opinion though :)

LordVan 2010-11-18 11:17

Re: mbarcode
 
maybe make it configurable?
talking about that having informed individual open up a list would be good too imho since it currently uses up most of the space ;)

lardman 2010-11-18 11:19

Re: mbarcode
 
Soon you will be able to disable plugins, once I finish writing the code and commit it :)

systemcrash 2010-11-18 17:32

Re: mbarcode
 
Quote:

Originally Posted by lardman (Post 876953)
I would prefer to be presented with a window that summaries the contents of these websites. So it says what the item is, gives links to reviews and then gives a list of prices derived from various websites. I think that would be more useful and usable than needing to start multiple browser windows and scroll around in them. Just my opinion though :)

Not bad!

However, I think this could quickly become quite complex. If Amazon changes the format of the page, thing they do from time to time, then the plugin will be unable to locate the information to show the summary; and an update will be necessary.

What I was proposing was not to open all the browser windows, but just let the user choose which one to open. Something similar to the "Informed individual".

lardman 2010-11-18 17:41

Re: mbarcode
 
Quote:

Originally Posted by systemcrash (Post 877236)
Not bad!

However, I think this could quickly become quite complex. If Amazon changes the format of the page, thing they do from time to time, then the plugin will be unable to locate the information to show the summary; and an update will be necessary.

Well as long as only a single data source fails, the plugin would still be useful, and then the relevant fixes could be made.

Quote:

Originally Posted by systemcrash (Post 877236)
What I was proposing was not to open all the browser windows, but just let the user choose which one to open. Something similar to the "Informed individual".

Well this is afair already provided by the websearch plugin (though it will need some minor modification to accept changes and extra URLs)

lardman 2010-11-19 09:56

Re: mbarcode
 
Lol, shows how much I use the web request plugin (or more likely that it already provides the URLs I need ;) ) - you can actually already edit and add new items to the list chaps...

Scan a barcode, then click the "Search the Web" plugin, you are presented with a list of providers. Now tap the menu bar and you can "Add Custom Provider" or "Edit Providers"

HTH

LordVan 2010-11-19 10:16

Re: mbarcode
 
Quote:

Originally Posted by lardman (Post 877776)
Lol, shows how much I use the web request plugin (or more likely that it already provides the URLs I need ;) ) - you can actually already edit and add new items to the list chaps...

Scan a barcode, then click the "Search the Web" plugin, you are presented with a list of providers. Now tap the menu bar and you can "Add Custom Provider" or "Edit Providers"

HTH

hehe nice but when in settings i go to plugins and to webrequest it tells me it ain'T got a settings window .. which is prolly why i didn'T notice that ;)

lardman 2010-11-19 11:33

Re: mbarcode
 
Apologies, my fault for re-enabling the settings window and not providing messages for those plugins which do something else. I'll add it to the list ;)

Fry-kun 2010-12-04 03:36

Re: mbarcode
 
Can't seem to parse this barcode: http://i53.tinypic.com/igmdsp.jpg

Found on cover of Website Magazine

dragly 2010-12-04 12:15

Re: mbarcode
 
Quote:

Originally Posted by Fry-kun (Post 888876)
Can't seem to parse this barcode: http://i53.tinypic.com/igmdsp.jpg

Found on cover of Website Magazine

That one looks new to me. I think it is an EZCode. It seems like the standard is proprietary, but the specs are open. I read that the codes only contain a small ID that will let you look up the full data on Scanbuy's servers. I.e. not a good option if you don't want to lock yourself down to Scanbuy's systems forever. This is somewhat similar to the Microsoft Tag.

In a couple of threads over at ZBar's forums on SourceForge (the engine mbarcode uses for some 2D barcodes) it seems like the developers didn't really like the idea of the codes and won't spend time implementing them. There is (as with the MS Tag) also a possibility that they will start charging for the service in the future, as well as locking out content they don't approve (the latter is already stated in the Terms Of Service of the MS Tag).

I suspect there won't be any implementation for this in zbar, and thus mBarcode, unless they get really, really popular or open up even more.

lardman 2010-12-06 07:43

Re: mbarcode
 
Hey chaps,

I'm just back from India, time to start finishing off the settings window and then push to Extras me-thinks. Any other thoughts Dragly (and indeed anyone else)?

Fry-kun 2010-12-07 01:24

Re: mbarcode
 
Quote:

Originally Posted by dragly (Post 889060)
...
I suspect there won't be any implementation for this in zbar, and thus mBarcode, unless they get really, really popular or open up even more.

This is similar to scanning a shortened URL (e.g. barcode of a TinyURL.com/etc. link). I think it should be made decodable -- user can make an intelligent decision on whether she wants to "click through". Otherwise, I have to install/use a proprietary application to be able to scan these.. which I would say is a lot worse.

lardman 2010-12-07 08:34

Re: mbarcode
 
Quote:

Originally Posted by dragly (Post 889060)
That one looks new to me. I think it is an EZCode. It seems like the standard is proprietary, but the specs are open. I read that the codes only contain a small ID that will let you look up the full data on Scanbuy's servers. I.e. not a good option if you don't want to lock yourself down to Scanbuy's systems forever. This is somewhat similar to the Microsoft Tag.

In a couple of threads over at ZBar's forums on SourceForge (the engine mbarcode uses for some 2D barcodes) it seems like the developers didn't really like the idea of the codes and won't spend time implementing them. There is (as with the MS Tag) also a possibility that they will start charging for the service in the future, as well as locking out content they don't approve (the latter is already stated in the Terms Of Service of the MS Tag).

I suspect there won't be any implementation for this in zbar, and thus mBarcode, unless they get really, really popular or open up even more.

As the encoding looks reasonably simply, it's a shame the ZBar devs are not interested in implementing it simply for the sake of completeness. It looks like some companies are already using this and there will be a scanner in Samsung phones, it looks like there's one in the iPhone, etc., so we'll have to wait and see whether it becomes popular enough to be added to ZBar.

Alternatively it ought to be possible to create a patch and add it in using the QRcode decoder (in ZBar) as a basis if anyone's feeling daring ;)

lardman 2010-12-08 09:31

Re: mbarcode
 
mBarcode starts too slowly for my liking, so I've added some qDebug()s with elapsed times. This is what we see with the first run through (not all classes instrumented):

Code:

event        elapsed time        event time
startup        0        0
show spash screen        266        266
start main window class        269        3
killing camera app        400        131
set window title        400        0
register dbus metatypes
and connect to shutter/button
signals        413        13
determine initial lens cover state        414        1
load settings        417        3
Create BarcodeDetector        421        4
create Resultswindow        512        91
create VideoWidget        2958        2446
Set autofocus, etc.        2959        1
connect some signals        2959        0
set some window attributes        3020        61
start video widget        3756        736
set videowidget as central widget        3759        3
create and run plugin loader
thread, register Dbus connections        6824        3065

So it looks like the GStreamer pipeline setup is taking a rather long time, and surprisingly the plugin loader thread (or the DBus connection registration) too, I need to look into that as it should really run async...

lardman 2010-12-08 09:34

Re: mbarcode
 
Hmm, that table looks awful, will edit it to remove the tabs

rmerren 2010-12-08 14:59

Re: mbarcode
 
Just wanted to mention again how great this app is! A friend recently got an android phone and wanted to show off the super cool app she had. She can scan bar codes and look stuff up! I pretended to be impressed.

Another friend was scanning a qr code with inigma on his iPhone yesterday. I had inigma on a previous windows phone and it is a good scanner, but neither that version nor the iPhone version is as quick or offers as many options as mBarcode.

So kudos to the author!

lardman 2010-12-08 15:09

Re: mbarcode
 
Thanks for the nice comments rmerren :)

Going back to the startup speed, looks like I made a school-boy error moving the plugin loading to a thread some months ago, I've now fiex this and we end with a startup time which is twice as quick, however the plugin loading still needs to be done. My preference would be to defer this until after the UI is displayed and then let it run in a bg thread, but apparently it's not possible to set thread priorities so this interferes with the camera view, so I'm currently thinking that the plugin loading should be performed when the results window is first displayed - this produces a delay, which is not ideal, so I'll see if there are any other options re. threading.

In any case I hope to have a new version in Extras-devel this evening.

Den in USA 2010-12-08 16:52

Re: mbarcode
 
1 Attachment(s)
Today I tried generating a link to this thread:

Attachment 16225


Works great!

lardman 2010-12-08 18:15

Re: mbarcode
 
Quote:

Originally Posted by Den in USA (Post 892394)
Today I tried generating a link to this thread:

Attachment 16225


Works great!


Lol, thanks :)

Time to get QR codes added to the maemo downloads page so we can install packages automatically too.

lardman 2010-12-08 18:18

Re: mbarcode
 
Right, I've pushed a version of mBarcode that is faster to startup, but then takes longer to display the results window (on the first go), see what you think.

Den in USA 2010-12-08 18:35

Re: mbarcode
 
@ lardman - For my Diablo version I stll need to go through terminal to run. However, not a problem since I use "Personal Launcher" and checked "Run in Terminal".

lardman 2010-12-08 19:07

Re: mbarcode
 
Yeah Diablo has unfortunately been almost forgotten.

I suppose we should try a backport of some of the newer features, but we'll need to change the UI. How many people are still using mBarcode with Diablo? Anyone fancy taking on the challenge (with me)?

AgogData 2010-12-13 11:21

Re: mbarcode
 
i saw an update yesterday but couldn't update, is there some bug ?

dragly 2010-12-13 11:27

Re: mbarcode
 
Quote:

Originally Posted by AgogData (Post 895809)
i saw an update yesterday but couldn't update, is there some bug ?

If it was the QR Code plugin then yes, there was a bug. Seems like the autobuilder made a mistake in giving the .deb file the correct hash.

It has been resolved now, so updating your repositories should give you access to v. 0.0.6-1 and that should update fine.

The update should also resolve the problem with international (UTF8) characters in vCards (thanks to Nikolay Bryskin!).

AgogData 2010-12-13 11:47

Re: mbarcode
 
now im trying to update but i got a call in the middle, i dont know if its affecting the update process or not but thats the xterm :

home/user # apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
hildon-desktop
The following packages will be upgraded:
gstreamer0.10-flac mbarcode-plugin-qrcode
2 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 69.5kB of archives.
After this operation, 41.0kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://repository.maemo.org fremantle/free gstreamer0.10-flac 0.10.15-0maemo3+0m5.tk1.nb1 [32.1kB]
Get:2 http://repository.maemo.org fremantle/free mbarcode-plugin-qrcode 0.0.6-1 [37.4kB]
Fetched 69.5kB in 3s (20.9kB/s)
(Reading database ... 57926 files and directories currently installed.)
Preparing to replace gstreamer0.10-flac 0.10.15-0maemo3+0m5.tk1 (using .../gstreamer0.10-flac_0.10.15-0maemo3+0m5.tk1.nb1_armel.deb) ...
Unpacking replacement gstreamer0.10-flac ...
Preparing to replace mbarcode-plugin-qrcode 0.0.5-0 (using .../mbarcode-plugin-qrcode_0.0.6-1_armel.deb) ...
Unpacking replacement mbarcode-plugin-qrcode ...
Setting up account-plugin-salut (0.10) ...
/var/lib/dpkg/info/account-plugin-salut.postinst: line 6: /etc/init.d/avahi-daemon: not found
dpkg: error processing account-plugin-salut (--configure):
subprocess post-installation script returned error exit status 127
Setting up gstreamer0.10-flac (0.10.15-0maemo3+0m5.tk1.nb1) ...
Setting up mbarcode-plugin-qrcode (0.0.6-1) ...


and its still at setting up till now

dragly 2010-12-13 11:56

Re: mbarcode
 
Hm... That is really strange. I would try removing the old version of the plugin by running,
Code:

apt-get remove mbarcode-plugin-qrcode
then clean the apt cache to make sure you don't have a broken package laying around:
Code:

apt-get clean
Make sure everything is updated,
Code:

apt-get update
and install the qrcode plugin alone:
Code:

apt-get install mbarcode-plugin-qrcode
Please post back if you're still unable to update.

AgogData 2010-12-13 12:14

Re: mbarcode
 
worked..thanks :)

treofant 2010-12-16 16:54

Re: mbarcode
 
Just an idea.
Would it be possible to send the information I got from barcode and send it to the dhl homepage for shipment tracking?
On the receipt they give me at the post office there is unfortunately no barcode on it only the shipment number. But the postal clerk usually puts a barcode sticker on the packet. So one could ask to take a quick shot with the barcode app then save the number and track the shipment later on the dhl page.

lardman 2010-12-17 08:49

Re: mbarcode
 
Certainly that should be possible (assuming the barcode type can be decoded - pdf417 is still WIP in libzbar atm). It would be easiest if the DHL webpage accepts the barcode as parameter in the URL. Do you have a link to the relevant pages?

treofant 2010-12-17 09:19

Re: mbarcode
 
The barcode can be decoded. mbarcode gives the right number when I scan the barcode on the packet. The DHL webpage is http://www.dhl.de/de.html You can also switch to an english version at the top of the page http://www.dhl.de/en.html
I donīt know much about the other packet services like hermes or DPD or UPS. They all have tracking service on their pages. But whatīs about the barcode? Iīm only used to send packets via dhl.

treofant 2010-12-17 09:25

Re: mbarcode
 
I think even a separate app just for the mentioned purpose whould be worth it:
Scanning >>> Saving Code >>> Checking status.................Checking again
(Maybe automatic checking? Every X minutes/hours? And sending alarm when the day has come shipment arrived)

icke 2010-12-17 09:57

Re: mbarcode
 
I just want to chip in and say thanks a lot for this great program. What I really like is the easyness to add additional requests.
German users might want to add guenstiger.de to their list of search providers.
Just enter:
Code:

http://www.guenstiger.de/Katalog/Preis.pl?suche=%s&x=0&y=0
So thanks again,
icke

Wikiwide 2010-12-17 10:21

Re: mbarcode
 
Quote:

Originally Posted by lardman (Post 898575)
Certainly that should be possible (assuming the barcode type can be decoded - pdf417 is still WIP in libzbar atm). It would be easiest if the DHL webpage accepts the barcode as parameter in the URL. Do you have a link to the relevant pages?

Quick reply (visited http://www.dhl.de/en.html)...
http://nolp.dhl.de/nextt-online-public/set_identcodes.do?lang=en&idc=<tracknumber>

I don't have a tracking number, so I don't know what the results page looks like.


All times are GMT. The time now is 08:47.

vBulletin® Version 3.8.8