tswast / dat-pin-box Goto Github PK
View Code? Open in Web Editor NEWPin Dat archives on a Raspberry Pi.
License: Apache License 2.0
Pin Dat archives on a Raspberry Pi.
License: Apache License 2.0
Would it make sense to use webrun for this project? If pinning is built-in to browsers, probably not. But maybe for browsers like Bunsen or Firefox extensions that don't have a built-in way for modifying pins?
Idea: Start up a service worker and listen for new pins in Beaker Browser (does Beaker offer an API to listen to these events?) and add them to the pins dat repo, thus keeping the Beaker pins in sync with my dat pin box pins.
I think it'd be useful for me to have a public set of pins (dat://464b000900de29e2f02e1c304abb70de0a94266cae55a5ca94bf1abae78839b6/) as well as a private set of pins. To support this, dat-pin-box should be able to watch more than one dat repo for pins.
Currently it's watching a pins repo in my home directory. It should be made a bit more general than that. At the very least, make it relative to $HOME
if not relative to the directory where dat-pin-box
is run.
Consistently, I get a TimeoutError
the second time I run index.js with webrun.
$ webrun 'index.js?pin=dat://464b000900de29e2f02e1c304abb70de0a94266cae55a5ca94bf1abae78839b6/'
(node:16195) ExperimentalWarning: vm.SourceTextModule is an experimental feature. This feature could change at any time
{ TimeoutError: Timed out
at Timeout.setTimeout [as _onTimeout] (/Users/tswast/.nvm/versions/node/v10.10.0/lib/node_modules/@rangermauve/webrun/node_modules/@beaker/dat-node/lib/util.js:21:14)
at ontimeout (timers.js:425:11)
at tryOnTimeout (timers.js:289:5)
at listOnTimeout (timers.js:252:5)
at Timer.processTimers (timers.js:212:10) name: 'TimeoutError', timedOut: true }
Deleting the .webrun
folder and re-running resolves the issue. But, since I'd like dat-pin-box to be used for archival purposes, not just seeding, this is quite a problem.
First reported at RangerMauve/webrun#2 (comment)
@RangerMauve did you end up filing an issue in hyperdrive or beaker for this? I think it affects follow-seeder too. I don't get the same TimeoutError
message, but I do get Unable to seed /posts/ in dat://6e96b27838c76991ac3563f729beb7c6e6c362fe369793784cd1c729b2b37299
the second time I run it.
Operating system: macOS 10.13.6
Node.js: v10.10.0
webrun: 2.1.2
When pins.json changes:
Currently, you must create a dat repo with a pins.json file on the system where you are primarily using dat for browsing (such as in Beaker Browser), then you have to clone the repo onto your pin box.
It'd be good if the first time you ran dat-pin-box, it created a private dat for you, but this requires multi-writer support to be useful.
This will make it more efficient to replicate & version the dat repo for pins. https://twitter.com/RangerMauve/status/1039976128373387264
It should be made easy to install dat-pin-box as a global NPM module.
It'd be good to use the example pin repo as the canonical pin repo to follow. People can then suggest changes to it by sending a PR here.
I think it'd be useful if there was a template repo that contained an HTML page for easily adding new URLs to be pinned,.
The JS for dat-pin-box would be stored within the repo so that it could be used by webrun or beaker.
Basically, the flow would be:
Here's a blog post I wrote about it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.