Update-Lbi is powershell cmdlet updates Dreamweaver library items (LBI) within html-files.
LBI-block format:
<!-- #BeginLibraryItem "/Library/filename.lbi" -->
html tags and regular texts
<!-- #EndLibraryItem -->
The cmlet read filename.lbi and refresh all content between #BeginLibraryItem and #EndLibraryItem html-comments.
See more about LBI: https://helpx.adobe.com/dreamweaver/using/library-items.html
Update all html-files in the site root directory and it's subdirectories. The cmdlet reinitialize the lbi-cache at each execution.
Set-Location %siteRoot%
Update-Lbi -Recurse
Update library items with 'menu' name prefix only in all html-files in the site root directory. Lbi with other file names is not change.
Set-Location %siteRoot%
Read-Lbi -include 'menu*.lbi'
Update-Lbi -UseCachedItemsOnly
Update library items with specified folders. The cmdlet read each lbi from file only once.
Set-Location %siteRoot%
Reset-LbiCache | % {
Update-Lbi './Foo/*' -SkipResetLbiCache
Update-Lbi './Bar/*' -SkipResetLbiCache
}
Automatic install the Update-Lbi cmdlet from the PowerShell Gallery:
Install-Module Update-Lbi
Automatic install the Update-Lbi cmdlet from the NuGet.org:
Install-Package Update-Lbi
or manual download and unzip the latest module files into your $PSModulePath
. For example $env:USERPROFILE\Documents\WindowsPowerShell\Modules
. Set an execution policy to RemoteSigned or Unrestricted to execute not signed modules.
Set-ExecutionPolicy RemoteSigned
- The cmdlet does not read a character encoding from LBI and html-files. The cmdlet always use UTF-8 encoding.
- The cmdlet does not use parallel processing. It is one thread application.
This project is licensed under the MIT License.