aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/config_env.org20
-rw-r--r--org/config_git.org18
-rw-r--r--org/config_nix.org160
-rw-r--r--org/env.org6
-rw-r--r--org/shared.org10
-rw-r--r--org/sisu_version_info_and_doc_header_including_copyright_and_license.org12
-rw-r--r--org/xhtml.org9
7 files changed, 146 insertions, 89 deletions
diff --git a/org/config_env.org b/org/config_env.org
index 671b0a1c..5fcf7a53 100644
--- a/org/config_env.org
+++ b/org/config_env.org
@@ -83,26 +83,36 @@ echo "
• for a dev shell (development environment):
❯❯ nix develop
- ❯❯ nix develop ".#" --print-build-logs -c zsh
- ❯❯ nix develop ".#dsh-latex-pdf" --print-build-logs -c zsh
+ ❯❯ nix develop '.#' --print-build-logs -c zsh
+ ❯❯ nix develop '.#rsh-comprehensive-shell' --print-build-logs -c zsh
• to build project:
- ❯❯ nix build ".#" --print-build-logs
+ ❯❯ nix build '.#' --print-build-logs
- (see nix other/additional build options):
❯❯ nix flake show
"
#+END_SRC
-*** 3.0.6
+*** 3.0.7
#+NAME: direnv-version
#+BEGIN_SRC shell
-3.0.6
+3.0.7
#+END_SRC
#+NAME: direnv-sha
#+BEGIN_SRC shell
+sha256-bn8WANE5a91RusFmRI7kS751ApelG02nMcwRekC/qzc=
+#+END_SRC
+
+*** 3.0.6
+
+#+BEGIN_SRC shell
+3.0.6
+#+END_SRC
+
+#+BEGIN_SRC shell
sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM=
#+END_SRC
diff --git a/org/config_git.org b/org/config_git.org
index baedbd8e..eb3d596e 100644
--- a/org/config_git.org
+++ b/org/config_git.org
@@ -47,6 +47,7 @@
!conf/
!conf/**
!*.json
+!*.md
!*.org
!org/
!org/*.org
@@ -96,13 +97,26 @@
,*.gem
,*.gemspec
!sisu.gemspec
-,*_.rb
-,*.rb_
0???-*.patch
,*.gz
,*.xz
,*_
.*
+,*_.org
+,*_.nix
+,*_.rb
+,*.rb_
+,*_.txt
+,*_.md
+,*_
+,*.swp
+,*~
+\#*
+,*.\#*
+#!*/
+#\#*
+#*.\#*
+tmp/**
!.gitignore
!.gitattributes
!.envrc
diff --git a/org/config_nix.org b/org/config_nix.org
index 9b922882..b7085e73 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -1,6 +1,6 @@
-*- mode: org -*-
#+TITLE: configuration nix
-#+DESCRIPTION: makefile for spine
+#+DESCRIPTION: configuration nix
#+FILETAGS: :sisu:build:tools:
#+AUTHOR: Ralph Amissah
#+EMAIL: [[mailto:ralph.amissah@gmail.com][ralph.amissah@gmail.com]]
@@ -15,26 +15,15 @@
#+PROPERTY: header-args+ :mkdirp yes
#+OPTIONS: H:3 num:nil toc:t \n:t ::t |:t ^:nil -:t f:t *:t
-* nix :nix:
-
-#+NAME: nixpkgs_local
-#+BEGIN_SRC sh
-/srv/nix/nixpkgs
-#+END_SRC
-
* sisu
-
-- default.nix
-- shell.nix
-
-** flake.nix
+** flake.nix :flake:
#+HEADER: :tangle ../flake.nix
#+HEADER: :noweb yes
#+BEGIN_SRC nix
{
description = "sisu parser & document generator";
- inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; # "github:nixos/nixpkgs"; # "github:NixOS/nixpkgs/nixpkgs-unstable"; "nixpkgs/nixos-unstable"; "nixpkgs/nixos-21.11";
+ inputs.nixpkgs.url = "<<nixpkgs_url>>";
outputs = {
self,
nixpkgs,
@@ -113,7 +102,7 @@
];
inherit shellHook;
};
- dsh-epub = mkShell {
+ rsh-epub = mkShell {
name = "sisu dev shell for epub output";
inherit shell;
inherit devEnv;
@@ -144,7 +133,7 @@
];
inherit shellHook;
};
- dsh-html = mkShell {
+ rsh-html = mkShell {
name = "sisu dev shell for html output";
inherit shell;
inherit devEnv;
@@ -161,7 +150,7 @@
];
inherit shellHook;
};
- dsh-latex-pdf = mkShell {
+ rsh-latex-pdf = mkShell {
name = "sisu dev shell for latex & pdf output";
inherit shell;
inherit devEnv;
@@ -175,7 +164,8 @@
source-sans-pro
source-serif-pro
source-code-pro
- texliveFull # texliveTeTeX
+ texlive.combined.scheme-full
+ # texliveFull # texliveTeTeX
noto-fonts
noto-fonts-cjk-sans
takao
@@ -185,7 +175,52 @@
];
inherit shellHook;
};
- dsh-sqlite = mkShell {
+ rsh-comprehensive-shell = mkShell {
+ name = "comprehensive sisu dev shell (for epub & latex & pdf output)";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ ruby
+ rubyPackages.rake
+ rubyPackages.sqlite3
+ rubyPackages.thor
+ sqlite
+ graphicsmagick
+ zip
+ unzip
+ xz
+ openssl
+ libxml2
+ html-tidy
+ xmlstarlet
+ epubcheck
+ ebook_tools
+ libxml2
+ html-tidy
+ xmlstarlet
+ epubcheck
+ ebook_tools
+ epr
+ sigil
+ calibre #(suite includes: ebook-viewer)
+ foliate
+ validatePkgConfig
+ jq
+ source-sans-pro
+ source-serif-pro
+ source-code-pro
+ texlive.combined.scheme-full
+ # texliveFull # texliveTeTeX
+ noto-fonts
+ noto-fonts-cjk-sans
+ takao
+ validatePkgConfig
+ jq
+ git
+ ];
+ inherit shellHook;
+ };
+ rsh-sqlite = mkShell {
name = "sisu dev shell for sqlite3 output";
inherit shell;
inherit devEnv;
@@ -202,7 +237,7 @@
];
inherit shellHook;
};
- dsh-i18n = mkShell {
+ rsh-i18n = mkShell {
name = "sisu dev shell internationalization, po4a";
inherit shell;
inherit devEnv;
@@ -217,19 +252,20 @@
];
inherit shellHook;
};
- #default = import ./shell.nix {inherit pkgs;};
- });
+ #default = import ./shell.nix { inherit pkgs; };
+ });
};
}
#+END_SRC
-** shell.nix TODO
+** shell.nix :shell:
+*** tangle
#+HEADER: :tangle ../shell.nix
-#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --impure\n#!nix-shell -i bash"
#+HEADER: :tangle-mode (identity #o755)
+#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --impure\n#!nix-shell -i bash"
#+BEGIN_SRC nix
-{pkgs ? import <nixpkgs> {}}:
+{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
buildInputs = [
@@ -242,33 +278,18 @@ with pkgs;
'';
}
#+END_SRC
-{ pkgs ? import <nixpkgs> {} }:
-with pkgs;
-mkShell {
- buildInputs = [
- <<ruby_current>>
- sqlite
- graphicsmagick
- unzip
- xz
- zip
- openssl
- #texliveFull # texliveTeTeX
- nixFlakes
- validatePkgConfig
- nix-output-monitor
- nix-tree
- jq
- git
- #starship
- ];
- shellHook = ''
- '';
-}
+
+** shared parts
+*** nixpkgs url
+
+#+NAME: nixpkgs_url
+#+BEGIN_SRC nix
+github:NixOS/nixpkgs/nixpkgs-unstable
#+END_SRC
-** packages.nix
-*** ruby next
+*** ruby versions
+**** ruby package selection
+***** ruby next
#+NAME: ruby_next
#+BEGIN_SRC nix
@@ -278,7 +299,7 @@ rubyPackages<<ruby_version_next>>.sqlite3
rubyPackages<<ruby_version_next>>.thor
#+END_SRC
-*** ruby current
+***** ruby current
#+NAME: ruby_current
#+BEGIN_SRC nix
@@ -288,22 +309,25 @@ rubyPackages<<ruby_version_current>>.sqlite3
rubyPackages<<ruby_version_current>>.thor
#+END_SRC
-*** ruby legacy
+***** ruby legacy
#+NAME: ruby_legacy
#+BEGIN_SRC nix
-<<ruby_version_3_2>>
+ruby<<ruby_version_legacy>>
+rubyPackages<<ruby_version_legacy>>.rake
+rubyPackages<<ruby_version_legacy>>.sqlite3
+rubyPackages<<ruby_version_legacy>>.thor
#+END_SRC
-*** ruby versions current, next
-**** ruby version next
+**** SET ruby nix package versions (current, next)
+***** SET ruby version next
#+NAME: ruby_version_next
#+BEGIN_SRC nix
_3_4
#+END_SRC
-**** ruby version current
+***** SET ruby version current
- default to current nix version, which is ruby 3.3 but not provided as a fixed lable/tag, so leave blank and will
follow nix current nix
@@ -312,15 +336,15 @@ _3_4
#+BEGIN_SRC nix
#+END_SRC
-**** ruby version legacy
+***** SET ruby version legacy
#+NAME: ruby_version_legacy
#+BEGIN_SRC nix
_3_2
#+END_SRC
-*** ruby fixed versions
-**** ruby 3.4 - ruby_version_3_4
+**** ruby fixed versions
+***** ruby 3.4 - ruby_version_3_4
#+NAME: ruby_version_3_4
#+BEGIN_SRC nix
@@ -330,7 +354,7 @@ rubyPackages_3_4.sqlite3
rubyPackages_3_4.thor
#+END_SRC
-**** ruby 3.2 - ruby_version_3_2
+***** ruby 3.2 - ruby_version_3_2
#+NAME: ruby_version_3_2
#+BEGIN_SRC nix
@@ -340,7 +364,8 @@ rubyPackages_3_2.sqlite3
rubyPackages_3_2.thor
#+END_SRC
-*** nix related packages
+*** packages.nix
+**** nix related packages
#+NAME: nix_packages
#+BEGIN_SRC nix
@@ -349,7 +374,7 @@ bundler
bundix
#+END_SRC
-*** project relevant packages
+**** project relevant packages
#+NAME: packages_project_relevant
#+BEGIN_SRC nix
@@ -362,7 +387,7 @@ openssl
#texliveFull # texliveTeTeX
#+END_SRC
-*** project misc build packages
+**** project misc build packages
#+NAME: packages_build
#+BEGIN_SRC nix
@@ -379,9 +404,16 @@ git
#starship
#+END_SRC
-** sisu version SET VERSION :version:set:project:
+*** sisu version SET VERSION :version:set:project:
#+NAME: sisu_project_version
#+BEGIN_SRC emacs-lisp
<<./sisu_version_info_and_doc_header_including_copyright_and_license.org:sisu_project_version()>>
#+END_SRC
+
+* nix :nix:
+
+#+NAME: nixpkgs_local
+#+BEGIN_SRC sh
+/srv/nix/nixpkgs
+#+END_SRC
diff --git a/org/env.org b/org/env.org
index 87feb912..99e127ae 100644
--- a/org/env.org
+++ b/org/env.org
@@ -5943,10 +5943,10 @@ WOK
: "#{md.opt.sisu_data_dir?}/sisu/image"
images=%W[bullet_09.png arrow_next_red.png arrow_prev_red.png arrow_up_red.png]
images.each do |i| #move to avoid repeated tests
- if FileTest.file?("#{src}/#{i}")
+ if Pathname#exist?("#{src}/#{i}")
FileUtils::cp("#{src}/#{i}","#{pth}/#{i}") \
- unless FileTest.file?("#{pth}/#{i}")
- else STDERR.puts %{\t*WARN* did not find image - "#{i}" [#{__FILE__}:#{__LINE__}]}
+ unless Pathname#exist?("#{pth}/#{i}")
+ else STDERR.puts %{\t*WARN* did not find image - "#{i}" [#{__FILE__}:#{__LINE__}] [#{src}/#{i}]}
end
end
pth
diff --git a/org/shared.org b/org/shared.org
index 34d17bd0..ced99872 100644
--- a/org/shared.org
+++ b/org/shared.org
@@ -152,19 +152,21 @@ module SiSU_Images
def images_set
@pwd=(/(\S+?)(?:\/(?:#{Px[:lng_lst_rgx]}))?$/).match(Dir.pwd)[1]
def copy(src_path,dest_path,images=nil)
- if FileTest.directory?(src_path)
+ require 'pathname'
+ src_path = Pathname.new(src_path)
+ dest_path = Pathname.new(dest_path)
+ if src_path.directory?
FileUtils::cd(src_path)
unless images
images=Dir.glob("*.{png,jpg,gif,ico}")
end
- unless FileTest.directory?(dest_path) \
- or FileTest.symlink?(dest_path)
+ unless dest_path.directory?
FileUtils::mkdir_p(dest_path)
FileUtils::chmod(0755,dest_path)
end
if images.length > 0
images.each do |i|
- if FileTest.file?(i)
+ if Pathname#exist?(i)
FileUtils::cp_r(i,"#{dest_path}/#{i}")
FileUtils::chmod(0644,"#{dest_path}/#{i}")
else STDERR.puts %{\t*WARN* did not find image - "#{i}" [#{__FILE__}:#{__LINE__}]}
diff --git a/org/sisu_version_info_and_doc_header_including_copyright_and_license.org b/org/sisu_version_info_and_doc_header_including_copyright_and_license.org
index 6581f5e2..74471f33 100644
--- a/org/sisu_version_info_and_doc_header_including_copyright_and_license.org
+++ b/org/sisu_version_info_and_doc_header_including_copyright_and_license.org
@@ -32,7 +32,7 @@ encoding: utf-8
- Copyright: (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2019,
- 2020, 2021, Ralph Amissah,
+ 2020, 2021, 2024, 2025 Ralph Amissah,
All Rights Reserved.
- License: GPL 3 or later:
@@ -52,14 +52,12 @@ encoding: utf-8
more details.
You should have received a copy of the GNU General Public License along with
- this program. If not, see <http://www.gnu.org/licenses/>.
+ this program. If not, see <https://www.gnu.org/licenses/>.
If you have Internet connection, the latest version of the GPL should be
available at these locations:
- <http://www.fsf.org/licensing/licenses/gpl.html>
- <http://www.gnu.org/licenses/gpl.html>
-
- <http://www.sisudoc.org/sisu/en/manifest/gpl.fsf.html>
+ <https://www.fsf.org/licensing/licenses/gpl.html>
+ <https://www.gnu.org/licenses/gpl.html>
- SiSU uses:
- Standard SiSU markup syntax,
@@ -67,7 +65,7 @@ encoding: utf-8
- Standard SiSU object citation numbering and system
- Homepages:
- <http://www.sisudoc.org>
+ <https://www.sisudoc.org>
- Git
<https://git.sisudoc.org/projects/>
diff --git a/org/xhtml.org b/org/xhtml.org
index 3aef5c7e..1e57ea74 100644
--- a/org/xhtml.org
+++ b/org/xhtml.org
@@ -1180,10 +1180,11 @@ module SiSU_XHTML_EPUB2
end
end
def images
-#puts @md.env.path.image_source_include
-#puts @md.env.processing_path.epub
-#puts @md.env.path.image_source_include_local
-puts @md.file.output_path.epub.rel_image
+#REMOVE
+#puts @md.env.path.image_source_include + ' : ' + __FILE__ + ':' + __LINE__.to_s
+#puts @md.env.processing_path.epub + ' : ' + __FILE__ + ':' + __LINE__.to_s
+#puts @md.env.path.image_source_include_local + ' : ' + __FILE__ + ':' + __LINE__.to_s
+#puts @md.file.output_path.epub.rel_image + ' : ' + __FILE__ + ':' + __LINE__.to_s
#img_pth=$sisu_base_data + '/image'
img_pth=@md.env.path.image_source_include
img_src_pth=unless @md.opt.f_pth[:pth] =~/\/\S+?\/sisupod\/\S+?\/sisupod\/doc/