Git Product home page Git Product logo

dat-pin-box's People

Contributors

tswast avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

dat-pin-box's Issues

Use webrun

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?

Make example pin repo self-modifying

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.

Watch more than 1 pins.json file (Multi-reader support)

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.

Don't hardcode user name into directory

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.

Known Issue: TimeoutError the second time dat-pin-box is run with webrun

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

Watch pins.json for changes

When pins.json changes:

  • connect to new dat repos
  • disconnect from removed repos
  • maybe delete removed repos from disk too?

Multi-writer support

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.

Use template repo for tracking pinned dats

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:

  • Fork the template
  • Send the URL to the JS within the new archive to webrun or wherever
  • Use the UI within the archive's index.html to add new links graphically

Here's a blog post I wrote about it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.