From 5be327ba1fbc98a57bd58eb9c4e7e3265c24146b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Tue, 3 Mar 2020 15:15:55 +0100 Subject: [PATCH] chore: move poetry scripts to poetry directory --- .gitignore | 2 ++ hermes.py => poetry/hermes.py | 12 ++++++------ rilke.py => poetry/rilke.py | 0 shell.nix | 4 ++++ 4 files changed, 12 insertions(+), 6 deletions(-) rename hermes.py => poetry/hermes.py (75%) rename rilke.py => poetry/rilke.py (100%) create mode 100644 shell.nix diff --git a/.gitignore b/.gitignore index 748588d..664b902 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ __pycache__/ .mypy_cache/ +.direnv/ +.envrc diff --git a/hermes.py b/poetry/hermes.py similarity index 75% rename from hermes.py rename to poetry/hermes.py index c9df6a0..22d7dea 100644 --- a/hermes.py +++ b/poetry/hermes.py @@ -2,12 +2,12 @@ import itertools import subprocess -from PyDictionary import PyDictionary +# from PyDictionary import PyDictionary -dictionary = PyDictionary() - -def translate_en_de(word): - return dictionary.translate(word, "de") +# dictionary = PyDictionary() +# +# def translate_en_de(word): +# return dictionary.translate(word, "de") def pronunciation(word, lang="de"): command = ["espeak", "-x", "-q", "-v", lang, word] @@ -20,5 +20,5 @@ def is_rhyme(word1, word2, lang="de"): if __name__ == "__main__": print(pronunciation("hallo welt")) - print(translate_en_de("woe")) + # print(translate_en_de("woe")) print(is_rhyme("welt", "geld")) diff --git a/rilke.py b/poetry/rilke.py similarity index 100% rename from rilke.py rename to poetry/rilke.py diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..012a7a3 --- /dev/null +++ b/shell.nix @@ -0,0 +1,4 @@ +{ pkgs ? import {} }: +pkgs.mkShell { + buildInputs = with pkgs; [ espeak ]; +}