1_general_forum/currency-ledger/scripts/generate-public-pages.py

219 lines
7.2 KiB
Python
Raw Normal View History

#!/usr/bin/env python3
"""
Generate MkDocs pages for public transparency
Converts CSV ledger data into beautiful web pages
"""
import csv
import os
from datetime import datetime
def generate_book_of_owners_page():
"""Generate public Book of Owners page"""
book_file = os.path.join(os.path.dirname(__file__), '..', 'ownership', 'book-of-owners.csv')
output_file = os.path.join(os.path.dirname(__file__), '..', '..', 'docs', 'smartup-zero', 'book-of-owners.md')
with open(book_file, 'r') as f:
reader = csv.DictReader(f)
owners = [row for row in reader if row['owner_id'] and not row['owner_id'].startswith('#')]
content = f'''# 📖 Book of Owners
**Live transparency into Smartup Zero ownership and organizational structure**
*Last updated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}*
---
## Current Owners
| Owner ID | Display Name | License | Teams | Roles | SK | Status |
|----------|--------------|---------|-------|-------|----|---------| '''
for owner in owners:
content += f'''
| {owner['owner_id']} | **{owner['display_name']}** | `{owner['license_type']}` | {owner['team_memberships']} | {owner['role_assignments']} | {owner['current_sk']} | {owner['status']} |'''
content += f'''
## Organizational Statistics
- **Total Owners**: {len(owners)}
- **Active Contributors**: {len([o for o in owners if o['status'] == 'active'])}
- **Teams Formed**: {len(set([t.strip() for o in owners for t in o['team_memberships'].split(',') if t.strip()]))}
- **Roles Assigned**: {len(set([r.strip() for o in owners for r in o['role_assignments'].split(',') if r.strip()]))}
## License Distribution
'''
license_counts = {}
for owner in owners:
license_type = owner['license_type']
license_counts[license_type] = license_counts.get(license_type, 0) + 1
for license_type, count in license_counts.items():
content += f"- **{license_type.title()}**: {count} owners\n"
content += '''
## Democratic Principles
Every person listed above is an **equal co-owner** of Smartup Zero, regardless of license price paid. The license determines capabilities (what you can do), but every owner gets exactly **one vote** in governance decisions.
!!! info "Transparency Note"
This Book of Owners uses public aliases chosen by each owner. Real identities are kept private unless owners choose full public disclosure.
---
*This page automatically reflects the current state of `currency-ledger/ownership/book-of-owners.csv`*
'''
with open(output_file, 'w') as f:
f.write(content)
print(f"✅ Generated: docs/smartup-zero/book-of-owners.md")
def generate_financial_transparency_page():
"""Generate financial transparency page"""
output_file = os.path.join(os.path.dirname(__file__), '..', '..', 'docs', 'smartup-zero', 'financial-transparency.md')
live_sc = 0
pending_sc = 82200
treasury_eur = 0
content = f'''# 💰 Financial Transparency
**Complete transparency into Smartup Zero's financial health and currency system**
*Last updated: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}*
---
## Current Financial Status
- 💶 **EUR Treasury**: {treasury_eur:,.2f}
- 🪙 **Live Smartup Credits**: {live_sc:,} SC
- **Pending Validation**: {pending_sc:,} SC
- **3x Rule Status**: COMPLIANT
## Founding Work Audit
The largest pending SC amount represents the **founding entrepreneur's 10-year work audit**:
| Vesting Tranche | Amount | Validation Required | Status |
|-----------------|--------|-------------------|---------|
| **Design Phase** | 24,660 SC | Team Captains + Leadership vote | Pending |
| **Production Phase** | 32,880 SC | Community binding vote | Pending |
| **Organization Phase** | 24,660 SC | Automatic at market launch | Pending |
| **TOTAL** | **82,200 SC** | Democratic validation | **0 current liability** |
!!! warning "Democratic Safeguard"
The founding entrepreneur **cannot validate their own work**. All 82,200 SC requires approval from future Team Captains and community votes, proving that Smartup Zero's "no special founders" principle is real and enforceable.
---
*Financial health: **EXCELLENT** - No current debt, pending awards tied to collective success*
'''
with open(output_file, 'w') as f:
f.write(content)
print(f"✅ Generated: docs/smartup-zero/financial-transparency.md")
def generate_currency_system_page():
"""Generate currency system explanation page"""
output_file = os.path.join(os.path.dirname(__file__), '..', '..', 'docs', 'smartup-zero', 'currency-system.md')
content = '''# 💱 Currency System
**How Smartup Zero's dual-currency economy works**
---
## The Dual Currency Model
- 🪙 **Smartup Credits (SC)**: 1 SC = 1 treasury claim, earned through work
- **Social Karma (SK)**: Non-transferable reputation, earned through community building
## How to Earn Smartup Credits
### Task-Based Earning
- Small Task (1-2h): 25 SC
- Medium Task (3-4h): 50 SC
- Large Task (5-8h): 100 SC
- Complex Task (1-2 days): 200 SC
### Democratic Validation Process
1. Submit SC claim via pull request
2. Team Captain (Defender) reviews
3. Community lazy consensus (48h)
4. Merge = official SC award
## How to Earn Social Karma
| Activity | SK Award | Purpose |
|----------|----------|---------|
| Code Review | 5 SK | Quality assurance |
| Mentoring | 10 SK | Knowledge transfer |
| Documentation | 15 SK | Community resource |
| Governance | 20 SK | Democratic participation |
| Conflict Resolution | 25 SK | Community harmony |
### SK Privilege Thresholds
- **50 SK**: Can propose in General Forum
- **100 SK**: Eligible for Team Captain roles
- **200 SK**: Can lead mission objectives
- **500 SK**: Join Leadership Team + enhanced voting weight (max 1.5x)
## Treasury Management
### The 3x Rule
**Outstanding SC 3x EUR Treasury Balance**
This mathematical rule prevents SC inflation and ensures redemption capacity.
**Example**: 10,000 treasury Maximum 30,000 SC outstanding
### License Integration
| License | SC Earning | SK Earning | Max Daily |
|---------|------------|------------|-----------|
| Campaign | | | 25 SK |
| Watch | | | 50 SK |
| Work | | | 500 SC + 100 SK |
| Organizational | | | 500 SC + 100 SK |
---
**The result**: A currency system that rewards both individual contribution and collective success, with full democratic accountability and mathematical integrity.
'''
with open(output_file, 'w') as f:
f.write(content)
print(f"✅ Generated: docs/smartup-zero/currency-system.md")
def main():
"""Generate all public transparency pages"""
print("🌐 GENERATING PUBLIC TRANSPARENCY PAGES")
print("=" * 45)
# Create docs/smartup-zero directory if it doesn't exist
smartup_zero_dir = os.path.join(os.path.dirname(__file__), '..', '..', 'docs', 'smartup-zero')
os.makedirs(smartup_zero_dir, exist_ok=True)
generate_book_of_owners_page()
generate_financial_transparency_page()
generate_currency_system_page()
print("\n✅ All transparency pages generated!")
print("📝 Files created in docs/smartup-zero/ directory")
print("🌐 Will be visible on timeline0.org when committed")
if __name__ == "__main__":
main()