From 79f795a8e21a54bba92bb67523b639dc814e737d Mon Sep 17 00:00:00 2001
From: 1Codealot <58225804+1Codealot@users.noreply.github.com>
Date: Fri, 24 May 2024 11:01:04 +0100
Subject: [PATCH 1/3] Wrote the original specification.
Made a `docs` dir and moved the man pages to it, TODO: Update ubuntu workflow, write the implementation
---
docs/CLI_Timer_Session_format.md | 26 +++++++++++++++++++++++
{man_pages => docs/man_pages}/.gitignore | 0
{man_pages => docs/man_pages}/CLI_Timer.1 | 0
{man_pages => docs/man_pages}/makefile | 0
4 files changed, 26 insertions(+)
create mode 100644 docs/CLI_Timer_Session_format.md
rename {man_pages => docs/man_pages}/.gitignore (100%)
rename {man_pages => docs/man_pages}/CLI_Timer.1 (100%)
rename {man_pages => docs/man_pages}/makefile (100%)
diff --git a/docs/CLI_Timer_Session_format.md b/docs/CLI_Timer_Session_format.md
new file mode 100644
index 0000000..fe63493
--- /dev/null
+++ b/docs/CLI_Timer_Session_format.md
@@ -0,0 +1,26 @@
+# Introduction
+
+This is the secification for the `*.CLI_T_S` file (new) binary format.
+
+This is for version 1 of the file type.
+
+# Description
+
+## Metadata
+Magic bytes: `CLI_TIMER{version_num}` (`43 4c 49 5f 54 49 4d 45 52 01`)
+
+## Main body
+In the original format it went `{scramble}§{time}~{Comment}`.
+If there were penalties (i.e. +2 or DNF) it would do `{time}+` or `DNF({time})`.
+
+
+In this new version, it will instead be `[02]{scramble}[03]{penalty_num}{time}[02]{comment}[03]`.
+
+This is where `[02]` and `[03]` are the ASCII codes for "start of text" and "end of text" respectively.
+The `{scramble}` and `{comment}` sections are just raw strings with no compression (for version 1; hopefully not for future versions).
+`{penalty_num}` will be:
+* 1: No penalty
+* 2: +2
+* 3: DNF
+
+Finally the `{time}` will be a binary representation for a float for the amount of seconds. For example, the time `1:23.45` would be stored as `42 a6 e6 66`
\ No newline at end of file
diff --git a/man_pages/.gitignore b/docs/man_pages/.gitignore
similarity index 100%
rename from man_pages/.gitignore
rename to docs/man_pages/.gitignore
diff --git a/man_pages/CLI_Timer.1 b/docs/man_pages/CLI_Timer.1
similarity index 100%
rename from man_pages/CLI_Timer.1
rename to docs/man_pages/CLI_Timer.1
diff --git a/man_pages/makefile b/docs/man_pages/makefile
similarity index 100%
rename from man_pages/makefile
rename to docs/man_pages/makefile
From 1120ced779a3ca6558f3c7dd9a4bdee813365aba Mon Sep 17 00:00:00 2001
From: 1Codealot <58225804+1Codealot@users.noreply.github.com>
Date: Fri, 24 May 2024 11:01:53 +0100
Subject: [PATCH 2/3] Update the workflow
---
.github/workflows/UBUNTU_makefile.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/UBUNTU_makefile.yml b/.github/workflows/UBUNTU_makefile.yml
index 0d0b21a..689afed 100644
--- a/.github/workflows/UBUNTU_makefile.yml
+++ b/.github/workflows/UBUNTU_makefile.yml
@@ -18,4 +18,4 @@ jobs:
run: make
- name: Install man page
- run: sudo make -C ./man_pages && make -C ./man_pages clean
\ No newline at end of file
+ run: sudo make -C ./docs/man_pages && make -C ./docs/man_pages clean
\ No newline at end of file
From c3b0d038a1b3d65d9036a2c3ad22bb0a17168892 Mon Sep 17 00:00:00 2001
From: 1Codealot <58225804+1Codealot@users.noreply.github.com>
Date: Fri, 24 May 2024 21:51:33 +0100
Subject: [PATCH 3/3] Updated the spec
---
docs/CLI_Timer_Session_format.md | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/docs/CLI_Timer_Session_format.md b/docs/CLI_Timer_Session_format.md
index fe63493..6796d2e 100644
--- a/docs/CLI_Timer_Session_format.md
+++ b/docs/CLI_Timer_Session_format.md
@@ -8,13 +8,15 @@ This is for version 1 of the file type.
## Metadata
Magic bytes: `CLI_TIMER{version_num}` (`43 4c 49 5f 54 49 4d 45 52 01`)
+
+Then there will be the initial seed in binary so that `--seed` stays consistent.
## Main body
In the original format it went `{scramble}§{time}~{Comment}`.
If there were penalties (i.e. +2 or DNF) it would do `{time}+` or `DNF({time})`.
-In this new version, it will instead be `[02]{scramble}[03]{penalty_num}{time}[02]{comment}[03]`.
+In this new version, it will instead be `[02]{scramble}[03]{penalty_num}{time}[02]{comment}[03]{rng_usage_count}`.
This is where `[02]` and `[03]` are the ASCII codes for "start of text" and "end of text" respectively.
The `{scramble}` and `{comment}` sections are just raw strings with no compression (for version 1; hopefully not for future versions).
@@ -23,4 +25,6 @@ The `{scramble}` and `{comment}` sections are just raw strings with no compressi
* 2: +2
* 3: DNF
-Finally the `{time}` will be a binary representation for a float for the amount of seconds. For example, the time `1:23.45` would be stored as `42 a6 e6 66`
\ No newline at end of file
+The `{time}` will be a binary representation for a float for the amount of seconds. For example, the time `1:23.45` would be stored as `42 a6 e6 66`
+
+Finally there will be the `{rng_usage_count}` so that when using a seed, it picks up where it left off.
\ No newline at end of file