fix: remove duplicate function definition
This commit is contained in:
parent
199dd9870f
commit
885d0dbd4e
1 changed files with 0 additions and 49 deletions
|
|
@ -243,55 +243,6 @@ function Get-PageMeta
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function Get-CachedPageMeta
|
|
||||||
{
|
|
||||||
<#
|
|
||||||
.SYNOPSIS
|
|
||||||
Get a locally indexed/cached Confluence page id
|
|
||||||
|
|
||||||
.EXAMPLE
|
|
||||||
Get-CachedPageMeta `
|
|
||||||
-Title 'd231cc3422bfdf96.xml' `
|
|
||||||
-CacheIndexFile 'confluence-page-cache.json'
|
|
||||||
#>
|
|
||||||
Param(
|
|
||||||
[Parameter(Mandatory)] [string] $Title,
|
|
||||||
[Parameter(Mandatory)] [string] $CacheIndexFile
|
|
||||||
)
|
|
||||||
|
|
||||||
Process
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
$raw = Get-Content $CacheIndexFile
|
|
||||||
}
|
|
||||||
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
$raw = "{}"
|
|
||||||
}
|
|
||||||
|
|
||||||
$data = $raw | ConvertFrom-JSON
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
$pageMeta = $data | Select -ExpandProperty $Title
|
|
||||||
|
|
||||||
$pageMeta
|
|
||||||
|
|
||||||
Write-Debug "page id cache hit: $Title -> $($pageMeta.PageId)"
|
|
||||||
}
|
|
||||||
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
$null
|
|
||||||
|
|
||||||
Write-Debug "page id cache miss: $Title"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function Register-PageMeta
|
function Register-PageMeta
|
||||||
{
|
{
|
||||||
<#
|
<#
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue