summaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/cgi_spine_search.org68
-rw-r--r--org/config_d_cfte.org11
-rw-r--r--org/config_dub.org17
-rw-r--r--org/config_env.org60
-rw-r--r--org/config_git.org2
-rw-r--r--org/config_make.org10
-rw-r--r--org/config_nix.org30
-rw-r--r--org/nixpkgs_overlays_d_related.org14
-rw-r--r--org/spine_version_info_and_doc_header_including_copyright_and_license.org109
9 files changed, 219 insertions, 102 deletions
diff --git a/org/cgi_spine_search.org b/org/cgi_spine_search.org
index 561cba8..e6252ea 100644
--- a/org/cgi_spine_search.org
+++ b/org/cgi_spine_search.org
@@ -37,11 +37,11 @@ struct Version {
}
#+END_SRC
-** set program version VERSION :version:set:project:
+** program version VERSION :version:set:project:
#+NAME: spine_version_set
#+BEGIN_SRC d
-enum _ver = Version(0, 12, 0);
+enum _ver = Version(<<spine_version_mmp>>);
#+END_SRC
** compilation restrictions (supported compilers)
@@ -2200,58 +2200,20 @@ _cfg.doc_root_db
see configuration_cfte.org
-*** document header including copyright & license
+*** spine project VERSION (major, minor, patch) :version:set:project:
-#+NAME: doc_header_including_copyright_and_license
-#+BEGIN_SRC txt
-/+
-- Name: Spine, Doc Reform
- - Description: documents, structuring, processing, publishing, search
- - static content generator
-
- - Author: Ralph Amissah
- [ralph.amissah@gmail.com]
-
- - Copyright: (C) 2015 - 2023 Ralph Amissah, All Rights
- Reserved.
-
- - License: AGPL 3 or later:
-
- Spine (SiSU), a framework for document structuring, publishing and
- search
-
- Copyright (C) Ralph Amissah
-
- This program is free software: you can redistribute it and/or modify it
- under the terms of the GNU AFERO General Public License as published by the
- Free Software Foundation, either version 3 of the License, or (at your
- option) any later version.
-
- This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- more details.
-
- You should have received a copy of the GNU General Public License along with
- this program. If not, see [https://www.gnu.org/licenses/].
-
- If you have Internet connection, the latest version of the AGPL should be
- available at these locations:
- [https://www.fsf.org/licensing/licenses/agpl.html]
- [https://www.gnu.org/licenses/agpl.html]
-
- - Spine (by Doc Reform, related to SiSU) uses standard:
- - docReform markup syntax
- - standard SiSU markup syntax with modified headers and minor modifications
- - docReform object numbering
- - standard SiSU object citation numbering & system
-
- - Homepages:
- [https://www.doc_reform.org]
- [https://www.sisudoc.org]
+#+NAME: spine_version_mmp
+#+HEADER: :noweb yes
+#+BEGIN_SRC emacs-lisp
+<<./spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version_major_minor_patch()>>
+#+END_SRC
- - Git
- [https://git.sisudoc.org/projects/?p=software/spine.git;a=summary]
+* document header including copyright & license
-+/
+#+NAME: doc_header_including_copyright_and_license
+#+HEADER: :noweb yes
+#+BEGIN_SRC emacs-lisp
+<<./spine_doc_header_including_copyright_and_license.org:spine_doc_header_including_copyright_and_license()>>
#+END_SRC
+
+* __END__
diff --git a/org/config_d_cfte.org b/org/config_d_cfte.org
index 6b2c96c..91ecf1d 100644
--- a/org/config_d_cfte.org
+++ b/org/config_d_cfte.org
@@ -21,13 +21,14 @@
** program version: version.txt
-*** set program version SET VERSION :version:set:project:
+*** spine project VERSION (major, minor, patch) :version:set:project:
- comma separated numbers: major, minor, patch
-#+NAME: spine_version_set
-#+BEGIN_SRC d
-0, 12, 0
+#+NAME: spine_version_mmp
+#+HEADER: :noweb yes
+#+BEGIN_SRC emacs-lisp
+<<./spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version_major_minor_patch()>>
#+END_SRC
*** set program version tangle :version:
@@ -41,7 +42,7 @@ struct Version {
int minor;
int patch;
}
-enum _ver = Version(<<spine_version_set>>);
+enum _ver = Version(<<spine_version_mmp>>);
<<spine_compiler_restrictions>>
#+END_SRC
diff --git a/org/config_dub.org b/org/config_dub.org
index e6b2697..e006da1 100644
--- a/org/config_dub.org
+++ b/org/config_dub.org
@@ -17,13 +17,20 @@
- [[./doc-reform.org][doc-reform.org]] [[./][org/]]
-** spine version SET VERSION :version:set:project:
+** spine project VERSION :version:set:project:
-#+NAME: spine_version_set
-#+BEGIN_SRC sh
-0.12.0
+#+NAME: spine_version
+#+HEADER: :noweb yes
+#+BEGIN_SRC emacs-lisp
+<<./spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>>
#+END_SRC
+** dub
+
+- https://github.com/dlang/dub/
+- https://code.dlang.org/getting_started
+- https://code.dlang.org/docs/commandline
+
*** dub.json :dub:config:json:
**** dub.json
***** file-system download external dependencies
@@ -42,7 +49,7 @@
],
"copyright": "Copyright © 2002, 2023 Ralph Amissah",
"name": "spine_search",
- "version": "0.12.0",
+ "version": "<<spine_version>>",
"description": "cgi search for spine, a sisu like document parser",
"homepage": "https://sisudoc.org",
"license": "AGPL-3.0+",
diff --git a/org/config_env.org b/org/config_env.org
index 75be302..5a02a2c 100644
--- a/org/config_env.org
+++ b/org/config_env.org
@@ -20,10 +20,23 @@
- [[./config_make.org][config_make.org]]
* envrc
+** nixDevEnv envrc :envrc:
+
+#+HEADER: :tangle ../nixDevEnv.sh
+#+BEGIN_SRC sh
+if [ -f .envrc ]; then
+ source_env_if_exists .envrc || source .envrc
+fi
+#+END_SRC
+
** envrc :envrc:
+#+NAME: envrc
#+HEADER: :tangle ../.envrc
#+BEGIN_SRC sh
+if [ -f .envrc-git-init ]; then
+ source_env_if_exists .envrc-git-init || source .envrc-git-init
+fi
if [ -f .envrc-local ]; then
source_env_if_exists .envrc-local || source .envrc-local
fi
@@ -51,23 +64,51 @@ fi
watch_file flake.lock
watch_file flake.nix
watch_file makefile
+watch_file nixDevEnv.sh
watch_file .envrc-local
watch_file .envrc-nix
PATH_add result/bin
-nix flake update
-nix flake check
-nix flake show
use flake .
#use flake .#default
+echo "
+- consider running:
+ ❯❯ nix flake show
+ ❯❯ nix flake update && nix flake check && nix flake show
+
+- for a dev shell:
+ ❯❯ nix develop
+ ❯❯ nix develop ".#" --print-build-logs -c zsh
+
+- to build project:
+ ❯❯ nix build ".#spine-search-nixpkgs-ldc" --print-build-logs
+ ❯❯ nix build ".#spine-search-ovlerlay-ldc" --print-build-logs
+ - (see nix other/additional build options):
+ ❯❯ nix flake show
+
+ ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh
+ ❯❯ dub build --compiler=ldmd --build=release --combined --skip-registry=all
+"
#+END_SRC
+*** 3.0.0
+
#+NAME: direnv-version
#+BEGIN_SRC sh
-2.4.0
+3.0.0
#+END_SRC
#+NAME: direnv-sha
#+BEGIN_SRC sh
+sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg=
+#+END_SRC
+
+*** 2.4.0
+
+#+BEGIN_SRC sh
+2.4.0
+#+END_SRC
+
+#+BEGIN_SRC sh
sha256-XQzUAvL6pysIJnRJyR7uVpmUSZfc7LSgWQwq/4mBr1U=
#+END_SRC
@@ -90,6 +131,17 @@ NixDirEnvSHA="sha256-0000000000000000000000000000000000000000000="
direnv fetchurl https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc
#+END_SRC
+** .envrc-git-init
+
+#+HEADER: :tangle ../.envrc-git-init
+#+HEADER: :noweb yes
+#+BEGIN_SRC sh
+if [[ ! -d ./.git ]]; then
+ git init
+ git add .
+fi
+#+END_SRC
+
** .envrc-local CHECK MODIFY
- bespoke modify appropriately and generate if needed
diff --git a/org/config_git.org b/org/config_git.org
index a9ad199..1106715 100644
--- a/org/config_git.org
+++ b/org/config_git.org
@@ -31,9 +31,11 @@
!nix/**
!*.nix
!flake.lock
+!nixDevEnv.sh
!.envrc
!.envrc-local
!.envrc-nix
+!.envrc-git-init
!.env
!.env/**
!nix-overlays
diff --git a/org/config_make.org b/org/config_make.org
index 145fcbe..45ed889 100644
--- a/org/config_make.org
+++ b/org/config_make.org
@@ -18,11 +18,12 @@
* project
** version info SET VERSION :version:set:project:
-*** project SET VERSION
+*** project VERSION
-#+NAME: spine_version_set
-#+BEGIN_SRC sh
-0.12.0
+#+NAME: spine_version
+#+HEADER: :noweb yes
+#+BEGIN_SRC emacs-lisp
+<<./spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>>
#+END_SRC
*** build tools if specified
@@ -44,6 +45,7 @@
* dr spine_search
** spine_search makefile :makefile
*** tangle
+
#+HEADER: :tangle ../makefile
#+HEADER: :noweb yes
#+BEGIN_SRC makefile
diff --git a/org/config_nix.org b/org/config_nix.org
index c209cc5..a3bb2d2 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -41,9 +41,9 @@
d-overlay,
} @ inputs: let
pname = "spine_search";
- version = "<<spine_version_set>>";
+ version = "<<spine_version>>";
shell = ./shell.nix;
- devEnv = ./.envrc;
+ devEnv = ./nixDevEnv.sh;
supportedSystems = ["x86_64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); # nixpkgs instantiated for supported system types
@@ -292,21 +292,6 @@ with pkgs;
#aria #wget #curl
];
shellHook = ''
- echo '
- shell.nix echo ❯❯
-
- ❯❯ nix flake update && nix flake check --show-trace && nix flake show && nix develop ".#devShell" -c zsh
-
- ❯❯ nix develop
- ❯❯ nix develop -c zsh
-
- ❯❯ nix build
- ❯❯ nix build ".#default" --print-build-logs
- ❯❯ nix build ".#spine-search-dmd" --print-build-logs |& nom
- ❯❯ nix build ".#spine-search-ldc" --print-build-logs |& nom
-
- ❯❯ dub build --compiler=ldmd --build=release --combined --skip-registry=all
- '
'';
}
#+END_SRC
@@ -501,7 +486,7 @@ with (
];
meta = with pkgs.lib; {
pname = "spine-search";
- version = "<<spine_version_set>>";
+ version = "<<spine_version>>";
homepage = "https://sisudoc.org";
description = "cgi sqlite search form for document object search";
longDescription = ''
@@ -527,11 +512,12 @@ installPhase = ''
#+END_SRC
** variables used SET
-*** spine version SET VERSION :version:set:project:
+*** spine project VERSION :version:set:project:
-#+NAME: spine_version_set
-#+BEGIN_SRC sh
-0.12.0
+#+NAME: spine_version
+#+HEADER: :noweb yes
+#+BEGIN_SRC emacs-lisp
+<<./spine_version_info_and_doc_header_including_copyright_and_license.org:spine_project_version()>>
#+END_SRC
*** nixpkgs path / url
diff --git a/org/nixpkgs_overlays_d_related.org b/org/nixpkgs_overlays_d_related.org
index 6bd14f5..3a7b545 100644
--- a/org/nixpkgs_overlays_d_related.org
+++ b/org/nixpkgs_overlays_d_related.org
@@ -183,6 +183,7 @@ nix flake update && nix flake check --show-trace && nix flake info && echo "" &&
# find . -name "*.o" | xargs rm -rf
,*
!.gitignore
+!nixDevEnv.sh
!.envrc
!.envrc-local
!.envrc-nix
@@ -214,9 +215,9 @@ tmp/**
#+END_SRC
** .env*
-*** .envrc
+*** nixDevEnv.sh (.envrc)
-#+HEADER: :tangle-NO "../nix-overlays/.envrc"
+#+HEADER: :tangle-NO "../nix-overlays/nixDevEnv.sh"
#+BEGIN_SRC sh
if [ -f .envrc-local ]; then
source_env_if_exists .envrc-local || source .envrc-local
@@ -272,14 +273,9 @@ watch_file flake.lock
watch_file flake.nix
watch_file shell.nix
watch_file makefile
-watch_file .envrc
+watch_file nixDevEnv.sh
watch_file .envrc-local
watch_file .envrc-nix
-nix_direnv_watch_file flake.nix
-nix_direnv_watch_file shell.nix
-nix_direnv_watch_file .envrc
-nix_direnv_watch_file .envrc-local
-nix_direnv_watch_file .envrc-nix
nix flake update
nix flake check
nix flake show
@@ -305,7 +301,7 @@ use flake .
} @ inputs: let
name = "dev-dub";
shell = ./shell.nix;
- devEnv = ./.envrc;
+ devEnv = ./nixDevEnv.sh; # ./.envrc;
supportedSystems = ["x86_64-linux"];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;});
diff --git a/org/spine_version_info_and_doc_header_including_copyright_and_license.org b/org/spine_version_info_and_doc_header_including_copyright_and_license.org
new file mode 100644
index 0000000..db022f5
--- /dev/null
+++ b/org/spine_version_info_and_doc_header_including_copyright_and_license.org
@@ -0,0 +1,109 @@
+-*- mode: org -*-
+#+TITLE: spine (doc_reform) object-centric document abstraction
+#+DESCRIPTION: documents - structuring, publishing in multiple formats & search
+#+FILETAGS: :spine:abstraction:
+#+AUTHOR: Ralph Amissah
+#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
+#+COPYRIGHT: Copyright (C) 2015 - 2023 Ralph Amissah
+#+LANGUAGE: en
+#+STARTUP: content hideblocks hidestars noindent entitiespretty
+#+PROPERTY: header-args :noweb yes
+#+PROPERTY: header-args+ :exports code
+#+PROPERTY: header-args+ :results no
+#+PROPERTY: header-args+ :cache no
+#+PROPERTY: header-args+ :padline no
+#+PROPERTY: header-args+ :mkdirp yes
+#+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t
+
+- [[./doc-reform.org][doc-reform.org]] [[./][org/]]
+
+* spine doc header including copyright & license
+
+#+NAME: spine_doc_header_including_copyright_and_license
+#+BEGIN_SRC org
+/+
+- Name: Spine, Doc Reform [a part of]
+ - Description: documents, structuring, processing, publishing, search
+ - static content generator
+
+ - Author: Ralph Amissah
+ [ralph.amissah@gmail.com]
+
+ - Copyright: (C) 2015 - 2023 Ralph Amissah, All Rights Reserved.
+
+ - License: AGPL 3 or later:
+
+ Spine (SiSU), a framework for document structuring, publishing and
+ search
+
+ Copyright (C) Ralph Amissah
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU AFERO General Public License as published by the
+ Free Software Foundation, either version 3 of the License, or (at your
+ option) any later version.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ more details.
+
+ You should have received a copy of the GNU General Public License along with
+ this program. If not, see [https://www.gnu.org/licenses/].
+
+ If you have Internet connection, the latest version of the AGPL should be
+ available at these locations:
+ [https://www.fsf.org/licensing/licenses/agpl.html]
+ [https://www.gnu.org/licenses/agpl.html]
+
+ - Spine (by Doc Reform, related to SiSU) uses standard:
+ - docReform markup syntax
+ - standard SiSU markup syntax with modified headers and minor modifications
+ - docReform object numbering
+ - standard SiSU object citation numbering & system
+
+ - Homepages:
+ [https://www.doc_reform.org]
+ [https://www.sisudoc.org]
+
+ - Git
+ [https://git.sisudoc.org/projects/?p=software/spine.git;a=summary]
+
++/
+#+END_SRC
+
+* spine version info SET VERSION
+** version in full
+
+#+NAME: spine_project_version
+#+BEGIN_SRC org
+0.14.0
+#+END_SRC
+
+** version parts (major, minor, patch)
+
+#+NAME: spine_project_version_major_minor_patch
+#+BEGIN_SRC org
+<<spine_project_version_part_major>>, <<spine_project_version_part_minor>>, <<spine_project_version_part_patch>>
+#+END_SRC
+
+*** major
+
+#+NAME: spine_project_version_part_major
+#+BEGIN_SRC org
+0
+#+END_SRC
+
+*** minor
+
+#+NAME: spine_project_version_part_minor
+#+BEGIN_SRC org
+14
+#+END_SRC
+
+*** patch
+
+#+NAME: spine_project_version_part_patch
+#+BEGIN_SRC org
+0
+#+END_SRC