Skip to content

Latest commit

 

History

History
88 lines (60 loc) · 2.73 KB

README.md

File metadata and controls

88 lines (60 loc) · 2.73 KB

Update-Lbi

Build status PowerShell Gallery NuGet Update-Lbi icon

Update-Lbi is powershell module with advanced functions updates Dreamweaver library items (LBI) within html-files.

LBI-block format:

<!-- #BeginLibraryItem "/Library/filename.lbi" -->
html tags and regular text
<!-- #EndLibraryItem -->

The function reads filename.lbi and refreshes all content between #BeginLibraryItem and #EndLibraryItem html-comments.

See more about LBI: https://helpx.adobe.com/dreamweaver/using/library-items.html

Examples

Update all html-files in the site root directory and it's subdirectories. The function Update-Lbi reinitialize the lbi-cache at each execution.

Set-Location %siteRoot%
Update-Lbi -Recurse

Update library items with menu 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 function Update-Lbi reads each lbi from file only once.

Set-Location %siteRoot%
Reset-LbiCache | % {
    Update-Lbi './Foo/*' -SkipResetLbiCache
    Update-Lbi './Bar/*' -SkipResetLbiCache
}

Installation

Automatic install the module from the PowerShell Gallery:

Install-Module Update-Lbi

Automatic install the module 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

Known issues

  • The function does not read a character encoding from LBI and html-files, it uses UTF-8 encoding anyway.

Changelog

License

This project is released under the licensed under the MIT License.

mazzy@mazzy.ru