diff --git a/README.md b/README.md index ff9630b..e12d9e9 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Backup archive of `Atlassian` jsons. `Atlassian Downloader` available [here](htt | [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Jira%20Core&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/jira/core) | :white_check_mark: | :white_check_mark: | :x: | | [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Jira%20Software&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/jira) | :white_check_mark: | :white_check_mark: | :white_check_mark: | | [![Product](https://img.shields.io/static/v1?label=Atlassian&message=Jira%20Servicedesk&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/jira/service-management) | :white_check_mark: | :white_check_mark: | :white_check_mark: | -| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=SourceTree&color=yellow&style=for-the-badge)](https://www.atlassian.com/software/sourcetree) | :x: | :x: | :x: | +| [![Product](https://img.shields.io/static/v1?label=Atlassian&message=SourceTree&color=bright%20green&style=for-the-badge)](https://www.atlassian.com/software/sourcetree) | :white_check_mark: | :white_check_mark: | :x: | ### Current links diff --git a/json-backups/sourcetreeapp-archive.csx b/json-backups/sourcetreeapp-archive.csx new file mode 100644 index 0000000..e019f64 --- /dev/null +++ b/json-backups/sourcetreeapp-archive.csx @@ -0,0 +1,15 @@ +#r "nuget: AngleSharp, 1.0.0-alpha-844" + +using System.Linq; + +System.Console.Out.WriteLine( + "download(" + System.Text.Json.JsonSerializer.Serialize( + new AngleSharp.Html.Parser.HtmlParser() + .ParseDocument( + await new System.Net.Http.HttpClient() + .GetStringAsync("https://www.sourcetreeapp.com/download-archives") + .ConfigureAwait(false)) + .QuerySelectorAll(".wpl tr a") + .Select(row => new { Version = row.TextContent, ZipUrl = row.GetAttribute("href") }) + .ToArray()) + ")" +); diff --git a/json-backups/update.sh b/json-backups/update.sh index f0277fa..581ff45 100755 --- a/json-backups/update.sh +++ b/json-backups/update.sh @@ -2,6 +2,8 @@ rm -rfv $PWD/current $PWD/archived $PWD/eap mkdir -p $PWD/current $PWD/archived $PWD/eap +dotnet tool install -g dotnet-script + ################################################################################################### # Current links ################################################################################################### @@ -30,6 +32,8 @@ wget -c -nv --random-wait -P $PWD/current/ https://my.atlassian.com/download/fee wget -c -nv --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/jira-software.json wget -c -nv --random-wait -P $PWD/current/ https://my.atlassian.com/download/feeds/current/jira-servicedesk.json +# SourceTree +dotnet-script sourcetreeapp-archive.csx > $PWD/current/sourcetree.json ################################################################################################### # Archived links @@ -59,6 +63,8 @@ wget -c -nv --random-wait -P $PWD/archived/ https://my.atlassian.com/download/fe wget -c -nv --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/jira-software.json wget -c -nv --random-wait -P $PWD/archived/ https://my.atlassian.com/download/feeds/archived/jira-servicedesk.json +# SourceTree +dotnet-script sourcetreeapp-archive.csx > $PWD/archived/sourcetree.json ################################################################################################### # EAP links