git ssb

0+

clemo / ssb-ipfs-share



forked from arj / dat-share

Commit 6eab0842af17e84613fcb72d0b1895e96198f522

Don't use live or collect won't return. Better info when using temp

Anders Rune Jensen committed on 9/27/2017, 8:00:39 PM
Parent: 338baa22ed1a31664b6306c3b58352e256a469ea

Files changed

README.mdchanged
lib.jschanged
package.jsonchanged
README.mdView
@@ -40,10 +40,4 @@
4040 "shareFolder": "PATH_TO_MY_SHARE_FOLDER",
4141 "onlyPeopleIFollow": true
4242 }
4343 ```
44-
45-TODO:
46-
47- https://github.com/datproject/dat-node
48-
49- - var stats = dat.trackStats(), peers
lib.jsView
@@ -11,9 +11,10 @@
1111 logs.forEach(msg => {
1212 uri.withinString(msg.value.content.text, (datLink) => {
1313 if (!datLink.startsWith("dat://")) return
1414
15- console.log("Saving to:", shareFolder + "/" + datLink.substring(6))
15+ if (!useTemp)
16+ console.log("Saving to:", shareFolder + "/" + datLink.substring(6))
1617
1718 Dat(shareFolder + "/" + datLink.substring(6), {
1819 key: datLink,
1920 temp: useTemp
@@ -30,9 +31,9 @@
3031 getAll: function(sbot, shareFolder, useTemp) {
3132 console.log("Looking for dat links in all feeds")
3233
3334 pull(
34- sbot.createLogStream({ live: true, reverse: true, limit: 10000 }),
35+ sbot.createLogStream({ reverse: true, limit: 15000 }),
3536 pull.filter((msg) => {
3637 return !msg.value ||
3738 msg.value.content.type == 'post' &&
3839 typeof msg.value.content.text == "string" &&
@@ -49,9 +50,9 @@
4950 shareFolder, useTemp) {
5051 console.log("users:", following)
5152 console.log("channels:", channelSubscriptions)
5253 pull(
53- sbot.createLogStream({ live: true, reverse: true, limit: 10000 }),
54+ sbot.createLogStream({ reverse: true, limit: 15000 }),
5455 pull.filter((msg) => {
5556 return !msg.value ||
5657 ((msg.value.author in following ||
5758 msg.value.content.channel in channelSubscriptions)
package.jsonView
@@ -1,7 +1,7 @@
11 {
22 "name": "ssb-dat-autoshare",
3- "version": "0.0.2",
3+ "version": "0.0.3",
44 "description": "A cli for auto sharing dat links scuttlebot feeds",
55 "main": "export-data.js",
66 "scripts": {
77 "test": "echo \"Error: no test specified\" && exit 1"

Built with git-ssb-web