first commit

This commit is contained in:
2025-05-24 18:13:05 +02:00
commit 9474ea3c12
19 changed files with 1583 additions and 0 deletions

18
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,18 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence, they will
# be requested for review when someone opens a pull request.
* @kjanat
# Specific file/directory ownership examples:
# /parser/ @parsing-expert
# /exporters/ @export-specialist
# *.go @go-reviewer
# Documentation files
/README.md @kjanat
/docs/ @kjanat
# Configuration files
/.github/ @kjanat
/go.mod @kjanat
/go.sum @kjanat

123
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@ -0,0 +1,123 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Project maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the project maintainers responsible for enforcement.
All complaints will be reviewed and investigated promptly and fairly.
All project maintainers are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Project maintainers will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from project maintainers, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>.

177
.github/CONTRIBUTING.md vendored Normal file
View File

@ -0,0 +1,177 @@
# Contributing to Articulate Rise Parser
Thank you for your interest in contributing to the Articulate Rise Parser! We welcome contributions from the community.
## Code of Conduct
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code.
## How Can I Contribute?
### Reporting Bugs
Before creating bug reports, please check existing issues as you might find that the issue has already been reported. When creating a bug report, include as many details as possible:
- Use the bug report template
- Include sample Articulate Rise content that reproduces the issue
- Provide your environment details (OS, Go version, etc.)
- Include error messages and stack traces
### Suggesting Enhancements
Enhancement suggestions are welcome! Please use the feature request template and include:
- A clear description of the enhancement
- Your use case and why this would be valuable
- Any implementation ideas you might have
### Pull Requests
1. **Fork the repository** and create your branch from `master`
2. **Make your changes** following our coding standards
3. **Add tests** for any new functionality
4. **Ensure all tests pass** by running `go test ./...`
5. **Run `go fmt`** to format your code
6. **Run `go vet`** to check for common issues
7. **Update documentation** if needed
8. **Create a pull request** with a clear title and description
## Development Setup
1. **Prerequisites:**
- Go 1.21 or later
- Git
2. **Clone and setup:**
```bash
git clone https://github.com/your-username/articulate-parser.git
cd articulate-parser
go mod download
```
3. **Run tests:**
```bash
go test -v ./...
```
4. **Build:**
```bash
go build main.go
```
## Coding Standards
### Go Style Guide
- Follow the [Go Code Review Comments](https://github.com/golang/go/wiki/CodeReviewComments)
- Use `gofmt` to format your code
- Use meaningful variable and function names
- Add comments for exported functions and types
- Keep functions focused and small
### Testing
- Write tests for new functionality
- Use table-driven tests where appropriate
- Aim for good test coverage
- Test error cases and edge conditions
### Commit Messages
Use clear and meaningful commit messages:
```txt
Add support for new content type: interactive timeline
- Parse timeline content blocks
- Export timeline data to markdown
- Add tests for timeline parsing
- Update documentation
Fixes #123
```
## Project Structure
```txt
articulate-parser/
├── main.go # Entry point and CLI handling
├── parser/ # Core parsing logic
├── exporters/ # Output format handlers
├── types/ # Data structures
├── utils/ # Utility functions
├── tests/ # Test files and data
└── docs/ # Documentation
```
## Adding New Features
### New Content Types
1. Add the content type definition to `types/`
2. Implement parsing logic in `parser/`
3. Add export handling in `exporters/`
4. Write comprehensive tests
5. Update documentation
### New Export Formats
1. Create a new exporter in `exporters/`
2. Implement the `Exporter` interface
3. Add CLI support in `main.go`
4. Add tests with sample output
5. Update README with usage examples
## Testing
### Running Tests
```bash
# Run all tests
go test ./...
# Run tests with coverage
go test -cover ./...
# Run tests with race detection
go test -race ./...
# Run specific test
go test -run TestSpecificFunction ./...
```
### Test Data
- Add sample Articulate Rise JSON files to `tests/data/`
- Include both simple and complex content examples
- Test edge cases and error conditions
## Documentation
- Update the README for user-facing changes
- Add inline code comments for complex logic
- Update examples when adding new features
- Keep the feature list current
## Release Process
Releases are handled by maintainers:
1. Version bumping follows semantic versioning
2. Releases are created from the `master` branch
3. GitHub Actions automatically builds and publishes releases
4. Release notes are auto-generated from commits
## Questions?
- Open a discussion for general questions
- Use the question issue template for specific help
- Check existing issues and documentation first
## Recognition
Contributors will be recognized in release notes and the project README. Thank you for helping make this project better!

0
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: 📖 Documentation
url: https://github.com/kjanat/articulate-parser/blob/master/README.md
about: Check the README for usage instructions and examples
- name: 💬 Discussions
url: https://github.com/kjanat/articulate-parser/discussions
about: Ask questions and discuss ideas with the community

View File

@ -0,0 +1,82 @@
name: Feature Request
description: Suggest an idea for this project
title: "[FEATURE] "
labels: ["enhancement", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to suggest a new feature!
- type: textarea
id: problem
attributes:
label: Is your feature request related to a problem?
description: A clear and concise description of what the problem is.
placeholder: I'm always frustrated when...
validations:
required: false
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
placeholder: I would like...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
placeholder: Alternative approaches...
validations:
required: false
- type: dropdown
id: category
attributes:
label: Feature Category
description: What category does this feature fall into?
options:
- Export Formats (PDF, HTML, etc.)
- Content Type Support
- Performance Improvements
- CLI/UX Improvements
- Media Handling
- Batch Processing
- Documentation
- Testing
- Other
validations:
required: true
- type: dropdown
id: priority
attributes:
label: Priority
description: How important is this feature to you?
options:
- Low - Nice to have
- Medium - Would be helpful
- High - Really need this
- Critical - Blocking my use case
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use Case
description: Describe your specific use case and how this feature would help you.
placeholder: In my workflow, I need to...
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context, screenshots, or examples about the feature request here.

57
.github/ISSUE_TEMPLATE/question.yml vendored Normal file
View File

@ -0,0 +1,57 @@
name: Question
description: Ask a question about the project
title: "[QUESTION] "
labels: ["question", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for your question! Please check the README and existing issues first.
- type: textarea
id: question
attributes:
label: Question
description: What would you like to know?
placeholder: How do I...?
validations:
required: true
- type: dropdown
id: category
attributes:
label: Question Category
description: What is your question about?
options:
- Installation/Setup
- Usage/How-to
- Supported Content Types
- Output Formats
- Troubleshooting
- Contributing
- Other
validations:
required: true
- type: textarea
id: context
attributes:
label: Additional Context
description: |
Provide any additional context that might help us answer your question:
- What you're trying to achieve
- What you've already tried
- Any error messages
- Your environment details
placeholder: I'm trying to...
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please confirm you have done the following
options:
- label: I have read the README
required: true
- label: I have searched existing issues
required: true

51
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,51 @@
## Description
<!-- Provide a brief description of the changes in this pull request -->
## Related Issue
<!-- Link to the issue this PR addresses using the syntax: Fixes #issue_number -->
Fixes #
## Type of Change
<!-- Mark the appropriate option with an "x" -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Performance improvement
- [ ] Code refactoring (no functional changes)
- [ ] Test updates
## Checklist
<!-- Mark the items you've completed with an "x" -->
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have added comments to complex logic
- [ ] I have updated the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have checked for potential breaking changes
- [ ] No new warnings are generated
- [ ] The commit message follows our guidelines
## Screenshots (if appropriate)
<!-- Add screenshots to demonstrate the changes, especially for UI changes -->
## Additional Context
<!-- Add any other context about the change here -->
## Testing Instructions
<!-- Provide steps to test the changes, if applicable -->
1.
2.
3.
## Implementation Details (optional)
<!-- Any specific implementation details that reviewers should be aware of -->

44
.github/SECURITY.md vendored Normal file
View File

@ -0,0 +1,44 @@
# Security Policy
## Supported Versions
Currently, the following versions of Articulate Rise Parser are supported with security updates:
| Version | Supported |
| ------- | ------------------ |
| 1.0.x | :white_check_mark: |
| < 1.0 | :x: |
## Reporting a Vulnerability
We take the security of Articulate Rise Parser seriously. If you believe you have found a security vulnerability, please follow these steps:
1. **Do not disclose the vulnerability publicly** - Please do not create a public GitHub issue for security vulnerabilities.
2. **Email the details to [security+articulate-parser@kjanat.com]** - Include as much information as possible about the vulnerability.
3. **Wait for a response** - We will acknowledge your email within 48 hours and provide an estimated timeline for a fix.
4. **Work with us** - We may ask for additional information to help us understand and address the issue.
## What to Include in a Report
When reporting a vulnerability, please include:
- A clear description of the issue
- Steps to reproduce the vulnerability
- The potential impact of the vulnerability
- Any possible mitigations you've identified
## What to Expect
- We will acknowledge receipt of your vulnerability report within 48 hours.
- We will provide regular updates about our progress.
- We will notify you when the vulnerability is fixed.
- With your permission, we will include your name in the acknowledgments.
## Security Measures
This project follows these security practices:
- Regular dependency updates via Dependabot
- CodeQL security scanning
- Automated testing for each pull request
- Code review requirements for all changes

34
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,34 @@
version: 2
updates:
# Check for updates to GitHub Actions
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
open-pull-requests-limit: 10
labels:
- 'dependencies'
- 'github-actions'
commit-message:
prefix: 'ci'
include: 'scope'
# Check for updates to Go modules
- package-ecosystem: 'gomod'
directory: '/'
schedule:
interval: 'weekly'
open-pull-requests-limit: 10
labels:
- 'dependencies'
- 'go'
commit-message:
prefix: 'deps'
include: 'scope'
groups:
go-modules:
patterns:
- '*'
update-types:
- 'minor'
- 'patch'

62
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,62 @@
name: CI
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.21.x, 1.22.x, 1.23.x]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: go mod download
- name: Verify dependencies
run: go mod verify
- name: Build
run: go build -v ./...
- name: Run tests
run: go test -v -race -coverprofile=coverage.out ./...
- name: Run go vet
run: go vet ./...
- name: Run go fmt
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
echo "The following files are not formatted:"
gofmt -s -l .
exit 1
fi
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.out
flags: unittests
name: codecov-umbrella
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

40
.github/workflows/codeql.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: CodeQL
on:
push:
branches: [master, develop]
pull_request:
branches: [master]
schedule:
- cron: '30 1 * * 0'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['go']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{matrix.language}}'

22
.github/workflows/dependency-review.yml vendored Normal file
View File

@ -0,0 +1,22 @@
name: Dependency Review
on: [pull_request]
permissions:
contents: read
jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
with:
fail-on-severity: moderate
comment-summary-in-pr: always
# # Use comma-separated names to pass list arguments:
# deny-licenses: LGPL-2.0, BSD-2-Clause

47
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
- name: Run tests
run: go test -v ./...
- name: Build binaries
run: |
# Build for different platforms
GOOS=windows GOARCH=amd64 go build -o articulate-parser-windows-amd64.exe main.go
GOOS=linux GOARCH=amd64 go build -o articulate-parser-linux-amd64 main.go
GOOS=darwin GOARCH=amd64 go build -o articulate-parser-darwin-amd64 main.go
GOOS=darwin GOARCH=arm64 go build -o articulate-parser-darwin-arm64 main.go
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
articulate-parser-windows-amd64.exe
articulate-parser-linux-amd64
articulate-parser-darwin-amd64
articulate-parser-darwin-arm64
generate_release_notes: true
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}