1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

catullus: proverb bot, autorenkalender bot

This commit is contained in:
Kierán Meinhardt
2019-04-14 23:39:05 +02:00
parent 11e322e275
commit 470eba7c8e
7 changed files with 68 additions and 7 deletions

View File

@@ -0,0 +1,7 @@
{ writeShellScriptBin, w3m, gnused }:
writeShellScriptBin "autorenkalender" ''
${w3m}/bin/w3m -dump https://gutenberg.spiegel.de/ \
| ${gnused}/bin/sed -n '/Autorenkalender/,//p' \
| head -n -2 \
| tail -n +3
''

View File

@@ -0,0 +1,27 @@
{ fetchFromGitHub, buildPythonApplication, buildPythonPackage, fetchPypi, aiohttp, urllib3, pillow, beautifulsoup4 }:
let
telepot =
buildPythonPackage rec {
pname = "telepot";
version = "12.7";
src = fetchPypi {
inherit pname version;
sha256 = "1c587dmr71ppray0lzxgib1plnndmaiwal1kaiqx82rdwx4kw4ms";
};
propagatedBuildInputs = [ aiohttp urllib3 ];
doCheck = false;
};
in buildPythonApplication rec {
pname = "telegram-proverb";
version = "0.1.0";
# src = ~/prog/git/proverb-pro;
src = fetchFromGitHub {
owner = "kmein";
repo = "proverb-pro";
rev = "356460f5c542e8f5735c3e3eb5a356a04faf48df";
sha256 = "02psipiyvs126b67xkqd72sfjixanrvlg02w3pn2wpc0miy5v0v3";
};
propagatedBuildInputs = [ telepot pillow beautifulsoup4 ];
}