From e8c071c2a9d58bea5b52bee2d5e9f88aa0c007c8 Mon Sep 17 00:00:00 2001 From: ElnuDev Date: Tue, 25 Jul 2023 10:22:09 -0700 Subject: [PATCH] Add fetch script --- data/.gitignore | 1 + data/fetch.sh | 10 ++++++++++ data/shell.nix | 2 ++ 3 files changed, 13 insertions(+) create mode 100644 data/.gitignore create mode 100755 data/fetch.sh diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000..224e4a5 --- /dev/null +++ b/data/.gitignore @@ -0,0 +1 @@ +JMdict.xml diff --git a/data/fetch.sh b/data/fetch.sh new file mode 100755 index 0000000..108f41c --- /dev/null +++ b/data/fetch.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +# https://www.edrdg.org/wiki/index.php/JMdict-EDICT_Dictionary_Project#CURRENT_VERSION_&_DOWNLOAD +wget http://ftp.edrdg.org/pub/Nihongo/JMdict.gz + +# Extract and delete archive +gzip -d JMdict.gz + +# Add XML extension +mv JMdict JMdict.xml diff --git a/data/shell.nix b/data/shell.nix index 7b23109..a0b909e 100644 --- a/data/shell.nix +++ b/data/shell.nix @@ -5,6 +5,8 @@ pkgs.mkShell { go gopls gnumake + wget + gzip ]; shellHook = '' export PATH="$HOME/go/bin:$PATH"