RE: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-27 Thread Simon Pickering
> >> So I'm more than happy to do this (after I look at libgdigicam to
work
> >> out how to focus the N900's camera and turn the LED on), as long as
> >> people want to use it, I don't want to waste time chopping things
up if
> >> no-one wants to use it afterwards.
> 
> I want to use it. =)
> 
> An easy-to-use wrapper like that can encourage the creation of scanner

> software for business applications: consider the use of nokia internet

> tablets as part of a cost-effective distributed system for inventory.
> 
> Many specialized scanning devices on the market are disgustingly high:

> for about $2000, you get a mobile computer/scanner with stats 
> (Intel XScale PXA255 Processor @ 400MHz, 64MB RAM, Windows Mobile
2003) 
> that the N810 can wipe the floor with. At lower prices, you devices
with 
> archaic OSs and hardware specs. At $700, you get just the scanner 
> without the computer. The nokia internet tablets are a steal!

Well controlling the N900 camera is reasonably straight forward using
the gst_photography_*() commands, I'll write up a page and stick that on
the wiki asap.

I've moved the backend (i.e. the decoding part) to use zbar for 1D and
QR codes and am still using libdmtx for Datamatrix codes (would be nice
to get that linked in as part of zbar so there's just one api to deal
with). I also just uploaded the zbar files to the autobuilder (and it
failed as I forgot to add a Python dep).

So basically all of the low level components are (or will soon be) in
place. 

Will keep the list updated with the progress of the wiki & zbar
building.

On the topic of mBarcode itself, I've got the autofocus working, and you
can grab a test code here for the N900 (and a zbar deb too):
http://people.bath.ac.uk/enpsgp/nokia770/mbarcode/test/

I'll (try to) debianise it this evening and also check the Diablo code
to see that it still builds after all the hacking around the N900 stuff
has needed.

Cheers,


Simon

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-25 Thread Graham Cobb
On Thursday 15 October 2009 10:58:45 Simon Pickering wrote:
> Someone mentioned sending the barcodes out over DBUS, is this of
> interest? Any use cases?
>
> So I'm more than happy to do this (after I look at libgdigicam to work
> out how to focus the N900's camera and turn the LED on), as long as
> people want to use it, I don't want to waste time chopping things up if
> no-one wants to use it afterwards.

Sorry for the late reply -- I have been on holiday.

I don't think I will ever get around to developing them myself but I would 
very much like to have some apps based on this (e.g. cataloguing books, maybe 
maintaining lists of things in the store cupboard, etc.).  So, I hope there 
will be some takers for such an API.

Graham
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-24 Thread David Galicia
>> So I'm more than happy to do this (after I look at libgdigicam to work
>> out how to focus the N900's camera and turn the LED on), as long as
>> people want to use it, I don't want to waste time chopping things up if
>> no-one wants to use it afterwards.

I want to use it. =)

An easy-to-use wrapper like that can encourage the creation of scanner
software for business applications: consider the use of nokia internet
tablets as part of a cost-effective distributed system for inventory.

Many specialized scanning devices on the market are disgustingly high:
for about $2000, you get a mobile computer/scanner with stats
(Intel XScale PXA255 Processor @ 400MHz, 64MB RAM, Windows Mobile 2003)
that the N810 can wipe the floor with. At lower prices, you devices with
archaic OSs and hardware specs. At $700, you get just the scanner
without the computer. The nokia internet tablets are a steal!

I would love to see more linux-enabled devices being used in small business.

And maybe, if these tablets get enough attention, nokia can roll out a hardy

mobile device running maemo that's designed for industrial environments.

Tell me if i'm crazy?

Kind regards,
David
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-15 Thread Marius Gedminas
On Thu, Oct 15, 2009 at 09:42:40PM +0300, Jody Fanning wrote:
> On 15.10.2009 10:57, Simon Pickering wrote:
> >> Why is it necessary to do a "webscrape" of Amazon. Amazon has plenty
> >> of simple APIs for getting data freely and easily. The REST based ones
> >> are extremely simple and you get back an XML document with everything
> >> you need.
> >>  
> > It quite possibly isn't necessary, this is certainly not my area of
> > expertise, just something I wanted to get working ASAP. When I looked at
> > how to do this I found a mixture of web scraping tools and ones that use
> > Amazon Web Services. AFAIK AWS requires that you register to obtain a
> > key, and I'm not sure of the exact terms and conditions, but I presume
> > they will not want me to share my key, but I may be wrong about this.
> >
> I'm pretty sure you are able to share the key. I do have an AWS account 
> and have used it for my own stuff (in Java though). But all those 
> applications around must have a key embedded since they never ask you to 
> register yourself. There must be some other open source applications 
> around that fetch data from Amazon using AWS.

Calibre, for one.  The key is embedded right there in the sources.
I don't know if they're allowed to do that since I was too lazy to
actually read the AWS agreement.  (Shh! Don't tell anyone.)

I applied for an AWS key, got two (one called "access key", the other
called "secret access key"), did some experiments with pyaws (a Python
library for accessing the AWS).  I couldn't get it to work with just the
AWS key, I needed to supply both.  I don't know how Calibre manages to
do its thing with just one key (or maybe it's broken now -- I couldn't
figure out the user interface and ran away screaming to invent my own
library management system).

> Amazon did make things a little more complicated a few months ago 
> though. All requests must be signed,

This might mean that Calibre was using old unsigned requests at the time
I looked at its source code.

> but they generally provide code 
> samples for how to do everything. One thing is to check the licensing of 
> the interfaces. There was something recently about different licensing 
> between mobile devices and other uses that came up with the iPhone. But 
> the advantage is that you won't have any problem with the page layout 
> breaking things. Plus their APIs provide pretty much every detail about 
> an item you could think of.

Marius Gedminas
-- 
Give a man a computer program and you give him a headache, but teach him to
program computers and you give him the power to create headaches for others for
the rest of his life...
-- R. B. Forest


signature.asc
Description: Digital signature
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-15 Thread Simon Pickering
Hi Jody,

On Thu, 2009-10-15 at 21:42 +0300, Jody Fanning wrote:
> On 15.10.2009 10:57, Simon Pickering wrote:
> >
> >>> For 1D codes mbarcode will attempt a very basic webscrape of Amazon and
> >>> will (hopefully) return a title (rather than a segfault). For URLs
> >>> encoded in a QR code/datamatrix it will open the webbrowser and for
> >>> vCards it will add them to your contacts.
> >>>
> >> Why is it necessary to do a "webscrape" of Amazon. Amazon has plenty
> >> of simple APIs for getting data freely and easily. The REST based ones
> >> are extremely simple and you get back an XML document with everything
> >> you need.
> >>  
> > It quite possibly isn't necessary, this is certainly not my area of
> > expertise, just something I wanted to get working ASAP. When I looked at
> > how to do this I found a mixture of web scraping tools and ones that use
> > Amazon Web Services. AFAIK AWS requires that you register to obtain a
> > key, and I'm not sure of the exact terms and conditions, but I presume
> > they will not want me to share my key, but I may be wrong about this.
> >
> > I guess you're also talking about AWS? What is your take on the key
> > issues - share mine, or get each user to register themselves and get a
> > key? Perhaps the registration could be automated. Any thoughts? Patches
> > welcome of course.
> >
> > Cheer
> >
> I'm pretty sure you are able to share the key. I do have an AWS account 
> and have used it for my own stuff (in Java though). But all those 
> applications around must have a key embedded since they never ask you to 
> register yourself. There must be some other open source applications 
> around that fetch data from Amazon using AWS.
> 
> Amazon did make things a little more complicated a few months ago 
> though. All requests must be signed, but they generally provide code 
> samples for how to do everything. One thing is to check the licensing of 
> the interfaces. There was something recently about different licensing 
> between mobile devices and other uses that came up with the iPhone. But 
> the advantage is that you won't have any problem with the page layout 
> breaking things. Plus their APIs provide pretty much every detail about 
> an item you could think of.

OK thank you, I'll take a look at this. 

Of course if anyone knows about this and/or wants to submit code
patches, they will be greatly appreciated!

Cheers,


Simon


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-15 Thread Jody Fanning
On 15.10.2009 10:57, Simon Pickering wrote:
>
>>> For 1D codes mbarcode will attempt a very basic webscrape of Amazon and
>>> will (hopefully) return a title (rather than a segfault). For URLs
>>> encoded in a QR code/datamatrix it will open the webbrowser and for
>>> vCards it will add them to your contacts.
>>>
>> Why is it necessary to do a "webscrape" of Amazon. Amazon has plenty
>> of simple APIs for getting data freely and easily. The REST based ones
>> are extremely simple and you get back an XML document with everything
>> you need.
>>  
> It quite possibly isn't necessary, this is certainly not my area of
> expertise, just something I wanted to get working ASAP. When I looked at
> how to do this I found a mixture of web scraping tools and ones that use
> Amazon Web Services. AFAIK AWS requires that you register to obtain a
> key, and I'm not sure of the exact terms and conditions, but I presume
> they will not want me to share my key, but I may be wrong about this.
>
> I guess you're also talking about AWS? What is your take on the key
> issues - share mine, or get each user to register themselves and get a
> key? Perhaps the registration could be automated. Any thoughts? Patches
> welcome of course.
>
> Cheer
>
I'm pretty sure you are able to share the key. I do have an AWS account 
and have used it for my own stuff (in Java though). But all those 
applications around must have a key embedded since they never ask you to 
register yourself. There must be some other open source applications 
around that fetch data from Amazon using AWS.

Amazon did make things a little more complicated a few months ago 
though. All requests must be signed, but they generally provide code 
samples for how to do everything. One thing is to check the licensing of 
the interfaces. There was something recently about different licensing 
between mobile devices and other uses that came up with the iPhone. But 
the advantage is that you won't have any problem with the page layout 
breaking things. Plus their APIs provide pretty much every detail about 
an item you could think of.

Jody
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-15 Thread Simon Pickering
On Thu, 2009-10-15 at 10:43 +0100, Graham Cobb wrote:
> On Thursday 15 October 2009 09:10:44 Simon Pickering wrote:
> > Replying to myself, another option (which is the same one that Android
> > Scan/CompareEverywhere uses) would be to move the "scraping" to a
> > server. This might let me use a single key for all the queries (though
> > it may still break the terms and conditions, I'd have to look) and would
> > also reduce on-device processing and the amount of data that needs to be
> > transferred.
> 
> While you are tolerating discussion of enhancements!...

lol :)

> If you do use a server, it would be great if you implemented an "offline" 
> mode 
> where I could scan barcodes all day without network connectivity and, later, 
> process them when I am online.  Some of the places one might want to scan 
> barcodes (barcodes on display adverts, on buildings like in Westergasfabriek, 
> or in warehouses) might not have great network connectivity.  Most 
> professional barcode readers which I know of seem to do the scanning offline 
> and process the barcodes once they are plugged into their docking/charging 
> station.

Yes, in any case I was planning on allowing the raw data to be saved if
a lookup is not possible (for e.g. isbns and also for web urls, etc.), I
currently assume an internet connection (which should apparently be fine
for Fremantle ;)), but I need to get the code to ask for one and/or have
an offline scanning setting (oh dear more gui elements - a menu!)

> This brings up a slightly larger question of how modular is your current 
> implementation?  It feels like it would be good to have a library (accessible 
> from C and Python) which would have an API like "scan the barcode the user is 
> currently pointing the camera at and give me back something that tells me 
> what sort of barcode it was and the data it contains" (maybe with some sort 
> of callbacks to allow some user interaction if needed to give them 
> help/feedback with the scanning).  
>
> The subsequent processing (database, lookup, etc, etc.) is the sort of
> thing 
> that various people might create separate applications for, although it might 
> be useful to expose some useful APIs there as well: "lookup this barcode 
> number on Amazon", "save this barcode in barcode database called 'My Books'", 
> etc.
> 
> Is that how it works at the moment or something you are looking in to?

Yes this is indeed a good idea. At the moment it's not modular as
everything is mixed in, however the code is structured such that it
won't take long to separate out the processing from the video taking
from the gui etc.

The question is then how many separate layers? I guess a wrapper/lib to
process a barcode from an image buffer. An extra optional layer that can
be placed ontop of this to allow the user to see what they are pointing
at and to click "Scan!" (which we may do away with once the camera app
is opened up, then we can add the bottom-most layer as a plugin to
optionally analyse stuff taken with the main camera app). On top of
these/using these one can do the other stuff such as web-lookups,
databases, etc.

The web-lookups should possibly also be part of the bottom-most layer
though, or perhaps separated off into their own package as they will
generally be needed no matter the app.

Someone mentioned sending the barcodes out over DBUS, is this of
interest? Any use cases?

So I'm more than happy to do this (after I look at libgdigicam to work
out how to focus the N900's camera and turn the LED on), as long as
people want to use it, I don't want to waste time chopping things up if
no-one wants to use it afterwards.

Cheers,


Simon


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-15 Thread Graham Cobb
On Thursday 15 October 2009 09:10:44 Simon Pickering wrote:
> Replying to myself, another option (which is the same one that Android
> Scan/CompareEverywhere uses) would be to move the "scraping" to a
> server. This might let me use a single key for all the queries (though
> it may still break the terms and conditions, I'd have to look) and would
> also reduce on-device processing and the amount of data that needs to be
> transferred.

While you are tolerating discussion of enhancements!...

If you do use a server, it would be great if you implemented an "offline" mode 
where I could scan barcodes all day without network connectivity and, later, 
process them when I am online.  Some of the places one might want to scan 
barcodes (barcodes on display adverts, on buildings like in Westergasfabriek, 
or in warehouses) might not have great network connectivity.  Most 
professional barcode readers which I know of seem to do the scanning offline 
and process the barcodes once they are plugged into their docking/charging 
station.

This brings up a slightly larger question of how modular is your current 
implementation?  It feels like it would be good to have a library (accessible 
from C and Python) which would have an API like "scan the barcode the user is 
currently pointing the camera at and give me back something that tells me 
what sort of barcode it was and the data it contains" (maybe with some sort 
of callbacks to allow some user interaction if needed to give them 
help/feedback with the scanning).  

The subsequent processing (database, lookup, etc, etc.) is the sort of thing 
that various people might create separate applications for, although it might 
be useful to expose some useful APIs there as well: "lookup this barcode 
number on Amazon", "save this barcode in barcode database called 'My Books'", 
etc.

Is that how it works at the moment or something you are looking in to?

Graham
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-15 Thread Graham Cobb
On Thursday 15 October 2009 07:50:21 Kimmo Hämäläinen wrote:
> On Thu, 2009-10-15 at 01:09 +0200, ext Simon Pickering wrote:
> > So all in all it's still work in progress, but it does at least work
> > well enough to test. Except that I use dialogs to ask the user if they
> > want to open a decoded URL/add a decoded vCard, and if these dialogs are
> > displayed the UI locks up straight afterwards. If I comment them out the
> > code continues quite happily after opening the browser/adding the URL,
> > so the fault must presumably lie with the dialogs.
>
> What kind of windows you are playing with?  We have a special feature in
> Fremantle where Gtk+ dialogs do not use pointer grabs anymore (*, so
> it's possible that Gtk+ gets confused there when it does not receive the
> pointer events.

Ah, yes, I had similar problems in GPE.  I haven't looked at your code, Simon 
(sorry) but in GPE I had dialog boxes with a similar problem.  It was even 
more noticeable in scratchbox where, after the dialog is dismissed, the 
background would reappear and my application window was nowhere to be seen.  
On the device, the application window appeared to be visible but clicks were 
going to the desktop instead (so, for example, I could invoke a desktop 
widget if I touched in the right place)!

In most cases the problem seemed to be that the existing code used the 
following sort of construct:

gtk_window_set_transient_for
(GTK_WINDOW (dialog), GTK_WINDOW (gtk_widget_get_toplevel (widget)));

In most cases I replaced that with setting it as transient for my main window 
(a HildonStackableWindow).  I don't know what the toplevel widget is on 
Hildon but whatever it is it doesn't seem to be useful!

In at least one case, the right thing to do was to replace the whole dialog 
with a HildonStackableWindow and create a Fremantle-style UI with a stacked 
window.

No idea if that will help in your case. 

Graham
___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-15 Thread Simon Pickering

> > > For 1D codes mbarcode will attempt a very basic webscrape of Amazon and
> > > will (hopefully) return a title (rather than a segfault). For URLs
> > > encoded in a QR code/datamatrix it will open the webbrowser and for
> > > vCards it will add them to your contacts.
> > 
> > Why is it necessary to do a "webscrape" of Amazon. Amazon has plenty  
> > of simple APIs for getting data freely and easily. The REST based ones  
> > are extremely simple and you get back an XML document with everything  
> > you need.
> 
> It quite possibly isn't necessary, this is certainly not my area of
> expertise, just something I wanted to get working ASAP. When I looked at
> how to do this I found a mixture of web scraping tools and ones that use
> Amazon Web Services. AFAIK AWS requires that you register to obtain a
> key, and I'm not sure of the exact terms and conditions, but I presume
> they will not want me to share my key, but I may be wrong about this.

Replying to myself, another option (which is the same one that Android
Scan/CompareEverywhere uses) would be to move the "scraping" to a
server. This might let me use a single key for all the queries (though
it may still break the terms and conditions, I'd have to look) and would
also reduce on-device processing and the amount of data that needs to be
transferred.

Or we could try hooking into the Android Scan/CompareEverywhere
webservice ;)

Any thoughts?

Cheers,


Simon


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-15 Thread Simon Pickering
Hi Kimmo,

> > So all in all it's still work in progress, but it does at least work
> > well enough to test. Except that I use dialogs to ask the user if they
> > want to open a decoded URL/add a decoded vCard, and if these dialogs are
> > displayed the UI locks up straight afterwards. If I comment them out the
> > code continues quite happily after opening the browser/adding the URL,
> > so the fault must presumably lie with the dialogs.
> 
> What kind of windows you are playing with?  We have a special feature in
> Fremantle where Gtk+ dialogs do not use pointer grabs anymore (*, so
> it's possible that Gtk+ gets confused there when it does not receive the
> pointer events.
> 
> *) This is done to allow the touch screen lock to do the pointer grab
> and discard all pointer events even if a dialog is open.

It's just a plain dialog afaik (GUIs also not being my area of
expertise). The dialog does close, so I imagine that means it's getting
the click event, but after it closes the rest of the UI locks up.

The exact code is here:
https://garage.maemo.org/plugins/scmsvn/viewcvs.php/branches/simon_wip/maemo-barcode/web.c?revision=103&root=maemo-barcode&view=markup

Scroll right to the bottom to see either the openURL() or addVCard()
functions, which are the ones that use dialogs and then lock up.

Thanks,


Simon


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-15 Thread Simon Pickering

> > For 1D codes mbarcode will attempt a very basic webscrape of Amazon and
> > will (hopefully) return a title (rather than a segfault). For URLs
> > encoded in a QR code/datamatrix it will open the webbrowser and for
> > vCards it will add them to your contacts.
> 
> Why is it necessary to do a "webscrape" of Amazon. Amazon has plenty  
> of simple APIs for getting data freely and easily. The REST based ones  
> are extremely simple and you get back an XML document with everything  
> you need.

It quite possibly isn't necessary, this is certainly not my area of
expertise, just something I wanted to get working ASAP. When I looked at
how to do this I found a mixture of web scraping tools and ones that use
Amazon Web Services. AFAIK AWS requires that you register to obtain a
key, and I'm not sure of the exact terms and conditions, but I presume
they will not want me to share my key, but I may be wrong about this.

I guess you're also talking about AWS? What is your take on the key
issues - share mine, or get each user to register themselves and get a
key? Perhaps the registration could be automated. Any thoughts? Patches
welcome of course.

Cheers,


Simon

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-14 Thread Kimmo Hämäläinen
On Thu, 2009-10-15 at 01:09 +0200, ext Simon Pickering wrote:
> Hi all

Hi you

> So all in all it's still work in progress, but it does at least work
> well enough to test. Except that I use dialogs to ask the user if they
> want to open a decoded URL/add a decoded vCard, and if these dialogs are
> displayed the UI locks up straight afterwards. If I comment them out the
> code continues quite happily after opening the browser/adding the URL,
> so the fault must presumably lie with the dialogs.

What kind of windows you are playing with?  We have a special feature in
Fremantle where Gtk+ dialogs do not use pointer grabs anymore (*, so
it's possible that Gtk+ gets confused there when it does not receive the
pointer events.

*) This is done to allow the touch screen lock to do the pointer grab
and discard all pointer events even if a dialog is open.

-Kimmo

___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


mbarcode/maemo-barcode dialog oddity and progress report

2009-10-14 Thread jodyfanning

> For 1D codes mbarcode will attempt a very basic webscrape of Amazon and
> will (hopefully) return a title (rather than a segfault). For URLs
> encoded in a QR code/datamatrix it will open the webbrowser and for
> vCards it will add them to your contacts.

Why is it necessary to do a "webscrape" of Amazon. Amazon has plenty  
of simple APIs for getting data freely and easily. The REST based ones  
are extremely simple and you get back an XML document with everything  
you need.



___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


Re: mbarcode/maemo-barcode dialog oddity and progress report

2009-10-14 Thread Simon Pickering

> The code is here:
> https://garage.maemo.org/plugins/scmsvn/viewcvs.php/branches/simon_wip/maemo-barcode/?root=maemo-barcode
> 
> binaries here: (you need to install libdmtx0, then just run the mbarcode
> binary after chmod'ing it):
> http://people.bath.ac.uk/enpsgp/nokia770/mbarcode/fremantle/
> 
> I should add that the code should also run on Diablo, but the diablo dir
> on the above webpage is out of date so you'll need to compile it
> yourself (please let me know if it doesn't compile/run). I plan on
> supporting both Fremantle and Diablo devices, don't worry!

I've just uploaded a diablo binary to
http://people.bath.ac.uk/enpsgp/nokia770/mbarcode/diablo/

vCard importing is disabled for the time being (as I've not looked at
the syntax for Diablo), and although the code opens the browser, it just
seems to open the start page for me.

In fact for both platforms, I should place the URL/text in a text box so
that people can select and copy it. Note to self! :)

Curiously the Diablo code doesn't seem to suffer from the lock-up after
opening the dialog to ask if I want to open a URL. Your theories/patches
for the Fremantle code are welcome, as are enhancements for the Diablo
code items that aren't working currently (URL opening, vCard adding,
etc.) and for anything else you see.

Enjoy!

Cheers,


Simon


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers


mbarcode/maemo-barcode dialog oddity and progress report

2009-10-14 Thread Simon Pickering
Hi all

I've been hacking away at maemo-barcode (now called mbarcode to remove
the maemo bit as we're not supposed to use that;) and have made some
progress.

The code is here:
https://garage.maemo.org/plugins/scmsvn/viewcvs.php/branches/simon_wip/maemo-barcode/?root=maemo-barcode

binaries here: (you need to install libdmtx0, then just run the mbarcode
binary after chmod'ing it):
http://people.bath.ac.uk/enpsgp/nokia770/mbarcode/fremantle/

I should add that the code should also run on Diablo, but the diablo dir
on the above webpage is out of date so you'll need to compile it
yourself (please let me know if it doesn't compile/run). I plan on
supporting both Fremantle and Diablo devices, don't worry!

In terms of features:
1D (EAN13/UPC12), datamatrix and QR codes are supported.

For 1D codes mbarcode will attempt a very basic webscrape of Amazon and
will (hopefully) return a title (rather than a segfault). For URLs
encoded in a QR code/datamatrix it will open the webbrowser and for
vCards it will add them to your contacts.

The UI is very rough and ready and needs serious work; the webscraper is
very basic and could do with more love (there are some other basic codes
in the source, but they are disabled as I've not had time to debug them
yet); the database functions on the latter notebook pages also need
serious work (the goal being to be able to store details about barcodes
you've scanned - mainly 1D products, e.g. DVDs, Books, etc.).

So all in all it's still work in progress, but it does at least work
well enough to test. Except that I use dialogs to ask the user if they
want to open a decoded URL/add a decoded vCard, and if these dialogs are
displayed the UI locks up straight afterwards. If I comment them out the
code continues quite happily after opening the browser/adding the URL,
so the fault must presumably lie with the dialogs.

Any ideas what might be going wrong here?

I am also open, of course, to patches for anything, but especially
webscraping fixes, debianisation, UI thoughts, etc.

I imagine I'm going to have to split the source code into some separate
files for diablo/fremantle (e.g. camera code, gui code as these will be
significantly different) rather than using lots of #ifdefs, does this
sound reasonable?

Thanks for looking,


Simon


___
maemo-developers mailing list
maemo-developers@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-developers