public inbox for ~johnnyrichard/olang-devel@lists.sr.ht
 help / color / mirror / code / Atom feed
* [olang/patches/.build.yml] build success
  2024-09-16 16:29 ` [PATCH olang v1 3/3] docs: remove pandoc dependency for man docs Johnny Richard
@ 2024-09-16 14:31   ` builds.sr.ht
  0 siblings, 0 replies; 7+ messages in thread
From: builds.sr.ht @ 2024-09-16 14:31 UTC (permalink / raw)
  To: Johnny Richard; +Cc: ~johnnyrichard/olang-devel

olang/patches/.build.yml: SUCCESS in 50s

[docs: remove pandoc dependency ][0] from [Johnny Richard][1]

[0]: https://lists.sr.ht/~johnnyrichard/olang-devel/patches/55062
[1]: mailto:johnny@johnnyrichard.com

✓ #1329317 SUCCESS olang/patches/.build.yml https://builds.sr.ht/~johnnyrichard/job/1329317

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH olang v1 0/3] docs: remove pandoc dependency
  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
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Carlos Maniero @ 2024-09-16 14:32 UTC (permalink / raw)
  To: Johnny Richard, ~johnnyrichard/olang-devel

Great work!

Approved.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH olang v1 0/3] docs: remove pandoc dependency
@ 2024-09-16 16:29 Johnny Richard
  2024-09-16 14:32 ` Carlos Maniero
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Johnny Richard @ 2024-09-16 16:29 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Johnny Richard

Johnny Richard (3):
  docs: move language spec to manual document
  docs: stop using pandoc to generate page on website
  docs: remove pandoc dependency for man docs

 .build.yml                                    |  1 -
 docs/Makefile                                 | 20 +++----
 docs/index.html                               | 57 +++++++++++++++++++
 docs/index.md                                 | 20 -------
 docs/manpages/olang.1                         | 53 +++++++++++++++++
 docs/manpages/olang.md                        | 40 -------------
 docs/manual/Makefile                          |  2 +-
 docs/manual/_header.html                      |  1 -
 docs/manual/olang.texi                        |  3 +
 .../specification.texi}                       | 13 ++---
 docs/template.html                            | 31 ----------
 11 files changed, 127 insertions(+), 114 deletions(-)
 create mode 100644 docs/index.html
 delete mode 100644 docs/index.md
 create mode 100644 docs/manpages/olang.1
 delete mode 100644 docs/manpages/olang.md
 rename docs/{pages/language-specification.md => manual/specification.texi} (97%)
 delete mode 100644 docs/template.html


base-commit: 3d4791adf7293e2f33d0dad1d3f426f33d690a6d
-- 
2.46.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH olang v1 1/3] docs: move language spec to manual document
  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 ` Johnny Richard
  2024-09-16 16:29 ` [PATCH olang v1 2/3] docs: stop using pandoc to generate page on website Johnny Richard
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Johnny Richard @ 2024-09-16 16:29 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Johnny Richard

Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
---
 docs/manual/Makefile                                |  2 +-
 docs/manual/_header.html                            |  1 -
 docs/manual/olang.texi                              |  3 +++
 .../specification.texi}                             | 13 ++++++-------
 docs/template.html                                  |  1 -
 5 files changed, 10 insertions(+), 10 deletions(-)
 rename docs/{pages/language-specification.md => manual/specification.texi} (97%)

diff --git a/docs/manual/Makefile b/docs/manual/Makefile
index 59aeb03..b2d29a4 100644
--- a/docs/manual/Makefile
+++ b/docs/manual/Makefile
@@ -4,7 +4,7 @@ HTML_HEADER=$(shell cat _header.html)
 
 all: html
 
-html: olang.texi introduction.texi installation.texi getting-started.texi contribution-guide.texi
+html: olang.texi introduction.texi installation.texi getting-started.texi specification.texi contribution-guide.texi
 	$(MAKEINFO) --set-customization-variable AFTER_BODY_OPEN="$(HTML_HEADER)" --css-include=../style.css -o html --html olang.texi
 
 .PHONY: clean
diff --git a/docs/manual/_header.html b/docs/manual/_header.html
index de347bb..9270b9a 100644
--- a/docs/manual/_header.html
+++ b/docs/manual/_header.html
@@ -3,7 +3,6 @@
   <nav>
     <span>[ <a href="/">Home</a> ]</span>
     <span>[ <a href="/manual/">Manual</a> ]</span>
-    <span>[ <a href="/pages/language-specification.html">Specification</a> ]</span>
     <span>[ <a href="https://sr.ht/~johnnyrichard/olang/sources" target="_blank">Sources &#8599;</a> ]</span>
     <span>[ <a href="https://sr.ht/~johnnyrichard/olang/lists" target="_blank">Mailing list &#8599;</a> ]</span>
   </nav>
diff --git a/docs/manual/olang.texi b/docs/manual/olang.texi
index 3ad28f4..eea4c29 100644
--- a/docs/manual/olang.texi
+++ b/docs/manual/olang.texi
@@ -27,6 +27,7 @@ programming language.
 * Introduction::
 * Installation::
 * Getting Started::
+* Language Specification::
 * Contribution Guide::
 @end menu
 
@@ -36,6 +37,8 @@ programming language.
 
 @include getting-started.texi
 
+@include specification.texi
+
 @include contribution-guide.texi
 
 @bye
diff --git a/docs/pages/language-specification.md b/docs/manual/specification.texi
similarity index 97%
rename from docs/pages/language-specification.md
rename to docs/manual/specification.texi
index 1a70810..e028fe9 100644
--- a/docs/pages/language-specification.md
+++ b/docs/manual/specification.texi
@@ -1,7 +1,7 @@
-% O programming language specification
+@node Specification
+@chapter Specification
 
-Abstract
---------
+@section Introduction
 
 This document specifies the semantics and behavior of the O Programming
 Language for compiler designers be informed how the language is designed.
@@ -9,8 +9,7 @@ Language for compiler designers be informed how the language is designed.
 This specification is a DRAFT and will be the discussions drive over olang-dev
 mailing list.
 
-Language Syntax
----------------
+@section Language Syntax
 
 This is the O Programming Language EBNF grammar specification[^1]
 
@@ -20,7 +19,7 @@ This is the O Programming Language EBNF grammar specification[^1]
 NOTE: This grammar spec is a DRAFT and it covers only a small portion of the
 language.
 
-```
+@verbatim
 (* Entry Point *)
 <translation-unit>     ::= (<ows> <external-declaration> <ows> (<end-of-statement> | <end-of-file>))*
 
@@ -96,4 +95,4 @@ language.
 <digit>               ::= #'[0-9]'
 <hex-digit>           ::= <digit> | #'[a-fA-F]'
 <end-of-file>         ::= #'$'
-```
+@end verbatim
diff --git a/docs/template.html b/docs/template.html
index 232ec59..c39ca05 100644
--- a/docs/template.html
+++ b/docs/template.html
@@ -13,7 +13,6 @@
     <nav>
       <span>[ <a href="/">Home</a> ]</span>
       <span>[ <a href="/manual/">Manual</a> ]</span>
-      <span>[ <a href="/pages/language-specification.html">Specification</a> ]</span>
       <span>[ <a href="https://sr.ht/~johnnyrichard/olang/sources" target="_blank">Sources &#8599;</a> ]</span>
       <span>[ <a href="https://sr.ht/~johnnyrichard/olang/lists" target="_blank">Mailing list &#8599;</a> ]</span>
     </nav>
-- 
2.46.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH olang v1 2/3] docs: stop using pandoc to generate page on website
  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 ` Johnny Richard
  2024-09-16 16:29 ` [PATCH olang v1 3/3] docs: remove pandoc dependency for man docs Johnny Richard
  2024-09-16 16:37 ` [PATCH olang v1 0/3] docs: remove pandoc dependency Johnny Richard
  4 siblings, 0 replies; 7+ messages in thread
From: Johnny Richard @ 2024-09-16 16:29 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Johnny Richard

The only page being generated with pandoc is the index, since we are not
using pandoc to generate any other pages we can drop the dependency.

Signed-off-by: Johnny Richard <johnny@johnnyrichard.com>
---
 docs/Makefile      | 16 ++++---------
 docs/index.html    | 57 ++++++++++++++++++++++++++++++++++++++++++++++
 docs/index.md      | 20 ----------------
 docs/template.html | 30 ------------------------
 4 files changed, 62 insertions(+), 61 deletions(-)
 create mode 100644 docs/index.html
 delete mode 100644 docs/index.md
 delete mode 100644 docs/template.html

diff --git a/docs/Makefile b/docs/Makefile
index ae5e546..3d01e0f 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -1,17 +1,14 @@
 PANDOC     := pandoc
-INDEX      := index.md
+INDEX      := index.html
 BUILD_DIR  := build
 SITE_DIR   := $(BUILD_DIR)/site
 TARGET     := $(SITE_DIR)/index.html
 DIST_FILE  := site.tar.gz
 STYLE      := style.css
-PAGES_DIR  := pages
 MANPAGES   := $(BUILD_DIR)/man
-PAGES      := $(wildcard $(PAGES_DIR)/*.md)
-HTML_PAGES := $(patsubst $(PAGES_DIR)/%.md, $(SITE_DIR)/$(PAGES_DIR)/%.html, $(PAGES))
 
 .PHONY: all
-all:  $(BUILD_DIR) $(STYLE) $(TARGET) $(PAGES) manpages manual
+all:  $(BUILD_DIR) $(STYLE) $(TARGET) manpages manual
 
 .PHONY: clean
 clean:
@@ -35,12 +32,12 @@ $(MANPAGES)/%.1: manpages/%.md
 $(DIST_FILE): all
 	tar -czf $(DIST_FILE) -C $(SITE_DIR) .
 
-$(TARGET): $(HTML_PAGES)
-	$(PANDOC) -s --template template.html -f markdown -t html $(INDEX) > $(TARGET)
+$(TARGET): index.html
+	@cp $(INDEX) $(TARGET)
 
 $(BUILD_DIR):
 	@mkdir -p $@
-	@mkdir -p $(SITE_DIR)/$(PAGES_DIR)
+	@mkdir -p $(SITE_DIR)
 	@mkdir -p $(MANPAGES)
 
 $(STYLE): $(BUILD_DIR)
@@ -50,6 +47,3 @@ $(SITE_DIR)/manual/index.html: manual/*.texi
 	make -C manual
 	rm -rf $(SITE_DIR)/manual
 	mv manual/html $(SITE_DIR)/manual
-
-$(SITE_DIR)/$(PAGES_DIR)/%.html: $(PAGES_DIR)/%.md
-	$(PANDOC) -s --template template.html -f markdown -t html --toc $< > $@
diff --git a/docs/index.html b/docs/index.html
new file mode 100644
index 0000000..bda4ddc
--- /dev/null
+++ b/docs/index.html
@@ -0,0 +1,57 @@
+<!doctype html>
+<html lang="en">
+<head>
+  <meta charset="utf-8">
+  <meta name="viewport" content="width=device-width, initial-scale=1.0">
+  <title>olang</title>
+  <link rel="stylesheet" href="/style.css">
+</head>
+<body>
+  <header>
+    <h1><span class="logo-name">olang</span> | O Programming Language</h1>
+    <nav>
+      <span>[ <a href="/">Home</a> ]</span>
+      <span>[ <a href="/manual/">Manual</a> ]</span>
+      <span>[ <a href="https://sr.ht/~johnnyrichard/olang/sources" target="_blank">Sources &#8599;</a> ]</span>
+      <span>[ <a href="https://sr.ht/~johnnyrichard/olang/lists" target="_blank">Mailing list &#8599;</a> ]</span>
+    </nav>
+  </header>
+  <article>
+    <p>
+      The O language is a system programming language crafted to be remarkably
+      simple and flexible. It stands not as a replacement for C, but rather as
+      a complementary counterpart, as both can coexist within the same source
+      code. O language boasts minimal abstraction, ensuring seamless
+      integration with C and almost predictable machine code.
+    </p>
+
+    <p>
+      olang is a deterministic system language that follows tree principles:
+    </p>
+
+    <ul>
+      <li>
+        <strong>fights complexity</strong>
+        by providing a simple syntax with a low level of abstraction
+      </li>
+      <li>
+        <strong>doesn't babysit programmers</strong>
+        it gives you the freedom of shooting your own foot
+      </li>
+      <li>
+        <strong>aims easy maintainability</strong>
+        by providing a syntax with a low refactoring overhead.
+      </li>
+    </ul>
+
+    <h2>Notice</h2>
+
+    <p>
+      This software is unfinished and not production ready.
+    </p>
+  </article>
+  <footer>
+    © 2024 olang maintainers
+  </footer>
+</body>
+</html>
diff --git a/docs/index.md b/docs/index.md
deleted file mode 100644
index 13aab32..0000000
--- a/docs/index.md
+++ /dev/null
@@ -1,20 +0,0 @@
-% Introduction
-
-The O language is a system programming language crafted to be remarkably simple
-and flexible. It stands not as a replacement for C, but rather as a
-complementary counterpart, as both can coexist within the same source code. O
-language boasts minimal abstraction, ensuring seamless integration with C and
-almost predictable machine code.
-
-olang is a deterministic system language that follows tree principles:
-
-- **fights complexity** by providing a simple syntax with a low level of
-  abstraction.
-- **doesn't babysit programmers**, it gives you the freedom of shooting your
-  own foot.
-- **aims easy maintainability** by providing a syntax with a low refactoring
-  overhead.
-
-## Notice
-
-This software is unfinished and not production ready.
diff --git a/docs/template.html b/docs/template.html
deleted file mode 100644
index c39ca05..0000000
--- a/docs/template.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!doctype html>
-<html lang="en">
-<head>
-  <meta charset="utf-8">
-  <meta name="viewport" content="width=device-width, initial-scale=1.0">
-  <meta name="date" content='$date-meta$'>
-  <title>$title$ | olang</title>
-  <link rel="stylesheet" href="/style.css">
-</head>
-<body>
-  <header>
-    <h1><span class="logo-name">olang</span> | O Programming Language</h1>
-    <nav>
-      <span>[ <a href="/">Home</a> ]</span>
-      <span>[ <a href="/manual/">Manual</a> ]</span>
-      <span>[ <a href="https://sr.ht/~johnnyrichard/olang/sources" target="_blank">Sources &#8599;</a> ]</span>
-      <span>[ <a href="https://sr.ht/~johnnyrichard/olang/lists" target="_blank">Mailing list &#8599;</a> ]</span>
-    </nav>
-  </header>
-  <article>
-    <h1>$title$</h1>
-    $toc$
-
-    $body$
-  </article>
-  <footer>
-    © 2024 olang maintainers
-  </footer>
-</body>
-</html>
-- 
2.46.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH olang v1 3/3] docs: remove pandoc dependency for man docs
  2024-09-16 16:29 [PATCH olang v1 0/3] docs: remove pandoc dependency Johnny Richard
                   ` (2 preceding siblings ...)
  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
  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
  4 siblings, 1 reply; 7+ messages in thread
From: Johnny Richard @ 2024-09-16 16:29 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel; +Cc: Johnny Richard

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH olang v1 0/3] docs: remove pandoc dependency
  2024-09-16 16:29 [PATCH olang v1 0/3] docs: remove pandoc dependency Johnny Richard
                   ` (3 preceding siblings ...)
  2024-09-16 16:29 ` [PATCH olang v1 3/3] docs: remove pandoc dependency for man docs Johnny Richard
@ 2024-09-16 16:37 ` Johnny Richard
  4 siblings, 0 replies; 7+ messages in thread
From: Johnny Richard @ 2024-09-16 16:37 UTC (permalink / raw)
  To: ~johnnyrichard/olang-devel

Applied, thanks for reviewing it.

Build: https://builds.sr.ht/~johnnyrichard/job/1329322

To git.sr.ht:~johnnyrichard/olang
   3d4791a..5a9ba5e  main -> main


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-09-16 14:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH olang v1 3/3] docs: remove pandoc dependency for man docs Johnny Richard
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

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