paper-system/json2md
Steve White a326553027 Fixed arxiv link issue 2025-01-24 11:03:21 -06:00
..
lib Fixed arxiv link issue 2025-01-24 11:03:21 -06:00
README.md Initial Commit; working system 2025-01-24 09:26:47 -06:00
go.mod Initial Commit; working system 2025-01-24 09:26:47 -06:00
main.go Initial Commit; working system 2025-01-24 09:26:47 -06:00
papers-output.md Initial Commit; working system 2025-01-24 09:26:47 -06:00

README.md

json2md - JSON to Markdown Converter

A Go module for converting academic paper review data from JSON to formatted Markdown reports.

Features

  • CLI interface for easy conversion
  • Reusable library package
  • Supports accepted/rejected paper categorization
  • Preserves abstract formatting
  • Generates arXiv links automatically

Installation

git clone https://github.com/yourusername/json2md.git
cd json2md
go build

Command Line Usage

./json2md --input papers.json --output results.md

# Or directly via Go:
go run main.go --input ../papers.json --output ../results.md

Library Usage

package main

import (
    "fmt"
    "json2md/lib"
)

func main() {
    // Process JSON file
    data, err := lib.ProcessJSONFile("input.json")
    if err != nil {
        panic(err)
    }

    // Generate Markdown
    if err := lib.GenerateMarkdown(data, "output.md"); err != nil {
        panic(err)
    }
    
    fmt.Println("Conversion successful!")
}

Input JSON Format

Expected structure:

{
    "accepted": [
        {
            "paper": {
                "title": "Paper Title",
                "arxiv_id": "1234.56789",
                "abstract": "Paper abstract..."
            },
            "explanation": "Acceptance reason"
        }
    ],
    "rejected": [
        {
            "paper": { /* same structure */ },
            "explanation": "Rejection reason"
        }
    ]
}

Project Structure

json2md/
├── lib/           # Core conversion library
│   └── lib.go
├── main.go        # CLI interface
├── go.mod         # Module configuration
└── README.md      # This file