diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1fad9e5..decc1fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,7 @@ name: CI on: push: branches: ["main"] + tags: ["v*"] pull_request: jobs: @@ -25,3 +26,55 @@ jobs: - name: Test run: dotnet test --no-build --verbosity normal RipSharp.sln + + pack-tool: + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 10.0.x + + - name: Get version from tag + id: version + run: echo "value=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT" + + - name: Validate tag format + run: | + if [[ ! "${{ steps.version.outputs.value }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Tag must match vMAJOR.MINOR.PATCH (e.g., v1.2.3)." + exit 1 + fi + + - name: Restore + run: dotnet restore RipSharp.sln + + - name: Build + run: dotnet build --no-restore -c Release RipSharp.sln + + - name: Pack + run: dotnet pack --no-build -c Release src/RipSharp /p:Version=${{ steps.version.outputs.value }} + + - name: Get OIDC token + id: oidc + uses: actions/github-script@v7 + with: + script: | + const token = await core.getIDToken('https://int.nugettest.org'); + core.setOutput('token', token); + + - name: Publish to NuGet + run: dotnet nuget push src/RipSharp/bin/Release/*.nupkg --api-key "${{ steps.oidc.outputs.token }}" --source https://int.nugettest.org/v3/index.json + + - name: Upload package + uses: actions/upload-artifact@v4 + with: + name: ripsharp-nupkg + path: src/RipSharp/bin/Release/*.nupkg diff --git a/Makefile b/Makefile index 832343c..f8ecdb4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all build test format clean restore help +.PHONY: all build test format clean restore pack help # Default target: build and test the solution all: build test @@ -11,6 +11,7 @@ help: @echo " make build - Build the solution" @echo " make format - Run dotnet format" @echo " make test - Run tests" + @echo " make pack - Build NuGet package (Release)" @echo " make clean - Clean build outputs" # Restore NuGet packages @@ -29,6 +30,10 @@ format: test: build dotnet test RipSharp.sln +# Build NuGet package (Release) +pack: build + dotnet pack -c Release src/RipSharp + # Clean build outputs clean: dotnet clean RipSharp.sln diff --git a/README.md b/README.md index 8c547c1..033ef66 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,35 @@ dotnet run --project src/RipSharp -- --output ~/Movies --disc "file:/path/to/movie.iso" ``` +## Install as a Global Tool + +Install from NuGet: + +```bash +dotnet tool install -g BugZapperLabs.RipSharp +``` + +Run: + +```bash +ripsharp --output ~/Movies +``` + +Check the version: + +```bash +ripsharp --version +``` + +### Pack and install locally + +```bash +dotnet pack -c Release src/RipSharp /p:Version=0.1.0 +dotnet tool install -g BugZapperLabs.RipSharp --add-source src/RipSharp/bin/Release +``` + +If you version from git tags in CI, pass the tag version as `/p:Version=1.2.3` during `dotnet pack`. + ## Options ### Required @@ -139,6 +168,7 @@ | `--sequential` | Disable parallel processing (rip all, then encode all) | | `--debug` | Enable debug logging | | `-h, --help` | Show help message | +| `-v, --version` | Show application version | ### Environment Variables diff --git a/src/RipSharp.Tests/Core/RipOptionsTests.cs b/src/RipSharp.Tests/Core/RipOptionsTests.cs index 2bd5cf5..5d6fb34 100644 --- a/src/RipSharp.Tests/Core/RipOptionsTests.cs +++ b/src/RipSharp.Tests/Core/RipOptionsTests.cs @@ -3,11 +3,11 @@ using AwesomeAssertions; -using RipSharp; +using BugZapperLabs.RipSharp; using Xunit; -namespace RipSharp.Tests.Core; +namespace BugZapperLabs.RipSharp.Tests.Core; public class RipOptionsTests { @@ -51,6 +51,39 @@ public void ParseArgs_WithHelpAmongOtherArgs_SetsShowHelpTrue() result.ShowHelp.Should().BeTrue(); } + [Fact] + public void ParseArgs_WithVersionShortFlag_SetsShowVersionTrue() + { + var args = new[] { "-v" }; + + var result = RipOptions.ParseArgs(args); + + result.ShowVersion.Should().BeTrue(); + result.ShowHelp.Should().BeFalse(); + } + + [Fact] + public void ParseArgs_WithVersionLongFlag_SetsShowVersionTrue() + { + var args = new[] { "--version" }; + + var result = RipOptions.ParseArgs(args); + + result.ShowVersion.Should().BeTrue(); + result.ShowHelp.Should().BeFalse(); + } + + [Fact] + public void ParseArgs_WithVersionAmongOtherArgs_SetsShowVersionTrue() + { + var args = new[] { "--output", "/tmp", "--version" }; + + var result = RipOptions.ParseArgs(args); + + result.ShowVersion.Should().BeTrue(); + result.ShowHelp.Should().BeFalse(); + } + [Fact] public void ParseArgs_WithoutOutput_ThrowsArgumentException() { diff --git a/src/RipSharp.Tests/GlobalUsings.cs b/src/RipSharp.Tests/GlobalUsings.cs index b6b9bd7..7f6f359 100644 --- a/src/RipSharp.Tests/GlobalUsings.cs +++ b/src/RipSharp.Tests/GlobalUsings.cs @@ -1,10 +1,10 @@ // Global using directives for test files global using AwesomeAssertions; -global using RipSharp.Abstractions; -global using RipSharp.Core; -global using RipSharp.MakeMkv; -global using RipSharp.Metadata; -global using RipSharp.Models; -global using RipSharp.Services; -global using RipSharp.Utilities; +global using BugZapperLabs.RipSharp.Abstractions; +global using BugZapperLabs.RipSharp.Core; +global using BugZapperLabs.RipSharp.MakeMkv; +global using BugZapperLabs.RipSharp.Metadata; +global using BugZapperLabs.RipSharp.Models; +global using BugZapperLabs.RipSharp.Services; +global using BugZapperLabs.RipSharp.Utilities; diff --git a/src/RipSharp.Tests/MakeMkv/MakeMkvProtocolTests.cs b/src/RipSharp.Tests/MakeMkv/MakeMkvProtocolTests.cs index 6559ed6..714360c 100644 --- a/src/RipSharp.Tests/MakeMkv/MakeMkvProtocolTests.cs +++ b/src/RipSharp.Tests/MakeMkv/MakeMkvProtocolTests.cs @@ -1,10 +1,8 @@ using AwesomeAssertions; -using RipSharp; - using Xunit; -namespace RipSharp.Tests.MakeMkv; +namespace BugZapperLabs.RipSharp.Tests.MakeMkv; public class MakeMkvProtocolTests { diff --git a/src/RipSharp.Tests/Metadata/MetadataServiceTests.cs b/src/RipSharp.Tests/Metadata/MetadataServiceTests.cs index b5905ee..cbf8bf1 100644 --- a/src/RipSharp.Tests/Metadata/MetadataServiceTests.cs +++ b/src/RipSharp.Tests/Metadata/MetadataServiceTests.cs @@ -6,11 +6,9 @@ using NSubstitute; -using RipSharp; - using Xunit; -namespace RipSharp.Tests.Metadata; +namespace BugZapperLabs.RipSharp.Tests.Metadata; public class MetadataServiceTests : IDisposable { diff --git a/src/RipSharp.Tests/Metadata/OmdbMetadataProviderTests.cs b/src/RipSharp.Tests/Metadata/OmdbMetadataProviderTests.cs index 4fc6548..8c303e7 100644 --- a/src/RipSharp.Tests/Metadata/OmdbMetadataProviderTests.cs +++ b/src/RipSharp.Tests/Metadata/OmdbMetadataProviderTests.cs @@ -8,11 +8,9 @@ using NSubstitute; -using RipSharp; - using Xunit; -namespace RipSharp.Tests.Metadata; +namespace BugZapperLabs.RipSharp.Tests.Metadata; public class OmdbMetadataProviderTests { diff --git a/src/RipSharp.Tests/Metadata/TitleVariationGeneratorEdgeCasesTests.cs b/src/RipSharp.Tests/Metadata/TitleVariationGeneratorEdgeCasesTests.cs index 4c4af69..977306b 100644 --- a/src/RipSharp.Tests/Metadata/TitleVariationGeneratorEdgeCasesTests.cs +++ b/src/RipSharp.Tests/Metadata/TitleVariationGeneratorEdgeCasesTests.cs @@ -1,10 +1,8 @@ using System.Collections.Generic; -using RipSharp; - using Xunit; -namespace RipSharp.Tests.Metadata; +namespace BugZapperLabs.RipSharp.Tests.Metadata; public class TitleVariationGeneratorEdgeCasesTests { diff --git a/src/RipSharp.Tests/Metadata/TitleVariationGeneratorTests.cs b/src/RipSharp.Tests/Metadata/TitleVariationGeneratorTests.cs index 7ba0774..c04adf0 100644 --- a/src/RipSharp.Tests/Metadata/TitleVariationGeneratorTests.cs +++ b/src/RipSharp.Tests/Metadata/TitleVariationGeneratorTests.cs @@ -1,10 +1,8 @@ using System.Collections.Generic; -using RipSharp; - using Xunit; -namespace RipSharp.Tests.Metadata; +namespace BugZapperLabs.RipSharp.Tests.Metadata; public class TitleVariationGeneratorTests { diff --git a/src/RipSharp.Tests/Metadata/TmdbMetadataProviderTests.cs b/src/RipSharp.Tests/Metadata/TmdbMetadataProviderTests.cs index 42ef395..a16c3cb 100644 --- a/src/RipSharp.Tests/Metadata/TmdbMetadataProviderTests.cs +++ b/src/RipSharp.Tests/Metadata/TmdbMetadataProviderTests.cs @@ -8,11 +8,9 @@ using NSubstitute; -using RipSharp; - using Xunit; -namespace RipSharp.Tests.Metadata; +namespace BugZapperLabs.RipSharp.Tests.Metadata; public class TmdbMetadataProviderTests { diff --git a/src/RipSharp.Tests/Services/DiscRipperOverallProgressTests.cs b/src/RipSharp.Tests/Services/DiscRipperOverallProgressTests.cs index 1571e4c..022e0de 100644 --- a/src/RipSharp.Tests/Services/DiscRipperOverallProgressTests.cs +++ b/src/RipSharp.Tests/Services/DiscRipperOverallProgressTests.cs @@ -3,12 +3,9 @@ using AwesomeAssertions; -using RipSharp.Abstractions; -using RipSharp.Services; - using Xunit; -namespace RipSharp.Tests.Services; +namespace BugZapperLabs.RipSharp.Tests.Services; public class DiscRipperOverallProgressTests { diff --git a/src/RipSharp.Tests/Services/DiscRipperRipSummaryTests.cs b/src/RipSharp.Tests/Services/DiscRipperRipSummaryTests.cs index f89cfc7..b100519 100644 --- a/src/RipSharp.Tests/Services/DiscRipperRipSummaryTests.cs +++ b/src/RipSharp.Tests/Services/DiscRipperRipSummaryTests.cs @@ -3,11 +3,9 @@ using AwesomeAssertions; -using RipSharp.Services; - using Xunit; -namespace RipSharp.Tests.Services; +namespace BugZapperLabs.RipSharp.Tests.Services; public class DiscRipperRipSummaryTests { diff --git a/src/RipSharp.Tests/Services/DiscTypeDetectorTests.cs b/src/RipSharp.Tests/Services/DiscTypeDetectorTests.cs index 88ce138..3f0f1d8 100644 --- a/src/RipSharp.Tests/Services/DiscTypeDetectorTests.cs +++ b/src/RipSharp.Tests/Services/DiscTypeDetectorTests.cs @@ -1,10 +1,8 @@ using System.Collections.Generic; -using RipSharp; - using Xunit; -namespace RipSharp.Tests.Services; +namespace BugZapperLabs.RipSharp.Tests.Services; public class DiscTypeDetectorTests { diff --git a/src/RipSharp.Tests/Utilities/CursorManagerTests.cs b/src/RipSharp.Tests/Utilities/CursorManagerTests.cs index f833597..aa98398 100644 --- a/src/RipSharp.Tests/Utilities/CursorManagerTests.cs +++ b/src/RipSharp.Tests/Utilities/CursorManagerTests.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Utilities; +namespace BugZapperLabs.RipSharp.Tests.Utilities; public class CursorManagerTests { diff --git a/src/RipSharp.Tests/Utilities/DurationFormatterTests.cs b/src/RipSharp.Tests/Utilities/DurationFormatterTests.cs index 89c5496..fd8a77e 100644 --- a/src/RipSharp.Tests/Utilities/DurationFormatterTests.cs +++ b/src/RipSharp.Tests/Utilities/DurationFormatterTests.cs @@ -1,10 +1,8 @@ using AwesomeAssertions; -using RipSharp; - using Xunit; -namespace RipSharp.Tests.Utilities; +namespace BugZapperLabs.RipSharp.Tests.Utilities; public class DurationFormatterTests { diff --git a/src/RipSharp.Tests/Utilities/FileNamingTests.cs b/src/RipSharp.Tests/Utilities/FileNamingTests.cs index 36fddaa..5101334 100644 --- a/src/RipSharp.Tests/Utilities/FileNamingTests.cs +++ b/src/RipSharp.Tests/Utilities/FileNamingTests.cs @@ -2,11 +2,9 @@ using AwesomeAssertions; -using RipSharp; - using Xunit; -namespace RipSharp.Tests.Utilities; +namespace BugZapperLabs.RipSharp.Tests.Utilities; public class FileNamingTests { diff --git a/src/RipSharp.Tests/Utilities/SpectreProgressDisplayTests.cs b/src/RipSharp.Tests/Utilities/SpectreProgressDisplayTests.cs index 0f34bbf..aa97885 100644 --- a/src/RipSharp.Tests/Utilities/SpectreProgressDisplayTests.cs +++ b/src/RipSharp.Tests/Utilities/SpectreProgressDisplayTests.cs @@ -3,11 +3,9 @@ using AwesomeAssertions; -using RipSharp.Utilities; - using Xunit; -namespace RipSharp.Tests.Utilities; +namespace BugZapperLabs.RipSharp.Tests.Utilities; public class SpectreProgressDisplayTests { diff --git a/src/RipSharp/Abstractions/IConsoleWriter.cs b/src/RipSharp/Abstractions/IConsoleWriter.cs index d0987cc..631b1db 100644 --- a/src/RipSharp/Abstractions/IConsoleWriter.cs +++ b/src/RipSharp/Abstractions/IConsoleWriter.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; /// /// Abstraction for writing styled output messages to the console. diff --git a/src/RipSharp/Abstractions/IDiscRipper.cs b/src/RipSharp/Abstractions/IDiscRipper.cs index 5257b9a..b52005b 100644 --- a/src/RipSharp/Abstractions/IDiscRipper.cs +++ b/src/RipSharp/Abstractions/IDiscRipper.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; public interface IDiscRipper { diff --git a/src/RipSharp/Abstractions/IDiscScanner.cs b/src/RipSharp/Abstractions/IDiscScanner.cs index f89264c..322266e 100644 --- a/src/RipSharp/Abstractions/IDiscScanner.cs +++ b/src/RipSharp/Abstractions/IDiscScanner.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; public interface IDiscScanner { diff --git a/src/RipSharp/Abstractions/IDiscTypeDetector.cs b/src/RipSharp/Abstractions/IDiscTypeDetector.cs index eadcca4..c4ff5e0 100644 --- a/src/RipSharp/Abstractions/IDiscTypeDetector.cs +++ b/src/RipSharp/Abstractions/IDiscTypeDetector.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; /// /// Interface for detecting the type of content on a disc (movie vs TV series). diff --git a/src/RipSharp/Abstractions/IEncoderService.cs b/src/RipSharp/Abstractions/IEncoderService.cs index 732e1a3..f0c59db 100644 --- a/src/RipSharp/Abstractions/IEncoderService.cs +++ b/src/RipSharp/Abstractions/IEncoderService.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; public interface IEncoderService { diff --git a/src/RipSharp/Abstractions/IMakeMkvService.cs b/src/RipSharp/Abstractions/IMakeMkvService.cs index 2f5a2fb..b29bc2c 100644 --- a/src/RipSharp/Abstractions/IMakeMkvService.cs +++ b/src/RipSharp/Abstractions/IMakeMkvService.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; public interface IMakeMkvService { diff --git a/src/RipSharp/Abstractions/IMetadataProvider.cs b/src/RipSharp/Abstractions/IMetadataProvider.cs index abe1208..6529c8f 100644 --- a/src/RipSharp/Abstractions/IMetadataProvider.cs +++ b/src/RipSharp/Abstractions/IMetadataProvider.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; public interface IMetadataProvider { diff --git a/src/RipSharp/Abstractions/IMetadataService.cs b/src/RipSharp/Abstractions/IMetadataService.cs index 2c5d33f..79a6111 100644 --- a/src/RipSharp/Abstractions/IMetadataService.cs +++ b/src/RipSharp/Abstractions/IMetadataService.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; public interface IMetadataService { diff --git a/src/RipSharp/Abstractions/IProcessRunner.cs b/src/RipSharp/Abstractions/IProcessRunner.cs index 4d7d0ed..f5e11b0 100644 --- a/src/RipSharp/Abstractions/IProcessRunner.cs +++ b/src/RipSharp/Abstractions/IProcessRunner.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; public interface IProcessRunner { diff --git a/src/RipSharp/Abstractions/IProgressDisplay.cs b/src/RipSharp/Abstractions/IProgressDisplay.cs index e756c99..aa3f292 100644 --- a/src/RipSharp/Abstractions/IProgressDisplay.cs +++ b/src/RipSharp/Abstractions/IProgressDisplay.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; /// /// Abstraction for displaying progress bars and animated progress indicators. diff --git a/src/RipSharp/Abstractions/ITvEpisodeTitleProvider.cs b/src/RipSharp/Abstractions/ITvEpisodeTitleProvider.cs index 33ce2b4..51dc801 100644 --- a/src/RipSharp/Abstractions/ITvEpisodeTitleProvider.cs +++ b/src/RipSharp/Abstractions/ITvEpisodeTitleProvider.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; public interface ITvEpisodeTitleProvider { diff --git a/src/RipSharp/Abstractions/IUserPrompt.cs b/src/RipSharp/Abstractions/IUserPrompt.cs index 69cd119..76bbf7b 100644 --- a/src/RipSharp/Abstractions/IUserPrompt.cs +++ b/src/RipSharp/Abstractions/IUserPrompt.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Abstractions; +namespace BugZapperLabs.RipSharp.Abstractions; /// /// Interface for prompting users for input during interactive operations. diff --git a/src/RipSharp/Core/AppConfig.cs b/src/RipSharp/Core/AppConfig.cs index 315d214..b53c860 100644 --- a/src/RipSharp/Core/AppConfig.cs +++ b/src/RipSharp/Core/AppConfig.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Configuration; -namespace RipSharp.Core; +namespace BugZapperLabs.RipSharp.Core; public class AppConfig { diff --git a/src/RipSharp/Core/Program.cs b/src/RipSharp/Core/Program.cs index a59be17..3b85b35 100644 --- a/src/RipSharp/Core/Program.cs +++ b/src/RipSharp/Core/Program.cs @@ -3,6 +3,7 @@ using System.IO; using System.Linq; using System.Net.Http; +using System.Reflection; using System.Threading.Tasks; using Microsoft.Extensions.Configuration; @@ -14,7 +15,7 @@ using Spectre.Console; -namespace RipSharp.Core; +namespace BugZapperLabs.RipSharp.Core; public class Program { @@ -44,6 +45,20 @@ public static async Task Main(string[] args) private static async Task RunAsync(string[] args, CursorManager cursorManager) { + var options = RipOptions.ParseArgs(args); + + if (options.ShowHelp) + { + RipOptions.DisplayHelp(new ConsoleWriter()); + return 0; + } + + if (options.ShowVersion) + { + Console.WriteLine($"ripsharp {GetVersion()}"); + return 0; + } + using var host = Host.CreateDefaultBuilder(args) .ConfigureAppConfiguration((ctx, cfg) => { @@ -97,14 +112,6 @@ private static async Task RunAsync(string[] args, CursorManager cursorManag }) .Build(); - var options = RipOptions.ParseArgs(args); - - if (options.ShowHelp) - { - RipOptions.DisplayHelp(new ConsoleWriter()); - return 0; - } - var ripper = host.Services.GetRequiredService(); var writer = host.Services.GetRequiredService(); @@ -134,4 +141,16 @@ private static async Task RunAsync(string[] args, CursorManager cursorManag return 1; } } + + private static string GetVersion() + { + var assembly = Assembly.GetExecutingAssembly(); + var infoVersion = assembly.GetCustomAttribute()?.InformationalVersion; + if (!string.IsNullOrWhiteSpace(infoVersion)) + { + return infoVersion; + } + + return assembly.GetName().Version?.ToString() ?? "unknown"; + } } diff --git a/src/RipSharp/Core/RipOptions.cs b/src/RipSharp/Core/RipOptions.cs index deeb828..32fdd8e 100644 --- a/src/RipSharp/Core/RipOptions.cs +++ b/src/RipSharp/Core/RipOptions.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; -namespace RipSharp.Core; +namespace BugZapperLabs.RipSharp.Core; public class RipOptions { @@ -17,6 +17,7 @@ public class RipOptions public bool Debug { get; set; } public string? DiscType { get; set; } // dvd|bd|uhd public bool ShowHelp { get; set; } + public bool ShowVersion { get; set; } public bool TempWasAutoGenerated { get; set; } public bool EnableParallelProcessing { get; set; } = true; // Enable parallel rip and encode by default @@ -24,6 +25,12 @@ public static RipOptions ParseArgs(string[] args) { var opts = new RipOptions(); + if (args.Any(a => a == "-v" || a == "--version")) + { + opts.ShowVersion = true; + return opts; + } + // Check for help first if (args.Length == 0 || args.Any(a => a == "-h" || a == "--help")) { @@ -113,6 +120,7 @@ public static void DisplayHelp(IConsoleWriter writer) writer.Plain(" --sequential Disable parallel processing (rip all, then encode all)"); writer.Plain(" --debug Enable debug logging"); writer.Plain(" -h, --help Show this help message"); + writer.Plain(" -v, --version Show the application version"); writer.Plain(""); writer.Plain("EXAMPLES:"); writer.Plain(" # Rip with auto-detection (recommended)"); diff --git a/src/RipSharp/GlobalUsings.cs b/src/RipSharp/GlobalUsings.cs index 49dd87b..7a21319 100644 --- a/src/RipSharp/GlobalUsings.cs +++ b/src/RipSharp/GlobalUsings.cs @@ -1,8 +1,8 @@ // Global using directives for all source files -global using RipSharp.Abstractions; -global using RipSharp.Core; -global using RipSharp.MakeMkv; -global using RipSharp.Metadata; -global using RipSharp.Models; -global using RipSharp.Services; -global using RipSharp.Utilities; +global using BugZapperLabs.RipSharp.Abstractions; +global using BugZapperLabs.RipSharp.Core; +global using BugZapperLabs.RipSharp.MakeMkv; +global using BugZapperLabs.RipSharp.Metadata; +global using BugZapperLabs.RipSharp.Models; +global using BugZapperLabs.RipSharp.Services; +global using BugZapperLabs.RipSharp.Utilities; diff --git a/src/RipSharp/MakeMkv/MakeMkvOutputHandler.cs b/src/RipSharp/MakeMkv/MakeMkvOutputHandler.cs index 38d45f6..93aaac2 100644 --- a/src/RipSharp/MakeMkv/MakeMkvOutputHandler.cs +++ b/src/RipSharp/MakeMkv/MakeMkvOutputHandler.cs @@ -2,7 +2,7 @@ using System.IO; using System.Text.RegularExpressions; -namespace RipSharp.MakeMkv; +namespace BugZapperLabs.RipSharp.MakeMkv; public class MakeMkvOutputHandler { diff --git a/src/RipSharp/MakeMkv/MakeMkvProtocol.cs b/src/RipSharp/MakeMkv/MakeMkvProtocol.cs index 2781294..33e00f5 100644 --- a/src/RipSharp/MakeMkv/MakeMkvProtocol.cs +++ b/src/RipSharp/MakeMkv/MakeMkvProtocol.cs @@ -1,6 +1,6 @@ using System.Text.RegularExpressions; -namespace RipSharp.MakeMkv; +namespace BugZapperLabs.RipSharp.MakeMkv; public static class MakeMkvProtocol { diff --git a/src/RipSharp/MakeMkv/MakeMkvService.cs b/src/RipSharp/MakeMkv/MakeMkvService.cs index fcda3fb..3f7b754 100644 --- a/src/RipSharp/MakeMkv/MakeMkvService.cs +++ b/src/RipSharp/MakeMkv/MakeMkvService.cs @@ -2,7 +2,7 @@ using System.Threading; using System.Threading.Tasks; -namespace RipSharp.MakeMkv; +namespace BugZapperLabs.RipSharp.MakeMkv; public class MakeMkvService : IMakeMkvService { diff --git a/src/RipSharp/MakeMkv/ScanOutputHandler.cs b/src/RipSharp/MakeMkv/ScanOutputHandler.cs index 2f24f8d..d138c3c 100644 --- a/src/RipSharp/MakeMkv/ScanOutputHandler.cs +++ b/src/RipSharp/MakeMkv/ScanOutputHandler.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Text.RegularExpressions; -namespace RipSharp.MakeMkv; +namespace BugZapperLabs.RipSharp.MakeMkv; public class ScanOutputHandler { diff --git a/src/RipSharp/Metadata/MetadataService.cs b/src/RipSharp/Metadata/MetadataService.cs index 23698a5..1dcd07b 100644 --- a/src/RipSharp/Metadata/MetadataService.cs +++ b/src/RipSharp/Metadata/MetadataService.cs @@ -2,7 +2,7 @@ using System.Linq; using System.Threading.Tasks; -namespace RipSharp.Metadata; +namespace BugZapperLabs.RipSharp.Metadata; public class MetadataService : IMetadataService { diff --git a/src/RipSharp/Metadata/NullEpisodeTitleProvider.cs b/src/RipSharp/Metadata/NullEpisodeTitleProvider.cs index 188ac6d..4fbb5a5 100644 --- a/src/RipSharp/Metadata/NullEpisodeTitleProvider.cs +++ b/src/RipSharp/Metadata/NullEpisodeTitleProvider.cs @@ -1,6 +1,6 @@ using System.Threading.Tasks; -namespace RipSharp.Metadata; +namespace BugZapperLabs.RipSharp.Metadata; public class NullEpisodeTitleProvider : ITvEpisodeTitleProvider { diff --git a/src/RipSharp/Metadata/OmdbMetadataProvider.cs b/src/RipSharp/Metadata/OmdbMetadataProvider.cs index 0dfa3ed..ded252e 100644 --- a/src/RipSharp/Metadata/OmdbMetadataProvider.cs +++ b/src/RipSharp/Metadata/OmdbMetadataProvider.cs @@ -3,7 +3,7 @@ using System.Text.Json; using System.Threading.Tasks; -namespace RipSharp.Metadata; +namespace BugZapperLabs.RipSharp.Metadata; public class OmdbMetadataProvider : IMetadataProvider { diff --git a/src/RipSharp/Metadata/TitleVariationGenerator.cs b/src/RipSharp/Metadata/TitleVariationGenerator.cs index 8dfd930..c6e4548 100644 --- a/src/RipSharp/Metadata/TitleVariationGenerator.cs +++ b/src/RipSharp/Metadata/TitleVariationGenerator.cs @@ -1,6 +1,6 @@ using System.Collections.Generic; -namespace RipSharp.Metadata; +namespace BugZapperLabs.RipSharp.Metadata; public static class TitleVariationGenerator { diff --git a/src/RipSharp/Metadata/TmdbMetadataProvider.cs b/src/RipSharp/Metadata/TmdbMetadataProvider.cs index 4be2dd0..63ca244 100644 --- a/src/RipSharp/Metadata/TmdbMetadataProvider.cs +++ b/src/RipSharp/Metadata/TmdbMetadataProvider.cs @@ -3,7 +3,7 @@ using System.Text.Json; using System.Threading.Tasks; -namespace RipSharp.Metadata; +namespace BugZapperLabs.RipSharp.Metadata; public class TmdbMetadataProvider : IMetadataProvider { diff --git a/src/RipSharp/Metadata/TvdbMetadataProvider.cs b/src/RipSharp/Metadata/TvdbMetadataProvider.cs index a6af9c7..922b353 100644 --- a/src/RipSharp/Metadata/TvdbMetadataProvider.cs +++ b/src/RipSharp/Metadata/TvdbMetadataProvider.cs @@ -6,7 +6,7 @@ using System.Text.Json; using System.Threading.Tasks; -namespace RipSharp.Metadata; +namespace BugZapperLabs.RipSharp.Metadata; /// /// TVDB metadata provider using raw REST calls. Currently scaffolding the flow; real diff --git a/src/RipSharp/Models/ContentMetadata.cs b/src/RipSharp/Models/ContentMetadata.cs index d5f3236..cfd62c7 100644 --- a/src/RipSharp/Models/ContentMetadata.cs +++ b/src/RipSharp/Models/ContentMetadata.cs @@ -1,7 +1,7 @@ using System.Collections.Generic; using System.Threading.Tasks; -namespace RipSharp.Models; +namespace BugZapperLabs.RipSharp.Models; public class ContentMetadata { diff --git a/src/RipSharp/Models/DiscInfo.cs b/src/RipSharp/Models/DiscInfo.cs index 0a4ee4c..0bd5adb 100644 --- a/src/RipSharp/Models/DiscInfo.cs +++ b/src/RipSharp/Models/DiscInfo.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Models; +namespace BugZapperLabs.RipSharp.Models; public class DiscInfo { diff --git a/src/RipSharp/Models/MediaFileAnalysis.cs b/src/RipSharp/Models/MediaFileAnalysis.cs index da73c4d..7f16b60 100644 --- a/src/RipSharp/Models/MediaFileAnalysis.cs +++ b/src/RipSharp/Models/MediaFileAnalysis.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Models; +namespace BugZapperLabs.RipSharp.Models; public class MediaFileAnalysis { diff --git a/src/RipSharp/Models/MediaStream.cs b/src/RipSharp/Models/MediaStream.cs index b851e30..4a5cee8 100644 --- a/src/RipSharp/Models/MediaStream.cs +++ b/src/RipSharp/Models/MediaStream.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Models; +namespace BugZapperLabs.RipSharp.Models; public class MediaStream { diff --git a/src/RipSharp/Models/TitleInfo.cs b/src/RipSharp/Models/TitleInfo.cs index bac4a57..f9ce98b 100644 --- a/src/RipSharp/Models/TitleInfo.cs +++ b/src/RipSharp/Models/TitleInfo.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Models; +namespace BugZapperLabs.RipSharp.Models; public class TitleInfo { diff --git a/src/RipSharp/RipSharp.csproj b/src/RipSharp/RipSharp.csproj index ccd42e2..99556ee 100644 --- a/src/RipSharp/RipSharp.csproj +++ b/src/RipSharp/RipSharp.csproj @@ -4,6 +4,15 @@ net10.0 enable enable + true + ripsharp + BugZapperLabs.RipSharp + https://github.com/mapitman/ripsharp + https://github.com/mapitman/ripsharp + MIT + ripping;makemkv;ffmpeg;metadata + 0.1.0 + BugZapperLabs.RipSharp diff --git a/src/RipSharp/Services/DiscRipper.cs b/src/RipSharp/Services/DiscRipper.cs index 52ab638..200cf25 100644 --- a/src/RipSharp/Services/DiscRipper.cs +++ b/src/RipSharp/Services/DiscRipper.cs @@ -7,12 +7,10 @@ using System.Threading.Channels; using System.Threading.Tasks; -using RipSharp.Abstractions; - using Spectre.Console; -namespace RipSharp.Services; +namespace BugZapperLabs.RipSharp.Services; // Job records for channel communication public record RipJob( diff --git a/src/RipSharp/Services/DiscScanner.cs b/src/RipSharp/Services/DiscScanner.cs index a97928e..10ffce5 100644 --- a/src/RipSharp/Services/DiscScanner.cs +++ b/src/RipSharp/Services/DiscScanner.cs @@ -3,7 +3,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; -namespace RipSharp.Services; +namespace BugZapperLabs.RipSharp.Services; public class DiscScanner : IDiscScanner { diff --git a/src/RipSharp/Services/DiscTypeDetector.cs b/src/RipSharp/Services/DiscTypeDetector.cs index 221ee15..b096c1f 100644 --- a/src/RipSharp/Services/DiscTypeDetector.cs +++ b/src/RipSharp/Services/DiscTypeDetector.cs @@ -2,7 +2,7 @@ using System.Collections.Generic; using System.Linq; -namespace RipSharp.Services; +namespace BugZapperLabs.RipSharp.Services; /// /// Detects the type of content on a disc (movie vs TV series) based on structural analysis. diff --git a/src/RipSharp/Services/EncoderService.cs b/src/RipSharp/Services/EncoderService.cs index caae80e..5f99e38 100644 --- a/src/RipSharp/Services/EncoderService.cs +++ b/src/RipSharp/Services/EncoderService.cs @@ -4,7 +4,7 @@ using System.Threading.Tasks; -namespace RipSharp.Services; +namespace BugZapperLabs.RipSharp.Services; public class EncoderService : IEncoderService { diff --git a/src/RipSharp/Services/ProcessRunner.cs b/src/RipSharp/Services/ProcessRunner.cs index 82795e6..6f71be9 100644 --- a/src/RipSharp/Services/ProcessRunner.cs +++ b/src/RipSharp/Services/ProcessRunner.cs @@ -3,7 +3,7 @@ using System.Threading; using System.Threading.Tasks; -namespace RipSharp.Services; +namespace BugZapperLabs.RipSharp.Services; public class ProcessRunner : IProcessRunner { diff --git a/src/RipSharp/Utilities/ConsoleColors.cs b/src/RipSharp/Utilities/ConsoleColors.cs index 9161d87..8c337c3 100644 --- a/src/RipSharp/Utilities/ConsoleColors.cs +++ b/src/RipSharp/Utilities/ConsoleColors.cs @@ -1,6 +1,6 @@ using Spectre.Console; -namespace RipSharp.Utilities; +namespace BugZapperLabs.RipSharp.Utilities; /// /// Consistent color palette for Spectre.Console markup throughout the application. diff --git a/src/RipSharp/Utilities/ConsoleUserPrompt.cs b/src/RipSharp/Utilities/ConsoleUserPrompt.cs index 5457c77..c845a8b 100644 --- a/src/RipSharp/Utilities/ConsoleUserPrompt.cs +++ b/src/RipSharp/Utilities/ConsoleUserPrompt.cs @@ -1,6 +1,6 @@ using Spectre.Console; -namespace RipSharp.Utilities; +namespace BugZapperLabs.RipSharp.Utilities; /// /// Prompts users for input using Spectre.Console for rich terminal interactions. diff --git a/src/RipSharp/Utilities/ConsoleWriter.cs b/src/RipSharp/Utilities/ConsoleWriter.cs index 1a760d0..92c9f98 100644 --- a/src/RipSharp/Utilities/ConsoleWriter.cs +++ b/src/RipSharp/Utilities/ConsoleWriter.cs @@ -1,6 +1,6 @@ using Spectre.Console; -namespace RipSharp.Utilities; +namespace BugZapperLabs.RipSharp.Utilities; /// /// Spectre.Console implementation for writing styled messages to the console. diff --git a/src/RipSharp/Utilities/CursorManager.cs b/src/RipSharp/Utilities/CursorManager.cs index dd96a89..9e6c090 100644 --- a/src/RipSharp/Utilities/CursorManager.cs +++ b/src/RipSharp/Utilities/CursorManager.cs @@ -1,6 +1,6 @@ using Spectre.Console; -namespace RipSharp.Utilities; +namespace BugZapperLabs.RipSharp.Utilities; /// /// Manages terminal cursor visibility, ensuring it's restored on application exit. diff --git a/src/RipSharp/Utilities/DurationFormatter.cs b/src/RipSharp/Utilities/DurationFormatter.cs index 35345bd..432f377 100644 --- a/src/RipSharp/Utilities/DurationFormatter.cs +++ b/src/RipSharp/Utilities/DurationFormatter.cs @@ -1,4 +1,4 @@ -namespace RipSharp.Utilities; +namespace BugZapperLabs.RipSharp.Utilities; public static class DurationFormatter { diff --git a/src/RipSharp/Utilities/FileNaming.cs b/src/RipSharp/Utilities/FileNaming.cs index fd1bd1e..8c2fa2b 100644 --- a/src/RipSharp/Utilities/FileNaming.cs +++ b/src/RipSharp/Utilities/FileNaming.cs @@ -1,7 +1,7 @@ using System; using System.IO; -namespace RipSharp.Utilities; +namespace BugZapperLabs.RipSharp.Utilities; public static class FileNaming { diff --git a/src/RipSharp/Utilities/SpectreProgressDisplay.cs b/src/RipSharp/Utilities/SpectreProgressDisplay.cs index fc52a51..e128821 100644 --- a/src/RipSharp/Utilities/SpectreProgressDisplay.cs +++ b/src/RipSharp/Utilities/SpectreProgressDisplay.cs @@ -7,7 +7,7 @@ using Spectre.Console; using Spectre.Console.Rendering; -namespace RipSharp.Utilities; +namespace BugZapperLabs.RipSharp.Utilities; /// /// Spectre.Console implementation of progress display with rich terminal animations.