Thanks to visit codestin.com
Credit goes to github.com

Skip to content

citrusinesis/bojexec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bojexec (Baekjoon Online Judge Executor)

Overview

백준 잘 풀고 싶어요 입출력 예제 복사하고 비교하는거 귀찮아요 누군가 해줘요

Project Structure

bojexec
├── cmd
│   └── bojexec     // Entrypoint
├── internal
│   ├── cmd         // CLI command
│   └── problem     // Problem domain
└── pkg
    ├── config      // Executor config parser (YAML, ...?)
    ├── crawl       // Problem page crawler
    ├── fs          // Read source code from filesystem
    ├── runner      // Code runner powered by docker
    └── util        // Util packages

Checkpoint

  • Problem Crawler
    • Send Request to baekjoon
    • Parse problem document
    • Abstract problem entity
    • Parse checker metadata (Timeout, Memory Usage)
      • <table class="table" id="problem-info">
          <thead>
            <tr>
              <th style="width:16%;">시간 제한</th>
              <th style="width:16%;">메모리 제한</th>
              <th style="width:17%;">제출</th>
              <th style="width:17%;">정답</th>
              <th style="width:17%;">맞힌 사람</th>
              <th style="width:17%;">정답 비율</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>2 초 </td>
              <td>128 MB</td>
              <td>1232987</td>
              <td>481941</td>
              <td>328035</td>
              <td>38.592%</td>
            </tr>
          </tbody>
        </table>
  • FS
    • Create directory structure to save problem data
    • Read solution code from fs
    • Parse file extension to determine language
    • Save crawled test cases into test-cases.json (For caching & append custom test cases)
    • Save problem description to Markdown
  • Runner
  • Config
    • Define config schema
    • Config parser (YAML, TOML, JSON, ...)
    • Save default configuration ($HOME/config/.bojexec/default.yaml)
    • Config file per problem
  • Command (cobra or bubbletea)
    • Fetch problem (boj fetch 1000)
    • Run/Validate test cases (boj run 1000 --solution main.go)

Further Improvements

  • Login & Submit
    • login: boj login
    • submit: boj submit 1000 --solution main.go
  • Problem Indexer by algorithm
  • Blog Helper
    • Review file builder (Markdown, HTML, ...)
    • Post to CMS (Hugo, Jekyll, ...)
  • GUI

About

Baekjoon Online Judge Executor

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published