Skip to content
LZPxka edited this page Jan 10, 2025 · 7 revisions

GL02_projet_OGMen Wiki

Welcome to the GL02_projet_OGMen wiki! This page serves as the central documentation hub for understanding, using, and maintaining the project. Below are the main sections that will guide both users and developers.

User Starting Guide

Introduction

GL02_projet_OGMen is a Command Line Interface (CLI) application designed to manage a question and exam database. Users can import questions from GIFT files, manipulate them (add, delete, search, deduplicate), and generate exams. This application is a practical tool for educators to streamline the exam preparation process.

Key Features

  • Import questions from GIFT files.
  • Manage questions: add, delete, search, deduplicate.
  • Generate exams containing 15-20 questions.
  • Export exams in GIFT format.
  • View questions and exams.
  • Manage contacts: create, modify, delete, search.
  • Generate HTML charts to visualize question distributions.

Installation

Prerequisites

  • Node.js
  • npm

Steps

  1. Clone the repository:
    git clone https://github.com/aminssutt/GL02_projet_OGMen.git
    cd GL02_projet_OGMen/src
  2. Install dependencies:
    npm install

Usage

To launch the CLI application, run the following command:

cd src
node everywhereCli.js

Available Commands

  1. questions list - Display all questions.
  2. questions import - Import questions from the ./data directory.
  3. questions delete --title <title> - Delete a question by its exact title.
  4. questions add --text <text> --type <type> - Add a new question.
  5. questions chart - Generate an HTML file with a chart of question types.
  6. exam generate - Generate an exam with 15-20 questions.
  7. exam export --id <id> - Export an exam in GIFT format.
  8. questions deduplicate - Remove duplicate question titles.
  9. contact create - Create a new contact.
  10. contact update - Update a contact.
  11. contact read - Read information about a contact.
  12. contact delete - Delete a contact.
  13. visualize exam - Visualize an exam as a bar chart.
  14. visualizeExamTheme - Visualize an exam profile by theme as a bar chart.
  15. search contact - Search for a contact by name.
  16. search question - Search for a question by ID.
  17. search exam - Search for an exam by ID or date.
  18. simulate exam - Simulate an exam with results.

Developer Maintenance Guide

Project Structure

  • src/: Contains the main application code.
    • cli/: Handles CLI-related functionality.
      • index.js: Entry point for CLI commands.
      • chart.html, exam-chart.html, exam-theme-chart.html: HTML files for visualizing exam and question data.
    • utils/: Contains utility functions.
      • fileManager.js: Manages file operations such as reading and writing.
      • parser.js: Parses input data from GIFT files.
      • question.js: Handles question-related logic and operations.
      • vCardParser.js: Parses and manages vCard contact files.
    • examen/: Stores generated exam files in GIFT format.
      • exam_1.gift, exam_1733153614187.gift: Example exam files.
    • data/: Stores input files, such as GIFT files, for importing questions.

Key Files

  • everywhereCli.js: Main entry point of the CLI application.
  • questions.js: Manages question-related functionality.
  • exams.js: Handles exam generation and export.
  • contacts.js: Manages contact creation and updates.

Development Guidelines

  1. Coding Standards:
    • Follow consistent naming conventions.
    • Write clear and concise comments for each function.
  2. Error Handling:
    • Validate user inputs.
    • Provide meaningful error messages.

Known Issues

  1. Handling Answers for Essay and Matching Questions:
    • Issue: Inconsistent processing of correct and incorrect answers.
    • Improvement: Enhance the answer comparison logic.
  2. CLI Command Execution:
    • Issue: CLI does not immediately accept new commands after execution.
    • Workaround: Use Ctrl + C to terminate the current session before entering a new command.
  3. Duplicate Input Feedback:
    • Issue: User input feedback sometimes duplicates.
    • Workaround: Press Backspace to resolve temporarily.

Future Enhancements

  • Implement a graphical user interface (GUI) for easier interaction.
  • Expand export formats to include CSV and PDF.
  • Introduce user authentication for better data security.

Test Plan


Contributors


License


Thank you for using GL02_projet_OGMen! If you encounter any issues, please report them in the Issues tab of the GitHub repository.

Clone this wiki locally