From b5f735025e7bb48121bc41a051ede434b32c8d99 Mon Sep 17 00:00:00 2001 From: NaiJi Date: Wed, 1 Feb 2023 02:25:26 +0400 Subject: [PATCH] chore: init --- .gitignore | 6 +++++ README.md | 3 +++ analysis_options.yaml | 30 ++++++++++++++++++++++ bin/nyaa_si_watcher.dart | 11 ++++++++ pubspec.lock | 54 ++++++++++++++++++++++++++++++++++++++++ pubspec.yaml | 12 +++++++++ 6 files changed, 116 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 analysis_options.yaml create mode 100644 bin/nyaa_si_watcher.dart create mode 100644 pubspec.lock create mode 100644 pubspec.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c8a157 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +# Files and directories created by pub. +.dart_tool/ +.packages + +# Conventional directory for build output. +build/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..bbba389 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +### nyaa-si-watcher + +A simple tool to help me monitor new entries by given prompt. diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..dee8927 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,30 @@ +# This file configures the static analysis results for your project (errors, +# warnings, and lints). +# +# This enables the 'recommended' set of lints from `package:lints`. +# This set helps identify many issues that may lead to problems when running +# or consuming Dart code, and enforces writing Dart using a single, idiomatic +# style and format. +# +# If you want a smaller set of lints you can change this to specify +# 'package:lints/core.yaml'. These are just the most critical lints +# (the recommended set includes the core lints). +# The core lints are also what is used by pub.dev for scoring packages. + +include: package:lints/recommended.yaml + +# Uncomment the following section to specify additional rules. + +# linter: +# rules: +# - camel_case_types + +# analyzer: +# exclude: +# - path/to/excluded/files/** + +# For more information about the core and recommended set of lints, see +# https://dart.dev/go/core-lints + +# For additional information about configuring this file, see +# https://dart.dev/guides/language/analysis-options diff --git a/bin/nyaa_si_watcher.dart b/bin/nyaa_si_watcher.dart new file mode 100644 index 0000000..1cc347c --- /dev/null +++ b/bin/nyaa_si_watcher.dart @@ -0,0 +1,11 @@ +import 'dart:html'; +import 'dart:io' as io; + +void main(final List arguments) async { + if (arguments.isEmpty) { + io.stderr.writeln('error: provide path for last id file'); + return; + } + + final List lines = await io.File(arguments[0]).readAsLines(); +} diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..f837604 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,54 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.17.1" + csslib: + dependency: transitive + description: + name: csslib + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.2" + html: + dependency: "direct main" + description: + name: html + url: "https://pub.dartlang.org" + source: hosted + version: "0.15.1" + lints: + dependency: "direct dev" + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.3" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" +sdks: + dart: ">=2.18.4 <3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..52fd58b --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,12 @@ +name: nyaa_si_watcher +description: A sample command-line application for watching nyaa.si +version: 1.0.0 + +environment: + sdk: '>=2.18.4 <3.0.0' + +dev_dependencies: + lints: ^2.0.0 + +dependencies: + html: ^0.15.1