git ssb

2+

arj / dat-share



Tree: 589659eb2f7557af64874b5dc925456e0cc0764a

Files: 589659eb2f7557af64874b5dc925456e0cc0764a / bin.js

568 bytesRaw
1#!/usr/bin/env node
2
3var lib = require('./lib');
4
5var program = require('commander');
6
7program
8 .option('-f, --share-folder [value]', 'Folder for sharing')
9 .option('-i, --only-people-i-follow', 'Only seed urls from people or channels I follow')
10 .parse(process.argv);
11
12require('ssb-client')((err, sbot) => {
13 if (err) throw err;
14
15 var shareFolder = program.shareFolder || '/tmp'
16
17 console.log("Sharing dat links from:", shareFolder)
18
19 if (program.onlyPeopleIFollow)
20 lib.getFromPeopleIFollow(sbot, shareFolder)
21 else
22 lib.getAll(sbot, shareFolder)
23})
24

Built with git-ssb-web