Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
itx-jd authored Dec 31, 2023
1 parent b2cfcd8 commit 55c0ea4
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 1 deletion.
105 changes: 104 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,104 @@
# Arabic-Poetry-Encyclopedia
# Arabic Poetry Encyclopedia

## Overview

The **Arabic Poetry Encyclopedia** is a Java-based application designed to serve as a comprehensive solution for managing and exploring Arabic poetry. It includes various modules such as Root, Poems, Books, Verses, Assign Root, Import Poem From File, Tokenize Verse, Root Info, and Auto Root Verse GUI. The application enables users to add books, poems, assign roots to verses, import poems from files, and tokenize verses. Additionally, it provides various filters to view information about poems containing specific roots, along with their verses and book names. The application maintains a log file, making it a complete solution for an Arabic poetry encyclopedia.

## Project Structure

```plaintext
Arabic Poetry Encyclopedia
|-- lib/
| -- external-jar1.jar
| -- external-jar2.jar
|-- db/
| -- setup.sql
|-- config/
| -- application.properties (template)
| -- log4j2.properties
|-- logs/ (Directory for log files)
|-- installer.sh (or installer.bat for Windows)
|-- README.md
|-- app.jar
```

- **lib/**: Contains external JAR files required by the application.
- **db/**: Includes the setup SQL script for database initialization.
- **config/**: Holds configuration files for the application.
- **application.properties**: Users can modify this file to configure the database and other system application properties.
- **log4j2.properties**: Configuration file for log4j2 logging framework.
- **logs/**: The directory where log files will be stored.
- **installer.sh**: The shell script for installing the application (or installer.bat for Windows).
- **README.md**: This documentation file.
- **app.jar**: The executable JAR file for the application.

## Installation Guide

### Prerequisites

1. Java Runtime Environment (JRE)
2. MySQL Database Server

### Installation Steps

1. **Download the Application**

Clone the project repository:

```bash
git clone https://github.com/SoftwareConstructionAndDev/project-se3001-the-squad.git
```

2. **Database Setup**

- Execute the `setup.sql` script provided in the `db/` directory to initialize the database schema.

3. **Configure Database Connection**

Open the `application.properties` file in the `config/` directory and modify the database connection properties:

```properties
# Database Configuration
db.url=jdbc:mysql://localhost:3306/arabicpoetryencyclopedia
db.user=root
db.password=
```

Update the `db.url`, `db.user`, and `db.password` with your database connection details.

4. **Run the Installer**

Execute the installer script:

```bash
sh installer.sh
```

or for Windows:

```bash
installer.bat
```

This script will create the necessary directories, copy files, and generate log files.

5. **Run the Application**

Double-click on `your-app.jar` or run it from the command line:

```bash
java -jar your-app.jar
```

The application should now be running.

### Usage

- Follow the on-screen instructions and explore the various modules of the Arabic Poetry Encyclopedia.

### Notes

- Make sure the MySQL server is running before initializing the database.
- The provided `application.properties` file is a template; users should modify it based on their specific database configuration.

Enjoy using the Arabic Poetry Encyclopedia!
49 changes: 49 additions & 0 deletions installer.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
@echo off
setlocal

REM Set the installation directory
set "INSTALL_DIR=C:\Program Files\ArabicPoetryEncyclopedia"
set "source_dir=%~dp0"

set "JAR_FILE=app.jar"
set "SHORTCUT_NAME=ArabicPoetryEncyclopedia"

echo Auto Installer Initializing...
echo Analyzing System Requirements...

REM Check if the installation directory exists, create if not
if not exist "%INSTALL_DIR%" mkdir "%INSTALL_DIR%"

REM Check Java version
java -version 2>&1 | findstr /I "version" | findstr /V /I "1.7" >nul
if %errorlevel% neq 0 (
echo Error: Java 1.8 or above is required to run this application.
echo Please install Java and run the installer again.
pause
goto :EOF
)

REM Display installation message
echo.
echo Copying Resource Files...
echo.

REM Copy all files and folders to the installation directory
xcopy "%source_dir%*" "%INSTALL_DIR%" /e /i /y

echo.
echo Creating Shortcut To Desktop...

REM Create a shortcut on the desktop using mklink
mklink "%USERPROFILE%\OneDrive\Desktop\%SHORTCUT_NAME%.lnk" "C:\Program Files\ArabicPoetryEncyclopedia\%JAR_FILE%"

REM Display completion message
echo.
echo Installation Completed Successfully
echo Please Run The Application Using: java -jar "%INSTALL_DIR%\app.jar"

echo.
echo Thank You

pause
endlocal

0 comments on commit 55c0ea4

Please sign in to comment.