
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
ssb-links
Advanced tools
ssb-plugin that indexes all the links!
if you have a handle on the sbot server:
sbot.use(require('ssb-links')
sbot.links2.read({query: [{$filter: {rel: ['mentions', {$prefix: '@d'}]}}]})
OR if sbot is a client...
links2 = require('ssb-links').init(sbot, {path: '~/.ssb'})
links2.read({query: [{$filter: {rel: ['mentions', {$prefix: '@d'}]}}]})
a leveldb instance will be created at config.path+'/links'
If there is no query provided, a full scan of the links database will be performed. this will return a stream of data that looks like
{
source: @{author_of_link},
rel: [{rel}, {rel_data}...],
dest: @/%/&{link} //the dest can be any type of ssb object.
ts: {local_timestamp}
}
this format will be the input to the query.
this module introduces the concept of "rel data", the rel is now stored as an array, and the data associated with the rel stored with it. by indexing it as an array, it becomes easy to query it when that data is a sortable range (for example, mention names, which may be aphabetically sorted)
see ./links.js to see how data is mapped.
TODO: map all markdown links, including http links.
the query must be a valid map-filter-reduce
these queries are in JSON format so you can use them via the cli,
sbot links2.read '{QUERY}'
be sure to use single quotes around the query so that the json is property
escaped. otherwise, run these queries by passing them to sbot.links2.read({query: QUERY})
and taking the output as a pull-stream.
returns an stream of {name, feed, uses}
[
{"$filter": {
"rel": ["mentions", {"$prefix": "@"}]
}},
{"$reduce":{
"name": ["rel", 1], "feed": "dest", "uses": {"$count": true}
}}
]
returns feeds in each thread, and how many posts they have made.
return object in form of {[thread_id]:{[poster]:count}}
[
{"$filter": {
"rel": ["root"]
}},
{"$reduce":{
"thread": "dest", "participant": "source", "posts": {"$count": true}
}}
]
[
{"$filter": {
"rel": ["mentions", {"$prefix": "@"}],
"dest": "@EMovhfIrFk4NihAKnRNhrfRaqIhBv1Wj8pTxJNgvCCY=.ed25519"
}},
{"$reduce": {
"name": ["rel", 1], "by": "source", "uses": {"$count": true}
}}
]
MIT
FAQs
index links in ssb messages
The npm package ssb-links receives a total of 325 weekly downloads. As such, ssb-links popularity was classified as not popular.
We found that ssb-links demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 19 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.