Skip to content

Expand README with comprehensive usage documentation#151

Merged
rbnswartz merged 4 commits intodevelopfrom
copilot/update-readme-usage-details
Nov 3, 2025
Merged

Expand README with comprehensive usage documentation#151
rbnswartz merged 4 commits intodevelopfrom
copilot/update-readme-usage-details

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 31, 2025

The README lacked practical usage examples beyond basic parser instantiation and document creation.

Added Documentation

Installation

  • NuGet installation instructions with .NET CLI, Package Manager, and PackageReference examples

Building from Source

  • Step-by-step instructions for cloning and building the project
  • Commands for running tests

Contributing

  • Enhanced contribution guidelines with clear areas for help
  • Streamlined format for better readability

Quick Start

  • Complete working example with USFM parsing
  • Shows basic document structure and marker access

Core Classes

  • USFMParser: Ignoring markers, handling unknown markers
  • USFMDocument: Querying markers by type, traversing document tree, merging documents

Performance Tips

  • Parser reuse for multiple documents
  • Using specific queries instead of traversing all markers
  • Batch hierarchy queries using GetHierachyToMultipleMarkers() instead of looping

Practical Examples (End of File)

  • Extract verse text from a chapter
  • Process footnotes

Example

// Find all chapters and iterate verses
var chapters = document.GetChildMarkers<CMarker>();
foreach (var chapter in chapters)
{
    var verses = chapter.GetChildMarkers<VMarker>();
    foreach (var verse in verses)
    {
        var textBlocks = verse.Contents.OfType<TextBlock>();
        string text = string.Join("", textBlocks.Select(t => t.Text));
        Console.WriteLine($"{chapter.Number}:{verse.VerseNumber} {text}");
    }
}

All code examples validated against actual implementation.

Original prompt

Update the README with more details about usage


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: rbnswartz <724704+rbnswartz@users.noreply.github.com>
Copilot AI changed the title [WIP] Update README with details about usage Expand README with comprehensive usage documentation Oct 31, 2025
Copilot AI requested a review from rbnswartz October 31, 2025 20:56
@rbnswartz
Copy link
Copy Markdown
Member

@copilot No need to go into details about all the different types of markers

Co-authored-by: rbnswartz <724704+rbnswartz@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 31, 2025

@copilot No need to go into details about all the different types of markers

Removed the "Common Marker Types" section. The practical examples now show marker usage in context without the detailed marker type documentation. (42009a6)

@rbnswartz
Copy link
Copy Markdown
Member

@copilot README.md:286 Don't need this section about error handling

Co-authored-by: rbnswartz <724704+rbnswartz@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Nov 3, 2025

@copilot README.md:286 Don't need this section about error handling

Removed the Error Handling section. Also addressed other feedback: removed "Lazy Processing" tip, added installation instructions, enhanced Building/Contributing sections, added performance tip for batch hierarchy queries, and moved shortened practical examples to the end. (bd225c4)

@rbnswartz rbnswartz marked this pull request as ready for review November 3, 2025 17:37
@rbnswartz rbnswartz merged commit 1d88631 into develop Nov 3, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants