Files: ee570c41c6e2c24f4c77c9f3c9f14811bfb29f5f / bin.js
768 bytesRaw
1 | |
2 | |
3 | var lib = require('./lib'); |
4 | |
5 | var program = require('commander'); |
6 | |
7 | program |
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 | .option('-t, --temp', 'Use memory instead of filesystem for sharing') |
11 | .parse(process.argv); |
12 | |
13 | require('ssb-client')((err, sbot) => { |
14 | if (err) throw err; |
15 | |
16 | var shareFolder = program.shareFolder || '/tmp' |
17 | |
18 | if (program.temp) |
19 | console.log("Sharing dat links in memory mode instead of filesytem") |
20 | else |
21 | console.log("Sharing dat links from:", shareFolder) |
22 | |
23 | if (program.onlyPeopleIFollow) |
24 | lib.getFromPeopleIFollow(sbot, shareFolder, program.temp) |
25 | else |
26 | lib.getAll(sbot, shareFolder, program.temp) |
27 | }) |
28 |
Built with git-ssb-web