[mod] tooling:ivaldi nutzen
This commit is contained in:
parent
081f650d5d
commit
556da302fa
26
ivaldi.json
Normal file
26
ivaldi.json
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"name": "munin",
|
||||||
|
"libs": [
|
||||||
|
{
|
||||||
|
"kind": "plankton",
|
||||||
|
"data": {
|
||||||
|
"modules": [
|
||||||
|
"pit",
|
||||||
|
"http",
|
||||||
|
"ical",
|
||||||
|
"telegram",
|
||||||
|
"conf",
|
||||||
|
"args"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
"types.ts",
|
||||||
|
"sources/kalender_digital.ts",
|
||||||
|
"sources/_functions.ts",
|
||||||
|
"conf.ts",
|
||||||
|
"main.ts"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
27
libs/plankton/plankton.d.ts
vendored
27
libs/plankton/plankton.d.ts
vendored
|
@ -1,11 +1,11 @@
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
type int = number;
|
declare type int = number;
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
type float = number;
|
declare type float = number;
|
||||||
declare var process: any;
|
declare var process: any;
|
||||||
declare var require: any;
|
declare var require: any;
|
||||||
declare class Buffer {
|
declare class Buffer {
|
||||||
|
@ -22,7 +22,7 @@ declare namespace lib_plankton.base {
|
||||||
/**
|
/**
|
||||||
* @author fenris
|
* @author fenris
|
||||||
*/
|
*/
|
||||||
type type_pseudopointer<type_value> = {
|
declare type type_pseudopointer<type_value> = {
|
||||||
value: type_value;
|
value: type_value;
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
|
@ -1205,6 +1205,9 @@ declare namespace lib_plankton.pit {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function is_before(pit: type_pit, reference: type_pit): boolean;
|
function is_before(pit: type_pit, reference: type_pit): boolean;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
function is_after(pit: type_pit, reference: type_pit): boolean;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function is_between(pit: type_pit, reference_left: type_pit, reference_right: type_pit): boolean;
|
function is_between(pit: type_pit, reference_left: type_pit, reference_right: type_pit): boolean;
|
||||||
|
@ -1217,9 +1220,27 @@ declare namespace lib_plankton.pit {
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function shift_week(pit: type_pit, increment: int): type_pit;
|
function shift_week(pit: type_pit, increment: int): type_pit;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
function shift_year(pit: type_pit, increment: int): type_pit;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
function trunc_minute(pit: type_pit): type_pit;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
function trunc_hour(pit: type_pit): type_pit;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
function trunc_day(pit: type_pit): type_pit;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function trunc_week(pit: type_pit): type_pit;
|
function trunc_week(pit: type_pit): type_pit;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
function trunc_month(pit: type_pit): type_pit;
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
function trunc_year(pit: type_pit): type_pit;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function now(): type_pit;
|
function now(): type_pit;
|
||||||
|
|
|
@ -1476,7 +1476,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
function step(op) {
|
function step(op) {
|
||||||
if (f) throw new TypeError("Generator is already executing.");
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
while (_) try {
|
||||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
switch (op[0]) {
|
switch (op[0]) {
|
||||||
|
@ -3637,6 +3637,7 @@ var lib_plankton;
|
||||||
function is_after(pit, reference) {
|
function is_after(pit, reference) {
|
||||||
return (pit > reference);
|
return (pit > reference);
|
||||||
}
|
}
|
||||||
|
pit_1.is_after = is_after;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function is_between(pit, reference_left, reference_right) {
|
function is_between(pit, reference_left, reference_right) {
|
||||||
|
@ -3668,6 +3669,7 @@ var lib_plankton;
|
||||||
function shift_year(pit, increment) {
|
function shift_year(pit, increment) {
|
||||||
return (pit + (60 * 60 * 24 * 365 * increment));
|
return (pit + (60 * 60 * 24 * 365 * increment));
|
||||||
}
|
}
|
||||||
|
pit_1.shift_year = shift_year;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function trunc_minute(pit) {
|
function trunc_minute(pit) {
|
||||||
|
@ -3695,6 +3697,7 @@ var lib_plankton;
|
||||||
};
|
};
|
||||||
return from_datetime(datetime_output);
|
return from_datetime(datetime_output);
|
||||||
}
|
}
|
||||||
|
pit_1.trunc_minute = trunc_minute;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function trunc_hour(pit) {
|
function trunc_hour(pit) {
|
||||||
|
@ -3718,6 +3721,7 @@ var lib_plankton;
|
||||||
};
|
};
|
||||||
return from_datetime(datetime_output);
|
return from_datetime(datetime_output);
|
||||||
}
|
}
|
||||||
|
pit_1.trunc_hour = trunc_hour;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function trunc_day(pit) {
|
function trunc_day(pit) {
|
||||||
|
@ -3737,6 +3741,7 @@ var lib_plankton;
|
||||||
};
|
};
|
||||||
return from_datetime(datetime_output);
|
return from_datetime(datetime_output);
|
||||||
}
|
}
|
||||||
|
pit_1.trunc_day = trunc_day;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function trunc_week(pit) {
|
function trunc_week(pit) {
|
||||||
|
@ -3768,6 +3773,7 @@ var lib_plankton;
|
||||||
};
|
};
|
||||||
return from_datetime(datetime_output);
|
return from_datetime(datetime_output);
|
||||||
}
|
}
|
||||||
|
pit_1.trunc_month = trunc_month;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function trunc_year(pit) {
|
function trunc_year(pit) {
|
||||||
|
@ -3787,6 +3793,7 @@ var lib_plankton;
|
||||||
};
|
};
|
||||||
return from_datetime(datetime_output);
|
return from_datetime(datetime_output);
|
||||||
}
|
}
|
||||||
|
pit_1.trunc_year = trunc_year;
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
function now() {
|
function now() {
|
||||||
|
|
|
@ -63,9 +63,9 @@ namespace _lixer_event_reminder
|
||||||
process.stdout.write(
|
process.stdout.write(
|
||||||
arg_handler.generate_help(
|
arg_handler.generate_help(
|
||||||
{
|
{
|
||||||
"programname": "lixer-event-reminder",
|
"programname": "munin",
|
||||||
"description": "a telegram bot, which sends reminders about upcoming events",
|
"description": "sends reminders about upcoming events",
|
||||||
"executable": "node build/event-reminder",
|
"executable": "node build/munin",
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
16
tools/build
16
tools/build
|
@ -1,16 +1,4 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
import os as _os
|
tools/ivaldi build
|
||||||
import argparse as _argparse
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
|
||||||
argument_parser = _argparse.ArgumentParser(
|
|
||||||
)
|
|
||||||
args = argument_parser.parse_args()
|
|
||||||
|
|
||||||
if True:
|
|
||||||
_os.system("make -f tools/makefile")
|
|
||||||
|
|
||||||
|
|
||||||
main()
|
|
||||||
|
|
3
tools/clear
Executable file → Normal file
3
tools/clear
Executable file → Normal file
|
@ -1,5 +1,4 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
rm -r -f temp
|
tools/ivaldi clear $@
|
||||||
rm -r -f build
|
|
||||||
|
|
||||||
|
|
16
tools/deploy
16
tools/deploy
|
@ -1,18 +1,4 @@
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
## args
|
tools/ivaldi deploy $@
|
||||||
|
|
||||||
# if [ $# -ge 1 ] ; then target=$1 ; else target="pv-svartalfheim-user:~/skripte" ; fi
|
|
||||||
target=$1
|
|
||||||
|
|
||||||
|
|
||||||
## exec
|
|
||||||
|
|
||||||
rsync \
|
|
||||||
--recursive \
|
|
||||||
--update \
|
|
||||||
--delete \
|
|
||||||
--verbose \
|
|
||||||
--rsh=ssh \
|
|
||||||
build/ \
|
|
||||||
${target}
|
|
||||||
|
|
5455
tools/ivaldi
Executable file
5455
tools/ivaldi
Executable file
File diff suppressed because it is too large
Load diff
|
@ -1,40 +0,0 @@
|
||||||
## commands
|
|
||||||
|
|
||||||
cmd_mkdir := mkdir -p
|
|
||||||
cmd_cp := cp -r -u
|
|
||||||
cmd_tsc := tsc
|
|
||||||
cmd_log := echo "--"
|
|
||||||
cmd_cat := cat
|
|
||||||
cmd_echo := echo
|
|
||||||
cmd_chmod := chmod
|
|
||||||
|
|
||||||
|
|
||||||
## rules
|
|
||||||
|
|
||||||
.PHONY: _default
|
|
||||||
_default: _root
|
|
||||||
|
|
||||||
temp/termine-reminder-unlinked.js: \
|
|
||||||
libs/plankton/plankton.d.ts \
|
|
||||||
source/types.ts \
|
|
||||||
source/sources/kalender_digital.ts \
|
|
||||||
source/sources/_functions.ts \
|
|
||||||
source/conf.ts \
|
|
||||||
source/main.ts
|
|
||||||
@ ${cmd_log} "compiling logic …"
|
|
||||||
@ ${cmd_mkdir} temp
|
|
||||||
@ ${cmd_tsc} $^ --lib es2020,dom --target es6 --outFile $@
|
|
||||||
|
|
||||||
build/termine-reminder: libs/plankton/plankton.js temp/termine-reminder-unlinked.js
|
|
||||||
@ ${cmd_log} "linking …"
|
|
||||||
@ ${cmd_echo} "#!/usr/bin/env node" > temp/head.js
|
|
||||||
@ ${cmd_mkdir} build
|
|
||||||
@ ${cmd_cat} temp/head.js $^ > $@
|
|
||||||
@ ${cmd_chmod} +x $@
|
|
||||||
|
|
||||||
.PHONY: sources
|
|
||||||
sources: build/termine-reminder
|
|
||||||
|
|
||||||
.PHONY: _root
|
|
||||||
_root: sources
|
|
||||||
|
|
4
tools/update-ivaldi
Executable file
4
tools/update-ivaldi
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
cp -u -v ../ivaldi/build/ivaldi tools/ivaldi
|
||||||
|
|
4
tools/update-libs
Executable file
4
tools/update-libs
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
tools/ivaldi fetch $@
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
#!/usr/bin/env sh
|
|
||||||
|
|
||||||
## consts
|
|
||||||
|
|
||||||
dir="libs/plankton"
|
|
||||||
|
|
||||||
|
|
||||||
## vars
|
|
||||||
|
|
||||||
modules=""
|
|
||||||
modules="${modules} pit"
|
|
||||||
modules="${modules} http"
|
|
||||||
modules="${modules} ical"
|
|
||||||
modules="${modules} telegram"
|
|
||||||
modules="${modules} conf"
|
|
||||||
modules="${modules} args"
|
|
||||||
|
|
||||||
|
|
||||||
## exec
|
|
||||||
|
|
||||||
mkdir -p ${dir}
|
|
||||||
cd ${dir}
|
|
||||||
ptk bundle node ${modules}
|
|
Loading…
Reference in a new issue