jadb/bin/ja_db.dart

21 lines
569 B
Dart
Raw 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('main.db').path);
2022-06-20 20:06:07 +02:00
await addDataFromJMdict(db);
await addDataFromRADKFILE(db);
// await addDataFromKANJIDIC(db);
2022-06-20 20:06:07 +02:00
}