jadb/bin/jadb.dart

21 lines
570 B
Dart
Raw Permalink Normal View History

import 'dart:ffi';
2022-06-20 20:06:07 +02:00
import 'dart:io';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:sqlite3/open.dart';
2022-06-20 20:06:07 +02:00
import 'jmdict/parser.dart';
import 'kanjidic/parser.dart';
import 'radkfile/parser.dart';
Future<void> main(List<String> arguments) async {
final db = await createDatabaseFactoryFfi(ffiInit: () {
open.overrideForAll(() => DynamicLibrary.open(arguments[0]));
})
.openDatabase(Directory.current.uri.resolve('jadb.sqlite').path);
2022-06-20 20:06:07 +02:00
await addDataFromJMdict(db);
await addDataFromRADKFILE(db);
2022-08-18 21:39:36 +02:00
await addDataFromKANJIDIC(db);
2022-06-20 20:06:07 +02:00
}