Skip to content

censync/jsonlines-editor

Repository files navigation

JsonLines Editor

A desktop application for editing JSON Lines (JSONL) files, specifically designed for preparing multilingual datasets for fine-tuning Large Language Models (LLMs).

JsonLines Editor Screenshot

Documentation

User manuals available in multiple languages:
English | Español | Türkçe | Українська | Русский

Features

Core Functionality

  • JSONL File Management: Open, edit, and save JSON Lines files with proper UTF-8 encoding
  • Multilingual Support: Edit terms and definitions in both local and original languages
  • Data Validation: Automatic validation of JSON structure on file load
  • Backup System: Automatic backup creation before saving files
  • Search Integration: Quick Google search for terms in both languages (Russian and English by default)
  • Row Operations: Add, edit, and remove individual entries
  • File Tracking: Monitors unsaved changes with confirmation dialogs

Technical Features

  • Qt Framework: Built with Qt 6 for cross-platform compatibility
  • SQLite Cache: Persistent application cache for storing preferences and recent paths
  • Daily Logs: Automatic logging of all operations with daily log files
  • Error Handling: Comprehensive error messages with file path and line number information
  • Table View: Spreadsheet-like interface for viewing and editing multiple entries

Requirements

Build Dependencies

  • Qt 6.x (Core, GUI, Widgets, SQL modules)
  • C++11 compiler (GCC, Clang, or MSVC)
  • qmake build system

Runtime Dependencies

  • Qt 6 runtime libraries
  • SQLite support (included with Qt)

Building from Source

Linux

  1. Install Qt 6 and development tools:
# Debian/Ubuntu
sudo apt-get install qt6-base-dev qt6-tools-dev build-essential

# Fedora
sudo dnf install qt6-qtbase-devel qt6-qttools-devel gcc-c++

# Arch Linux
sudo pacman -S qt6-base qt6-tools base-devel
  1. Build the application:
cd jsonlines-editor
qmake6 jsonlines-editor.pro
make
  1. Run the application:
./jsonlines-editor

macOS

  1. Install Qt 6:
# Using Homebrew
brew install qt@6

# Add Qt to PATH
export PATH="/usr/local/opt/qt@6/bin:$PATH"
  1. Build the application:
cd jsonlines-editor
qmake jsonlines-editor.pro
make
  1. Create application bundle (optional):
macdeployqt jsonlines-editor.app
  1. Run the application:
open jsonlines-editor.app
# or
./jsonlines-editor.app/Contents/MacOS/jsonlines-editor

Windows

  1. Install Qt 6:

    • Download Qt Online Installer from https://www.qt.io/download
    • Install Qt 6.x with MinGW or MSVC compiler
    • Add Qt bin directory to PATH (e.g., C:\Qt\6.x.x\mingw_64\bin)
  2. Build the application using Qt Creator:

    • Open jsonlines-editor.pro in Qt Creator
    • Configure project with installed kit
    • Build > Build Project "jsonlines-editor"
  3. Alternative: Build from command line:

# Using Qt command prompt
cd jsonlines-editor
qmake jsonlines-editor.pro
mingw32-make
# or for MSVC
nmake
  1. Deploy the application:
windeployqt jsonlines-editor.exe
  1. Run the application:
jsonlines-editor.exe

Example File

Data Structure

Each line in the JSONL file contains:

{
  "term": "Localized term",
  "original_term": "Original language term",
  "definition": "Localized definition",
  "original_definition": "Original language definition",
  "source": "Source reference"
}

An example JSONL file assets/example.jsonl

This file demonstrates the correct format and can be used to test the application functionality.

Application Data

The application stores configuration and logs in platform-specific directories:

  • Linux: ~/.config/CenSync/JsonLinesEditor/
  • macOS: ~/Library/Application Support/CenSync/JsonLinesEditor/
  • Windows: %APPDATA%\CenSync\JsonLinesEditor\

Directory structure:

JsonLinesEditor/
├── cache.db        # SQLite database with application preferences
├── logs/           # Daily operation logs
│   └── YYYY-MM-DD.log
└── backups/        # Automatic file backups
    └── filename.jsonl.bak

License

MIT License - see LICENSE file for details.

Copyright (c) 2025 CenSync

About

Json Lines (JSONL) simple editor

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors