1
9
Fork
You've already forked bookpile
12

Added buchhandlung.de importer #74

Merged
bitboxer merged 7 commits from Aziz-JH/bookpile:feat/added-buchhandlung-de-importer into main 2026年06月16日 22:08:23 +02:00
Collaborator
Copy link

When we add the changes, there will be also conflicts with the Rupprecht stores. Rupprecht uses the Buchhandlung.de service for its online shop.

The schoeningh book store in Würzburg do also have two online shop: https://www.schoeningh-buch.de/ and https://ebooksinfranken.buchhandlung.de/shop/

When we add the changes, there will be also conflicts with the Rupprecht stores. Rupprecht uses the Buchhandlung.de service for its online shop. The schoeningh book store in Würzburg do also have two online shop: https://www.schoeningh-buch.de/ and https://ebooksinfranken.buchhandlung.de/shop/

Awesome. Thank you.

I would say we should add a denylist in this filter and remove the stores that are already in the data through other sources. The schoeningh for example shows store availability in their own store. Which I would prefer...

Also I will add a system tomorrow to not load all cities on load of the page, but only the 15 closest and if people start searching, ask the backend for more.

Awesome. Thank you. I would say we should add a denylist in this filter and remove the stores that are already in the data through other sources. The schoeningh for example shows store availability in their own store. Which I would prefer... Also I will add a system tomorrow to not load all cities on load of the page, but only the 15 closest and if people start searching, ask the backend for more.

Another thing: there are not that many openstreetmap ids in the data...did the importer fail to find any? Will check tomorrow.

Another thing: there are not that many openstreetmap ids in the data...did the importer fail to find any? Will check tomorrow.
Author
Collaborator
Copy link

I think the API calls run into a rate limit problems

https://dev.overpass-api.de/overpass-doc/en/preface/commons.html

I think the API calls run into a rate limit problems https://dev.overpass-api.de/overpass-doc/en/preface/commons.html

Ah yeah, I limited it to one request/second. might need to go slower.

I build a cache into it so that for locations we alreaady have the osm id, we never query for that again.

Ah yeah, I limited it to one request/second. might need to go slower. I build a cache into it so that for locations we alreaady have the osm id, we never query for that again.

Okay, the rate limit handling in the osm part is now a bit smarter

Okay, the rate limit handling in the osm part is now a bit smarter
Author
Collaborator
Copy link

OK, I'll rerun it tomorrow, so we should get more ids

OK, I'll rerun it tomorrow, so we should get more ids
Aziz-JH force-pushed feat/added-buchhandlung-de-importer from 888597346f to bf115a5027 2026年06月09日 23:40:16 +02:00 Compare

closes #87

closes #87

@Aziz-JH do you think I could merge this one?

@Aziz-JH do you think I could merge this one?

Btw: i now have this branch running locally and use that to modify the view layer to be able to handle so many entries

Btw: i now have this branch running locally and use that to modify the view layer to be able to handle so many entries

Ah and the healthcheck finds duplicates with the existing data. I think we should remove the existing data * in favour of this importer, excluding the rupprecht importer and the buchbox case. I want those still grouped together. Or we find a smarter way to group them and using this data?

And we then add some tags (e.g. Queer) into the generated file and rescue them in each run so that we don't loose the manual added data (tags, note, lat/lng, osmid) with a helper method in common.js

Ah and the healthcheck finds duplicates with the existing data. I think we should remove the existing data * in favour of this importer, excluding the rupprecht importer and the buchbox case. I want those still grouped together. Or we find a smarter way to group them and using this data? And we then add some tags (e.g. Queer) into the generated file and rescue them in each run so that we don't loose the manual added data (tags, note, lat/lng, osmid) with a helper method in common.js

Okay, after playing around with this, we need a "addToGroup": "Rupprecht" that we manually add? Not sure how to automate that.

Okay, after playing around with this, we need a "addToGroup": "Rupprecht" that we manually add? Not sure how to automate that.

Only question: How do you group this:

https://www.buchhandlung-ludwig.de/shop/magazine/146155/standorte_und_oeffnungszeiten.html

"Ludwig & Eckert"?! What a strange shop that is.

Only question: How do you group this: https://www.buchhandlung-ludwig.de/shop/magazine/146155/standorte_und_oeffnungszeiten.html "Ludwig & Eckert"?! What a strange shop that is.
@ -0,0 +150,4 @@
const location: Location = {
name: store.shopName,
address,
url: `https://${store.domain}/`,
Owner
Copy link

The URl should be this:

url: `https://${store.domain}/shop/quickSearch?searchString={{ISBN}}`,
The URl should be this: ``` url: `https://${store.domain}/shop/quickSearch?searchString={{ISBN}}`, ```

LUDWIG (Bhf. Lichtenberg) Weitlingstr. 22, 10317 Berlin has the wrong osm id. It should be way/430955095 . Maybe we could do one pass checking if the osmId lat/lng is more than 300m off?

LUDWIG (Bhf. Lichtenberg) Weitlingstr. 22, 10317 Berlin has the wrong osm id. It should be way/430955095 . Maybe we could do one pass checking if the osmId lat/lng is more than 300m off?
Author
Collaborator
Copy link

@bitboxer wrote in #74 (comment):

Only question: How do you group this:

https://www.buchhandlung-ludwig.de/shop/magazine/146155/standorte_und_oeffnungszeiten.html

"Ludwig & Eckert"?! What a strange shop that is.

I think I made somthing so we can group them under a "chain". It will be a patch function that can be used to do changes after the import

@bitboxer wrote in https://codeberg.org/bitboxer/bookpile/pulls/74#issuecomment-17225438: > Only question: How do you group this: > > https://www.buchhandlung-ludwig.de/shop/magazine/146155/standorte_und_oeffnungszeiten.html > > "Ludwig & Eckert"?! What a strange shop that is. I think I made somthing so we can group them under a "chain". It will be a patch function that can be used to do changes after the import
Author
Collaborator
Copy link

@bitboxer wrote in #74 (comment):

LUDWIG (Bhf. Lichtenberg) Weitlingstr. 22, 10317 Berlin has the wrong osm id. It should be way/430955095 . Maybe we could do one pass checking if the osmId lat/lng is more than 300m off?

The Problem is also it is as "newsagent" stored https://www.openstreetmap.org/way/430955095#map=19/52.509476/13.496774

@bitboxer wrote in https://codeberg.org/bitboxer/bookpile/pulls/74#issuecomment-17227166: > LUDWIG (Bhf. Lichtenberg) Weitlingstr. 22, 10317 Berlin has the wrong osm id. It should be way/430955095 . Maybe we could do one pass checking if the osmId lat/lng is more than 300m off? The Problem is also it is as "newsagent" stored https://www.openstreetmap.org/way/430955095#map=19/52.509476/13.496774

Ah, damn. I think we need to also search for "newsagent" then...because i can assume that this happens often and newagent also carry books in a lot of cases.

Ah, damn. I think we need to also search for "newsagent" then...because i can assume that this happens often and newagent also carry books in a lot of cases.

@Aziz-JH wrote in #74 (comment):

I think I made somthing so we can group them under a "chain". It will be a patch function that can be used to do changes after the import

Yes, let's do this. This function can then be used by all importers. We just need to have a chain.json that defines some filters how to group the stuff.

@Aziz-JH wrote in https://codeberg.org/bitboxer/bookpile/pulls/74#issuecomment-17231894: > I think I made somthing so we can group them under a "chain". It will be a patch function that can be used to do changes after the import Yes, let's do this. This function can then be used by all importers. We just need to have a chain.json that defines some filters how to group the stuff.
Author
Collaborator
Copy link

Yes the newsagent stores are sometimes also selling books. I will later rerun the script and push it. Should we also filter out stores that do not have a osm ID?

Yes the newsagent stores are sometimes also selling books. I will later rerun the script and push it. Should we also filter out stores that do not have a osm ID?

No, let us keep them. My plan is to add a UI that says: we don't know the OpenStreetmap for this, please add it. And we should try to figure out the lat/lng without openstreetmap osmid and use that in the map if possible. If not possible, we change the text to: "sorry, we don't know where the store is, please help us (link to form where people can send us more details)"

No, let us keep them. My plan is to add a UI that says: we don't know the OpenStreetmap for this, please add it. And we should try to figure out the lat/lng without openstreetmap osmid and use that in the map if possible. If not possible, we change the text to: "sorry, we don't know where the store is, please help us (link to form where people can send us more details)"
@ -0,0 +112,4 @@
const patches: Patch[] = [
{
matcher: { url: /lovestoryofberlin\.buchhandlung\.de/ },
apply: (_, { addTags, setChain }) => {
Owner
Copy link

The data from Buchbox is unfortunately not so good, I think we can reject Buchbox directly here and take the ones that I already have.

The data from Buchbox is unfortunately not so good, I think we can reject Buchbox directly here and take the ones that I already have.

This is amazing. Loving the new patching approach <3

This is amazing. Loving the new patching approach <3
Author
Collaborator
Copy link

At first, I wasn't sure whether we should use a JSON or a TS file for patching, as that's how it's currently done.

If we need to do more patching, we should use JSON instead. What do you think?

At first, I wasn't sure whether we should use a JSON or a TS file for patching, as that's how it's currently done. If we need to do more patching, we should use JSON instead. What do you think?
@ -26,0 +36,4 @@
entry
|> Map.drop(["locations_json", "locations_chain"])
|> Map.put("locations", locations)
Author
Collaborator
Copy link

@bitboxer I'm not sure if that's right. I don't have enough experience with Elixir.

@bitboxer I'm not sure if that's right. I don't have enough experience with Elixir.
Owner
Copy link

Will have a look, but reads okay 👍

Will have a look, but reads okay 👍
Author
Collaborator
Copy link

We also have some problems with duplicate OSM IDs, which are causing issues. Some interesting things are happening. For example, the OSM search is showing results for a completely different city.

https://www.openstreetmap.org/search?query=Am+Markt+23%2C+39288+Burg&zoom=16&minlon=11.181185245513918&minlat=54.43500780204213&maxlon=11.214873790740969&maxlat=54.44568958121143#map=16/54.43931/11.19751

Thats why the store a OSM ID from a other store: node/1370584944

We also have some problems with duplicate OSM IDs, which are causing issues. Some interesting things are happening. For example, the OSM search is showing results for a completely different city. https://www.openstreetmap.org/search?query=Am+Markt+23%2C+39288+Burg&zoom=16&minlon=11.181185245513918&minlat=54.43500780204213&maxlon=11.214873790740969&maxlat=54.44568958121143#map=16/54.43931/11.19751 Thats why the store a OSM ID from a other store: node/1370584944
Aziz-JH force-pushed feat/added-buchhandlung-de-importer from 5f53aa4f30 to 5455b14d5e 2026年06月12日 02:19:24 +02:00 Compare

@Aziz-JH wrote in #74 (comment):

We also have some problems with duplicate OSM IDs, which are causing issues. Some interesting things are happening. For example, the OSM search is showing results for a completely different city.

https://www.openstreetmap.org/search?query=Am+Markt+23%2C+39288+Burg&zoom=16&minlon=11.181185245513918&minlat=54.43500780204213&maxlon=11.214873790740969&maxlat=54.44568958121143#map=16/54.43931/11.19751

Thats why the store a OSM ID from a other store: node/1370584944

The problem is that the correct address is "Markt 23, 39288 Burg", the "Am Markt" is confusing nominatim and then it finds another "Am Markt" in a city starting with "Burg".

@Aziz-JH wrote in https://codeberg.org/bitboxer/bookpile/pulls/74#issuecomment-17298965: > We also have some problems with duplicate OSM IDs, which are causing issues. Some interesting things are happening. For example, the OSM search is showing results for a completely different city. > > https://www.openstreetmap.org/search?query=Am+Markt+23%2C+39288+Burg&zoom=16&minlon=11.181185245513918&minlat=54.43500780204213&maxlon=11.214873790740969&maxlat=54.44568958121143#map=16/54.43931/11.19751 > > Thats why the store a OSM ID from a other store: node/1370584944 The problem is that the correct address is "Markt 23, 39288 Burg", the "Am Markt" is confusing nominatim and then it finds another "Am Markt" in a city starting with "Burg".

@Aziz-JH wrote in #74 (comment):

At first, I wasn't sure whether we should use a JSON or a TS file for patching, as that's how it's currently done.

If we need to do more patching, we should use JSON instead. What do you think?

Yeah, go for it. Easy solution first and if we see something else fits better we can switch.

@Aziz-JH wrote in https://codeberg.org/bitboxer/bookpile/pulls/74#issuecomment-17298563: > At first, I wasn't sure whether we should use a JSON or a TS file for patching, as that's how it's currently done. > > If we need to do more patching, we should use JSON instead. What do you think? Yeah, go for it. Easy solution first and if we see something else fits better we can switch.
Aziz-JH force-pushed feat/added-buchhandlung-de-importer from 126e36efbf to 76e6d2e2f8 2026年06月16日 22:07:39 +02:00 Compare
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bitboxer/bookpile!74
Reference in a new issue
bitboxer/bookpile
No description provided.
Delete branch "Aziz-JH/bookpile:feat/added-buchhandlung-de-importer"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?