Skip to content

Commit 1288923

Browse files
committed
feat: add v1.2 feature examples (tables and modular docs)
Breaking Changes: NONE New Examples (7 files): Tables: - tables/basic-table.osf - Simple product catalog - tables/styled-table.osf - All style variants with alignment - tables/sales-report.osf - Complete business report Modular Documents: - modular/main.osf - Main document with @include directives - modular/sections/intro.osf - Executive summary section - modular/sections/body.osf - Technical implementation - modular/sections/conclusion.osf - Results and recommendations Changes: - Update README.md with new example sections - Update omniscript-parser dependency from ^0.6.0 to ^1.2.0 - Add comprehensive @table examples (3 files, all styles) - Add complete modular document example (4 files) All examples parse successfully and demonstrate v1.2 features with realistic, production-quality content. Refs: P0-2, P2-8
1 parent 8293215 commit 1288923

File tree

12 files changed

+401
-2
lines changed

12 files changed

+401
-2
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ Data analysis and tracking sheets:
3636
- **[expense-report.osf](spreadsheets/expense-report.osf)** - Expense tracking with formulas
3737
- **[inventory-management.osf](spreadsheets/inventory-management.osf)** - Inventory system
3838

39+
### 📋 Tables (v1.2+)
40+
Professional tables with styling and alignment:
41+
- **[basic-table.osf](tables/basic-table.osf)** - Simple product catalog with default styling
42+
- **[styled-table.osf](tables/styled-table.osf)** - Examples of all three style variants
43+
- **[sales-report.osf](tables/sales-report.osf)** - Complete sales report with multiple tables
44+
45+
### 🔗 Modular Documents (v1.2+)
46+
Document composition using @include directive:
47+
- **[main.osf](modular/main.osf)** - Main document including multiple sections
48+
- **[sections/intro.osf](modular/sections/intro.osf)** - Executive summary section
49+
- **[sections/body.osf](modular/sections/body.osf)** - Technical implementation section
50+
- **[sections/conclusion.osf](modular/sections/conclusion.osf)** - Results and recommendations
51+
3952
### 🎯 Combined
4053
Multi-format documents demonstrating OSF's versatility:
4154
- **[business-report.osf](combined/business-report.osf)** - Doc + Slides + Sheets in one file

modular/main.osf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// File: omniscript-examples/modular/main.osf
2+
// What: Main document demonstrating @include directive
3+
// Why: Show how to compose documents from multiple files
4+
// Related: sections/intro.osf, sections/body.osf, sections/conclusion.osf
5+
6+
@meta {
7+
title: "Complete Project Report";
8+
author: "Project Team";
9+
date: "2025-10-17";
10+
description: "Comprehensive project documentation using modular composition";
11+
}
12+
13+
@include { path: "./sections/intro.osf"; }
14+
15+
@include { path: "./sections/body.osf"; }
16+
17+
@include { path: "./sections/conclusion.osf"; }
18+
19+
@doc {
20+
---
21+
22+
**Document composed from multiple files using @include directive**
23+
24+
- intro.osf: Executive summary and project overview
25+
- body.osf: Technical details and implementation
26+
- conclusion.osf: Results and recommendations
27+
}

modular/sections/body.osf

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
// File: omniscript-examples/modular/sections/body.osf
2+
// What: Body section with technical details
3+
// Why: Demonstrate technical content in modular docs
4+
// Related: main.osf, intro.osf, conclusion.osf
5+
6+
@doc {
7+
# Technical Implementation
8+
9+
## Architecture
10+
11+
The new portal uses a microservices architecture with:
12+
- React 18 frontend
13+
- Node.js 22 backend services
14+
- PostgreSQL 17 database
15+
- Redis caching layer
16+
- Docker containerization
17+
}
18+
19+
@table {
20+
caption: "Performance Metrics - Before vs After";
21+
style: "bordered";
22+
alignment: ["left", "right", "right", "center"];
23+
24+
| Metric | Before | After | Improvement |
25+
| --- | --- | --- | --- |
26+
| Page Load Time | 3.2s | 1.1s | -65% ↓ |
27+
| Time to Interactive | 4.8s | 1.6s | -67% ↓ |
28+
| Mobile Performance | 45 | 92 | +104% ↑ |
29+
| SEO Score | 72 | 96 | +33% ↑ |
30+
}
31+
32+
@doc {
33+
## Security Enhancements
34+
35+
- Multi-factor authentication (MFA)
36+
- OAuth 2.0 with PKCE
37+
- OWASP Top 10 compliance
38+
- Automated security scanning in CI/CD
39+
- Regular penetration testing
40+
41+
## Deployment Strategy
42+
43+
Blue-green deployment with automated rollback capability ensured zero-downtime
44+
updates across all regions.
45+
}

modular/sections/conclusion.osf

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// File: omniscript-examples/modular/sections/conclusion.osf
2+
// What: Conclusion section with recommendations
3+
// Why: Complete the modular document example
4+
// Related: main.osf, intro.osf, body.osf
5+
6+
@doc {
7+
# Results and Impact
8+
9+
## Business Impact
10+
11+
The new customer portal has significantly improved business metrics:
12+
- **50% increase** in user engagement
13+
- **40% reduction** in support tickets
14+
- **$1.2M annual savings** in infrastructure costs
15+
- **120% ROI** in first year
16+
}
17+
18+
@table {
19+
caption: "User Adoption by Region";
20+
style: "striped";
21+
alignment: ["left", "right", "right", "center"];
22+
23+
| Region | Users (Before) | Users (After) | Growth |
24+
| --- | --- | --- | --- |
25+
| North America | 12,000 | 18,500 | +54% |
26+
| Europe | 8,500 | 13,200 | +55% |
27+
| Asia Pacific | 6,200 | 11,800 | +90% |
28+
| Latin America | 3,100 | 4,800 | +55% |
29+
| Middle East | 1,800 | 2,700 | +50% |
30+
}
31+
32+
@doc {
33+
## Recommendations
34+
35+
1. **Expand to Mobile App**: Consider native iOS/Android apps
36+
2. **Add AI Assistant**: Implement chatbot for common queries
37+
3. **Enhance Analytics**: Real-time dashboards for business users
38+
4. **Global CDN**: Further reduce latency in distant regions
39+
5. **API Marketplace**: Allow third-party integrations
40+
41+
## Lessons Learned
42+
43+
- Early user testing prevented costly late-stage changes
44+
- Automated testing caught 85% of bugs before production
45+
- Modular architecture enabled parallel team development
46+
- Regular stakeholder demos maintained alignment
47+
48+
---
49+
50+
**Project Status**: ✓ Successfully Completed
51+
**Next Phase**: Q1 2026 - Mobile App Development
52+
}

modular/sections/intro.osf

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// File: omniscript-examples/modular/sections/intro.osf
2+
// What: Introduction section for modular document
3+
// Why: Demonstrate section composition
4+
// Related: main.osf, body.osf, conclusion.osf
5+
6+
@doc {
7+
# Executive Summary
8+
9+
This project successfully delivered a new customer portal with enhanced features
10+
and improved performance. The system now serves **50,000+ active users** with
11+
**99.9% uptime**.
12+
13+
## Project Overview
14+
15+
- **Duration**: 8 months (January - August 2025)
16+
- **Team Size**: 12 members
17+
- **Budget**: $850,000
18+
- **Status**: ✓ Completed on time and under budget
19+
20+
## Key Achievements
21+
22+
1. Reduced page load time by 65%
23+
2. Increased mobile usage by 120%
24+
3. Improved customer satisfaction score from 7.2 to 8.9
25+
4. Deployed to 5 regions with zero downtime
26+
}

node_modules/.package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node_modules/omniscript-parser

Lines changed: 0 additions & 1 deletion
This file was deleted.

package-lock.json

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@
2828
},
2929
"homepage": "https://omniscriptosf.github.io",
3030
"devDependencies": {
31-
"omniscript-parser": "^0.6.0"
31+
"omniscript-parser": "^1.2.0"
3232
}
3333
}

tables/basic-table.osf

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// File: omniscript-examples/tables/basic-table.osf
2+
// What: Basic table example with default styling
3+
// Why: Demonstrate simple table usage
4+
// Related: sales-report.osf, styled-table.osf
5+
6+
@meta {
7+
title: "Basic Table Example";
8+
author: "Documentation Team";
9+
date: "2025-10-17";
10+
}
11+
12+
@doc {
13+
# Simple Product Catalog
14+
15+
Basic table showing product information with default styling.
16+
}
17+
18+
@table {
19+
| Product | Price | Stock |
20+
| --- | --- | --- |
21+
| Widget A | $19.99 | 150 |
22+
| Widget B | $24.99 | 87 |
23+
| Widget C | $29.99 | 203 |
24+
| Widget D | $34.99 | 45 |
25+
}
26+
27+
@doc {
28+
Tables use Markdown pipe syntax for easy editing and Git-friendly diffs.
29+
}

0 commit comments

Comments
 (0)