Skip to main content

Convert SVG files to Unicode block characters for terminal display

Project description

๐Ÿง  SView - SVG Viewer & PWA Launcher

XQR Integration Enabled | Universal File System | Cross-Platform

SView Version XQR Integration Platform License

SView is an advanced tool for managing, viewing, and launching SVG files as Progressive Web Apps (PWAs) with XQR memory system integration. The project combines the speed of native Rust applications with the capabilities of modern web technologies.

๐Ÿš€ Key Features

๐Ÿ“‚ SVG File Management

  • Fast Scanning - Efficient disk scanning using parallel processing
  • Smart Thumbnails - Automatic UTF-8 icon generation based on SVG content
  • System Integration - Native integration with Linux/Windows/macOS
  • XQR Support - Recognition and handling of SVG files with XQR extensions

๐Ÿง  XQR Memory System

  • Factual Memory - Long-term storage of preferences and settings
  • Episodic Memory - History of file and application interactions
  • Semantic Memory - Semantic relationships between files
  • Working Memory - Temporary session memory

๐ŸŒ PWA Launching

  • App Mode - Launch SVGs as full-fledged PWAs
  • Offline Support - Functionality without internet connection
  • Responsive Interface - Automatic adaptation to different screen sizes
  • Native Look & Feel - Interface that resembles native applications

โšก Programming Language Support

  • JavaScript/Node.js - Direct JS code execution
  • Python - Python script execution
  • Rust - Rust code compilation and execution
  • Go, Ruby, PHP - Additional language support

๐Ÿ› ๏ธ Installation

Prerequisites

  • Rust 1.70+ (for building from source)
  • Cargo (Rust's package manager)
  • Git (for cloning the repository)

Building from Source

# Clone the repository
git clone https://github.com/veridock/sview.git
cd sview

# Build in release mode
cargo build --release

# The binary will be available at ./target/release/sview

Quick Start

# Make the binary executable
chmod +x target/release/sview

# Add to PATH (temporary for current session)
export PATH="$PWD/target/release:$PATH"

# Verify installation
sview --version

System Installation (Optional)

# Install system-wide (requires root)
sudo cp target/release/sview /usr/local/bin/

# Create configuration directory
mkdir -p ~/.sview/{cache,config,logs}

๐Ÿ–ฅ๏ธ Usage

Viewing SVGs

Basic Viewing

# View an SVG file with default size (40x20 characters)
sview view example.svg

# View with custom dimensions
sview view example.svg --width 80 --height 30

# Open SVG in default web browser
sview view example.svg --browser

Directory Operations

# List SVG files in a directory
sview list /path/to/svgs

# Detailed listing with file information
sview list /path/to/svgs --long

# Recursively search for SVGs
sview list /path/to/search --recursive

Advanced Features

Search and Filter

# Search for SVGs by name
sview search "icon" /path/to/search

# Filter by size
sview list /path/to/svgs --min-size 1M --max-size 10M

# Find recently modified files
sview list /path/to/svgs --modified-within 7d

Batch Processing

# Convert multiple SVGs to ASCII art
for svg in *.svg; do
    echo "Rendering $svg"
    sview view "$svg" --width 60 --no-color > "${svg%.svg}.txt"
done

Integration with Other Tools

fzf Integration

# Interactive file selection with preview
export FZF_DEFAULT_OPTS='--preview "sview view {} --width 40 --height 15 --no-color 2>/dev/null || echo \"Not an SVG file\""'
selected=$(find . -type f | fzf)
[ -n "$selected" ] && sview view "$selected"

File Manager Integration

Add this to your ~/.bashrc or ~/.zshrc to use with ranger file manager:

# Ranger integration
export VISUAL="sview view"
alias ranger='ranger --choosedir=$HOME/.rangerdir; LASTDIR=`cat $HOME/.rangerdir`; cd "$LASTDIR"'

Rendering Options

Option Description Default
--width <N> Set output width in characters 40
--height <N> Set output height in characters 20
--mini Show single-character representation false
--browser Open in default web browser false
--no-color Disable color output false
--invert Invert colors false
--format <fmt> Output format (text, json, yaml) text

Configuration

SView can be configured using a configuration file located at ~/.config/sview/config.toml:

[rendering]
width = 60
height = 30
character_set = " .,:;+*?%S#@"
color = true

[directories]
# Add custom search paths
search_paths = [
    "~/.local/share/icons",
    "/usr/share/icons"
]

[memory]
enabled = true
cache_size = "1GB"

๐Ÿ“ฆ Installation Methods

Prerequisites

  • Rust 1.70 or later
  • Cargo (Rust's package manager)
  • Git (for source installation)
  • Build essentials for your platform

Quick Installation

Using Cargo (Recommended)

# Install or update
cargo install sview-cli --locked

From Source

# Clone the repository
git clone https://github.com/veridock/sview.git
cd sview

# Build in release mode
cargo build --release

# Install system-wide (requires root)
sudo cp target/release/sview /usr/local/bin/

Package Manager Installation

Linux

# Arch Linux (AUR)
yay -S sview

# Debian/Ubuntu (coming soon)
# sudo apt install sview

# Fedora (coming soon)
# sudo dnf install sview

macOS

# Using Homebrew
brew tap veridock/sview
brew install sview

Windows

# Using Chocolatey (coming soon)
# choco install sview

# Using Scoop
scoop bucket add sview https://github.com/veridock/sview.git
scoop install sview

Post-Installation

Set Up Configuration

# Create config directory
mkdir -p ~/.config/sview

# Generate default config
sview config generate > ~/.config/sview/config.toml

# Verify installation
sview --version

Shell Completions

# Generate completions for your shell
# Bash
sview completions bash > /etc/bash_completion.d/sview

# Zsh
sview completions zsh > "${fpath[1]}/_sview"

# Fish
sview completions fish > ~/.config/fish/completions/sview.fish

Development Installation

For developers who want to contribute or modify SView:

# Clone the repository
git clone https://github.com/veridock/sview.git
cd sview

# Install development dependencies
rustup component add rustfmt clippy

# Build in development mode
cargo build

# Run tests
cargo test

# Run with logging
RUST_LOG=debug cargo run -- --help

Updating

To update an existing installation:

# If installed via Cargo
cargo install sview-cli --force

# If installed from source
cd /path/to/sview
git pull
cargo build --release
sudo cp target/release/sview /usr/local/bin/

Uninstallation

# Remove binary
sudo rm /usr/local/bin/sview

# Remove configuration files (optional)
rm -rf ~/.config/sview
rm -rf ~/.cache/sview
rm -rf ~/.local/share/sview

๐ŸŽฏ Usage Examples

Basic Commands

Viewing SVGs

# View a single SVG file
sview view image.svg

# View with custom dimensions
sview view image.svg --width 80 --height 40

# Open in default web browser
sview view image.svg --browser

File Management

# List all SVG files in current directory
sview list

# Detailed listing with file information
sview list --long

# List files in a specific directory
sview list /path/to/svgs

# Recursive search in subdirectories
sview list --recursive

# Filter by file size
sview list --min-size 1M --max-size 10M

# Show recently modified files
sview list --modified-within 7d

Advanced Usage

Searching and Filtering

# Search by filename
sview search "icon"

# Search in specific directory
sview search "icon" /path/to/search

# Case-insensitive search
sview search -i "logo"

# Search with regular expressions
sview search --regex "icon-.*"

Batch Processing

# Convert multiple SVGs to text
for file in *.svg; do
    sview view "$file" --width 60 > "${file%.svg}.txt"
done

# Create thumbnails for all SVGs in a directory
mkdir -p thumbnails
sview list --recursive /path/to/svgs | xargs -I{} sview view "{}" --width 20 --height 10 > thumbnails/{}_thumb.txt

Integration with Other Tools

fzf Integration
# Interactive file selection with preview
export FZF_DEFAULT_OPTS='--preview "sview view {} --width 60 --height 20"'
selected=$(sview list --recursive | fzf)
[ -n "$selected" ] && sview view "$selected"
Ranger File Manager

Add to ~/.config/ranger/rc.conf:

map sv shell sview view %s
map sV shell -p sview view %s

Common Use Cases

Quick Preview in Terminal

# Quick preview of an SVG
sview view file.svg

# Preview with custom character set
sview view file.svg --chars " .:-=+*#%@"

# Invert colors for light backgrounds
sview view file.svg --invert

File Operations

# Find and view the largest SVG file
sview list --sort size -r | head -n 1 | xargs sview view

# Find duplicate SVG files
sview list --checksum | sort | uniq -w 32 -d

# Clean up temporary files
sview clean --older-than 30d

Help and Documentation

# Show general help
sview --help

# Show help for specific command
sview list --help
sview view --help
sview search --help

# Show version information
sview --version

# Generate shell completions
sview completions bash  # or zsh, fish, etc.

โš™๏ธ Configuration

SView can be configured using a TOML configuration file, environment variables, or command-line arguments. Settings are applied in this order of precedence:

  1. Command-line arguments
  2. Environment variables
  3. Configuration file
  4. Default values

Configuration File

By default, SView looks for a configuration file at ~/.config/sview/config.toml. You can generate a default configuration:

mkdir -p ~/.config/sview
sview config generate > ~/.config/sview/config.toml

Example Configuration

[rendering]
# Character set for ASCII/UTF-8 rendering (dark to light)
character_set = " .,:;+*?%S#@"

# Default dimensions for terminal output
width = 40
height = 20

# Enable/disable colored output
color = true

# Invert colors (for light backgrounds)
invert = false

[directories]
# Additional directories to search for SVGs
search_paths = [
    "~/.local/share/icons",
    "/usr/share/icons",
    "/path/to/your/svgs"
]

# Maximum recursion depth when searching directories
max_depth = 10

[memory]
# Enable/disable memory system
enabled = true

# Maximum cache size (e.g., 1GB, 500MB)
cache_size = "1GB"

# Path to memory database
# database_path = "~/.local/share/sview/memory.db"

[plugins]
# Enable/disable plugins
enabled = true

# List of plugins to load
# active_plugins = ["git", "metadata", "preview"]

Environment Variables

You can override any setting using environment variables:

# Set default dimensions
export SVIEW_WIDTH=80
export SVIEW_HEIGHT=30

# Custom character set
export SVIEW_CHARS=" .:-=+*#%@"

# Enable/disable features
export SVIEW_COLOR=1
export SVIEW_INVERT=0

# Memory settings
export SVIEW_MEMORY_ENABLED=1
export SVIEW_CACHE_SIZE="2GB"

๐Ÿ”ง Advanced Usage

Memory System

SView includes a powerful memory system for storing and recalling information:

# Store a fact
sview memory --store "user_preference" "dark_theme"

# Recall a fact
sview memory --recall "user_preference"

# List all memories
sview memory --list

# Export memories to JSON
sview memory --export > memories.json

# Import memories from JSON
sview memory --import memories.json

Plugins

Extend SView's functionality with plugins:

# List available plugins
sview plugins list

# Enable a plugin
sview plugins enable git

# Disable a plugin
sview plugins disable git

# Get plugin information
sview plugins info git

API Integration

SView can be used as a library in your Rust projects:

use sview::{SvgViewer, RenderOptions};

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let svg_content = std::fs::read_to_string("example.svg")?;
    let options = RenderOptions {
        width: 80,
        height: 30,
        color: true,
        ..Default::default()
    };
    
    let output = SvgViewer::new()
        .with_options(options)
        .render(&svg_content)?;
        
    println!("{}", output);
    Ok(())
}

๐Ÿš€ Performance Tips

  1. Use the latest version - Performance improvements are regularly added
  2. Enable caching - Reduces redundant processing
  3. Optimize your SVGs - Use tools like SVGO to clean up SVGs
  4. Use appropriate dimensions - Larger dimensions require more processing
  5. Consider using --no-color for faster rendering in scripts

๐Ÿ“š Additional Resources

๐Ÿค Contributing

Contributions are welcome! Please see our Contributing Guide for details.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ” Viewing File Details

# Show detailed file information
sview view -l  # or --long

๐Ÿ” Advanced File Operations

Sorting and Filtering

# Sort by size (smallest first)
sview view --sort=size

# Sort by modification time (newest first)
sview view --sort=modified -r

# Limit search depth
sview view --depth=2

Integration with Other Tools

# Find and display SVGs using find
find ~/ -name "*.svg" -type f -exec sview view {} \;

# Count SVG files in a directory
sview view /directory | wc -l

# Search and display specific files
sview view /directory | grep pattern

Advanced Scripting

# Display only icons (without paths)
sview view /directory | awk '{print $1}'

# Generate an HTML file with SVG previews
echo "<html><body>" > previews.html
sview view /directory --long >> previews.html
echo "</body></html>" >> previews.html

# Process SVGs in a script
for svg in $(find . -name "*.svg"); do
    echo -n "$svg: "
    sview view "$svg"
done

Supported File Types

SView automatically detects SVG file types and displays appropriate icons:

  • ๐Ÿ“Š - Charts and diagrams
  • โญ• - Circular elements (buttons, icons)
  • ๐Ÿ“ - Directories
  • ๐Ÿ“„ - Documents
  • ๐Ÿ–ผ๏ธ - Images
  • ๐Ÿ” - Search
  • โš™๏ธ - Settings
  • ๐Ÿ“ฅ - Downloads/Uploads

Browser Preview

# Open SVG in default browser
sview view example.svg --browser

# Set custom preview size in browser
sview view example.svg --browser --width 1024 --height 768

Getting Help

# Show help for view command
sview view --help

Note: By default, sview view displays a UTF-8 icon representing the SVG content. To open the file in a browser, use the --browser flag.

๐Ÿ’พ Memory Management

# List all memory entries
sview memory list

# Add a new memory entry
sview memory add --key user.preferences.theme --value dark

# Retrieve a value from memory
sview memory get --key user.preferences.theme

# Remove a memory entry
sview memory remove --key user.preferences.theme

# Show memory command help
sview memory --help

Note: The SView memory system stores user preferences and settings. Keys should be organized hierarchically using dots as separators (e.g., user.preferences.theme).

๐Ÿ” System Diagnostics

Interactive Shell and Diagnostics

# Start interactive shell
sview shell

# Display system information
sview system info

# Check system requirements
sview system check

# Clean temporary files
sview system clean

# Show system command help
sview system --help

Diagnostic Examples

# Verify system meets requirements
sview system check

# Clean temporary files and cache
sview system clean

# Get detailed system information
sview system info

๐Ÿ”Ž File Search with sview list

The sview list command allows you to display SVG files with various sorting and formatting options.

Basic Usage

# List all SVG files in current directory
sview list

# List files in a specific directory
sview list /path/to/directory

# Show detailed information
sview list -l
sview list --long

# Sort results
sview list -s name     # by name (default)
sview list -s size     # by file size
sview list -s modified # by modification time

# Reverse sort order
sview list -r
sview list --reverse

# Filter by file type
sview list -f svg    # SVG files only (default)
sview list -f xml     # XML files

Practical Examples

# List files sorted by size (largest first)
sview list -s size -r

# Show detailed information about XML files
sview list -f xml -l

# List files in user's home directory
sview list ~

# Export thumbnails to directory
sview list --export-thumbnails=output_directory/

# Find SVG files with syntax errors
sview list --check-validity

# Search for SVGs with specific dominant color
sview list --dominant-color="#FF5733" --tolerance=10

File System Integration

# Advanced search using find
find . -type f -name "*.svg" -exec sview list -l {} \; | sort -k5 -n

# Interactive search with fzf
sview list | fzf --preview 'sview view {}'

# Search file contents with ripgrep
sview list | xargs rg -l "@import"

# Create a terminal preview
sview list --preview | less -R

Tool Integration

# Search within SVG files
sview list | xargs grep -l "keyword"

# Remove temporary files older than 30 days
sview list --format=tmp --min-age=30 | xargs rm -f

# Calculate total size of SVG files
sview list -l | awk '{sum += $1} END {print sum}'

๐Ÿ†˜ Help

sview --help
sview --version

โš™๏ธ Advanced Options

# Scan with depth limit
sview ls --depth 5

# Export file list
sview ls --export json > files.json
sview ls --export csv > files.csv

# Filter by type
sview ls --sview-only          # sView-enhanced files only
sview ls --interactive         # Interactive SVGs only
sview ls --pwa-capable         # PWA-capable SVGs only

# Run code in different languages
sview exec javascript "console.log('Hello from JS!')"
sview exec python "print('Hello from Python!')"
sview exec rust "fn main() { println!(\"Hello from Rust!\"); }"

# Work with sView memory
sview memory --store "user_preference" "dark_theme"
sview memory --recall "user_preference"
sview memory --export json > my_memory.json

# Watch for changes
sview watch ~/projects/

Working with sView Files

# Create a new sView file
sview create --template dashboard --name "my-dashboard"

# Convert SVG to sView format
sview convert input.svg --output enhanced.sview

# Validate sView file
sview validate my-file.sview

# Optimize files
sview optimize --compress --encrypt my-file.sview

๐ŸŽจ Graphical Interface

SView offers both command-line and graphical interfaces:

GUI Features

  • Grid/List View - Toggle between grid and list layouts
  • Live Preview - Real-time thumbnail generation
  • Search - Filter files by name and path
  • Statistics - File count, size, and type information
  • Drag & Drop - Easy file import via drag and drop
  • Batch Operations - Perform actions on multiple files at once

Launching the GUI

# Electron-based GUI
sview-gui

# Web-based interface
sview serve --port 8080
# Then open http://localhost:8080 in your browser

# System tray mode (Linux/Windows)
sview --tray

๐Ÿ”ง Configuration

Main Configuration File (~/.sview/config/config.toml)

[general]
version = "1.0.0"
scan_depth = 10              # Maximum scan depth
cache_thumbnails = true      # Cache thumbnails
auto_update = true          # Enable automatic updates

[browser]
command = "chromium"        # Browser command
flags = [                   # Launch flags
    "--app",
    "--new-window", 
    "--disable-web-security",
    "--allow-file-access-from-files"
]

[performance]
parallel_scan = true        # Enable parallel scanning
max_threads = 0            # 0 = auto-detect
memory_limit = "512MB"     # Memory limit
cache_size = "100MB"       # Cache size

[sview]
enabled = true             # Enable sView support
memory_encryption = true   # Enable memory encryption
auto_enhance = false       # Auto-enhance SVGs
compression = "gzip"       # Compression algorithm

[security]
encryption_algorithm = "AES-256-GCM"
key_derivation = "Argon2id"
audit_trail = true         # Enable audit logging
data_classification = "internal"

[languages]
supported = [
    "javascript", "python", "rust", 
    "go", "ruby", "php", "bash"
]

[ui]
default_columns = 4        # Default number of columns
default_view = "grid"      # "grid" or "list"
theme = "auto"             # "light", "dark", or "auto"
animations = true          # Enable UI animations

[paths]
scan_paths = [             # Paths to scan
    "~/Documents",
    "~/Projects", 
    "~/Desktop"
]
exclude_paths = [          # Excluded directories
    "node_modules",
    ".git",
    "target"
]

Environment Variables

export SVIEW_CONFIG_DIR="~/.sview"
export SVIEW_CACHE_DIR="~/.sview/cache"
export SVIEW_LOG_LEVEL="info"
export SVIEW_BROWSER="firefox"
export SVIEW_PARALLEL_THREADS="8"

๐Ÿ“Š Usage Examples

1. Simple Chart SVG

<!-- simple-chart.svg -->
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="300">
  <rect width="400" height="300" fill="#f8f9fa"/>
  <text x="200" y="30" text-anchor="middle" font-family="Arial" font-size="18">
    Sales Chart
  </text>
  
  <!-- Data bars -->
  <rect x="50" y="200" width="40" height="80" fill="#4CAF50"/>
  <rect x="120" y="150" width="40" height="130" fill="#2196F3"/>
  <rect x="190" y="100" width="40" height="180" fill="#FF9800"/>
  <rect x="260" y="170" width="40" height="110" fill="#E91E63"/>
</svg>

Run with:

sview simple-chart.svg

2. sView Enhanced Dashboard

<!-- dashboard.svg -->
<svg xmlns="http://www.w3.org/2000/svg" 
     xmlns:sview="http://sview.veridock.com/schema/v1"
     sview:enhanced="true" width="800" height="600">
  
  <metadata>
    <sview:memory>
      <sview:factual>{"user": "demo", "preferences": {"theme": "dark"}}</sview:factual>
      <sview:working>{"currentView": "dashboard"}</sview:working>
    </sview:memory>
    
    <sview:config>
      {
        "version": "1.0",
        "interactive": true,
        "pwa_capable": true,
        "memory_enabled": true
      }
    </sview:config>
  </metadata>
  
  <!-- Interactive content -->
  <g sview:interactive="true" sview:data-binding="sales_data">
    <!-- Dashboard widgets -->
  </g>
  
  <script type="application/javascript">
    // sView Enhanced functionality
    window.sviewMemory = {
      factual: { user: "demo", preferences: { theme: "dark" } },
      working: { currentView: "dashboard" },
      episodic: [],
      semantic: []
    };
    
    console.log('๐Ÿง  sView Enhanced Dashboard initialized');
  </script>
</svg>

3. Interactive Game

<!-- pong-game.svg -->
<svg xmlns="http://www.w3.org/2000/svg" 
     xmlns:sview="http://sview.veridock.com/schema/v1"
     sview:enhanced="true" width="600" height="400">
  
  <metadata>
    <sview:memory>
      <sview:factual>{"highScore": 0, "player": "guest"}</sview:factual>
      <sview:working>{"gameState": "ready", "score": 0}</sview:working>
    </sview:memory>
  </metadata>
  
  <!-- Game elements -->
  <rect width="600" height="400" fill="#1a1a1a"/>
  <rect id="leftPaddle" x="20" y="150" width="10" height="100" fill="white"/>
  <rect id="rightPaddle" x="570" y="150" width="10" height="100" fill="white"/>
  <circle id="ball" cx="300" cy="200" r="8" fill="white"/>
  
  <script type="application/javascript">
    // Simple Pong game implementation
    // ... (game logic)
  </script>
</svg>

๐Ÿง  sView Memory System

Memory Types

  1. Factual Memory - Long-term factual knowledge

    • User preferences
    • Application settings
    • Configuration data
  2. Episodic Memory - Event history over time

    • File access history
    • User interactions
    • Session context
  3. Semantic Memory - Semantic relationships

    • Vector embeddings
    • File relationships
    • Categories and tags
  4. Working Memory - Session working memory

    • Current application state
    • Temporary data
    • Task context

Memory API

# Store in memory
sview memory store factual "user_theme" "dark"
sview memory store episodic "file_opened" "dashboard.svg"

# Search memory
sview memory recall "user_theme"
sview memory search "dashboard" --type semantic

# Export/import memory
sview memory export --format json > memory_backup.json
sview memory import memory_backup.json

# Memory analysis
sview memory analyze --stats
sview memory compress --threshold 0.8

๐Ÿ›ก๏ธ Security

Data Encryption

SView uses modern encryption algorithms:

  • AES-256-GCM - Symmetric encryption
  • Argon2id - Key derivation
  • Ed25519 - Digital signatures
  • X25519 - Key exchange

Security Configuration

[security]
encryption_algorithm = "AES-256-GCM"
key_derivation = "Argon2id"
key_rotation = true
hardware_security = true    # HSM/TEE when available

[privacy]
data_classification = "internal"
retention_policy = "1_year"
anonymization = true
audit_trail = true

[compliance]
gdpr = true
hipaa = false
sox = false

Security Audit

# Security check (requires cargo-audit)
cargo audit

# Check GUI dependencies (in GUI directory)
cd gui && npm audit

# Integrity check
sview security verify --all

# Security report
sview security report > security_report.json

๐Ÿš€ Performance

Optimizations

  • Parallel processing - Multi-threaded disk scanning
  • Lazy loading - On-demand loading
  • Caching - Intelligent result caching
  • Memory mapping - Efficient memory management
  • SIMD optimizations - Vector optimizations

Benchmarks

Operation Time Notes
Scan 1000 files < 100ms SSD, parallel
Thumbnail generation < 5ms Cache miss
PWA launch < 200ms Cold start
Semantic search < 50ms 1000 embeddings

Performance Monitoring

# Performance statistics
sview perf stats

# Profiling
sview perf profile --duration 30s

# Benchmark
sview perf benchmark --iterations 100

# Resource monitoring
sview perf monitor --live

๐Ÿ”Œ Extensions and Plugins

Available Plugins

  1. Cloud Sync - Cloud synchronization
  2. AI Integration - AI model integration
  3. Version Control - File versioning
  4. Collaboration - Real-time collaboration
  5. Export Formats - Additional export formats

Plugin Installation

# Install from repository
sview plugin install cloud-sync
sview plugin install ai-integration

# Install locally
sview plugin install ./my-plugin.spx

# List plugins
sview plugin list

# Configuration
sview plugin config cloud-sync --provider aws

Creating Custom Plugins

// Plugin API
use sview_plugin::{Plugin, PluginResult, PluginCapability};

#[derive(Debug)]
pub struct MyPlugin;

impl Plugin for MyPlugin {
    fn name(&self) -> &str { "my-plugin" }
    fn version(&self) -> &str { "1.0.0" }
    
    fn capabilities(&self) -> Vec<PluginCapability> {
        vec![
            PluginCapability::FileFormatSupport,
            PluginCapability::MemoryProvider,
        ]
    }
    
    fn execute(&self, command: PluginCommand) -> PluginResult {
        // Plugin logic
        Ok(PluginResponse::Success)
    }
}

๐Ÿ“š API Reference

CLI API

sview [OPTIONS] [FILE] [SUBCOMMAND]

OPTIONS:
    -h, --help       Show help
    -V, --version    Show version
    -v, --verbose    Verbose mode
    -q, --quiet      Quiet mode
    --config <FILE>  Configuration file

SUBCOMMANDS:
    ls              List SVG files
    exec            Execute code
    memory          Memory operations
    config          Configuration
    plugin          Plugin management
    server          Start web server
    watch           Monitor for changes

REST API (Server Mode)

# Start server
sview serve --port 8080 --api

# API Endpoints
GET    /api/files           # List files
POST   /api/files/:id/run   # Run file
GET    /api/memory          # Memory data
POST   /api/memory          # Save to memory
GET    /api/stats           # Statistics

JavaScript API (PWA)

// sView Memory API
const memory = window.sviewMemory;

// Store in memory
memory.store('factual', 'user_preference', { theme: 'dark' });

// Retrieve from memory
const preference = memory.recall('factual', 'user_preference');

// History
memory.episodic.push({
  timestamp: new Date().toISOString(),
  event: 'user_action',
  data: { action: 'button_click', target: 'save' }
});

// Semantic search
const results = await memory.semanticSearch('dashboard', 0.8);

๐Ÿ”„ CI/CD and Development

Project Structure

sview/
โ”œโ”€โ”€ src/                    # Rust source code
โ”‚   โ”œโ”€โ”€ main.rs            # Main CLI file
โ”‚   โ”œโ”€โ”€ scanner.rs         # Scanning module
โ”‚   โ”œโ”€โ”€ launcher.rs        # PWA launcher module
โ”‚   โ”œโ”€โ”€ memory/            # sView memory system
โ”‚   โ””โ”€โ”€ gui.rs             # Graphical interface
โ”œโ”€โ”€ gui/                   # React frontend
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ package.json
โ”œโ”€โ”€ plugins/               # Plugins
โ”œโ”€โ”€ examples/              # Example files
โ”œโ”€โ”€ tests/                 # Tests
โ”œโ”€โ”€ docs/                  # Documentation
โ”œโ”€โ”€ scripts/               # Utility scripts
โ”œโ”€โ”€ Cargo.toml            # Rust configuration
โ”œโ”€โ”€ package.json          # Node.js configuration
โ””โ”€โ”€ README.md

Development Setup

# Clone the repository
git clone https://github.com/veridock/sview.git
cd sview

# Install dependencies
cargo build
npm install

# Run in development mode
cargo run -- ls
npm run dev  # for GUI

# Run tests
cargo test
npm test

# Code formatting
cargo fmt
npm run format

# Linting
cargo clippy
npm run lint

GitHub Actions

# .github/workflows/ci.yml
name: CI/CD Pipeline

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: stable
      - run: cargo test --all-features
      
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
    steps:
      - uses: actions/checkout@v3
      - run: cargo build --release
      
  release:
    if: startsWith(github.ref, 'refs/tags/')
    needs: [test, build]
    runs-on: ubuntu-latest
    steps:
      - run: cargo publish

๐Ÿค Contributing

How to Help

  1. Report Bugs - Use GitHub Issues
  2. Feature Requests - Suggest new features
  3. Code - Submit pull requests
  4. Documentation - Improve documentation
  5. Tests - Add automated tests
  6. Translations - Help with localization

Guidelines

  • Use conventional commits
  • Write tests for new code
  • Update documentation
  • Follow code style (rustfmt)
  • Run clippy before PR

Roadmap

v1.1 (Q3 2025)

  • AI Models Integration (OpenAI, Anthropic)
  • Cloud synchronization
  • Mobile app (React Native)
  • Plugin marketplace

v1.2 (Q4 2025)

  • Real-time collaboration
  • Version control integration
  • Advanced analytics
  • Enterprise features

v2.0 (2026)

  • Distributed memory system
  • Blockchain integration
  • VR/AR support
  • Quantum-ready encryption

๐Ÿ“„ License

Apache License - see LICENSE for details.

๐Ÿ™ Acknowledgments

  • sView Team - Core architecture and specification
  • Rust Community - Technical support
  • SVG Working Group - SVG standards
  • PWA Community - Best practices

๐Ÿ“ž Contact


SView - Where SVG meets PWA meets AI ๐Ÿš€๐Ÿง โœจ

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

svg2unicode-0.1.5.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

svg2unicode-0.1.5-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file svg2unicode-0.1.5.tar.gz.

File metadata

  • Download URL: svg2unicode-0.1.5.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.12 Linux/6.15.4-200.fc42.x86_64

File hashes

Hashes for svg2unicode-0.1.5.tar.gz
Algorithm Hash digest
SHA256 5144c482519a1690789edd79f933af50ff7e86c77a8e66717ac2f77fae2a1e31
MD5 357bce102cd45ba273908dd3238a3c27
BLAKE2b-256 804e47cc5268357bc936aba3733f2fd175272c1e4f4f847616c355ee030da396

See more details on using hashes here.

File details

Details for the file svg2unicode-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: svg2unicode-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.12 Linux/6.15.4-200.fc42.x86_64

File hashes

Hashes for svg2unicode-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 650243dde31d66ce268028da318f12889566c8df8ef7b0012f1e2e90850973e0
MD5 bdb46b7a98cffd5bf656ec35d82a12dd
BLAKE2b-256 2246d9b238410a6ca0b38c7dd1fbfd60d61768cb708fe846936a1edcf288dd37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page