public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
From: Johnny Richard <johnny@johnnyrichard.com>
To: ~johnnyrichard/olang-devel@lists.sr.ht
Cc: Johnny Richard <johnny@johnnyrichard.com>
Subject: [PATCH olang v1 3/3] docs: remove pandoc dependency for man docs
Date: Mon, 16 Sep 2024 18:29:14 +0200	[thread overview]
Message-ID: <20240916163004.43389-4-johnny@johnnyrichard.com> (raw)
In-Reply-To: <20240916163004.43389-1-johnny@johnnyrichard.com>

Pandoc is an excelente tool and works pretty well, but I think it's
overkill to keep it just for create a manpage.  The man pages should be
pretty simple to create using the roff syntax so lets keep things
simpler with less dependency.

Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
---
 .build.yml             |  1 -
 docs/Makefile          |  4 ++--
 docs/manpages/olang.1  | 53 ++++++++++++++++++++++++++++++++++++++++++
 docs/manpages/olang.md | 40 -------------------------------
 4 files changed, 55 insertions(+), 43 deletions(-)
 create mode 100644 docs/manpages/olang.1
 delete mode 100644 docs/manpages/olang.md

diff --git a/.build.yml b/.build.yml
index 3cbba82..8265da2 100644
--- a/.build.yml
+++ b/.build.yml
@@ -5,7 +5,6 @@ packages:
   - make
   - hut
   - clang
-  - pandoc-cli
   - texinfo
 environment:
   site: o-lang.org
diff --git a/docs/Makefile b/docs/Makefile
index 3d01e0f..a38c091 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -26,8 +26,8 @@ manpages: $(BUILD_DIR) $(MANPAGES)/olang.1
 manual: $(SITE_DIR)/manual/index.html
 
 
-$(MANPAGES)/%.1: manpages/%.md
-	$(PANDOC) -s -t man $< > $@
+$(MANPAGES)/%.1: manpages/%.1
+	@cp $< $@
 
 $(DIST_FILE): all
 	tar -czf $(DIST_FILE) -C $(SITE_DIR) .
diff --git a/docs/manpages/olang.1 b/docs/manpages/olang.1
new file mode 100644
index 0000000..fed1e4e
--- /dev/null
+++ b/docs/manpages/olang.1
@@ -0,0 +1,53 @@
+.\" Man page for olang
+.\" Contact ~johnnyrichard/olang-devel@lists.sr.ht to report issues
+
+.TH man 1 "Feb 2024" "0.0" "olang man page"
+
+.SH NAME
+
+olang \- O programming language compiler
+
+.SH SYNOPSIS
+
+olang source_file
+
+[ --dump-tokens ] [ --dump-ast ] [ [ -o output_file [ --save-temps ] [ --arch arch ]  [ --sysroot dir] ]
+
+.SH DESCRIPTION
+
+.B olang
+is the official O programming language compiler, it is also a tool that contains
+utilities to help the language development.
+
+.SH OPTIONS
+
+.TP
+.BI \-\-dump-tokens
+Display lexical tokens given a soruce.ol code.
+
+.TP
+.BR \-\-dump-ast
+Display AST tree to stdout right after syntax analyzes
+
+.TP
+.BI \-o\  file
+Compile program into a binary file
+
+.TP
+.BR \-\-save\-temps
+Keep temp files used to compile program
+
+.TP
+.BI \-\-arch\  arch
+
+Binary arch: default to "x86_64", avaliable options ("x86_64" | "aarch64")
+
+.TP
+.BI \-\-sysroot\  dir
+
+System root dir where the GNU Assembler and GNU Linker are located: default to '/'
+
+
+.SH AUTHOR
+
+Olang Maintainers <~johnnyrichard/olang-devel@lists.sr.ht>
diff --git a/docs/manpages/olang.md b/docs/manpages/olang.md
deleted file mode 100644
index fbca5c3..0000000
--- a/docs/manpages/olang.md
+++ /dev/null
@@ -1,40 +0,0 @@
-% OLANG(1)
-% olang mantainers
-% Feb 2024
-
-# NAME
-
-olang - O Programming Language compiler
-
-# SYNOPSIS
-
-**olang**
-    source_file
-    [**----dump-tokens**]
-    [**----dump-ast**]
-    [**--o** ___output_file___ [**----save-temps**] [**----arch** ___arch___] [**----sysroot** ___dir___]]
-
-# DESCRIPTION
-
-**olang** is the offical O programming language compiler, it is also a tool that
-contains utilities to help the language development.
-
-# GENERAL OPTIONS
-
-**----dump-tokens**
-:   Display lexical tokens given a soruce.0 code.
-
-**----dump-ast**
-:   Display AST tree to stdout right after syntax analyzes
-
-**--o** ___file___
-:   Compile program into a binary file
-
-**----save-temps**
-:   Keep temp files used to compile program
-
-**----arch** ___architecture___
-:   Binary arch: default to "x86_64", avaliable options ("x86_64" | "aarch64")
-
-**----sysroot**  ___dir___
-:   System root dir where the GNU Assembler and GNU Linker are located: default to '/'
-- 
2.46.0


  parent reply	other threads:[~2024-09-16 14:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-16 16:29 [PATCH olang v1 0/3] docs: remove pandoc dependency Johnny Richard
2024-09-16 14:32 ` Carlos Maniero
2024-09-16 16:29 ` [PATCH olang v1 1/3] docs: move language spec to manual document Johnny Richard
2024-09-16 16:29 ` [PATCH olang v1 2/3] docs: stop using pandoc to generate page on website Johnny Richard
2024-09-16 16:29 ` Johnny Richard [this message]
2024-09-16 14:31   ` [olang/patches/.build.yml] build success builds.sr.ht
2024-09-16 16:37 ` [PATCH olang v1 0/3] docs: remove pandoc dependency Johnny Richard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240916163004.43389-4-johnny@johnnyrichard.com \
    --to=johnny@johnnyrichard.com \
    --cc=~johnnyrichard/olang-devel@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.johnnyrichard.com/olang.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox