Browse Source

Add ziparound script

Gautier P 8 months ago
parent
commit
b3e316cf5b
3 changed files with 32 additions and 5 deletions
  1. 7
    1
      doc/0.getting_started.md
  2. 3
    2
      package.json
  3. 22
    2
      yarn.lock

+ 7
- 1
doc/0.getting_started.md View File

@@ -227,4 +227,10 @@ schema might change from time to time. Here is how to update it automatically:
227 227
 
228 228
 ### Other tools more or less connected with Flatisfy
229 229
 
230
-+ [ZipAround](https://github.com/guix77/ziparound) generates a list of ZIP codes centered on a city name, within a radius of N kilometers and within a certain travel time by car (France only)
230
++ [ZipAround](https://github.com/guix77/ziparound) generates a list of ZIP codes centered on a city name, within a radius of N kilometers and within a certain travel time by car (France only). You can invoke it with:
231
+
232
+```sh
233
+yarn ziparound
234
+# or alternatively
235
+yarn ziparound --code 75001 --distance 3
236
+```

+ 3
- 2
package.json View File

@@ -14,7 +14,8 @@
14 14
     "watch:dev": "webpack --colors --progress --watch",
15 15
     "build:prod": "NODE_ENV=production webpack --colors --progress -p",
16 16
     "watch:prod": "NODE_ENV=production webpack --colors --progress --watch -p",
17
-    "lint": "eslint --ext .js,.vue ./flatisfy/web/js_src/**"
17
+    "lint": "eslint --fix --ext .js,.vue ./flatisfy/web/js_src/**",
18
+    "ziparound": "cp flatisfy/data_files/laposte.json node_modules/ziparound/laposte.json && node node_modules/ziparound"
18 19
   },
19 20
   "dependencies": {
20 21
     "es6-promise": "^4.1.0",
@@ -56,6 +57,6 @@
56 57
     "vue-loader": "^11.3.4",
57 58
     "vue-template-compiler": "^2.2.6",
58 59
     "webpack": "^2.3.3",
59
-    "ziparound": "https://github.com/guix77/ziparound"
60
+    "ziparound": "1.0.0"
60 61
   }
61 62
 }

+ 22
- 2
yarn.lock View File

@@ -5065,6 +5065,11 @@ minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5:
5065 5065
   resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
5066 5066
   integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
5067 5067
 
5068
+minimist@~0.0.1:
5069
+  version "0.0.10"
5070
+  resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf"
5071
+  integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=
5072
+
5068 5073
 mixin-deep@^1.2.0:
5069 5074
   version "1.3.2"
5070 5075
   resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566"
@@ -5411,6 +5416,14 @@ onetime@^1.0.0:
5411 5416
   resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
5412 5417
   integrity sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=
5413 5418
 
5419
+optimist@^0.6.1:
5420
+  version "0.6.1"
5421
+  resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686"
5422
+  integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY=
5423
+  dependencies:
5424
+    minimist "~0.0.1"
5425
+    wordwrap "~0.0.2"
5426
+
5414 5427
 optionator@^0.8.2:
5415 5428
   version "0.8.3"
5416 5429
   resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
@@ -7864,6 +7877,11 @@ wordwrap@0.0.2:
7864 7877
   resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
7865 7878
   integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=
7866 7879
 
7880
+wordwrap@~0.0.2:
7881
+  version "0.0.3"
7882
+  resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
7883
+  integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc=
7884
+
7867 7885
 wrap-ansi@^2.0.0:
7868 7886
   version "2.1.0"
7869 7887
   resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"
@@ -7955,11 +7973,13 @@ yauzl@^2.2.1, yauzl@^2.4.2:
7955 7973
     buffer-crc32 "~0.2.3"
7956 7974
     fd-slicer "~1.1.0"
7957 7975
 
7958
-"ziparound@https://github.com/guix77/ziparound":
7976
+ziparound@1.0.0:
7959 7977
   version "1.0.0"
7960
-  resolved "https://github.com/guix77/ziparound#0eac83945d73549fe80b439c09d0dbcc97ebe346"
7978
+  resolved "https://registry.yarnpkg.com/ziparound/-/ziparound-1.0.0.tgz#f66cce0c2b17a14615a4195153dd2e91e0cde24a"
7979
+  integrity sha512-A24nZaHbfvySxTiSLkzvDaH7G6d59RDHu8qS9Ck25yJCTAoV+jWgW5MT+rlR7A3xlG+YhFPXRUudW36nOOcjTQ==
7961 7980
   dependencies:
7962 7981
     dotenv "^7.0.0"
7963 7982
     haversine "^1.1.1"
7964 7983
     node-fetch "^2.3.0"
7984
+    optimist "^0.6.1"
7965 7985
     prompt "^1.0.0"