From deb9bd75511c790d151449b020093f54515bb19f Mon Sep 17 00:00:00 2001 From: tjpcc Date: Wed, 18 Oct 2023 17:50:55 -0600 Subject: README cleanup --- README.gmi | 11 +++++++---- README.md | 10 ++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/README.gmi b/README.gmi index 5169016..8a5f95a 100644 --- a/README.gmi +++ b/README.gmi @@ -340,7 +340,7 @@ The Repository object at ".Repo" has methods: * .Blob(ctx, ref, path) reads the file at from commit and returns its contents. * .Tree(ctx, ref, path) retrieves the directory contents at from commit and returns a list of ObjectDescriptions. -Ref objects: +### Ref objects * .Repo a pointer back to the Repository. * .Name is the full ref name, starting with "refs/heads/" or "refs/tags/". * .Hash is the commit hash the ref points to. @@ -348,7 +348,7 @@ Ref objects: * .IsTag() returns whether the ref is a tag. * .ShortName() returns just the branch or tag name, with "/refs/heads/" or "refs/tags/" stripped off. -Commit objects: +### Commit objects * .Repo is a pointer back to the Repository. * .Hash is the full commit hash. * .Parents is a list of strings, of the parent commit hashes. @@ -363,13 +363,16 @@ Commit objects: * .ShortMessage() returns just the first line of the commit message. * .RestOfMessage() returns all but the first line of the commit message after trimming off an empty line at the start. -Readme objects: +### Readme objects * .Filename is the filename at which the README was found. * .RawContents is a string of the file contents. -* .GeminiEscapedContents() produces the file contents but with any ```-leading lines prefixed with a space. +* .GeminiEscapedContents() produces the file contents but with any triple-backtick-leading lines prefixed with a space. * .GopherEscapedContents(selector, host, port) produces the file contents formatted as gopher menu with each line an info-message line. +### ObjectDescription objects + ObjectDescription is a representation of a blob or tree: + * .Mode is an integer of the file permission bits. * .Type is a string of the object type ("blob", "tree", etc). * .Hash is the string git hash object object. diff --git a/README.md b/README.md index 52116a0..390f438 100644 --- a/README.md +++ b/README.md @@ -347,7 +347,7 @@ The Repository object at ".Repo" has methods: * .Blob(ctx, ref, path) reads the file at from commit and returns its contents. * .Tree(ctx, ref, path) retrieves the directory contents at from commit and returns a list of ObjectDescriptions. -Ref objects: +### Ref objects * .Repo a pointer back to the Repository. * .Name is the full ref name, starting with "refs/heads/" or "refs/tags/". @@ -356,7 +356,7 @@ Ref objects: * .IsTag() returns whether the ref is a tag. * .ShortName() returns just the branch or tag name, with "/refs/heads/" or "refs/tags/" stripped off. -Commit objects: +### Commit objects * .Repo is a pointer back to the Repository. * .Hash is the full commit hash. @@ -372,13 +372,15 @@ Commit objects: * .ShortMessage() returns just the first line of the commit message. * .RestOfMessage() returns all but the first line of the commit message after trimming off an empty line at the start. -Readme objects: +### Readme objects * .Filename is the filename at which the README was found. * .RawContents is a string of the file contents. -* .GeminiEscapedContents() produces the file contents but with any ```-leading lines prefixed with a space. +* .GeminiEscapedContents() produces the file contents but with any triple-backtick-leading lines prefixed with a space. * .GopherEscapedContents(selector, host, port) produces the file contents formatted as gopher menu with each line an info-message line. +### ObjectDescription objects + ObjectDescription is a representation of a blob or tree: * .Mode is an integer of the file permission bits. -- cgit v1.2.3