Casasoft.IF.GBlorbLib 25.6.15

dotnet add package Casasoft.IF.GBlorbLib --version 25.6.15
                    
NuGet\Install-Package Casasoft.IF.GBlorbLib -Version 25.6.15
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Casasoft.IF.GBlorbLib" Version="25.6.15" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Casasoft.IF.GBlorbLib" Version="25.6.15" />
                    
Directory.Packages.props
<PackageReference Include="Casasoft.IF.GBlorbLib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Casasoft.IF.GBlorbLib --version 25.6.15
                    
#r "nuget: Casasoft.IF.GBlorbLib, 25.6.15"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Casasoft.IF.GBlorbLib@25.6.15
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Casasoft.IF.GBlorbLib&version=25.6.15
                    
Install as a Cake Addin
#tool nuget:?package=Casasoft.IF.GBlorbLib&version=25.6.15
                    
Install as a Cake Tool

GBlorbLib

GBlorbLib is a .NET library for working with the GBlorb file format, which is used to package resources for interactive fiction (IF) games.
It provides functionality to read, manipulate, and write GBlorb files, including handling headers, resource indices, and chunks.

Features

  • Parse GBlorb files to extract headers, resource indices, and chunks.
  • Export individual chunks to files.
  • Add or update optional text chunks (e.g., author, copyright, annotations).
  • Write modified GBlorb files back to disk.
  • Generate resource maps required by the Quixe interpreter.

Installation

To use GBlorbLib in your project, add a reference to the library. If using Visual Studio, you can include the NuGet package.

Usage

Reading a GBlorb File

using Casasoft.IF.GBlorbLib;

// Load a GBlorb file 
GBlorb blorb = new("path/to/file.gblorb");

// Access header, resource index, and chunks 
Console.WriteLine(blorb.Header); 
Console.WriteLine(blorb.ResourceIndex); 
foreach (var chunk in blorb.Chunks) { Console.WriteLine(chunk); }

Exporting a Chunk

// Export all chunks to a specified directory 
blorb.Export("path/to/export/directory");

Adding/Updating Optional Text Chunks

// Add or update optional text chunks
blorb.AddUpdateOptionalTextChunk("AUTH", "Author Name"); 
blorb.AddUpdateOptionalTextChunk("(c) ", "2025 Author Copyright"); 
blorb.AddUpdateOptionalTextChunk("ANNO", "Annotations or remarks");

Writing a Modified GBlorb File

// Save changes to a new GBlorb file 
blorb.Write("path/to/output.gblorb");

Generating a Resource Map for Quixe

ExtractDir = $"{ProjectName}.materials/Release";
file = $"{ExtractDir}/{Path.GetFileName(ProjectName)}.gblorb";
GBlorb blorb = new(file);
Blorb.ExportResourceMap(ExtractDir);

Online documentation

For detailed documentation, including API references, visit the GBlorbLib documentation site.

Dependencies

  • .NET 8
  • Mono.Options: Used for command-line option parsing in related tools.
  • IronSoftware.System.Drawing: Used for image processing.

Contributing

Contributions are welcome! Feel free to submit issues or pull requests on the GitHub repository.

License

This project is licensed under the GNU Affero General Public License v3.0.
See the LICENSE file for details.

Acknowledgments

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
25.6.15 143 6/15/2025
25.6.1 107 6/1/2025
25.5.4 152 5/4/2025