Browse Source

Switched to dkjson, cause it\'s a much smaller dependency

and since we only need it once to decode the emoji list, we don't need the performance of a C written json module
master v1.0-0
Sebastian 3 years ago
parent
commit
d3519647a1
Signed by: imo GPG Key ID: AFA10CBFE4391C0C
  1. 2
      README.md
  2. 2
      emoji-downloader-1.0-0.rockspec
  3. 2
      emoji-downloader.lua

2
README.md

@ -12,7 +12,7 @@ Inspired by [emoji-stealer](https://github.com/mirro-chan/emoji-stealer)
* [lpath](https://github.com/starwing/lpath)
* [copas](https://github.com/keplerproject/copas)
* [luasec](https://github.com/brunoos/luasec)
* [lua-rapidjson](https://github.com/xpol/lua-rapidjson)
* [dkjson](http://dkolf.de/src/dkjson-lua.fsl/home)
* [argparse](https://github.com/mpeterv/argparse)
"Uhhh, why so much more dependencies?" you might think, so let me explain: The previous version depended on [lua-requests](https://github.com/JakobGreen/lua-requests), which has 5 dependencies on it's own, of which two were not even needed for this script. So we're at the same dependency level as before, but this time all dependencies are used. I could remove the argparse dependenciy and write my own short version, but...laziness. ;)

2
emoji-downloader-1.0-0.rockspec

@ -19,7 +19,7 @@ dependencies = {
'lua >= 5.3',
'lpath',
'copas',
'rapidjson',
'dkjson',
'argparse',
'luasocket',
'luasec'

2
emoji-downloader.lua

@ -8,7 +8,7 @@ local limit = require('copas.limit')
local ltn12 = require('ltn12')
local argparse = require('argparse')
local url_parser = require('socket.url').parse
local json = require('rapidjson').decode
local json = require('dkjson').decode
local exists = require('path.fs').exists
local mkdir = require('path.fs').makedirs