mirror of
https://github.com/EpicMorg/atlassian-downloader.git
synced 2025-04-16 14:02:37 +03:00
v1.0.0.3
This commit is contained in:
parent
f333eb5e4c
commit
711398a30a
@ -4,7 +4,7 @@
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||
<PackageId>Atlassian Downloader</PackageId>
|
||||
<PackageId>EpicMorg.Atlassian.Downloader</PackageId>
|
||||
<Authors>Atlassian Downloader</Authors>
|
||||
<Description>Atlassian Downloader by EpicMorg, code by kasthack</Description>
|
||||
<PackageProjectUrl>https://github.com/EpicMorg/atlassian-downloader</PackageProjectUrl>
|
||||
@ -13,9 +13,10 @@
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<RepositoryUrl>https://github.com/EpicMorg/atlassian-downloader</RepositoryUrl>
|
||||
<PackageTags>atlassian, donwloader, epicmorg</PackageTags>
|
||||
<AssemblyVersion>1.0.0.2</AssemblyVersion>
|
||||
<Version>1.0.0.2</Version>
|
||||
<AssemblyVersion>1.0.0.3</AssemblyVersion>
|
||||
<Version>1.0.0.3</Version>
|
||||
<Copyright>EpicMorg 20201</Copyright>
|
||||
<Product>Atlassian Downloader</Product>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -1,14 +1,17 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text.Json;
|
||||
|
||||
|
||||
var appTitle = System.Reflection.Assembly.GetExecutingAssembly().GetName().Name;
|
||||
var appVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
var appStartupDate = DateTime.Now;
|
||||
var appBuildType = "[Release]";
|
||||
#if DEBUG
|
||||
appBuildType = "[Debug]";
|
||||
#endif
|
||||
|
||||
var outputDir = "output";
|
||||
var feedUrls =
|
||||
new[] {
|
||||
@ -34,7 +37,7 @@ var feedUrls =
|
||||
"https://my.atlassian.com/download/feeds/current/stash.json"
|
||||
};
|
||||
|
||||
Console.Title = $"{appTitle} {appVersion}";
|
||||
Console.Title = $"{appTitle} {appVersion} {appBuildType}";
|
||||
Console.WriteLine($"Download started at {appStartupDate}.");
|
||||
|
||||
var client = new HttpClient();
|
||||
@ -71,22 +74,20 @@ foreach (var feedUrl in feedUrls)
|
||||
using var request = await client.GetStreamAsync(file.ZipUrl).ConfigureAwait(false);
|
||||
await request.CopyToAsync(outputStream).ConfigureAwait(false);
|
||||
Console.ForegroundColor = ConsoleColor.Green;
|
||||
Console.WriteLine($"File \"{file.ZipUrl}\" downloaded to \"{outputFile}\".");
|
||||
Console.WriteLine($"[INFO] File \"{file.ZipUrl}\" successfully downloaded to \"{outputFile}\".");
|
||||
Console.ResetColor();
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||
Console.WriteLine($"[WARN] File \"{outputFile}\" for \"{file.ZipUrl}\" already exists. Skip.");
|
||||
Console.WriteLine($"[WARN] File \"{outputFile}\" already exists. Download from \"{file.ZipUrl}\" skipped.");
|
||||
Console.ResetColor();
|
||||
}
|
||||
}
|
||||
}
|
||||
Console.WriteLine($"Downloaded all files from " +
|
||||
$"{feedUrl}");
|
||||
Console.WriteLine($"[SUCCESS] All files from \"{feedUrl}\" successfully downloaded.");
|
||||
}
|
||||
Console.WriteLine("Download complete.");
|
||||
|
||||
Console.WriteLine($"Download complete at {appStartupDate}.");
|
||||
|
||||
public partial class ResponseArray
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user