An open API service indexing awesome lists of open source software.

https://github.com/imtjl/net-parser

Standalone utility for converting .et1/.fdb files to standardized worthan't quiz-system JSON
https://github.com/imtjl/net-parser

Last synced: 7 months ago
JSON representation

Standalone utility for converting .et1/.fdb files to standardized worthan't quiz-system JSON

Awesome Lists containing this project

README

          

# Net-Parser

## Overview

Net-Parser is a standalone command-line utility designed to parse proprietary
.et1/.fdb test files commonly used for computer networks certification tests and
exams and convert them into a standardized JSON format that can be easily used
in quiz-like learning platforms or exported into simple human-readable format.

## Features (wip)

- [ ] Decodes .et1 file format
- [ ] Converts .fdb file format to .txt, .md, .pdf, .json
- [ ] Does health checks for encodings in created .txt
- [ ] Automatically detects and handles different text encodings
- [ ] Extracts questions, answers
- [ ] Extracts categories, and metadata
- [ ] Handles corrupted or partially readable files
- [ ] Command-line interface for easy integration

## Installation

Using bun:

```bash
# Install globally
bun install -g net-parser

# Or install locally in your project
bun install net-parser
```

## Usage

```bash
# Basic usage
net-parser convert path/to/file.fdb

# Specify output file
net-parser convert path/to/file.fdb -o output.json

# Validate only (no output)
net-parser validate path/to/file.fdb

# Show debug information
net-parser convert path/to/file.fdb --debug
```

## Programmatic Usage

```typescript
import { parseTestFile } from 'net-parser';

// Parse a file
const result = await parseTestFile('path/to/file.fdb');
console.log(result);

// Parse content directly
const content = await fs.readFile('path/to/file.fdb', 'utf-8');
const result = parseTestContent(content);
console.log(result);
```

## Architecture

```
net-parser/
├── src/
│ ├── core/ # Core parsing logic
│ ├── encoders/ # Encoding detection/conversion
│ ├── formatters/ # Output formatters
│ └── cli.ts # Command-line interface
├── tests/ # Jest tests
├── package.json
├── tsconfig.json
├── jest.config.js
└── README.md
```