about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-08-11 19:07:51 -0700
committerKartik K. Agaram <vc@akkartik.com>2021-08-11 19:07:51 -0700
commit8b0355386728714fece2bcc14abc6edc0d20c726 (patch)
tree4e9a08501fe212e670944bc228bca81f5d003c72
parentefcf321d158af7098cd1aa7bff73556f18e8a093 (diff)
downloadmu-8b0355386728714fece2bcc14abc6edc0d20c726.tar.gz
"release" for FoC group
-rw-r--r--browse-slack/convert_slack.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/browse-slack/convert_slack.py b/browse-slack/convert_slack.py
index 5dcdc91d..93be54d2 100644
--- a/browse-slack/convert_slack.py
+++ b/browse-slack/convert_slack.py
@@ -1,14 +1,14 @@
 # Import JSON from a Slack admin export into a disk image Mu can load.
 #
-# Dependencies: python, netpbm
+# Dependencies: python, wget, awk, sed, netpbm
 #
-# Step 1: download a Slack archive
+# Step 1: download a Slack archive and unpack it to some directory
 #
 # Step 2: download user avatars to subdirectory images/ and convert them to PPM in subdirectory images/ppm/
+#   grep image_72 . -r |grep -v users.json |awk '{print $3}' |sort |uniq |sed 's/?.*//' |sed 's,\\,,g' |sed 's/"//' |sed 's/",$//' > images.list
 #   mkdir images
 #   cd images
-#   grep image_72 . -r |grep -v users.json |awk '{print $3}' |sort |uniq |sed 's/?.*//' |sed 's,\\,,g' |sed 's/"//' |sed 's/",$//' > images.list
-#   wget -i images.list --wait=0.1
+#   wget -i ../images.list --wait=0.1
 #   # fix some lying images
 #   for f in $(file *.jpg |grep PNG |sed 's/:.*//'); do mv -i $f $(echo $f |sed 's/\.jpg$/.png/'); done
 #   #
@@ -17,9 +17,9 @@
 #   for f in *.png; do png2pnm -n $f > ppm/$(echo $f |sed 's/\.png$//').ppm; done
 #
 # Step 3: construct a disk image out of the archives and avatars
-#   cd ../..  # go back to parent of images/
+#   cd ..  # go back to the top-level archive directory
 #   dd if=/dev/zero of=data.img count=201600  # 100MB
-#   python path/to/convert_slack.py > data.out
+#   python path/to/convert_slack.py > data.out 2> data.err
 #   (optionally sort items by timestamp; I currently do this in Vim by piping the latter half of data.out through `sort`)
 #   dd if=data.out of=data.img conv=notrunc
 # Currently this process yields errors for ~300 items (~70 posts and their comments)
a id='n181' href='#n181'>181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273