Browse code

Save the toot as a markdown text

Julio Biason authored on 16/05/2019 10:01:40
Showing 3 changed files

... ...
@@ -19,6 +19,11 @@ dependencies = [
19 19
  "nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)",
20 20
 ]
21 21
 
22
+[[package]]
23
+name = "ascii"
24
+version = "0.9.1"
25
+source = "registry+https://github.com/rust-lang/crates.io-index"
26
+
22 27
 [[package]]
23 28
 name = "autocfg"
24 29
 version = "0.1.2"
... ...
@@ -109,6 +114,11 @@ name = "cc"
109 114
 version = "1.0.36"
110 115
 source = "registry+https://github.com/rust-lang/crates.io-index"
111 116
 
117
+[[package]]
118
+name = "cesu8"
119
+version = "1.1.0"
120
+source = "registry+https://github.com/rust-lang/crates.io-index"
121
+
112 122
 [[package]]
113 123
 name = "cfg-if"
114 124
 version = "0.1.7"
... ...
@@ -133,6 +143,18 @@ dependencies = [
133 143
  "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
134 144
 ]
135 145
 
146
+[[package]]
147
+name = "combine"
148
+version = "3.8.1"
149
+source = "registry+https://github.com/rust-lang/crates.io-index"
150
+dependencies = [
151
+ "ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
152
+ "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
153
+ "either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
154
+ "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
155
+ "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
156
+]
157
+
136 158
 [[package]]
137 159
 name = "cookie"
138 160
 version = "0.11.1"
... ...
@@ -245,6 +267,7 @@ name = "downfav"
245 267
 version = "0.1.0"
246 268
 dependencies = [
247 269
  "elefren 0.19.4 (registry+https://github.com/rust-lang/crates.io-index)",
270
+ "html2md 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
248 271
 ]
249 272
 
250 273
 [[package]]
... ...
@@ -252,6 +275,11 @@ name = "dtoa"
252 275
 version = "0.4.4"
253 276
 source = "registry+https://github.com/rust-lang/crates.io-index"
254 277
 
278
+[[package]]
279
+name = "either"
280
+version = "1.5.2"
281
+source = "registry+https://github.com/rust-lang/crates.io-index"
282
+
255 283
 [[package]]
256 284
 name = "elefren"
257 285
 version = "0.19.4"
... ...
@@ -357,6 +385,15 @@ name = "fuchsia-zircon-sys"
357 385
 version = "0.3.3"
358 386
 source = "registry+https://github.com/rust-lang/crates.io-index"
359 387
 
388
+[[package]]
389
+name = "futf"
390
+version = "0.1.4"
391
+source = "registry+https://github.com/rust-lang/crates.io-index"
392
+dependencies = [
393
+ "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
394
+ "new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
395
+]
396
+
360 397
 [[package]]
361 398
 name = "futures"
362 399
 version = "0.1.26"
... ...
@@ -393,6 +430,31 @@ dependencies = [
393 430
  "tokio-io 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)",
394 431
 ]
395 432
 
433
+[[package]]
434
+name = "html2md"
435
+version = "0.2.9"
436
+source = "registry+https://github.com/rust-lang/crates.io-index"
437
+dependencies = [
438
+ "html5ever 0.22.5 (registry+https://github.com/rust-lang/crates.io-index)",
439
+ "jni 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
440
+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
441
+ "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
442
+ "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
443
+]
444
+
445
+[[package]]
446
+name = "html5ever"
447
+version = "0.22.5"
448
+source = "registry+https://github.com/rust-lang/crates.io-index"
449
+dependencies = [
450
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
451
+ "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
452
+ "markup5ever 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
453
+ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
454
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
455
+ "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)",
456
+]
457
+
396 458
 [[package]]
397 459
 name = "http"
398 460
 version = "0.1.17"
... ...
@@ -502,6 +564,24 @@ name = "itoa"
502 564
 version = "0.4.4"
503 565
 source = "registry+https://github.com/rust-lang/crates.io-index"
504 566
 
567
+[[package]]
568
+name = "jni"
569
+version = "0.11.0"
570
+source = "registry+https://github.com/rust-lang/crates.io-index"
571
+dependencies = [
572
+ "cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
573
+ "combine 3.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
574
+ "error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
575
+ "jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
576
+ "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
577
+ "walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
578
+]
579
+
580
+[[package]]
581
+name = "jni-sys"
582
+version = "0.3.0"
583
+source = "registry+https://github.com/rust-lang/crates.io-index"
584
+
505 585
 [[package]]
506 586
 name = "kernel32-sys"
507 587
 version = "0.2.2"
... ...
@@ -548,6 +628,26 @@ dependencies = [
548 628
  "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
549 629
 ]
550 630
 
631
+[[package]]
632
+name = "mac"
633
+version = "0.1.1"
634
+source = "registry+https://github.com/rust-lang/crates.io-index"
635
+
636
+[[package]]
637
+name = "markup5ever"
638
+version = "0.7.5"
639
+source = "registry+https://github.com/rust-lang/crates.io-index"
640
+dependencies = [
641
+ "phf 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
642
+ "phf_codegen 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
643
+ "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
644
+ "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
645
+ "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)",
646
+ "string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
647
+ "string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
648
+ "tendril 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
649
+]
650
+
551 651
 [[package]]
552 652
 name = "matches"
553 653
 version = "0.1.8"
... ...
@@ -657,6 +757,11 @@ dependencies = [
657 757
  "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
658 758
 ]
659 759
 
760
+[[package]]
761
+name = "new_debug_unreachable"
762
+version = "1.0.3"
763
+source = "registry+https://github.com/rust-lang/crates.io-index"
764
+
660 765
 [[package]]
661 766
 name = "nodrop"
662 767
 version = "0.1.13"
... ...
@@ -787,6 +892,11 @@ name = "pkg-config"
787 892
 version = "0.3.14"
788 893
 source = "registry+https://github.com/rust-lang/crates.io-index"
789 894
 
895
+[[package]]
896
+name = "precomputed-hash"
897
+version = "0.1.1"
898
+source = "registry+https://github.com/rust-lang/crates.io-index"
899
+
790 900
 [[package]]
791 901
 name = "proc-macro2"
792 902
 version = "0.4.30"
... ...
@@ -1169,6 +1279,37 @@ name = "string"
1169 1279
 version = "0.1.3"
1170 1280
 source = "registry+https://github.com/rust-lang/crates.io-index"
1171 1281
 
1282
+[[package]]
1283
+name = "string_cache"
1284
+version = "0.7.3"
1285
+source = "registry+https://github.com/rust-lang/crates.io-index"
1286
+dependencies = [
1287
+ "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1288
+ "new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
1289
+ "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
1290
+ "precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1291
+ "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)",
1292
+ "string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
1293
+ "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1294
+]
1295
+
1296
+[[package]]
1297
+name = "string_cache_codegen"
1298
+version = "0.4.2"
1299
+source = "registry+https://github.com/rust-lang/crates.io-index"
1300
+dependencies = [
1301
+ "phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
1302
+ "phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)",
1303
+ "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
1304
+ "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)",
1305
+ "string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
1306
+]
1307
+
1308
+[[package]]
1309
+name = "string_cache_shared"
1310
+version = "0.3.0"
1311
+source = "registry+https://github.com/rust-lang/crates.io-index"
1312
+
1172 1313
 [[package]]
1173 1314
 name = "syn"
1174 1315
 version = "0.15.34"
... ...
@@ -1217,6 +1358,16 @@ dependencies = [
1217 1358
  "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)",
1218 1359
 ]
1219 1360
 
1361
+[[package]]
1362
+name = "tendril"
1363
+version = "0.4.1"
1364
+source = "registry+https://github.com/rust-lang/crates.io-index"
1365
+dependencies = [
1366
+ "futf 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
1367
+ "mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
1368
+ "utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)",
1369
+]
1370
+
1220 1371
 [[package]]
1221 1372
 name = "thread_local"
1222 1373
 version = "0.3.6"
... ...
@@ -1420,6 +1571,14 @@ name = "unicode-xid"
1420 1571
 version = "0.1.0"
1421 1572
 source = "registry+https://github.com/rust-lang/crates.io-index"
1422 1573
 
1574
+[[package]]
1575
+name = "unreachable"
1576
+version = "1.0.0"
1577
+source = "registry+https://github.com/rust-lang/crates.io-index"
1578
+dependencies = [
1579
+ "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
1580
+]
1581
+
1423 1582
 [[package]]
1424 1583
 name = "url"
1425 1584
 version = "1.7.2"
... ...
@@ -1430,6 +1589,11 @@ dependencies = [
1430 1589
  "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
1431 1590
 ]
1432 1591
 
1592
+[[package]]
1593
+name = "utf-8"
1594
+version = "0.7.5"
1595
+source = "registry+https://github.com/rust-lang/crates.io-index"
1596
+
1433 1597
 [[package]]
1434 1598
 name = "utf8-ranges"
1435 1599
 version = "1.0.2"
... ...
@@ -1453,6 +1617,11 @@ name = "version_check"
1453 1617
 version = "0.1.5"
1454 1618
 source = "registry+https://github.com/rust-lang/crates.io-index"
1455 1619
 
1620
+[[package]]
1621
+name = "void"
1622
+version = "1.0.2"
1623
+source = "registry+https://github.com/rust-lang/crates.io-index"
1624
+
1456 1625
 [[package]]
1457 1626
 name = "walkdir"
1458 1627
 version = "2.2.7"
... ...
@@ -1523,6 +1692,7 @@ dependencies = [
1523 1692
 "checksum adler32 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7e522997b529f05601e05166c07ed17789691f562762c7f3b987263d2dedee5c"
1524 1693
 "checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c"
1525 1694
 "checksum arrayvec 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)" = "92c7fb76bc8826a8b33b4ee5bb07a247a81e76764ab4d55e8f73e3a4d8808c71"
1695
+"checksum ascii 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a5fc969a8ce2c9c0c4b0429bb8431544f6658283c8326ba5ff8c762b75369335"
1526 1696
 "checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799"
1527 1697
 "checksum backtrace 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "f106c02a3604afcdc0df5d36cc47b44b55917dbaf3d808f71c163a0ddba64637"
1528 1698
 "checksum backtrace-sys 0.1.28 (registry+https://github.com/rust-lang/crates.io-index)" = "797c830ac25ccc92a7f8a7b9862bde440715531514594a6154e3d4a54dd769b6"
... ...
@@ -1535,9 +1705,11 @@ dependencies = [
1535 1705
 "checksum bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)" = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
1536 1706
 "checksum cargo_metadata 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e5d1b4d380e1bab994591a24c2bdd1b054f64b60bef483a8c598c7c345bc3bbe"
1537 1707
 "checksum cc 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)" = "a0c56216487bb80eec9c4516337b2588a4f2a2290d72a1416d930e4dcdb0c90d"
1708
+"checksum cesu8 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
1538 1709
 "checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4"
1539 1710
 "checksum chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "45912881121cb26fad7c38c17ba7daa18764771836b34fab7d3fbd93ed633878"
1540 1711
 "checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f"
1712
+"checksum combine 3.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680"
1541 1713
 "checksum cookie 0.11.1 (registry+https://github.com/rust-lang/crates.io-index)" = "99be24cfcf40d56ed37fd11c2123be833959bbc5bddecb46e1c2e442e15fa3e0"
1542 1714
 "checksum cookie_store 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b0d2f2ecb21dce00e2453268370312978af9b8024020c7a37ae2cc6dbbe64685"
1543 1715
 "checksum core-foundation 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "25b9e03f145fd4f2bf705e07b900cd41fc636598fe5dc452fd0db1441c3f496d"
... ...
@@ -1551,6 +1723,7 @@ dependencies = [
1551 1723
 "checksum data-encoding 2.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4f47ca1860a761136924ddd2422ba77b2ea54fe8cc75b9040804a0d9d32ad97"
1552 1724
 "checksum doc-comment 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "923dea538cea0aa3025e8685b20d6ee21ef99c4f77e954a30febbaac5ec73a97"
1553 1725
 "checksum dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "ea57b42383d091c85abcc2706240b94ab2a8fa1fc81c10ff23c4de06e2a90b5e"
1726
+"checksum either 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5527cfe0d098f36e3f8839852688e63c8fff1c90b2b405aef730615f9a7bcf7b"
1554 1727
 "checksum elefren 0.19.4 (registry+https://github.com/rust-lang/crates.io-index)" = "34f49632a0d50544fe2874ac59c0c36c79871269e58b491ed73c94ffe71d0568"
1555 1728
 "checksum encoding_rs 0.8.17 (registry+https://github.com/rust-lang/crates.io-index)" = "4155785c79f2f6701f185eb2e6b4caf0555ec03477cb4c70db67b465311620ed"
1556 1729
 "checksum error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "07e791d3be96241c77c43846b665ef1384606da2cd2a48730abe606a12906e02"
... ...
@@ -1563,10 +1736,13 @@ dependencies = [
1563 1736
 "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
1564 1737
 "checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82"
1565 1738
 "checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7"
1739
+"checksum futf 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7c9c1ce3fa9336301af935ab852c437817d14cd33690446569392e65170aac3b"
1566 1740
 "checksum futures 0.1.26 (registry+https://github.com/rust-lang/crates.io-index)" = "62941eff9507c8177d448bd83a44d9b9760856e184081d8cd79ba9f03dd24981"
1567 1741
 "checksum futures-cpupool 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4"
1568 1742
 "checksum glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb"
1569 1743
 "checksum h2 0.1.18 (registry+https://github.com/rust-lang/crates.io-index)" = "85ab6286db06040ddefb71641b50017c06874614001a134b423783e2db2920bd"
1744
+"checksum html2md 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e3f40515ebe18a0e23fa35cfce0694e681474a29c6cf0ebe510c05ad6cf2233c"
1745
+"checksum html5ever 0.22.5 (registry+https://github.com/rust-lang/crates.io-index)" = "c213fa6a618dc1da552f54f85cba74b05d8e883c92ec4e89067736938084c26e"
1570 1746
 "checksum http 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "eed324f0f0daf6ec10c474f150505af2c143f251722bf9dbd1261bd1f2ee2c1a"
1571 1747
 "checksum httparse 1.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e8734b0cfd3bc3e101ec59100e101c2eecd19282202e87808b3037b442777a83"
1572 1748
 "checksum hyper 0.12.28 (registry+https://github.com/rust-lang/crates.io-index)" = "e8e4606fed1c162e3a63d408c07584429f49a4f34c7176cb6cbee60e78f2372c"
... ...
@@ -1577,6 +1753,8 @@ dependencies = [
1577 1753
 "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
1578 1754
 "checksum isolang 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "265ef164908329e47e753c769b14cbb27434abf0c41984dca201484022f09ce5"
1579 1755
 "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
1756
+"checksum jni 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "294eca097d1dc0bf59de5ab9f7eafa5f77129e9f6464c957ed3ddeb705fb4292"
1757
+"checksum jni-sys 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130"
1580 1758
 "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
1581 1759
 "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a"
1582 1760
 "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14"
... ...
@@ -1584,6 +1762,8 @@ dependencies = [
1584 1762
 "checksum libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6"
1585 1763
 "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c"
1586 1764
 "checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6"
1765
+"checksum mac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c41e0c4fef86961ac6d6f8a82609f55f31b05e4fce149ac5710e439df7619ba4"
1766
+"checksum markup5ever 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "897636f9850c3eef4905a5540683ed53dc9393860f0846cab2c2ddf9939862ff"
1587 1767
 "checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08"
1588 1768
 "checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39"
1589 1769
 "checksum memoffset 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0f9dc261e2b62d7a622bf416ea3c5245cdd5d9a7fcc428c0d06804dfce1775b3"
... ...
@@ -1595,6 +1775,7 @@ dependencies = [
1595 1775
 "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
1596 1776
 "checksum native-tls 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4b2df1a4c22fd44a62147fd8f13dd0f95c9d8ca7b2610299b2a2f9cf8964274e"
1597 1777
 "checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88"
1778
+"checksum new_debug_unreachable 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "f40f005c60db6e03bae699e414c58bf9aa7ea02a2d0b9bfbcf19286cc4c82b30"
1598 1779
 "checksum nodrop 0.1.13 (registry+https://github.com/rust-lang/crates.io-index)" = "2f9667ddcc6cc8a43afc9b7917599d7216aa09c463919ea32c59ed6cac8bc945"
1599 1780
 "checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea"
1600 1781
 "checksum num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0b3a5d7cc97d6d30d8b9bc8fa19bf45349ffe46241e8816f50f62f6d6aaabee1"
... ...
@@ -1611,6 +1792,7 @@ dependencies = [
1611 1792
 "checksum phf_generator 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "09364cc93c159b8b06b1f4dd8a4398984503483891b0c26b867cf431fb132662"
1612 1793
 "checksum phf_shared 0.7.24 (registry+https://github.com/rust-lang/crates.io-index)" = "234f71a15de2288bcb7e3b6515828d22af7ec8598ee6d24c3b526fa0a80b67a0"
1613 1794
 "checksum pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)" = "676e8eb2b1b4c9043511a9b7bea0915320d7e502b0a079fb03f9635a5252b18c"
1795
+"checksum precomputed-hash 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
1614 1796
 "checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
1615 1797
 "checksum publicsuffix 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5afecba86dcf1e4fd610246f89899d1924fe12e1e89f555eb7c7f710f3c5ad1d"
1616 1798
 "checksum pulldown-cmark 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "eef52fac62d0ea7b9b4dc7da092aa64ea7ec3d90af6679422d3d7e0e14b6ee15"
... ...
@@ -1654,11 +1836,15 @@ dependencies = [
1654 1836
 "checksum smallvec 0.6.9 (registry+https://github.com/rust-lang/crates.io-index)" = "c4488ae950c49d403731982257768f48fada354a5203fe81f9bb6f43ca9002be"
1655 1837
 "checksum stable_deref_trait 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8"
1656 1838
 "checksum string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "b639411d0b9c738748b5397d5ceba08e648f4f1992231aa859af1a017f31f60b"
1839
+"checksum string_cache 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "25d70109977172b127fe834e5449e5ab1740b9ba49fa18a2020f509174f25423"
1840
+"checksum string_cache_codegen 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1eea1eee654ef80933142157fdad9dd8bc43cf7c74e999e369263496f04ff4da"
1841
+"checksum string_cache_shared 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b1884d1bc09741d466d9b14e6d37ac89d6909cbcac41dd9ae982d4d063bbedfc"
1657 1842
 "checksum syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe"
1658 1843
 "checksum synstructure 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "73687139bf99285483c96ac0add482c3776528beac1d97d444f6e91f203a2015"
1659 1844
 "checksum tap-reader 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8f13fc301d415a8cd4529ba679720c59f07369bcff573618a6e8d5afebefb6f3"
1660 1845
 "checksum tempdir 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
1661 1846
 "checksum tempfile 3.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "b86c784c88d98c801132806dadd3819ed29d8600836c4088e855cdf3e178ed8a"
1847
+"checksum tendril 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "707feda9f2582d5d680d733e38755547a3e8fb471e7ba11452ecfd9ce93a5d3b"
1662 1848
 "checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b"
1663 1849
 "checksum time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)" = "db8dcfca086c1143c9270ac42a2bbd8a7ee477b78ac8e45b19abfb0cbede4b6f"
1664 1850
 "checksum tokio 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)" = "cec6c34409089be085de9403ba2010b80e36938c9ca992c4f67f407bb13db0b1"
... ...
@@ -1680,11 +1866,14 @@ dependencies = [
1680 1866
 "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5"
1681 1867
 "checksum unicode-normalization 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "141339a08b982d942be2ca06ff8b076563cbe223d1befd5450716790d44e2426"
1682 1868
 "checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"
1869
+"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56"
1683 1870
 "checksum url 1.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a"
1871
+"checksum utf-8 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)" = "05e42f7c18b8f902290b009cde6d651262f956c98bc51bca4cd1d511c9cd85c7"
1684 1872
 "checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737"
1685 1873
 "checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a"
1686 1874
 "checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d"
1687 1875
 "checksum version_check 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd"
1876
+"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d"
1688 1877
 "checksum walkdir 2.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "9d9d7ed3431229a144296213105a390676cc49c9b6a72bd19f3176c98e129fa1"
1689 1878
 "checksum want 0.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "797464475f30ddb8830cc529aaaae648d581f99e2036a928877dfde027ddf6b3"
1690 1879
 "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a"
... ...
@@ -6,3 +6,4 @@ edition = "2018"
6 6
 
7 7
 [dependencies]
8 8
 elefren = { version = "0.19", features = ["toml"] }
9
+html2md = "0.2.9"
... ...
@@ -1,6 +1,12 @@
1
+use std::path::Path;
2
+use std::path::PathBuf;
3
+use std::fs::File;
4
+use std::io::prelude::*;
5
+
1 6
 use elefren::prelude::*;
2 7
 use elefren::helpers::cli;
3 8
 use elefren::helpers::toml;
9
+use elefren::entities::status;
4 10
 
5 11
 fn main() {
6 12
     let client = if let Ok(data) = toml::from_file("mastodon.toml") {
... ...
@@ -19,7 +25,7 @@ fn main() {
19 25
         .favourites().unwrap()
20 26
         .items_iter()
21 27
         .take(2)
22
-        .for_each(move |record| println!("{:#?}", record))
28
+        .for_each(move |record| dump_record(record))
23 29
         ;
24 30
 
25 31
     // status
... ...
@@ -30,3 +36,26 @@ fn main() {
30 36
     //  -> attachment.remote_url / attachment.url
31 37
     //     attachment.
32 38
 }
39
+
40
+fn dump_record(record: status::Status) -> () {
41
+    create_structure(&record);
42
+    save_content(&record);
43
+}
44
+
45
+fn toot_dir(record: &status::Status) -> PathBuf {
46
+    Path::new("data")
47
+        .join(&record.account.acct)
48
+        .join(&record.id)
49
+}
50
+
51
+fn create_structure(record: &status::Status) -> () {
52
+    std::fs::create_dir_all(toot_dir(record))
53
+        .expect("Failed to create the storage path");
54
+}
55
+
56
+fn save_content(record: &status::Status) -> () {
57
+    if let Ok(mut fp) = File::create(toot_dir(&record).join("toot.md")) {
58
+        fp.write_all(html2md::parse_html(&record.content).as_bytes())
59
+            .expect("Failed to save content");
60
+    }
61
+}