chore: move poetry scripts to poetry directory

This commit is contained in:
Kierán Meinhardt
2020-03-03 15:15:55 +01:00
parent 253d09cebc
commit 5be327ba1f
4 changed files with 12 additions and 6 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
__pycache__/ __pycache__/
.mypy_cache/ .mypy_cache/
.direnv/
.envrc

View File

@@ -2,12 +2,12 @@
import itertools import itertools
import subprocess import subprocess
from PyDictionary import PyDictionary # from PyDictionary import PyDictionary
dictionary = PyDictionary() # dictionary = PyDictionary()
#
def translate_en_de(word): # def translate_en_de(word):
return dictionary.translate(word, "de") # return dictionary.translate(word, "de")
def pronunciation(word, lang="de"): def pronunciation(word, lang="de"):
command = ["espeak", "-x", "-q", "-v", lang, word] command = ["espeak", "-x", "-q", "-v", lang, word]
@@ -20,5 +20,5 @@ def is_rhyme(word1, word2, lang="de"):
if __name__ == "__main__": if __name__ == "__main__":
print(pronunciation("hallo welt")) print(pronunciation("hallo welt"))
print(translate_en_de("woe")) # print(translate_en_de("woe"))
print(is_rhyme("welt", "geld")) print(is_rhyme("welt", "geld"))

4
shell.nix Normal file
View File

@@ -0,0 +1,4 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
buildInputs = with pkgs; [ espeak ];
}