View Issue Details

IDProjectCategoryView StatusLast Update
0000335librarianEnhancementpublic2025-10-11 07:12
Reportermikee Assigned Tomikee  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Summary0000335: Add API entry to use 'phone barcode scanner
Description

Android barcode scanner apps can use an API endpoint to send the barcode to. We can use this to attach the phone to librarian and enable:

  1. Scanning with a phone to add or check books. If we do this in a bookshop it can tell us if we already have to book perhaps.
    The API URL is: http://maria.local/api.librarian/book-and.php or http://saxicola.freeddns.org/api.librarian/book-and.php
    Add a required auth code to the URL. &auth=supersectret
TagsNo tags attached.
Attach Tags
Git commit
GitLab/Hub Issue

Relationships

related to 0000504 assignedmikee Add API for the Desktop Application 
related to 0000439 assignedmikee Request books directly from the book list. 

Activities

mikee

2022-02-07 15:29

administrator   ~0001067

Interestingly there already is an add_book function that takes a JSON object. THis was likely written to enable exactly this function.
However, this need to just take the ISBN, the server does the lookup, then a callback asks the user to "really add?" with a button.

mikee

2022-02-07 15:42

administrator   ~0001068

commit 0754d625295d743e60a85c112916a3a4d6252b6c (HEAD -> Bug-335, origin/Bug-335)
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Feb 7 15:41:54 2022 +0000

Add stub to add books by ISBN.

git

2022-02-07 16:08

updater   ~0001069

Branch Bug-335 - commit c95008b6ce97abd6969b10f0f82e502799a24ed7
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Feb 7 16:08:12 2022 +0000

Added more.

book-and.php

git

2022-02-07 22:37

updater   ~0001070

Branch Bug-335 - commit d5d1de3a83bc11a6d9c7999d28d1d694a74ff067
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Feb 7 22:36:29 2022 +0000

Return human readable data when required from get_by_ISBN.

This is a proof of ceoncept for android scanner only.

book-and.php

git

2022-02-07 23:21

updater   ~0001071

Branch Bug-335 - commit 5621d23804f7199720e0c2503013f3ac6a8bc078
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Feb 7 23:21:27 2022 +0000

Another small step.

book-and.php

git

2024-03-19 14:11

updater   ~0001543

Branch Bug-335 - commit 49b46a628e72fb222136da9a8134468238ad6701
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 19 14:07:45 2024 +0000

Change ip and some fixins.

Works for isbnsearch.

book-and.php

git

2024-03-19 15:07

updater   ~0001544

Branch Bug-335 - commit 172c3e89d3b06f30f1d11eed90cca3df098fc201
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 19 15:07:33 2024 +0000

Query googleapis working.

book-and.php

git

2024-03-19 16:54

updater   ~0001545

Branch Bug-335 - commit c97f263dc5dbeb6d4722aacaa10d4add14ae87b3
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 19 15:31:41 2024 +0000

Now returns the CORRECT data.

book-and.php

git

2024-03-19 16:54

updater   ~0001546

Branch Bug-335 - commit 81c8870809340d34eaccb66469017d81bdab60d7
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 19 16:53:32 2024 +0000

Stuff.

Can't seem to output HTML, just getting plain text.

book-and.php

git

2024-03-23 12:06

updater   ~0001548

Branch Bug-335 - commit 59bcacf035f5660996a5c6fb3345c2ae8f073057
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 12:05:17 2024 +0000

Implement trivial authentication.

Probably suffice for this application. Maybe.

book-and.php

git

2024-03-23 13:32

updater   ~0001549

Branch Bug-335 - commit ae3b6e567f7946bfaf631ef197084ec44790e20e
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 13:31:23 2024 +0000

Add books using API.

The URL of the device is recorded in a new column in the DB.
So remember to export the new schema!

book-and.php

mikee

2024-03-23 13:48

administrator   ~0001550

The remaining issue is that the results are not rendering as HTML

git

2024-03-23 17:47

updater   ~0001551

Branch Bug-335 - commit 661633ddc2ba243aea08cccf1f4bd85e8eca86e0
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 17:40:44 2024 +0000

return HTML.

Mostly.

book-and.php

git

2024-03-23 17:47

updater   ~0001552

Branch Bug-335 - commit e6a1c90bc0aa2d1d6d986397efeee60f6f83e023
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 17:41:55 2024 +0000

deleted:    book-and.py
deleted:    book-and.pyc

book-and.py
book-and.pyc

git

2024-03-23 17:47

updater   ~0001553

Branch Bug-335 - commit 0fc63394716a6fbd166830ed83d24223951e4ab4
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 17:46:51 2024 +0000

De-cruft.

book-and.php

git

2024-03-24 13:14

updater   ~0001554

Branch Bug-335 - commit ca16a639ffbc73314790e6ee31a84212abd35d42
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sun Mar 24 12:43:16 2024 +0000

Fix get_borrowed_books().

Called by ?lent in the URL.

book-and.php

mikee

2024-03-25 09:38

administrator   ~0001555

Needs to write a template secrets.php it it does not exist.

git

2024-03-25 11:16

updater   ~0001556

Branch master - commit 954e410fe7571b4968b06442520126e0ec75c695
Merge: ad88438 cc4ccf7
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Mar 25 11:15:48 2024 +0000

Merge branch 'Bug-335'

commit cc4ccf72fddbdb91036a77961920a1f1e397d9fe
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Mar 25 10:43:45 2024 +0000

Get by author.

Needs completion.

book-and.php

commit 82d359a77e9d881d6dbf66418395be7c92e8da64
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Mar 25 10:39:38 2024 +0000

IF secrets.php doesn't exist, write a template.

book-and.php

commit 16802a9eef45962d493684afe8ce3ade91b19add
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Mar 25 10:07:04 2024 +0000

Slightly change formatting.

book-and.php

commit ca16a639ffbc73314790e6ee31a84212abd35d42
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sun Mar 24 12:43:16 2024 +0000

Fix get_borrowed_books().

Called by ?lent in the URL.

book-and.php

commit 0fc63394716a6fbd166830ed83d24223951e4ab4
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 17:46:51 2024 +0000

De-cruft.

book-and.php

commit e6a1c90bc0aa2d1d6d986397efeee60f6f83e023
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 17:41:55 2024 +0000

deleted:    book-and.py
deleted:    book-and.pyc

book-and.py
book-and.pyc

commit 661633ddc2ba243aea08cccf1f4bd85e8eca86e0
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 17:40:44 2024 +0000

return HTML.

Mostly.

book-and.php

commit ae3b6e567f7946bfaf631ef197084ec44790e20e
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 13:31:23 2024 +0000

Add books using API.

The URL of the device is recorded in a new column in the DB.
So remember to export the new schema!

book-and.php

commit 59bcacf035f5660996a5c6fb3345c2ae8f073057
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Mar 23 12:05:17 2024 +0000

Implement trivial authentication.

Probably suffice for this application. Maybe.

book-and.php

commit 81c8870809340d34eaccb66469017d81bdab60d7
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 19 16:53:32 2024 +0000

Stuff.

Can't seem to output HTML, just getting plain text.

book-and.php

commit c97f263dc5dbeb6d4722aacaa10d4add14ae87b3
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 19 15:31:41 2024 +0000

Now returns the CORRECT data.

book-and.php

commit 172c3e89d3b06f30f1d11eed90cca3df098fc201
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 19 15:07:33 2024 +0000

Query googleapis working.

book-and.php

commit 49b46a628e72fb222136da9a8134468238ad6701
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 19 14:07:45 2024 +0000

Change ip and some fixins.

Works for isbnsearch.

book-and.php

commit 5621d23804f7199720e0c2503013f3ac6a8bc078
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Feb 7 23:21:27 2022 +0000

Another small step.

book-and.php

commit d5d1de3a83bc11a6d9c7999d28d1d694a74ff067
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Feb 7 22:36:29 2022 +0000

Return human readable data when required from get_by_ISBN.

This is a proof of ceoncept for android scanner only.

book-and.php

commit c95008b6ce97abd6969b10f0f82e502799a24ed7
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Feb 7 16:08:12 2022 +0000

Added more.

book-and.php

commit 0754d625295d743e60a85c112916a3a4d6252b6c
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Feb 7 15:41:54 2022 +0000

Add stub to add books by ISBN.

book-and.php

commit 0cb3d4003322b8980ec8d92d0c4f738157baded7
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Mon Feb 7 15:32:31 2022 +0000

Update sample url and DB server address.

book-and.php

commit d074f7580209fcc5b3d177a486d86ecbe8360d2a
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Apr 9 12:49:06 2016 +0100

Fix get_count, add stuff to auth().

book-and.php

commit a76d522c5642acd55646f1b1d8112b8f7214d4da
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Sat Feb 6 18:50:05 2016 +0000

Added getCount method.

But. I'm not getting the data I want so I'm gonna halfta fix this.

book-and.php

git

2024-03-26 12:02

updater   ~0001559

Branch Bug-335 - commit 5bd284cf91a2e61e85e222a135cac6811fc0e594
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 26 11:52:38 2024 +0000

Bug-438

Add honeypot fields for spam reduction.

request.php

git

2024-03-26 15:23

updater   ~0001565

Branch Bug-335 - commit a3acde513eb20feddf042a65cdf5f6c8fe2c224b
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 26 13:40:56 2024 +0000

Experiment with this idea.

ask.php
book-and.php
request.php

git

2024-03-26 15:23

updater   ~0001566

Branch Bug-335 - commit 4bceb9422b456c5d3cc9fd05453e1529626c2076
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 26 14:25:32 2024 +0000

modified:   README.adoc
modified:   ask.php
modified:   book-and.php

README.adoc
ask.php
book-and.php

git

2024-03-26 15:23

updater   ~0001567

Branch Bug-335 - commit 2f1f14abeb93d5c32ae1cbec522897bf4ce63c5d
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 26 14:49:52 2024 +0000

modified:   README.adoc

README.adoc

git

2024-03-26 15:23

updater   ~0001568

Branch Bug-335 - commit 31ea43c01ab1f2380d68ff8add028514c4898653
Merge: 2f1f14a 4bceb94
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 26 15:23:06 2024 +0000

Merge branch 'Bug-439' into Bug-335

commit 4bceb9422b456c5d3cc9fd05453e1529626c2076
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 26 14:25:32 2024 +0000

modified:   README.adoc
modified:   ask.php
modified:   book-and.php

README.adoc
ask.php
book-and.php

commit a3acde513eb20feddf042a65cdf5f6c8fe2c224b
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 26 13:40:56 2024 +0000

Experiment with this idea.

ask.php
book-and.php
request.php

git

2025-10-03 19:35

updater   ~0001902

Branch Bug-335 - commit 09605b00f0a1085c9eefac35bc6f43de5127dd17
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Tue Mar 26 15:27:55 2024 +0000

Don't list books we no longer have.

book-and.php

git

2025-10-03 19:35

updater   ~0001903

Branch Bug-335 - commit 1fce66ec48ef9b3031d5d410aa250bdec19ac9f2
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Thu Apr 4 15:13:16 2024 +0100

Print array when human=n.

I still  can't get it to return JSON though.

book-and.php

git

2025-10-03 19:35

updater   ~0001904

Branch Bug-335 - commit 873e5bd6e6c6ba8fde08543ffba51bb701b3b790
Author: Mike Evans <mikee@saxicola.co.uk>
Date: Fri Oct 3 19:34:54 2025 +0100

modified:   ask.php
modified:   book-and.php

ask.php
book-and.php

Add Note

View Status
Note
Upload Files
Maximum size: 2,048 KiB

Attach files by dragging & dropping, selecting or pasting them.

Issue History

Date Modified Username Field Change
2022-02-07 15:26 mikee New Issue
2022-02-07 15:26 mikee Status new => assigned
2022-02-07 15:26 mikee Assigned To => mikee
2022-02-07 15:29 mikee Note Added: 0001067
2022-02-07 15:34 mikee Description Updated
2022-02-07 15:42 mikee Note Added: 0001068
2022-02-07 16:08 git Note Added: 0001069
2022-02-07 22:37 git Note Added: 0001070
2022-02-07 23:21 git Note Added: 0001071
2024-03-19 14:11 git Note Added: 0001543
2024-03-19 15:07 git Note Added: 0001544
2024-03-19 16:54 git Note Added: 0001545
2024-03-19 16:54 git Note Added: 0001546
2024-03-23 11:35 mikee Description Updated
2024-03-23 12:06 git Note Added: 0001548
2024-03-23 13:32 git Note Added: 0001549
2024-03-23 13:48 mikee Note Added: 0001550
2024-03-23 17:47 git Note Added: 0001551
2024-03-23 17:47 git Note Added: 0001552
2024-03-23 17:47 git Note Added: 0001553
2024-03-24 13:14 git Note Added: 0001554
2024-03-25 09:38 mikee Note Added: 0001555
2024-03-25 11:16 git Note Added: 0001556
2024-03-26 12:02 git Note Added: 0001559
2024-03-26 14:52 mikee Relationship added related to 0000439
2024-03-26 15:23 git Note Added: 0001565
2024-03-26 15:23 git Note Added: 0001566
2024-03-26 15:23 git Note Added: 0001567
2024-03-26 15:23 git Note Added: 0001568
2025-10-03 19:35 git Note Added: 0001902
2025-10-03 19:35 git Note Added: 0001903
2025-10-03 19:35 git Note Added: 0001904
2025-10-11 07:12 mikee Relationship added related to 0000504