From ec05efe62d7239c5e6d8cb9e1d95ff8c4d8b8ed3 Mon Sep 17 00:00:00 2001 From: natri0 Date: Sun, 6 Apr 2025 19:24:37 +0300 Subject: [PATCH] Add readme --- readme.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..78ec91c --- /dev/null +++ b/readme.md @@ -0,0 +1,36 @@ +# bytefield + +a simple Obsidian plugin adding support for byte-field diagrams. + +## usage + +a byte-field diagram is one of those tables that show offsets of fields in e.g. network packets: + +image + +to create one, simply make a codeblock and add your fields. + + ```bytediag + field1: 3 + field2: 4 + field3: 1 + ``` + +simple diagram as above + +every line has to contain the name of the field, `: ` as the delimiter and the length of the field in bytes. lines that do not contain `: ` are silently ignored, so feel free to use them as comments. + +also, it is possible to change the offset where the diagram starts: + + ```bytediag + !curOffset: 7 + field1: 5 + field2: 3 + field3: 4 + ``` + +diagram with starting offset set to 7 + +fields are wrapped around if they're longer than the row: + +diagram with one of the fields wrapping around