Content Calendar, Content Gap Analysis, and Content Optimization

This commit is contained in:
ajaysi
2025-05-27 09:15:08 +05:30
parent 4049d19787
commit 889021c078
100 changed files with 18504 additions and 1251 deletions

View File

@@ -0,0 +1,122 @@
@echo off
setlocal enabledelayedexpansion
s :: Set colors for better visibility
color 0A
:: Set the Python version requirement
set MIN_PYTHON_VERSION=3.9
echo ===============================================
echo ALwrity Installation Setup
echo ===============================================
echo.
echo [1/5] Checking Python installation...
python --version > nul 2>&1
if errorlevel 1 (
color 0C
echo [ERROR] Python is not installed!
echo Please install Python %MIN_PYTHON_VERSION% or higher from python.org
echo Press any key to exit...
pause > nul
exit /b 1
)
:: Get Python version
for /f "tokens=2" %%V in ('python --version 2^>^&1') do set PYTHON_VERSION=%%V
for /f "tokens=1,2 delims=." %%a in ("%PYTHON_VERSION%") do (
set PYTHON_MAJOR=%%a
set PYTHON_MINOR=%%b
)
:: Check Python version
set /a PYTHON_VER=%PYTHON_MAJOR%*100 + %PYTHON_MINOR%
set /a MIN_VER=309
if %PYTHON_VER% LSS %MIN_VER% (
color 0C
echo [ERROR] Python version %MIN_PYTHON_VERSION% or higher is required!
echo Current version: %PYTHON_VERSION%
echo Please upgrade Python from python.org
echo Press any key to exit...
pause > nul
exit /b 1
)
echo [✓] Python %PYTHON_VERSION% detected
echo.
echo [2/5] Creating virtual environment...
python -m venv "%~dp0..\..\venv"
if errorlevel 1 (
color 0C
echo [ERROR] Failed to create virtual environment!
echo Press any key to exit...
pause > nul
exit /b 1
)
echo [✓] Virtual environment created
echo.
echo [3/5] Activating virtual environment...
call "%~dp0..\..\venv\Scripts\activate.bat"
if errorlevel 1 (
color 0C
echo [ERROR] Failed to activate virtual environment!
echo Press any key to exit...
pause > nul
exit /b 1
)
echo [✓] Virtual environment activated
echo.
echo [4/5] Upgrading pip...
python -m pip install --upgrade pip
if errorlevel 1 (
color 0C
echo [ERROR] Failed to upgrade pip!
echo Press any key to exit...
pause > nul
exit /b 1
)
echo [✓] Pip upgraded
echo.
echo [5/5] Installing requirements...
pip install -r "%~dp0..\..\requirements.txt"
if errorlevel 1 (
color 0C
echo [ERROR] Failed to install requirements!
echo Press any key to exit...
pause > nul
exit /b 1
)
echo [✓] Requirements installed
echo.
color 0A
echo ===============================================
echo Installation Completed Successfully!
echo ===============================================
echo.
echo Next steps to run ALwrity:
echo.
echo 1. Open a new Command Prompt window
echo 2. Navigate to the ALwrity root directory by copying and pasting this command:
echo cd /d "%~dp0..\.."
echo.
echo 3. Activate the virtual environment by copying and pasting this command:
echo "%~dp0..\..\venv\Scripts\activate.bat"
echo.
echo 4. Run ALwrity with Streamlit by copying and pasting this command:
echo streamlit run "%~dp0..\..\alwrity.py"
echo.
echo Note: You'll need to activate the virtual environment (step 3)
echo each time you want to run ALwrity.
echo.
echo Troubleshooting:
echo - If you see any errors, make sure Python is in your PATH
echo - For help, visit: https://github.com/yourusername/ALwrity
echo.
echo Press any key to exit...
pause > nul

View File

@@ -0,0 +1,27 @@
# ALwrity Installation Guide
## Quick Start
1. **Install Python**
- Download and install Python from [python.org](https://www.python.org/downloads/)
- During installation, check "Add Python to PATH"
2. **Install ALwrity**
- Download this project
- Open the 'Getting Started' folder
- Double-click `setup.py`
- Follow the on-screen instructions
## Running ALwrity
1. Open Command Prompt/Terminal in the 'Getting Started' folder
2. Run: `venv\Scripts\activate` (Windows) or `source venv/bin/activate` (Mac/Linux)
3. Run: `streamlit run alwrity.py`
## Need Help?
- If you see "pip not found": Re-install Python and check "Add Python to PATH"
- For other issues: [Open a support ticket](https://github.com/AJaySi/AI-Writer/issues)
- Join our support community
---

View File

@@ -0,0 +1,26 @@
# Use Python 3.8 slim image optimized for M1/M2 Macs
FROM --platform=linux/arm64 python:3.8-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
# Clone the repository
RUN git clone https://github.com/AJaySi/AI-Writer.git .
# Install Python dependencies
RUN python -m pip install --upgrade pip
RUN pip install -r requirements.txt
# Expose Streamlit port
EXPOSE 8501
# Run the application
CMD ["streamlit", "run", "alwrity.py"]

View File

@@ -0,0 +1,23 @@
# ALwrity Installation for Mac Users
## Prerequisites
- macOS 10.15 or later
- Terminal access
- Internet connection
## Installation Methods
### Method 1: Easy Setup (Recommended)
1. Open Terminal
2. Navigate to this directory
3. Run: `python setup.py`
4. Follow the on-screen instructions
### Method 2: Docker Installation
1. Install Docker Desktop for Mac
- Visit [Docker Desktop](https://www.docker.com/products/docker-desktop)
- Download and install the Apple Silicon (M1/M2) or Intel version
2. Build and run:
```bash
docker build -t alwrity .
docker run -p 8501:8501 alwrity

View File

@@ -0,0 +1,78 @@
import sys
import os
import subprocess
import shutil
from pathlib import Path
def print_step(text):
print(f"\n{text}")
def print_error(text):
print(f"\nError: {text}", file=sys.stderr)
def check_homebrew():
try:
subprocess.run(['brew', '--version'], capture_output=True, check=True)
return True
except:
return False
def setup_homebrew():
print_step("Homebrew is required for some dependencies")
print("Please install Homebrew by running this command in Terminal:")
print('/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"')
print("\nAfter installing Homebrew, run this setup script again.")
sys.exit(1)
def create_virtual_environment(venv_path):
try:
if venv_path.exists():
shutil.rmtree(venv_path)
subprocess.run([sys.executable, '-m', 'venv', str(venv_path)], check=True)
return True
except Exception as e:
print_error(f"Failed to create virtual environment: {e}")
return False
def install_requirements(venv_python, requirements_path):
try:
subprocess.run([str(venv_python), '-m', 'pip', 'install', '--upgrade', 'pip'], check=True)
subprocess.run([str(venv_python), '-m', 'pip', 'install', '-r', str(requirements_path)], check=True)
return True
except Exception as e:
print_error(f"Failed to install requirements: {e}")
return False
def main():
print("\n=== ALwrity Mac Installation ===\n")
if not check_homebrew():
setup_homebrew()
current_dir = Path(__file__).parent
project_root = current_dir.parent.parent
requirements_path = project_root / 'requirements.txt'
venv_path = current_dir / 'venv'
print_step("Creating virtual environment")
if not create_virtual_environment(venv_path):
return
print_step("Installing dependencies")
venv_python = venv_path / 'bin' / 'python'
if not install_requirements(venv_python, requirements_path):
return
print("\n✓ Installation completed successfully!")
print("\nTo start ALwrity:")
print("1. Open Terminal in this directory")
print("2. Run: source venv/bin/activate")
print("3. Run: streamlit run alwrity.py")
if __name__ == '__main__':
try:
main()
except KeyboardInterrupt:
print("\nInstallation cancelled")
except Exception as e:
print_error(f"Unexpected error: {e}")

View File

@@ -1,52 +1,25 @@
# ALwrity Installation Guide: Start Here!
# Getting Started with ALwrity
Welcome to ALwrity! This guide will help you choose the best installation method for your needs, whether you're a non-technical user or a developer. Please read the options below and follow the recommended path for your system.
Welcome to ALwrity! Choose the installation method that best suits you:
---
## Option 1: Quick Install for Windows Users (Recommended for Content Creators)
- No technical knowledge required
- Automatic Python installation
- One-click setup
→ [Go to Windows Quick Install](./Option_1_Windows_Quick_Install)
## Which Installation Method Should I Use?
## Option 2: Setup for Python Users
- For users who already have Python installed
- More customization options
- Manual virtual environment setup
→ [Go to Python Setup](./Option_2_Python_Users)
### 1. **Docker (Recommended for Most Users, All Platforms)**
- **Best for:** Anyone who wants a hassle-free, one-command setup on Windows, Mac, or Linux.
- **Why choose Docker?**
- No need to install Python, Rust, or system libraries manually.
- Everything runs in a safe, isolated environment.
- Consistent experience across all operating systems.
- **How to use:**
- See [README_dockerfile.md](./README_dockerfile.md) for step-by-step instructions.
## Option 3: Docker Installation
- For advanced users and developers
- Containerized environment
- Platform-independent setup
→ [Go to Docker Setup](./Option_3_Docker_Install)
### 2. **Windows One-Click Installer (`install_alwrity.bat`)**
- **Best for:** Windows users who prefer a simple double-click installer.
- **Why choose this?**
- Checks and installs all prerequisites for you (Python, Rust, Visual C++ Build Tools).
- Minimal technical knowledge required.
- **How to use:**
- See [README_install_bat.md](./README_install_bat.md) for detailed instructions.
### 3. **Manual Setup for Linux/macOS (`setup.py`)**
- **Best for:** Linux/macOS users who are comfortable with the terminal.
- **Why choose this?**
- Gives you more control over the environment.
- Useful if you want to customize or develop ALwrity.
- **How to use:**
- See [README_setup_py.md](./README_setup_py.md) for a full walkthrough.
---
## Quick Decision Table
| Your System | Easiest Method | File/Guide to Use |
|---------------------|-----------------------|--------------------------|
| Windows (any) | Docker or install_alwrity.bat | README_dockerfile.md or README_install_bat.md |
| Mac | Docker | README_dockerfile.md |
| Linux | Docker | README_dockerfile.md |
| Linux/macOS (dev) | setup.py (manual) | README_setup_py.md |
---
## Still Unsure?
- If you are not sure, **Docker is the safest and easiest choice** for most users.
- If you run into any issues, check the troubleshooting sections in each guide or [open an issue on GitHub](https://github.com/AJaySi/AI-Writer/issues).
---
Happy writing!
## Need Help?
- Visit our [GitHub Issues](https://github.com/AJaySi/AI-Writer/issues) page
- Check our [Documentation](../docs)

View File

@@ -1,92 +0,0 @@
# ALwrity Linux/macOS Installer Guide (`setup.py`)
---
## What is `setup.py`?
`setup.py` is an automated installer for ALwrity on Linux and macOS. It checks your system, sets up a virtual environment, installs all dependencies, and configures ALwrity for you.
---
## What Does It Do?
- Checks your Python version (must be 3.11.x)
- Checks for Rust compiler (required for some Python packages)
- Creates a Python virtual environment (`venv`) if it doesn't exist
- Activates the virtual environment (auto-activation for Linux/macOS)
- Installs all required Python packages from `requirements.txt`
- Installs ALwrity as a command-line tool
- Prints clear next steps for running ALwrity
- Logs any errors to `install_errors.log` for easy troubleshooting
---
## Prerequisites
- **Linux or macOS**
- **Python 3.11.x** (install from https://www.python.org/downloads/ if needed)
- **Rust compiler** (install with `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y`)
- **At least 4GB RAM**
- **2GB free disk space**
---
## Step-by-Step Instructions
### 1. Open a Terminal
- Navigate to the ALwrity project folder:
```
cd /path/to/AI-Writer/Getting\ Started
```
### 2. Run the Installer
- Run:
```
python3 setup.py install
```
- The script will check your system and install everything needed.
- If you see errors about Python or Rust, follow the on-screen instructions to install them, then re-run the script.
### 3. Start ALwrity
- Activate the virtual environment:
```
source venv/bin/activate
```
- Start the app:
```
streamlit run alwrity.py
```
- Or use the command:
```
alwrity
```
---
## Troubleshooting
- **Python version error:**
- Make sure you have Python 3.11.x installed and are using `python3`.
- **Rust not found:**
- Install Rust with:
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
```
- **Other errors:**
- Check the `install_errors.log` file in the folder for details.
- Copy the error and [open an issue on GitHub](https://github.com/AJaySi/AI-Writer/issues).
---
## FAQ
- **Do I need to install anything else?**
- No, `setup.py` will handle everything for you if prerequisites are met.
- **Can I run this on Windows?**
- Use the Windows installer (`install_alwrity.bat`) instead.
- **Is it safe?**
- Yes, the script only installs ALwrity and its dependencies.
---
## Need More Help?
- [Open an issue on GitHub](https://github.com/AJaySi/AI-Writer/issues)
- Join our support community
---

View File

@@ -1,91 +0,0 @@
@echo off
:: ALwrity Automated Windows Installer
:: This script will set up ALwrity with minimal user input.
:: Last updated: April 23, 2025
chcp 65001 >nul
setlocal enabledelayedexpansion
:: Welcome message
cls
echo ======================================
echo ALwrity - One Click Windows Installer
echo ======================================
echo.
:: Check for admin rights
openfiles >nul 2>&1
if %errorlevel% NEQ 0 (
echo This installer needs to be run as administrator.
echo Please right-click and select "Run as administrator".
pause
exit /b 1
)
:: 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 Downloading Python 3.11 installer...
powershell -Command "Invoke-WebRequest -Uri https://www.python.org/ftp/python/3.11.6/python-3.11.6-amd64.exe -OutFile python-3.11.6-amd64.exe"
echo Launching Python installer. Please check 'Add Python to PATH' and complete installation.
start python-3.11.6-amd64.exe
echo After installation, please re-run this installer.
pause
exit /b 1
)
:: Check for Visual C++ Build Tools
where cl >nul 2>&1
if errorlevel 1 (
echo Visual C++ Build Tools not found. Installing...
powershell -Command "Start-Process 'powershell' -Verb runAs -ArgumentList 'winget install Microsoft.VisualStudio.2022.BuildTools --silent --override \"--wait --quiet --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended\"'"
echo Please wait for the installation to finish, then re-run this installer.
pause
exit /b 1
)
:: Check for Rust compiler
where rustc >nul 2>&1
if errorlevel 1 (
echo Rust compiler not found. Installing...
powershell -Command "Invoke-WebRequest -Uri https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe -OutFile rustup-init.exe"
start rustup-init.exe -y
echo Please wait for the installation to finish, then re-run this installer.
pause
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
:: Upgrade pip
echo Upgrading pip...
python -m pip install --upgrade pip
:: Install requirements if requirements.txt exists
if exist requirements.txt (
echo Installing Python dependencies...
pip install -r requirements.txt
)
:: Install ALwrity
if exist setup.py (
echo Installing ALwrity...
python setup.py install
) else (
echo setup.py not found. Skipping ALwrity install step.
)
echo.
echo Installation complete!
echo To start ALwrity, open a new command prompt and type: alwrity
echo.
pause