Docs & Roadmap updates
This commit is contained in:
167
Getting Started/README.md
Normal file
167
Getting Started/README.md
Normal file
@@ -0,0 +1,167 @@
|
||||
## Easy Installation Guide for Content Creators
|
||||
|
||||
### Step 1: Install Python 3.11
|
||||
1. Download Python 3.11 installer:
|
||||
- Visit [Python 3.11.6 Download Page](https://www.python.org/downloads/release/python-3116/)
|
||||
- Scroll down and click on "Windows installer (64-bit)"
|
||||
- Save the file to your computer
|
||||
|
||||
2. Run the installer:
|
||||
- Double click the downloaded file
|
||||
- ✅ IMPORTANT: Check "Add Python 3.11 to PATH"
|
||||
- Click "Install Now"
|
||||
- Wait for installation to complete
|
||||
- Click "Close"
|
||||
|
||||
### Step 2: Install ALwrity
|
||||
1. Download this project:
|
||||
- Click the green "Code" button above
|
||||
- Select "Download ZIP"
|
||||
- Extract the ZIP file to your desired location
|
||||
|
||||
2. Open Command Prompt:
|
||||
- Press Windows + R
|
||||
- Type "cmd" and press Enter
|
||||
- Navigate to the extracted folder:
|
||||
```
|
||||
cd path\to\ALwrity
|
||||
```
|
||||
|
||||
3. Run the automatic installer:
|
||||
```
|
||||
python setup.py install
|
||||
```
|
||||
|
||||
### Troubleshooting
|
||||
If you encounter any issues:
|
||||
1. Make sure Python 3.11 is installed correctly:
|
||||
- Open Command Prompt
|
||||
- Type: `python --version`
|
||||
- Should show: `Python 3.11.x`
|
||||
|
||||
2. Common Issues:
|
||||
- If you see "Python is not recognized": Restart your computer
|
||||
- If you get package errors: Run `pip install --upgrade pip` first
|
||||
|
||||
Need help? [Open an issue](../../issues) and we'll assist you!
|
||||
|
||||
## For Developers
|
||||
If you're a developer or want to contribute:
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/yourusername/ALwrity.git
|
||||
|
||||
# Create virtual environment
|
||||
python -m venv venv
|
||||
|
||||
# Activate virtual environment
|
||||
# On Windows:
|
||||
.\venv\Scripts\activate
|
||||
# On Mac/Linux:
|
||||
source venv/bin/activate
|
||||
|
||||
# Install dependencies
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
# ALwrity - AI Content Writing Assistant
|
||||
|
||||
## Quick Start Guide for Non-Technical Users
|
||||
|
||||
### Option 1: One-Click Installation (Recommended)
|
||||
1. Download this project:
|
||||
- Click the green "Code" button above
|
||||
- Select "Download ZIP"
|
||||
- Extract the ZIP file to your desired location (e.g., Desktop)
|
||||
|
||||
2. Run the installer:
|
||||
- Double-click `install.bat` in the extracted folder
|
||||
- If Windows asks for permission, click "Yes"
|
||||
- Follow the on-screen instructions
|
||||
- Wait for the installation to complete
|
||||
|
||||
3. Start ALwrity:
|
||||
- Open Command Prompt (Windows + R, type "cmd", press Enter)
|
||||
- Navigate to the ALwrity folder:
|
||||
```
|
||||
cd path\to\ALwrity
|
||||
```
|
||||
- Type `alwrity` and press Enter
|
||||
|
||||
### Option 2: Manual Installation
|
||||
If the one-click installer doesn't work, follow these steps:
|
||||
|
||||
1. Install Python 3.11:
|
||||
- Visit [Python 3.11.6 Download Page](https://www.python.org/downloads/release/python-3116/)
|
||||
- Click "Windows installer (64-bit)"
|
||||
- Run the installer
|
||||
- ✅ IMPORTANT: Check "Add Python 3.11 to PATH"
|
||||
- Click "Install Now"
|
||||
- Wait for installation to complete
|
||||
|
||||
2. Install ALwrity:
|
||||
- Open Command Prompt (Windows + R, type "cmd", press Enter)
|
||||
- Navigate to the ALwrity folder:
|
||||
```
|
||||
cd path\to\ALwrity
|
||||
```
|
||||
- Run the installation:
|
||||
```
|
||||
python setup.py install
|
||||
```
|
||||
- Follow any on-screen instructions
|
||||
|
||||
3. Start ALwrity:
|
||||
- In the same Command Prompt window, type:
|
||||
```
|
||||
alwrity
|
||||
```
|
||||
- Press Enter
|
||||
|
||||
### Troubleshooting Guide
|
||||
|
||||
#### Common Issues and Solutions:
|
||||
|
||||
1. "Python is not recognized"
|
||||
- Solution: Restart your computer after installing Python
|
||||
- Make sure you checked "Add Python 3.11 to PATH" during installation
|
||||
|
||||
2. "Visual C++ Build Tools not found"
|
||||
- Solution: Run this command in an administrative PowerShell:
|
||||
```
|
||||
winget install Microsoft.VisualStudio.2022.BuildTools --silent --override "--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"
|
||||
```
|
||||
|
||||
3. "Rust compiler not found"
|
||||
- Solution: Run these commands in PowerShell:
|
||||
```
|
||||
Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile rustup-init.exe
|
||||
./rustup-init.exe -y
|
||||
```
|
||||
|
||||
4. Installation Errors
|
||||
- Check the `install_errors.log` file in the ALwrity folder
|
||||
- Share the error message with our support team
|
||||
|
||||
#### Need Help?
|
||||
- Open an issue on GitHub
|
||||
- Join our support community
|
||||
- Contact our support team
|
||||
|
||||
### System Requirements
|
||||
- Windows 10 or later
|
||||
- Python 3.11.x
|
||||
- At least 4GB RAM
|
||||
- 2GB free disk space
|
||||
|
||||
### First-Time Setup
|
||||
After installation:
|
||||
1. The first time you run ALwrity, it will ask for your API keys
|
||||
2. Follow the on-screen instructions to enter your keys
|
||||
3. Your keys will be saved securely for future use
|
||||
|
||||
### Updating ALwrity
|
||||
To update to the latest version:
|
||||
1. Download the latest release
|
||||
2. Run `install.bat` again
|
||||
3. Follow the on-screen instructions
|
||||
39
Getting Started/install.bat
Normal file
39
Getting Started/install.bat
Normal file
@@ -0,0 +1,39 @@
|
||||
@echo off
|
||||
echo Welcome to ALwrity Installer
|
||||
echo ============================
|
||||
echo.
|
||||
|
||||
:: Check if Python 3.11 is installed
|
||||
python --version 2>nul | findstr /i "3.11" >nul
|
||||
if errorlevel 1 (
|
||||
echo Python 3.11 is not installed or not in PATH
|
||||
echo Please install Python 3.11 from https://www.python.org/downloads/release/python-3116/
|
||||
echo Make sure to check "Add Python 3.11 to PATH" during installation
|
||||
echo.
|
||||
echo Press any key to open the download page...
|
||||
pause >nul
|
||||
start https://www.python.org/downloads/release/python-3116/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
:: Create virtual environment if it doesn't exist
|
||||
if not exist "venv" (
|
||||
echo Creating virtual environment...
|
||||
python -m venv venv
|
||||
)
|
||||
|
||||
:: Activate virtual environment and install requirements
|
||||
echo Activating virtual environment...
|
||||
call venv\Scripts\activate.bat
|
||||
|
||||
echo Upgrading pip...
|
||||
python -m pip install --upgrade pip
|
||||
|
||||
echo Installing ALwrity...
|
||||
python setup.py install
|
||||
|
||||
echo.
|
||||
echo Installation complete!
|
||||
echo To start ALwrity, open a new command prompt and type: alwrity
|
||||
echo.
|
||||
pause
|
||||
157
Getting Started/setup.py
Normal file
157
Getting Started/setup.py
Normal file
@@ -0,0 +1,157 @@
|
||||
import sys
|
||||
import os
|
||||
import platform
|
||||
import subprocess
|
||||
import shutil
|
||||
import datetime
|
||||
import socket
|
||||
import traceback
|
||||
import pkg_resources
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
def log_error(error_type, details):
|
||||
"""
|
||||
Logs installation errors to a file with timestamp and system information.
|
||||
"""
|
||||
log_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'install_errors.log')
|
||||
timestamp = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
|
||||
system_info = {
|
||||
"OS": platform.system(),
|
||||
"OS Version": platform.version(),
|
||||
"Architecture": platform.machine(),
|
||||
"Python Version": f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}",
|
||||
"Hostname": socket.gethostname()
|
||||
}
|
||||
|
||||
log_entry = f"[{timestamp}] ERROR: {error_type}\n"
|
||||
log_entry += f"Details: {details}\n"
|
||||
log_entry += "System Information:\n"
|
||||
for key, value in system_info.items():
|
||||
log_entry += f" {key}: {value}\n"
|
||||
log_entry += "-" * 80 + "\n"
|
||||
|
||||
with open(log_file, 'a') as f:
|
||||
f.write(log_entry)
|
||||
|
||||
print(f"Error logged to {log_file}")
|
||||
|
||||
def check_system_dependencies():
|
||||
"""Check for required system dependencies."""
|
||||
print("Checking system dependencies...")
|
||||
all_checks_passed = True
|
||||
|
||||
# Check Python version
|
||||
print("Checking Python version...")
|
||||
if sys.version_info < (3, 11) or sys.version_info >= (3, 12):
|
||||
error_msg = "ALwrity requires Python 3.11.x"
|
||||
print(f"Error: {error_msg}")
|
||||
log_error("Python Version Check", error_msg)
|
||||
all_checks_passed = False
|
||||
else:
|
||||
print(f"✓ Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro} found")
|
||||
|
||||
# Check Visual C++ Build Tools on Windows
|
||||
if platform.system() == "Windows":
|
||||
print("Checking for Visual C++ Build Tools...")
|
||||
if not shutil.which("cl"):
|
||||
error_msg = "Visual C++ Build Tools not found"
|
||||
print("❌ Visual C++ Build Tools not found")
|
||||
print("\nTo install Visual C++ Build Tools, run in an administrative PowerShell:")
|
||||
print("winget install Microsoft.VisualStudio.2022.BuildTools --silent --override \"--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended\"")
|
||||
log_error("Visual C++ Build Tools Check", error_msg)
|
||||
all_checks_passed = False
|
||||
else:
|
||||
print("✓ Visual C++ Build Tools found")
|
||||
|
||||
# Check Rust compiler
|
||||
print("Checking for Rust compiler...")
|
||||
if not shutil.which("rustc"):
|
||||
error_msg = "Rust compiler not found"
|
||||
print("❌ Rust compiler not found")
|
||||
if platform.system() == "Windows":
|
||||
print("\nTo install Rust on Windows, run:")
|
||||
print("Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile rustup-init.exe")
|
||||
print("./rustup-init.exe -y")
|
||||
else:
|
||||
print("\nTo install Rust on Linux/macOS, run:")
|
||||
print("curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y")
|
||||
print("source $HOME/.cargo/env")
|
||||
log_error("Rust Compiler Check", error_msg)
|
||||
all_checks_passed = False
|
||||
else:
|
||||
print("✓ Rust compiler found")
|
||||
|
||||
return all_checks_passed
|
||||
|
||||
def get_requirements():
|
||||
"""Read requirements from requirements.txt."""
|
||||
with open('requirements.txt') as f:
|
||||
requirements = [line.strip() for line in f if line.strip() and not line.startswith('#')]
|
||||
return requirements
|
||||
|
||||
def install_requirements(requirements):
|
||||
"""Install each requirement, showing progress."""
|
||||
print("Installing required packages...")
|
||||
for requirement in requirements:
|
||||
try:
|
||||
print(f"Installing {requirement}...")
|
||||
subprocess.check_call([sys.executable, "-m", "pip", "install", requirement])
|
||||
except subprocess.CalledProcessError as e:
|
||||
error_msg = f"Error installing {requirement}: {e}"
|
||||
print(error_msg)
|
||||
log_error("Package Installation", error_msg)
|
||||
sys.exit(1)
|
||||
|
||||
def main():
|
||||
"""Main installation function."""
|
||||
print("ALwrity Installation\n")
|
||||
|
||||
# Check system dependencies
|
||||
if not check_system_dependencies():
|
||||
print("\nPlease install the missing dependencies and try again.")
|
||||
print("Check the install_errors.log file for detailed error information.")
|
||||
sys.exit(1)
|
||||
|
||||
# Create virtual environment if it doesn't exist
|
||||
if not os.path.exists("venv"):
|
||||
print("\nCreating virtual environment...")
|
||||
try:
|
||||
subprocess.check_call([sys.executable, "-m", "venv", "venv"])
|
||||
except subprocess.CalledProcessError as e:
|
||||
error_msg = f"Failed to create virtual environment: {e}"
|
||||
print(error_msg)
|
||||
log_error("Virtual Environment Creation", error_msg)
|
||||
sys.exit(1)
|
||||
|
||||
# Install requirements
|
||||
requirements = get_requirements()
|
||||
install_requirements(requirements)
|
||||
|
||||
# Run setup
|
||||
setup(
|
||||
name="alwrity",
|
||||
version="1.0.0",
|
||||
description="AI-powered content writing assistant",
|
||||
author="Your Name",
|
||||
packages=find_packages(),
|
||||
python_requires=">=3.11, <3.12",
|
||||
install_requires=requirements,
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'alwrity=alwrity:main',
|
||||
],
|
||||
},
|
||||
)
|
||||
|
||||
print("\nInstallation complete! To start ALwrity:")
|
||||
print("1. Activate the virtual environment:")
|
||||
if platform.system() == "Windows":
|
||||
print(" .\\venv\\Scripts\\activate")
|
||||
else:
|
||||
print(" source venv/bin/activate")
|
||||
print("2. Run the application:")
|
||||
print(" streamlit run alwrity.py")
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user