docs(v1.5.0): document web server, terminal UI, webhooks, and f-strings in README & update setup.nsi
This commit is contained in:
1 parent
f90ea8cdd1
commit
cf9afe103a
2 files changed
+188
-2
No files matched your search
@@ -12,7 +12,7 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://marketplace.visualstudio.com/items?itemName=AiraGroupOfTechnology.airalang"><img src="https://img.shields.io/badge/VS_Code_Marketplace-AiraLang-007ACC?logo=visualstudiocode&logoColor=white" alt="VS Code Marketplace"></a>
|
<a href="https://marketplace.visualstudio.com/items?itemName=AiraGroupOfTechnology.airalang"><img src="https://img.shields.io/badge/VS_Code_Marketplace-AiraLang-007ACC?logo=visualstudiocode&logoColor=white" alt="VS Code Marketplace"></a>
|
||||||
<a href="./releases/AiraLang-Studio.apk"><img src="https://img.shields.io/badge/Android_APK-AiraLang_Studio-3DDC84?logo=android&logoColor=white" alt="Android APK"></a>
|
<a href="./releases/AiraLang-Studio.apk"><img src="https://img.shields.io/badge/Android_APK-AiraLang_Studio-3DDC84?logo=android&logoColor=white" alt="Android APK"></a>
|
||||||
<img src="https://img.shields.io/badge/Version-v1.4.5-brightgreen" alt="Version">
|
<img src="https://img.shields.io/badge/Version-v1.5.0-brightgreen" alt="Version">
|
||||||
<img src="https://img.shields.io/badge/OS-Windows%20%7C%20Linux%20%7C%20Termux%20%7C%20Android-blue" alt="OS">
|
<img src="https://img.shields.io/badge/OS-Windows%20%7C%20Linux%20%7C%20Termux%20%7C%20Android-blue" alt="OS">
|
||||||
<img src="https://img.shields.io/badge/License-MIT-purple.svg" alt="License">
|
<img src="https://img.shields.io/badge/License-MIT-purple.svg" alt="License">
|
||||||
</p>
|
</p>
|
||||||
@@ -262,10 +262,18 @@ let target = nums.find(fn(x) { return x > 4; }); # 5
|
|||||||
let sum = nums.reduce(fn(acc, val) { return acc + val; }, 0); # 21
|
let sum = nums.reduce(fn(acc, val) { return acc + val; }, 0); # 21
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 11. Modern String Interpolation (F-Strings)
|
||||||
|
Embed dynamic expressions, variables, and calculations directly inside strings with native `f"..."` syntax:
|
||||||
|
```aira
|
||||||
|
let name = "Adam Eehan";
|
||||||
|
let score = 95;
|
||||||
|
say f"Welcome back, {name}! Your security audit score is {score + 5}/100.";
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 📦 Standard Library Modules
|
## 📦 Standard Library Modules
|
||||||
> 📚 **Detailed Documentation:** For complete syntax, parameters, and examples for all 15 built-in modules, visit the [**Modules Catalog (`modules/`)**](./modules/README.md).
|
> 📚 **Detailed Documentation:** For complete syntax, parameters, and examples for all 22 built-in modules, visit the [**Modules Catalog (`modules/`)**](./modules/README.md).
|
||||||
|
|
||||||
### 🤖 Universal AI Integration Engine (`ai`)
|
### 🤖 Universal AI Integration Engine (`ai`)
|
||||||
Directly integrate Generative AI from ANY provider in the world natively in AiraLang (OpenAI, DeepSeek, Anthropic Claude, Google Gemini, Groq, OpenRouter, Mistral, Ollama, Perplexity, Cerebras, or custom servers):
|
Directly integrate Generative AI from ANY provider in the world natively in AiraLang (OpenAI, DeepSeek, Anthropic Claude, Google Gemini, Groq, OpenRouter, Mistral, Ollama, Perplexity, Cerebras, or custom servers):
|
||||||
@@ -427,6 +435,65 @@ say "Current Time: " + time.now();
|
|||||||
import "utils.aira";
|
import "utils.aira";
|
||||||
let output = utils.my_custom_function();
|
let output = utils.my_custom_function();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### 🌐 Native Micro Web Server Engine (`serve`)
|
||||||
|
Deploy instant REST APIs, web backends, and microservices directly in AiraLang:
|
||||||
|
```aira
|
||||||
|
import "serve";
|
||||||
|
|
||||||
|
serve.get("/api/health", fn(req) {
|
||||||
|
return {"status": "healthy", "service": "AiraLang v1.5.0 Engine"};
|
||||||
|
});
|
||||||
|
|
||||||
|
serve.post("/api/echo", fn(req) {
|
||||||
|
return {"received": req.body, "sender": "Er. Adam Eehan"};
|
||||||
|
});
|
||||||
|
|
||||||
|
# Start server on port 8080
|
||||||
|
serve.start(8080);
|
||||||
|
```
|
||||||
|
|
||||||
|
### 🎨 Terminal UI & Aesthetics Suite (`term` / `ui`)
|
||||||
|
Build professional cyberpunk CLI tools with ANSI formatting, ASCII data tables, and spinners:
|
||||||
|
```aira
|
||||||
|
import "term";
|
||||||
|
|
||||||
|
say term.rainbow("⚡ Aira Group of Technology ⚡");
|
||||||
|
term.box("AiraLang v1.5.0 Full-Stack Engine", title="STATUS", color="green");
|
||||||
|
|
||||||
|
let headers = ["Module", "Category", "Status"];
|
||||||
|
let rows = [
|
||||||
|
["serve", "Web Engine", "Active"],
|
||||||
|
["sec", "Cyber OSINT", "Active"],
|
||||||
|
["term", "CLI Suite", "Active"]
|
||||||
|
];
|
||||||
|
term.table(headers, rows);
|
||||||
|
```
|
||||||
|
|
||||||
|
### 🤖 Event Webhooks & Bot Dispatcher (`webhook`, `bot`)
|
||||||
|
Automate workflows and trigger real-time notifications across Telegram & Discord:
|
||||||
|
```aira
|
||||||
|
import "webhook";
|
||||||
|
import "bot";
|
||||||
|
|
||||||
|
# 1-Line Webhook Dispatch
|
||||||
|
webhook.send("https://webhook.site/endpoint", {"event": "login", "user": "Adam"});
|
||||||
|
|
||||||
|
# Telegram & Discord Notifications
|
||||||
|
bot.telegram_send("YOUR_BOT_TOKEN", "CHAT_ID", "🚀 Deployment Successful!");
|
||||||
|
bot.discord_send("https://discord.com/api/webhooks/...", "🔥 AiraLang v1.5.0 is live!");
|
||||||
|
```
|
||||||
|
|
||||||
|
### 🔑 Environment Secrets Manager (`env` / `dotenv`)
|
||||||
|
Safely manage secrets by natively loading `.env` configuration files:
|
||||||
|
```aira
|
||||||
|
import "env";
|
||||||
|
|
||||||
|
env.load(".env");
|
||||||
|
let apiKey = env.get("GROQ_API_KEY");
|
||||||
|
let port = env.get("PORT", "8080");
|
||||||
|
```
|
||||||
|
|
||||||
# 🎬 AiraLang `youtube` Module
|
# 🎬 AiraLang `youtube` Module
|
||||||
> **YouTube Video and Audio Downloader Engine (via APM)**
|
> **YouTube Video and Audio Downloader Engine (via APM)**
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,119 @@
|
|||||||
|
; ==============================================================================
|
||||||
|
; AiraLang v1.5.0 Official Windows Setup Wizard Script
|
||||||
|
; Engineered by Adam Eehan (Aira Group of Technology)
|
||||||
|
; ==============================================================================
|
||||||
|
|
||||||
|
Unicode true
|
||||||
|
Name "AiraLang v1.5.0 (64-bit)"
|
||||||
|
OutFile "/data/data/com.termux/files/home/airalang-website/downloads/AiraLang-Setup-v1.5.0.exe"
|
||||||
|
InstallDir "$LOCALAPPDATA\Programs\AiraLang"
|
||||||
|
InstallDirRegKey HKCU "Software\AiraLang" "Install_Dir"
|
||||||
|
RequestExecutionLevel user
|
||||||
|
|
||||||
|
SetCompressor /SOLID lzma
|
||||||
|
|
||||||
|
; Pages
|
||||||
|
Page license
|
||||||
|
Page components
|
||||||
|
Page directory
|
||||||
|
Page instfiles
|
||||||
|
|
||||||
|
UninstPage uninstConfirm
|
||||||
|
UninstPage instfiles
|
||||||
|
|
||||||
|
LicenseData "LICENSE"
|
||||||
|
LicenseText "Please review the license terms before installing AiraLang v1.5.0." "I Agree"
|
||||||
|
|
||||||
|
; ==============================================================================
|
||||||
|
; Sections
|
||||||
|
; ==============================================================================
|
||||||
|
|
||||||
|
Section "AiraLang Core Engine (required)" SecCore
|
||||||
|
SectionIn RO
|
||||||
|
|
||||||
|
SetOutPath "$INSTDIR"
|
||||||
|
File "LICENSE"
|
||||||
|
File "README.md"
|
||||||
|
File "welcome.aira"
|
||||||
|
|
||||||
|
SetOutPath "$INSTDIR\src"
|
||||||
|
File /r "src\*.*"
|
||||||
|
|
||||||
|
SetOutPath "$INSTDIR\bin"
|
||||||
|
File "bin\airalang.cmd"
|
||||||
|
File "bin\airalang.bat"
|
||||||
|
File "bin\airalang.ps1"
|
||||||
|
|
||||||
|
; Store installation folder
|
||||||
|
WriteRegStr HKCU "Software\AiraLang" "Install_Dir" "$INSTDIR"
|
||||||
|
|
||||||
|
; Write Uninstaller
|
||||||
|
WriteUninstaller "$INSTDIR\uninstall.exe"
|
||||||
|
|
||||||
|
; Register in Windows Add/Remove Programs (Control Panel)
|
||||||
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "DisplayName" "AiraLang Programming Language v1.5.0"
|
||||||
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "DisplayVersion" "1.5.0"
|
||||||
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "Publisher" "Adam Eehan (Aira Group of Technology)"
|
||||||
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
||||||
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S'
|
||||||
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "InstallLocation" "$INSTDIR"
|
||||||
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "HelpLink" "https://adameehantech.gitlab.io/airalang-website"
|
||||||
|
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "URLInfoAbout" "https://adameehantech.gitlab.io/airalang-website"
|
||||||
|
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "NoModify" 1
|
||||||
|
WriteRegDWORD HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang" "NoRepair" 1
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Standard Library (22 Modules)" SecModules
|
||||||
|
SetOutPath "$INSTDIR\modules"
|
||||||
|
File /r "modules\*.*"
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Add AiraLang to User PATH" SecPath
|
||||||
|
; Read user PATH
|
||||||
|
ReadRegStr $0 HKCU "Environment" "Path"
|
||||||
|
StrCmp $0 "" PathEmpty
|
||||||
|
|
||||||
|
; Append to PATH
|
||||||
|
WriteRegStr HKCU "Environment" "Path" "$0;$INSTDIR\bin"
|
||||||
|
Goto PathDone
|
||||||
|
|
||||||
|
PathEmpty:
|
||||||
|
WriteRegStr HKCU "Environment" "Path" "$INSTDIR\bin"
|
||||||
|
|
||||||
|
PathDone:
|
||||||
|
; Broadcast environment change to Windows explorer/terminals
|
||||||
|
SendMessage 0xffff 0x001A 0 "STR:Environment" /TIMEOUT=5000
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
Section "Desktop & Start Menu Shortcuts" SecShortcuts
|
||||||
|
CreateDirectory "$SMPROGRAMS\AiraLang"
|
||||||
|
CreateShortcut "$SMPROGRAMS\AiraLang\AiraLang REPL.lnk" "$INSTDIR\bin\airalang.cmd" "" "$INSTDIR\bin\airalang.cmd" 0
|
||||||
|
CreateShortcut "$SMPROGRAMS\AiraLang\Uninstall AiraLang.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0
|
||||||
|
CreateShortcut "$DESKTOP\AiraLang REPL.lnk" "$INSTDIR\bin\airalang.cmd" "" "$INSTDIR\bin\airalang.cmd" 0
|
||||||
|
SectionEnd
|
||||||
|
|
||||||
|
; ==============================================================================
|
||||||
|
; Uninstaller Section
|
||||||
|
; ==============================================================================
|
||||||
|
|
||||||
|
Section "Uninstall"
|
||||||
|
; Remove shortcuts
|
||||||
|
Delete "$DESKTOP\AiraLang REPL.lnk"
|
||||||
|
Delete "$SMPROGRAMS\AiraLang\AiraLang REPL.lnk"
|
||||||
|
Delete "$SMPROGRAMS\AiraLang\Uninstall AiraLang.lnk"
|
||||||
|
RMDir "$SMPROGRAMS\AiraLang"
|
||||||
|
|
||||||
|
; Remove installed files
|
||||||
|
RMDir /r "$INSTDIR\src"
|
||||||
|
RMDir /r "$INSTDIR\modules"
|
||||||
|
RMDir /r "$INSTDIR\bin"
|
||||||
|
Delete "$INSTDIR\LICENSE"
|
||||||
|
Delete "$INSTDIR\README.md"
|
||||||
|
Delete "$INSTDIR\welcome.aira"
|
||||||
|
Delete "$INSTDIR\uninstall.exe"
|
||||||
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
|
; Remove registry keys
|
||||||
|
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Uninstall\AiraLang"
|
||||||
|
DeleteRegKey HKCU "Software\AiraLang"
|
||||||
|
SectionEnd
|
||||||
Reference in new issue
Block a user