21 lines
566 B
Dart
21 lines
566 B
Dart
import 'dart:ffi';
|
|
import 'dart:io';
|
|
|
|
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
|
import 'package:sqlite3/open.dart';
|
|
|
|
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);
|
|
await addDataFromJMdict(db);
|
|
await addDataFromRADKFILE(db);
|
|
await addDataFromKANJIDIC(db);
|
|
}
|
|
|