Skip to content

Commit

Permalink
inital
Browse files Browse the repository at this point in the history
  • Loading branch information
nyakokitsu committed Dec 31, 2023
0 parents commit 26ebd7f
Show file tree
Hide file tree
Showing 24 changed files with 1,069 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/ config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug Report
about: Create a report to help us improve
title: "fix: "
labels: bug
---

**Description**

A clear and concise description of what the bug is.

**Steps To Reproduce**

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected Behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Additional Context**

Add any other context about the problem here.
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Feature Request
about: A new feature to be added to the project
title: "feat: "
labels: feature
---

**Description**

Clearly describe what you are looking to add. The more context the better.

**Requirements**

- [ ] Checklist of requirements to be fulfilled

**Additional Context**

Add any other context or screenshots about the feature request go here.
23 changes: 23 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
Thanks for contributing!
Provide a description of your changes below and a general summary in the title
Please look at the following checklist to ensure that your PR can be accepted quickly:
-->

## Description

<!--- Describe your changes in detail -->

## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 🛠️ Bug fix (non-breaking change which fixes an issue)
- [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
- [ ] 🧹 Code refactor
- [ ] ✅ Build configuration change
- [ ] 📝 Documentation
- [ ] 🗑️ Chore
20 changes: 20 additions & 0 deletions .github/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": "0.2",
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"dictionaries": ["vgv_allowed", "vgv_forbidden"],
"dictionaryDefinitions": [
{
"name": "vgv_allowed",
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt",
"description": "Allowed VGV Spellings"
},
{
"name": "vgv_forbidden",
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt",
"description": "Forbidden VGV Spellings"
}
],
"useGitignore": true,
"words": [
]
}
11 changes: 11 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/"
schedule:
interval: "daily"
55 changes: 55 additions & 0 deletions .github/workflows/maco.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: maco

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
paths:
- ".github/workflows/maco.yaml"
- "lib/**"
- "test/**"
- "pubspec.yaml"
push:
branches:
- main
paths:
- ".github/workflows/maco.yaml"
- "lib/**"
- "test/**"
- "pubspec.yaml"

jobs:
semantic-pull-request:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1

build:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/dart_package.yml@v1

spell-check:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
with:
includes: |
**/*.md
!brick/**/*.md
.*/**/*.md
modified_files_only: false

verify-version:
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v2

- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: "stable"

- name: 📦 Install Dependencies
run: |
dart pub get
- name: 🔎 Verify version
run: dart run test --run-skipped -t version-verify
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# See https://www.dartlang.org/guides/libraries/private-files

# Files and directories created by pub
.dart_tool/
.packages
build/
pubspec.lock

# Files generated during tests
.test_coverage.dart
coverage/
.test_runner.dart

# Android studio and IntelliJ
.idea
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
## maco

![coverage][coverage_badge]
[![License: MIT][license_badge]][license_link]

An anime downloading cli based on [libanime][https://github.com/libanime/libanime].

---

## Getting Started 🚀

If the CLI application is available on [pub](https://pub.dev), activate globally via:

```sh
dart pub global activate maco
```

Or locally via:

```sh
dart pub global activate --source=path <path to this package>
```

## Usage

```sh
# Sample command
$ maco sample

# Sample command option
$ maco sample --cyan

# Show CLI version
$ maco --version

# Show usage help
$ maco --help
```

## Running Tests with coverage 🧪

To run all unit tests use the following command:

```sh
$ dart pub global activate coverage 1.2.0
$ dart test --coverage=coverage
$ dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info
```

To view the generated coverage report you can use [lcov](https://github.com/linux-test-project/lcov)
.

```sh
# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
$ open coverage/index.html
```

---

[coverage_badge]: coverage_badge.svg
[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg
[license_link]: https://opensource.org/licenses/MIT
4 changes: 4 additions & 0 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
include: package:very_good_analysis/analysis_options.5.1.0.yaml
linter:
rules:
public_member_api_docs: false
18 changes: 18 additions & 0 deletions bin/maco.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import 'dart:io';

import 'package:maco/src/command_runner.dart';

Future<void> main(List<String> args) async {
await _flushThenExit(await MacoCommandRunner().run(args));
}

/// Flushes the stdout and stderr streams, then exits the program with the given
/// status code.
///
/// This returns a Future that will never complete, since the program will have
/// exited already. This is useful to prevent Future chains from proceeding
/// after you've decided to exit.
Future<void> _flushThenExit(int status) {
return Future.wait<void>([stdout.close(), stderr.close()])
.then<void>((_) => exit(status));
}
20 changes: 20 additions & 0 deletions coverage_badge.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions dart_test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
tags:
version-verify:
skip: "Should only be run during pull request. Verifies if version file is updated."
10 changes: 10 additions & 0 deletions lib/maco.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// maco, An anime ownloading cli.
///
/// ```sh
/// # activate maco
/// dart pub global activate maco
///
/// # see usage
/// maco --help
/// ```
library maco;
Loading

0 comments on commit 26ebd7f

Please sign in to comment.