Skip to content
Snippets Groups Projects
Commit 8ce2dca6 authored by Anduin Xue's avatar Anduin Xue
Browse files

Use latest format.

parent 24c40fa1
No related branches found
No related tags found
No related merge requests found
Showing
with 119 additions and 36 deletions
root = true
[*]
# Some CSS Resharper doesn't know how to load.
resharper_unknown_css_class_highlighting=none
# Some JS Resharper doesn't know how to load.
resharper_undeclared_global_variable_using_highlighting=suggesting
# Some HTML reference Resharper doesn't know how to load.
resharper_html_path_error_highlighting=none
# Allow JS global var.
resharper_use_of_implicit_global_in_function_scope_highlighting=none
# Stop suggesting IE compatibility.
resharper_css_browser_compatibility_highlighting=none
# Localization might not be finished.
resharper_not_overridden_in_specific_culture_highlighting=suggestion
# Allow names like `IPAddress`.
resharper_inconsistent_naming_highlighting=suggestion
# Allow unused auto property get.
resharper_unused_auto_property_accessor_global_highlighting=suggestion
# Allow view render global var.
resharper_access_to_modified_closure_highlighting=suggestion
# Suppress id not resolved because resharper can't understand
resharper_html_id_not_resolved_highlighting=suggestion
# Allow all cllass in the same namepsace.
resharper_check_namespace_highlighting=none
\ No newline at end of file
bin
obj
.vs
\ No newline at end of file
.vs/
.idea/
lib
*.lock.json
package-lock.json
*.user
*.min.css
*.min.js
bin/
obj/
node_modules/
Properties/
npm-debug.log
yarn.lock
bundle.js
appsettings.Production.json
appsettings.Development.json
*.log
TestResults/
\ No newline at end of file
......@@ -117,4 +117,4 @@ upload_to_local_nuget:
dotnet nuget push "$file" --api-key "$LOCAL_NUGET_API_KEY" --source "https://nuget.aiursoft.cn/v3/index.json" --skip-duplicate || exit 1;
done
only:
- master
- master
\ No newline at end of file
MIT License
Copyright (c) 2022 Anduin Xue
Copyright (c) 2023 Anduin Xue
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
......
# Parser
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitlab.aiursoft.cn/anduin/parser/-/blob/master/LICENSE)
[![Pipeline stat](https://gitlab.aiursoft.cn/anduin/parser/badges/master/pipeline.svg)](https://gitlab.aiursoft.cn/anduin/parser/-/pipelines)
[![Test Coverage](https://gitlab.aiursoft.cn/anduin/parser/badges/master/coverage.svg)](https://gitlab.aiursoft.cn/anduin/parser/-/pipelines)
[![NuGet version](https://img.shields.io/nuget/v/Anduin.Parser.svg)](https://www.nuget.org/packages/Anduin.Parser/)
A small project helps me to parse and save my videos.
## How to use
## Install
Run the following command to install this tool:
```bash
dotnet tool install --global Anduin.Parser
```
Requires:
## Usage
- ffmpeg
- dotnet
After getting the binary, run it directly in the terminal.
```bash
dotnet run "C:\Users...."
$ parser
Required command was not provided.
Option '--path' is required.
Description:
A cli tool project helps to re-encode and save all videos under a path.
Usage:
parser [command] [options]
Options:
-g, --gpu Use NVIDIA GPU to speed up parsing. Only if you have an NVIDIA GPU attached. [default:
False]
-c, --crf <crf> The range of the CRF scale is 0-51, where 0 is lossless (for 8 bit only, for 10 bit use
-qp 0), 20 is the default, and 51 is worst quality possible. [default: 20]
-p, --path <path> (REQUIRED) Path of the videos to be parsed.
-d, --dry-run Preview changes without actually making them
-v, --verbose Show detailed log
--version Show version information
-?, -h, --help Show help and usage information
Commands:
ffmpeg The command to convert all video files to HEVC using FFmpeg.
```
It will fetch all videos under that folder, and try to re-encode it with ffmpeg.
namespace Aiursoft.Parser.Core.Abstracts;
namespace Anduin.Parser.Core.Abstracts;
public interface IEntryService
{
......
using Aiursoft.Parser.Core.Framework;
using Anduin.Parser.Core.Framework;
namespace Aiursoft.Parser.Core.Abstracts;
namespace Anduin.Parser.Core.Abstracts;
public interface IParserPlugin
{
......
using Microsoft.Extensions.DependencyInjection;
namespace Aiursoft.Parser.Core.Abstracts;
namespace Anduin.Parser.Core.Abstracts;
public interface IStartUp
{
......
......@@ -2,7 +2,7 @@
using System.CommandLine;
namespace Aiursoft.Parser.Core.Framework;
namespace Anduin.Parser.Core.Framework;
public abstract class CommandHandler
{
......
using Aiursoft.Parser.Core.Abstracts;
using Anduin.Parser.Core.Abstracts;
using System.CommandLine;
namespace Aiursoft.Parser.Core.Framework;
namespace Anduin.Parser.Core.Framework;
public static class OptionsProvider
{
......
using System.CommandLine;
using Aiursoft.Parser.Core.Abstracts;
using Anduin.Parser.Core.Abstracts;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace Aiursoft.Parser.Core.Framework;
namespace Anduin.Parser.Core.Framework;
public abstract class ServiceCommandHandler<TE, TS> : CommandHandler
where TE : class, IEntryService
......
......@@ -5,7 +5,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Aiursoft.Parser.Core</RootNamespace>
<RootNamespace>Anduin.Parser.Core</RootNamespace>
</PropertyGroup>
<ItemGroup>
......
using Aiursoft.Parser.Core.Abstracts;
using Aiursoft.Parser.FFmpeg.Services;
using Anduin.Parser.Core.Abstracts;
using Anduin.Parser.FFmpeg.Services;
using Microsoft.Extensions.Logging;
namespace Aiursoft.Parser.FFmpeg
namespace Anduin.Parser.FFmpeg
{
public class FFmpegEntry : IEntryService
{
......
using Aiursoft.Parser.Core.Framework;
using Anduin.Parser.Core.Framework;
using Microsoft.Extensions.DependencyInjection;
using System.CommandLine;
namespace Aiursoft.Parser.FFmpeg;
namespace Anduin.Parser.FFmpeg;
public class FFmpegHandler : ServiceCommandHandler<FFmpegEntry, StartUp>
{
......
namespace Aiursoft.Parser.FFmpeg
namespace Anduin.Parser.FFmpeg
{
public class FFmpegOptions
{
......
using Aiursoft.Parser.Core.Abstracts;
using Aiursoft.Parser.Core.Framework;
using Anduin.Parser.Core.Abstracts;
using Anduin.Parser.Core.Framework;
namespace Aiursoft.Parser.FFmpeg;
namespace Anduin.Parser.FFmpeg;
public class FFmpegPlugin : IParserPlugin
{
......
......@@ -5,7 +5,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Aiursoft.Parser.FFmpeg</RootNamespace>
<RootNamespace>Anduin.Parser.FFmpeg</RootNamespace>
</PropertyGroup>
<ItemGroup>
......
using System.Diagnostics;
namespace Aiursoft.Parser.FFmpeg.Services
namespace Anduin.Parser.FFmpeg.Services
{
public class CommandService
{
......
using Aiursoft.Parser.Core.Abstracts;
using Aiursoft.Parser.FFmpeg.Services;
using Anduin.Parser.Core.Abstracts;
using Anduin.Parser.FFmpeg.Services;
using Microsoft.Extensions.DependencyInjection;
namespace Aiursoft.Parser.FFmpeg;
namespace Anduin.Parser.FFmpeg;
public class StartUp : IStartUp
{
......
......@@ -6,7 +6,7 @@
<Version>0.0.4</Version>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>parser</AssemblyName>
<RootNamespace>Aiursoft.Parser</RootNamespace>
<RootNamespace>Anduin.Parser</RootNamespace>
<!--Tool-->
<PackAsTool>true</PackAsTool>
<ToolCommandName>parser</ToolCommandName>
......@@ -26,7 +26,7 @@
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://gitlab.aiursoft.cn/Anduin/Parser</RepositoryUrl>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageId>Aiursoft.Parser</PackageId>
<PackageId>Anduin.Parser</PackageId>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://gitlab.aiursoft.cn/Anduin/Parser</PackageProjectUrl>
</PropertyGroup>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment