Powershell cmdlet updates Dreamweaver library items (LBI) within html-files.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Media
Tests
Update-Lbi
.gitignore
CHANGELOG.md
LICENSE
README.md
Update-Lbi.nuspec
appveyor.yml

README.md

Update-Lbi

Build status PowerShell Gallery NuGet Update-Lbi icon

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

Examples

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
}

Installation

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

Known issues and ideas for a future development

  • 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.

Changelog

License

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

mazzy@mazzy.ru