-
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #627 from jms-du-se/Adobe-Digital-Editions
[New App]: Adobe Digital Editons
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Function Get-AdobeDigitalEditions { | ||
Check warning Code scanning / PSScriptAnalyzer The cmdlet 'Get-AdobeDigitalEditions' uses a plural noun. A singular noun should be used instead. Warning
The cmdlet 'Get-AdobeDigitalEditions' uses a plural noun. A singular noun should be used instead.
|
||
<# | ||
.SYNOPSIS | ||
Gets the version and download URLs for Adobe Digital Editions. | ||
.NOTES | ||
Author: Jasper Metselaar | ||
E-mail: [email protected] | ||
#> | ||
[OutputType([System.Management.Automation.PSObject])] | ||
[CmdletBinding(SupportsShouldProcess = $False)] | ||
param ( | ||
[Parameter(Mandatory = $False, Position = 0)] | ||
[ValidateNotNull()] | ||
[System.Management.Automation.PSObject] | ||
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) | ||
) | ||
|
||
$params = @{ | ||
Uri = $res.Get.Update.Uri | ||
} | ||
$updateFeed = Invoke-EvergreenRestMethod @params | ||
|
||
# Removing first 3 bytes from array by selecting the full length and stripping first 3 | ||
Write-Verbose "Remove-ByteOrderMark (UTF8 BOM)" | ||
$OutputBytes = $updateFeed[3..$updateFeed.Length] | ||
$updateFeed = [System.Text.Encoding]::UTF8.GetString($OutputBytes) | ConvertFrom-Json | ||
|
||
if ($Null -ne $updateFeed) { | ||
|
||
# Output the object to the pipeline | ||
foreach ($item in $updateFeed) { | ||
$PSObject = [PSCustomObject] @{ | ||
Version = $item.version | ||
URI = $item.SecuredDownloadPath | ||
} | ||
Write-Output -InputObject $PSObject | ||
} | ||
|
||
} | ||
else { | ||
Write-Error -Message "$($MyInvocation.MyCommand): unable to retrieve content from $($res.Get.Update.Uri)." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"Name": "Adobe Digital Editions", | ||
"Source": "https://www.adobe.com/solutions/ebook/digital-editions.html", | ||
"Get": { | ||
"Update": { | ||
"Uri": "https://adedownload.adobe.com/pub/adobe/digitaleditions/sha2/adeupdaterconfig.cfg" | ||
} | ||
}, | ||
"Install": { | ||
"Preinstall": "", | ||
"Setup": "ADE_*_Installer.exe", | ||
"Physical": { | ||
"Arguments": "/S", | ||
"PostInstall": [] | ||
}, | ||
"Virtual": { | ||
"Arguments": "", | ||
"PostInstall": [] | ||
} | ||
} | ||
} |