Skip to content

Commit

Permalink
Merge pull request #8 from Etherna/epic/EVI-22-MultiProjects
Browse files Browse the repository at this point in the history
Epic/evi 22 multi projects
  • Loading branch information
tmm360 authored Feb 10, 2023
2 parents ccb5a0a + 3d08ff2 commit 8a3e3f9
Show file tree
Hide file tree
Showing 60 changed files with 2,402 additions and 1,680 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/publish-app-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,31 @@ jobs:
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x

- name: Build
- name: Build Project Etherna Video Importer
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
release_name="etherna-video-importer-$tag-${{ matrix.kind }}"
# Build everything
dotnet publish src/EthernaVideoImporter/EthernaVideoImporter.csproj --framework net6.0 --runtime "${{ matrix.target }}" "${{ matrix.frameworktype }}" -c Release -o "$release_name"
dotnet publish src/EthernaVideoImporter/EthernaVideoImporter.csproj --framework net7.0 --runtime "${{ matrix.target }}" "${{ matrix.frameworktype }}" -c Release -o "$release_name"
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
# Pack to zip for Windows
7z a -tzip "${release_name}.zip" "./${release_name}/*"
else
tar czvf "${release_name}.tar.gz" "$release_name"
fi
# Delete output directory
rm -r "$release_name"
- name: Build Project Devcon Archive Video Importer
shell: bash
run: |
tag=$(git describe --tags --abbrev=0)
release_name="devcon-archive-video-importer-$tag-${{ matrix.kind }}"
# Build everything
dotnet publish src/DevconArchiveVideoImporter/DevconArchiveVideoImporter.csproj --framework net7.0 --runtime "${{ matrix.target }}" "${{ matrix.frameworktype }}" -c Release -o "$release_name"
# Pack files
if [ "${{ matrix.target }}" == "win-x64" ]; then
# Pack to zip for Windows
Expand All @@ -53,6 +69,8 @@ jobs:
- name: Publish
uses: softprops/action-gh-release@v1
with:
files: "etherna-video-importer-*"
files: |
"etherna-video-importer-*"
"devcon-archive-video-importer-*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 18 additions & 12 deletions EthernaVideoImporter.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,23 @@ VisualStudioVersion = 17.3.32819.101
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EthernaVideoImporter", "src\EthernaVideoImporter\EthernaVideoImporter.csproj", "{6B534273-4C90-4EEC-A13B-ABBD9867E1D2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EthernaVideoImporter.YoutubeDownloader", "src\EthernaVideoImporter.YoutubeDownloader\EthernaVideoImporter.YoutubeDownloader.csproj", "{4DA6944A-8048-4A33-BC18-D29C0C1A59A0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EthernaVideoImporter.CommonData", "src\EthernaVideoImporter.CommonData\EthernaVideoImporter.CommonData.csproj", "{DA8B07A0-D7D7-43B6-8CE0-7AE619A97817}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6647EBF4-A8E7-4987-9A43-CF6F9DA1A3AF}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{1E5D1B5B-4926-4F7F-97A9-19DAE5065550}"
ProjectSection(SolutionItems) = preProject
.github\workflows\publish-app-release.yml = .github\workflows\publish-app-release.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0A3B4988-7F19-430D-BF6C-31AFD0234C44}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EthernaVideoImporter.Core", "src\EthernaVideoImporter.Core\EthernaVideoImporter.Core.csproj", "{CD81CBF2-FBFE-4BB2-A777-5F5B9EFAB80E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EthernaVideoImporter.Devcon", "src\EthernaVideoImporter.Devcon\EthernaVideoImporter.Devcon.csproj", "{9CBEB485-1E55-4457-B127-7E0A75602939}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -29,20 +32,23 @@ Global
{6B534273-4C90-4EEC-A13B-ABBD9867E1D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6B534273-4C90-4EEC-A13B-ABBD9867E1D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6B534273-4C90-4EEC-A13B-ABBD9867E1D2}.Release|Any CPU.Build.0 = Release|Any CPU
{4DA6944A-8048-4A33-BC18-D29C0C1A59A0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4DA6944A-8048-4A33-BC18-D29C0C1A59A0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4DA6944A-8048-4A33-BC18-D29C0C1A59A0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4DA6944A-8048-4A33-BC18-D29C0C1A59A0}.Release|Any CPU.Build.0 = Release|Any CPU
{DA8B07A0-D7D7-43B6-8CE0-7AE619A97817}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA8B07A0-D7D7-43B6-8CE0-7AE619A97817}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA8B07A0-D7D7-43B6-8CE0-7AE619A97817}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA8B07A0-D7D7-43B6-8CE0-7AE619A97817}.Release|Any CPU.Build.0 = Release|Any CPU
{CD81CBF2-FBFE-4BB2-A777-5F5B9EFAB80E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CD81CBF2-FBFE-4BB2-A777-5F5B9EFAB80E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD81CBF2-FBFE-4BB2-A777-5F5B9EFAB80E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD81CBF2-FBFE-4BB2-A777-5F5B9EFAB80E}.Release|Any CPU.Build.0 = Release|Any CPU
{9CBEB485-1E55-4457-B127-7E0A75602939}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9CBEB485-1E55-4457-B127-7E0A75602939}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9CBEB485-1E55-4457-B127-7E0A75602939}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9CBEB485-1E55-4457-B127-7E0A75602939}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6B534273-4C90-4EEC-A13B-ABBD9867E1D2} = {0A3B4988-7F19-430D-BF6C-31AFD0234C44}
{1E5D1B5B-4926-4F7F-97A9-19DAE5065550} = {6647EBF4-A8E7-4987-9A43-CF6F9DA1A3AF}
{CD81CBF2-FBFE-4BB2-A777-5F5B9EFAB80E} = {0A3B4988-7F19-430D-BF6C-31AFD0234C44}
{9CBEB485-1E55-4457-B127-7E0A75602939} = {0A3B4988-7F19-430D-BF6C-31AFD0234C44}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {09CED59B-3404-49D6-ADE2-70D93A110B72}
Expand Down
38 changes: 1 addition & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Etherna Video Importer
Overview
--------

Tool for import video from CSV data.
Tool to import videos on Etherna from different sources.

Issue reports
-------------
Expand All @@ -17,39 +17,3 @@ Questions? Problems?
---------------------

For questions or problems please write an email to [[email protected]](mailto:[email protected]).

Libraries
---------------------

### [VideoLibrary](https://github.com/omansak/libvideo)

<details>
<summary>BSD 2-Clause "Simplified" License</summary>

BSD 2-Clause License

Copyright (c) 2021, OMANSAK
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

</details>

This file was deleted.

12 changes: 0 additions & 12 deletions src/EthernaVideoImporter.CommonData/Interfaces/IDownloadClient.cs

This file was deleted.

27 changes: 0 additions & 27 deletions src/EthernaVideoImporter.CommonData/Models/SourceVideoInfo.cs

This file was deleted.

24 changes: 24 additions & 0 deletions src/EthernaVideoImporter.Core/Dtos/MetadataImageInput.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System.Collections.Generic;

namespace Etherna.VideoImporter.Core.Dtos
{
public sealed class MetadataImageInput
{
// Constructors.
public MetadataImageInput(
float aspectRatio,
string blurhash,
IDictionary<string, string> sources)
{
AspectRatio = aspectRatio;
Blurhash = blurhash;
Sources = sources;
}

// Properties.
public float AspectRatio { get; set; }
public string Blurhash { get; set; }
public IDictionary<string, string> Sources { get; }
public string V { get; } = "1.0";
}
}
49 changes: 49 additions & 0 deletions src/EthernaVideoImporter.Core/Dtos/MetadataManifestInsertInput.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Etherna.ServicesClient.Clients.Index;
using System.Collections.Generic;

namespace Etherna.VideoImporter.Core.Dtos
{
public sealed class MetadataManifestInsertInput
{
// Constructors.
public MetadataManifestInsertInput(
long createdAt,
string ownerAddress,
string? batchId,
string? description,
long? duration,
string? originalQuality,
string? personalData,
MetadataImageInput? thumbnail,
string? title,
ICollection<SourceDto> sources)
{
CreatedAt = createdAt;
OwnerAddress = ownerAddress;
BatchId = batchId;
Description = description;
Duration = duration;
Hash = "";
OriginalQuality = originalQuality;
PersonalData = personalData;
Thumbnail = thumbnail;
Title = title;
Sources = sources ?? new List<SourceDto>();
}

// Properties.
public long CreatedAt { get; }
public string? BatchId { get; }
public string? Description { get; }
public long? Duration { get; }
public string Hash { get; }
public string? OriginalQuality { get; }
public string OwnerAddress { get; }
public string? PersonalData { get; }
public long? UpdatedAt { get; }
public string V { get; } = "1.1";
public ICollection<SourceDto> Sources { get; }
public MetadataImageInput? Thumbnail { get; }
public string? Title { get; }
}
}
8 changes: 8 additions & 0 deletions src/EthernaVideoImporter.Core/Dtos/MetadataPersonalDataDto.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Etherna.VideoImporter.Core.Dtos
{
public class MetadataPersonalDataDto
{
public string VideoId { get; set; } = default!;
public MetadataUploadMode Mode { get; set; } = default!;
}
}
9 changes: 9 additions & 0 deletions src/EthernaVideoImporter.Core/Dtos/MetadataUploadMode.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Etherna.VideoImporter.Core.Dtos
{
public enum MetadataUploadMode
{
DevconImporter,
EthernaImporter,
WebApp
}
}
41 changes: 41 additions & 0 deletions src/EthernaVideoImporter.Core/EthernaVideoImporter.Core.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>Etherna.VideoImporter.Core</RootNamespace>

<Authors>Etherna Sagl</Authors>
<Description>A .Net console for upload video on Etherna</Description>

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Nullable>enable</Nullable>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>

<ItemGroup>
<Compile Remove="FFmpeg\**" />
<EmbeddedResource Remove="FFmpeg\**" />
<None Remove="FFmpeg\**" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Bee.Net" Version="0.2.0-alpha.127" />
<PackageReference Include="Blurhash.SkiaSharp" Version="2.0.0" />
<PackageReference Include="EthernaServicesClient" Version="0.3.0-alpha.59" />
<PackageReference Include="MimeTypes" Version="2.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="7.0.2" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="7.0.0" />
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.3" />
<PackageReference Include="IdentityModel.OidcClient" Version="5.2.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.25.1" />
<PackageReference Include="YoutubeExplode" Version="6.2.5" />
<PackageReference Include="YoutubeExplode.Converter" Version="6.2.5" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

</Project>
Loading

0 comments on commit 8a3e3f9

Please sign in to comment.