Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
9252214
initial commit
F0lak May 30, 2026
a6d9f53
readme and gitignore
F0lak May 30, 2026
bb5f8f8
requirements file added
F0lak May 30, 2026
0537314
update requirements and ci workflow
F0lak May 30, 2026
2c96033
ci try 3
F0lak May 30, 2026
5311ae5
ci try 4
F0lak May 30, 2026
5f5f58f
update actions version in ci workflow
F0lak May 30, 2026
5330e5b
deliberate tests
F0lak May 30, 2026
271d80a
fixes tests
F0lak May 30, 2026
0ecfa26
ok i think this wraps the CI
F0lak May 30, 2026
fc47c2a
implements ref fetching from byond remote
F0lak May 30, 2026
c3c38f9
attempt fix of unit test suite
F0lak May 30, 2026
686820f
adds CI badge to readme
F0lak May 30, 2026
76eb86f
reorganize src files, remove old_ files from repo
F0lak Jun 1, 2026
c7f8fc5
reorg source files
F0lak Jun 1, 2026
40d30e2
implements extracting reference content and building RefEntry objects
F0lak Jun 1, 2026
93cb252
parses description lists
F0lak Jun 2, 2026
99b33dc
cleans up a bit of naming and docstring formatting
F0lak Jun 2, 2026
5c3e670
adds encoded <a> tags and cleans up ref_splitter.py file
F0lak Jun 2, 2026
f3c2336
cleans up and touches up tests
F0lak Jun 2, 2026
a988dde
moves RefEntry to ref_splitter.py and renames ref_entry.py to ref_tre…
F0lak Jun 2, 2026
af149bd
renames ref_str to ref_info to be more clear what it is
F0lak Jun 2, 2026
ec34528
implements reftree building and markdown export
F0lak Jun 2, 2026
4fb06b5
fixes broken unit tests
F0lak Jun 2, 2026
3239348
implements paragraph and codeblock parsing, as well as inline tag tok…
F0lak Jun 2, 2026
6438f8b
replaces INLINE_TAGs with a global TOKEN_TABLE
F0lak Jun 2, 2026
5c558fc
fixes markdown token formatting
F0lak Jun 2, 2026
a334d69
fixes spaces within token blocks
F0lak Jun 2, 2026
11bc682
implements md link formatting
F0lak Jun 3, 2026
359c85b
fixes md file export pathing
F0lak Jun 3, 2026
006bef3
fixes several small issues encountered when running a full parse of t…
F0lak Jun 3, 2026
376f3d7
adds common fields to ref entry and no longer parses out remaining de…
F0lak Jun 4, 2026
09387a3
testing automated commit messages in diary entry
F0lak Jun 4, 2026
fb43433
confirmed commit messages are added to diary
F0lak Jun 4, 2026
9f6fe96
test commit message format
F0lak Jun 4, 2026
28c5f83
implements export as its own class. minor code reorganization
F0lak Jun 7, 2026
78cbfd6
implements p class tokens and adds markdown checks to token unit tests
F0lak Jun 7, 2026
52e7852
implements data-driven approach to p class tokenization
F0lak Jun 8, 2026
5fcc444
implements p_class token parsing
F0lak Jun 8, 2026
1878b48
formatting cleanup pass
F0lak Jun 8, 2026
4bf457d
implements test suite for export.py implementation
F0lak Jun 8, 2026
2e25fcc
Add 'ref_splitter/' from commit '4bf457d3033c064f785a5e7944821ba7527f…
F0lak Jun 9, 2026
ce56052
moves requirements into repo root folder
F0lak Jun 9, 2026
d61c2c0
removes local test files
F0lak Jun 9, 2026
e0dfa0b
fixes module paths and cleans main.py
F0lak Jun 9, 2026
3eb54bc
implements tqdm for cleaner cli output while parsing
F0lak Jun 9, 2026
2b0bf34
moves diary to open_ref root folder and adds commit message back into it
F0lak Jun 9, 2026
276e196
fixes test suite
F0lak Jun 9, 2026
8d8c9b6
configures test file for ref_splitter tests and moves refsplitter fix…
F0lak Jun 9, 2026
13669f1
implements e2e test happypath using test file
F0lak Jun 10, 2026
51d470d
replaces remote ref with ref parsed with v2 parser program
F0lak Jun 10, 2026
091b80e
updates ci.yml to run all unit tests
F0lak Jun 10, 2026
baf4921
updates readme and addresses tests failing on runner
F0lak Jun 10, 2026
b544e59
testing fix on the runner
F0lak Jun 10, 2026
89dcc17
attempts to correct runner errors _again_
F0lak Jun 10, 2026
5ec7ff7
fixes oopsie typo on ci.yml
F0lak Jun 10, 2026
cdcbf5c
testing runner again
F0lak Jun 10, 2026
9cc5cec
Removing linux simulation and info test from suite (it has served its…
F0lak Jun 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI Pipeline

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Check out repository code
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.14'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest

- name: Run Test Suite
run: |
pytest
23 changes: 22 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
*.prof
*.html
.env
.env
_md_export/

# Python bytecode cache
__pycache__/
*.pyc
*.pyo
*.pyd

# Pytest cache
.pytest_cache/

*/__pycache__/
_tmp_md_export/

old_bot.py
old_refsplitter.py
entries/
pages/
pretty_soup.txt
ref_doc.txt
dm cache sample.txt
50 changes: 37 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,42 @@
# About open-ref
This is an open source project meant to allow the [DM Reference](https://www.byond.com/docs/ref/) to be edited by the community to allow us to make fixes, corrections and ammendments and expand upon it.
# OpenRef
OpenRef is an open-source project that makes the BYOND DM Reference easier to maintain, improve, and expand through community contributions.

This repo also contains the tool used for splitting the reference provided by BYOND.com: `ref_splitter.py`. At this time the documentation for the tool is contained in the script itself.
Originally started as a way to edit and version-control the reference, the project evolved into a document-processing pipeline featuring HTML parsing, structured document models, automated transformations, testing, CI/CD, and community tooling.

The discord bot is also available here as well, under the bot folder.
## Features
* HTML → structured document parsing
* Markdown generation and transformation
* Automated reference processing tools
* Test suite and CI/CD pipeline
* Discord bot integration

You can join the BYONDiscord server to discuss this project [here](https://discord.gg/pTFccGgnAr)
## Repository Contents
### Reference Data
A community-maintained version of the DM Reference derived from BYOND's published documentation.

## Contributing
Anyone is welcome to submit contributions to open-ref.
Contributions can be made either on Github.com or by cloning the repo and working locally.
All contributions require a PR and are subject to approval.
If you have any thoughts for changes or edits, feel free to open a discussion on the repo or discuss them on the discord server

## BYOND Version
The reference is currently built with the documentation for BYOND version 516.1644 alpha.
BYOND release notes can be found [here](https://www.byond.com/docs/notes/515.html).
Contributions are welcome, including:
* Documentation corrections
* Additional explanations and examples
* Tooling improvements
* Bug fixes
* Test coverage improvements

All changes should be submitted through a Pull Request and are subject to review before being merged.
Discussion is available through GitHub or the BYONDiscord community:
https://discord.gg/pTFccGgnAr

## Supported BYOND Version
The current reference data is based on BYOND 516.1644 Alpha.

Release notes:
https://www.byond.com/docs/notes/516.html

## Technical Focus
This project demonstrates:
* Parser development
* Document transformation pipelines
* Python application architecture
* Automated testing
* CI/CD workflows
* Open-source collaboration
25 changes: 25 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from pathlib import Path
import pytest
from ref_splitter.ref_splitter import RefSplitter

@pytest.fixture(scope="function")
def mouse_down_sample_path():
"""Returns the absolute path to the mouse_down_sample test file."""
return Path(__file__).parent / "tests" / "test_data" / "mouse_down_input_sample.txt"

@pytest.fixture(scope="function")
def client_sample_path():
"""Returns the absolute path to the reference client sample file."""
return Path(__file__).parent / "tests" / "test_data" / "ref_client_input_sample.txt"

@pytest.fixture(scope="function")
def splitter(mouse_down_sample_path):
'''creates a shared splitter instance for all the tests in this module'''
with open(mouse_down_sample_path, 'r', encoding='utf-8') as f:
content = f.read()

splitter_instance = RefSplitter(content)
splitter_instance.prep_pages()
splitter_instance.build_ref_entries()

return splitter_instance
Loading