Skip to content

Commit 73078ae

Browse files
committed
docs: updated README and added new example structure
- Enhanced README with better organization - Added scaffolding for additional examples - Created categories: getting-started, documents, presentations, spreadsheets, use-cases, combined
1 parent 05f2d10 commit 73078ae

40 files changed

+7778
-2
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# File: .github/workflows/validate-examples.yml
2+
name: Validate Examples
3+
4+
on:
5+
push:
6+
branches: [main, develop]
7+
pull_request:
8+
branches: [main, develop]
9+
workflow_dispatch:
10+
11+
jobs:
12+
validate:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '22'
23+
24+
- name: Install omniscript-cli
25+
run: npm install -g omniscript-cli@latest
26+
27+
- name: Validate all examples
28+
run: |
29+
echo "Validating all OSF examples..."
30+
find . -name "*.osf" -type f | while read file; do
31+
echo "Validating: $file"
32+
osf parse "$file" || exit 1
33+
done
34+
echo "βœ“ All examples validated successfully!"
35+
36+
- name: Count examples
37+
run: |
38+
total=$(find . -name "*.osf" -type f | wc -l)
39+
echo "Total examples: $total"

β€ŽREADME.mdβ€Ž

Lines changed: 233 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,233 @@
1-
# omniscript-examples
2-
A library of sample OSF documents, test cases, and real-world demos for spec validation and community contribution.
1+
# OmniScript Examples Library
2+
3+
**Comprehensive collection of OmniScript Format (OSF) examples, templates, and real-world use cases.**
4+
5+
This repository contains 20+ professionally crafted OSF documents demonstrating all features of the format, from basic syntax to advanced multi-format compositions.
6+
7+
---
8+
9+
## πŸ“š Categories
10+
11+
### 🌱 Getting Started
12+
Perfect for beginners learning OSF syntax:
13+
- **[01-hello-world.osf](getting-started/01-hello-world.osf)** - Minimal example (2 min) ⏱️
14+
- **[02-basic-document.osf](getting-started/02-basic-document.osf)** - Formatting, headings, lists (5 min) ⏱️
15+
- **[03-simple-presentation.osf](getting-started/03-simple-presentation.osf)** - Slides with layouts (5 min) ⏱️
16+
- **[04-basic-spreadsheet.osf](getting-started/04-basic-spreadsheet.osf)** - Data tables and formulas (10 min) ⏱️
17+
18+
### πŸ“„ Documents
19+
Professional document examples:
20+
- **[technical-report.osf](documents/technical-report.osf)** - Multi-section technical document
21+
- **[meeting-notes.osf](documents/meeting-notes.osf)** - Structured meeting notes template
22+
- **[research-paper.osf](documents/research-paper.osf)** - Academic document with citations
23+
- **[user-manual.osf](documents/user-manual.osf)** - Technical documentation
24+
25+
### πŸ“Š Presentations
26+
Business and educational slide decks:
27+
- **[business-pitch.osf](presentations/business-pitch.osf)** - Corporate pitch deck
28+
- **[product-demo.osf](presentations/product-demo.osf)** - Product showcase slides
29+
- **[quarterly-review.osf](presentations/quarterly-review.osf)** - Business review presentation
30+
- **[training-slides.osf](presentations/training-slides.osf)** - Educational training materials
31+
32+
### πŸ“ˆ Spreadsheets
33+
Data analysis and tracking sheets:
34+
- **[budget-tracker.osf](spreadsheets/budget-tracker.osf)** - Personal/business budget
35+
- **[sales-dashboard.osf](spreadsheets/sales-dashboard.osf)** - Sales metrics dashboard
36+
- **[expense-report.osf](spreadsheets/expense-report.osf)** - Expense tracking with formulas
37+
- **[inventory-management.osf](spreadsheets/inventory-management.osf)** - Inventory system
38+
39+
### 🎯 Combined
40+
Multi-format documents demonstrating OSF's versatility:
41+
- **[business-report.osf](combined/business-report.osf)** - Doc + Slides + Sheets in one file
42+
- **[project-proposal.osf](combined/project-proposal.osf)** - Comprehensive project proposal
43+
- **[annual-report.osf](combined/annual-report.osf)** - Full annual business report
44+
45+
### ⚑ Advanced
46+
Complex examples showcasing advanced features:
47+
- **[complex-formulas.osf](advanced/complex-formulas.osf)** - Advanced Excel-style formulas
48+
- **[nested-tables.osf](advanced/nested-tables.osf)** - Complex table structures
49+
- **[multi-theme.osf](advanced/multi-theme.osf)** - Theme switching demonstration
50+
- **[large-dataset.osf](advanced/large-dataset.osf)** - Performance testing with large data
51+
52+
### πŸ’‘ Use Cases
53+
Real-world application scenarios:
54+
- **[llm-prompts.osf](use-cases/llm-prompts.osf)** - AI/LLM prompt documentation
55+
- **[api-documentation.osf](use-cases/api-documentation.osf)** - Technical API docs
56+
- **[classroom-materials.osf](use-cases/classroom-materials.osf)** - Educational content
57+
- **[personal-finance.osf](use-cases/personal-finance.osf)** - Personal finance tracking
58+
59+
---
60+
61+
## πŸš€ Quick Start
62+
63+
### Clone and Explore
64+
```bash
65+
# Clone the repository
66+
git clone https://github.com/OmniScriptOSF/omniscript-examples.git
67+
cd omniscript-examples
68+
69+
# Browse examples
70+
ls -R
71+
```
72+
73+
### Validate Examples
74+
```bash
75+
# Install dependencies
76+
npm install
77+
78+
# Validate all examples
79+
npm run validate
80+
```
81+
82+
### Convert an Example
83+
```bash
84+
# Install OSF CLI globally
85+
npm install -g omniscript-cli
86+
87+
# Convert to PDF
88+
osf render getting-started/01-hello-world.osf --format pdf
89+
90+
# Convert to DOCX
91+
osf render documents/technical-report.osf --format docx --theme corporate
92+
93+
# Convert to PPTX
94+
osf render presentations/business-pitch.osf --format pptx --theme modern
95+
```
96+
97+
---
98+
99+
## πŸ“– How to Use These Examples
100+
101+
### For Learning
102+
1. Start with **Getting Started** examples in order
103+
2. Read the inline comments to understand syntax
104+
3. Modify examples to experiment
105+
4. Progress to category-specific examples
106+
107+
### As Templates
108+
1. Browse by category to find relevant template
109+
2. Copy the example file
110+
3. Modify metadata and content
111+
4. Export to your desired format
112+
113+
### For Reference
114+
1. Search for specific features (charts, formulas, layouts)
115+
2. Copy and adapt code snippets
116+
3. Consult comments for best practices
117+
118+
---
119+
120+
## 🀝 Contributing Examples
121+
122+
We welcome community contributions! Submit your own examples via pull request.
123+
124+
### Contribution Guidelines
125+
1. **File Naming**: Use `kebab-case` (e.g., `my-example.osf`)
126+
2. **Location**: Place in appropriate category folder
127+
3. **Documentation**: Add header comment explaining purpose
128+
4. **Comments**: Include inline comments for complex syntax
129+
5. **Validation**: Ensure file parses without errors
130+
6. **Realistic Content**: Use meaningful content, not lorem ipsum
131+
7. **Showcase Features**: Demonstrate specific OSF capabilities
132+
133+
### Example Template
134+
```osf
135+
// =============================================================================
136+
// Example: [Name]
137+
// Category: [Category]
138+
// Description: [What this example demonstrates]
139+
// Features: [List of OSF features used]
140+
// Estimated time: [X minutes]
141+
// =============================================================================
142+
143+
@meta {
144+
title: "Example Title";
145+
author: "Your Name";
146+
theme: default;
147+
}
148+
149+
@doc {
150+
# Your content here
151+
}
152+
```
153+
154+
### Submit Your Example
155+
```bash
156+
# Fork the repository
157+
# Create a new branch
158+
git checkout -b add-example-name
159+
160+
# Add your example
161+
git add your-category/your-example.osf
162+
163+
# Commit with descriptive message
164+
git commit -m "Add: [Category] - [Example Name]"
165+
166+
# Push and create pull request
167+
git push origin add-example-name
168+
```
169+
170+
---
171+
172+
## πŸ” Finding Examples
173+
174+
### By Feature
175+
- **Markdown formatting**: `02-basic-document.osf`
176+
- **Slide layouts**: `03-simple-presentation.osf`
177+
- **Formulas**: `04-basic-spreadsheet.osf`, `complex-formulas.osf`
178+
- **Multi-format**: All files in `combined/` folder
179+
- **Themes**: `multi-theme.osf`
180+
- **Large scale**: `large-dataset.osf`
181+
182+
### By Use Case
183+
- **Business**: `business-pitch.osf`, `quarterly-review.osf`, `business-report.osf`
184+
- **Education**: `training-slides.osf`, `classroom-materials.osf`
185+
- **Technical**: `technical-report.osf`, `api-documentation.osf`, `user-manual.osf`
186+
- **Personal**: `meeting-notes.osf`, `personal-finance.osf`, `budget-tracker.osf`
187+
- **AI/LLM**: `llm-prompts.osf`
188+
189+
---
190+
191+
## βœ… Example Quality Standards
192+
193+
All examples in this repository meet these criteria:
194+
- βœ“ Parse successfully with `omniscript-parser`
195+
- βœ“ Include descriptive header comments
196+
- βœ“ Contain realistic, meaningful content
197+
- βœ“ Demonstrate specific OSF features
198+
- βœ“ Follow OSF specification
199+
- βœ“ Validated by CI on every commit
200+
201+
---
202+
203+
## πŸ“¦ Integration
204+
205+
### CI/CD Validation
206+
All examples are automatically validated on every commit using GitHub Actions. See [.github/workflows/validate-examples.yml](.github/workflows/validate-examples.yml).
207+
208+
### Test Suite Usage
209+
These examples are used as test cases in:
210+
- `omniscript-parser` test suite
211+
- `omniscript-converters` integration tests
212+
- `omniscript-cli` end-to-end tests
213+
214+
---
215+
216+
## πŸ“„ License
217+
218+
MIT License - see [LICENSE](LICENSE) for details.
219+
220+
All examples are provided as templates and may be freely used, modified, and distributed.
221+
222+
---
223+
224+
## 🌟 Support
225+
226+
- **Issues**: [GitHub Issues](https://github.com/OmniScriptOSF/omniscript-examples/issues)
227+
- **Discussions**: [GitHub Discussions](https://github.com/OmniScriptOSF/omniscript-core/discussions)
228+
- **Documentation**: https://omniscriptosf.github.io
229+
- **Email**: alpha912@github.com
230+
231+
---
232+
233+
**Happy documenting with OmniScript! πŸ“**

0 commit comments

Comments
Β (0)