
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Script for converting Slack JSON into Roam import JSON.
Works as both a node module for use in other projects, as well as a command-line interface. The cli can be used in many diverse ways.
npm install --save slack2roam
const slack2roam = require('slack2roam')
const users = [{
id: "U0ABC123",
name: "malcolmocean",
real_name: "Malcolm Ocean",
}, {
id: "U0DEF456",
name: "conaw",
real_name: "Conor White-Sullivan",
}]
const channel = {name: 'general'}
const messages = [{
"type": "message",
"text": "Hey it's a message in slack",
"user": "U0ABC123",
"ts": "1585242429.009300",
}, {
"type": "message",
"text": "Wow, here's another it's a message in slack!",
"user": "U0DEF456",
"ts": "1585893429.009300",
}]
const options = {uPageNameKey: 'real_name'} // defaults to 'name', ie username
slack2roam.makeUserMap(users)
const roamJson = slack2roam.slackChannelToRoamPage(channel, messages, options)
result:
"title": "general",
"children": [
{
"string": "[[March 26th, 2020]]",
"children": [
{
"uid": "slack_general_1585242429_009300",
"create-time": 1585242429093,
"string": "[[Malcolm Ocean]] 13:07\nHey it's a message in slack"
}
]
},
{
"string": "[[April 3rd, 2020]]",
"children": [
{
"uid": "slack_general_1585893429_009300",
"create-time": 1585893429093,
"string": "[[Conor White-Sullivan]] 01:57\nWow, here's another it's a message in slack!"
}
]
}
]
}
If you have NodeJS installed, npm comes with it. If not, get it here.
npm install --global slack2roam
The command-line tool expects the command to be run from a slack export folder that contains the following:
users.jsonchannels.jsongeneral/
2020-06-11.json2020-06-12.jsonrandom/(It doesn't specifically expect general/ and random/, those are just examples)
Once you're in that folder, you can just run this:
slack2roam -o roam_data.json
This will output to the file roam_data.json. If you omit the -o flag it will show you a preview in the console instead.
Each channel listed in channels.json gets its own page in roam.
If you want to provide options, add this flag with a JSON string
--options='{"uPageNameKey":"real_name", "workspaceName":"mycompany", "timeOfDayFormat": "ampm"}'
Importing in bulk is best as it will do optimal things with threading, but if you import stuff later that replies to earlier threads, then it will block reference them. This uses custom UIDs, which is the reason you might want to provide a workspaceName above, since slack's UIDs are probably only per-workspace and otherwise you could get a collision if you're importing from multiple workspaces. This is fairly unlikely, especially since slack2roam also puts the channel name into the UID.
Ummm yeah hmu. I haven't done much managing of OSS projects but if you submit a pull request we can figure something out. Talk to me about it on Twitter @Malcolm_Ocean as I don't check GitHub notifications much.
See here for Roam's JSON schema.
If this is hugely valuable to you, you can tip me here, or also go check out my meta-systematic, goal-oriented productivity app, Complice.
FAQs
Script for converting Slack export JSON into Roam import JSON
The npm package slack2roam receives a total of 2 weekly downloads. As such, slack2roam popularity was classified as not popular.
We found that slack2roam demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.