I've looked at the code and it seems that using URL instead of file path will just work, but the connection failure use case won't be handled.

I have an idea how it can be implemented using stream_wrapper_register(), but I don't have time to implement it, sorry.

Example class registered as stream wrapper



On 15 August 2018 at 23:23, Jeroen De Dauw <jeroendedauw@gmail.com> wrote:
Hey Aleksey,

The library allows you to access the position of the DumpReader and to resume from a stored position.


This functionality is used by Replicator, a CLI tool build on top of the JSON Dump Reader library.


Neither the library or the CLI tool support streaming dumps (unless that somehow magically ends up working). I'm happy to review pull requests with additions or enhancements.

Note that Replicator supports import from the Wikidata web API, including automatic fetching of dependencies. This works if you want to get a specific set of entities or just a few thousand for testing purposes. If you want all entities from Wikidata this approach is of course not viable.


Cheers
Software Crafter | Speaker | Student | Strategist | Contributor to Wikimedia and Open Source
~=[,,_,,]:3

_______________________________________________
Wikidata-tech mailing list
Wikidata-tech@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-tech