aboutsummaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/config_env.org22
-rw-r--r--org/config_git.org1
-rw-r--r--org/config_nix.org28
-rw-r--r--org/default_regex.org6
-rw-r--r--org/ocda_functions.org4
-rw-r--r--org/out_text.org8
-rw-r--r--org/spine_info.org4
7 files changed, 59 insertions, 14 deletions
diff --git a/org/config_env.org b/org/config_env.org
index 2a2dac1..3e622ee 100644
--- a/org/config_env.org
+++ b/org/config_env.org
@@ -39,6 +39,8 @@ if [ -f .envrc-git-init ]; then
fi
if [ -f .envrc-local ]; then
source_env_if_exists .envrc-local || source .envrc-local
+elif [ -f .envrc-local_ ]; then
+ source_env_if_exists .envrc-local_ || source .envrc-local_
fi
if [ -f .envrc-nix ]; then
source_env_if_exists .envrc-nix || source .envrc-nix
@@ -122,6 +124,8 @@ echo '
❯❯ ${SpineBIN} -v --sqlite-db-create --sqlite-db-filename=${SpineSQLdb} --sqlite-db-path=./_tmp-db
❯❯ ${SpineBIN} -v --sqlite-update --sqlite-db-filename=${SpineSQLdb} --sqlite-db-path=./_tmp-db ./markup/pod/*
+
+ ❯❯ $SpineBIN --source --pod --curate --text --latex --epub --html --manifest --html-link-search --html-link-pdf --html-link-text --html-link-curate --html-link-markup --html-link-source --html-link-pod --html-link-metadata --cgi-sqlite-search-filename="$SpineCGIform" --cgi-url-action="$SpineSearchActionRemote" --sqlite-db-path="$SpineDBpath" --sqlite-db-filename="$SpineSQLdb" --www-url-doc-root=$SpineURLdocRoot --set-papersize="a4,letter" --output=$SpineOUT $SpinePOD/*
'
echo "•
❯❯ ${SpineBIN} -v --source --pod --epub --html --html-link-curate --html-link-markup --curate --output=${SpineOUT} ${SpinePOD}/*
@@ -140,6 +144,19 @@ if [[ ! -d ./.git ]]; then
fi
#+END_SRC
+** ,version (project & git version info)
+
+#+HEADER: :tangle ../,version
+#+HEADER: :noweb yes
+#+HEADER: :tangle-mode (identity #o755)
+#+HEADER: :shebang #!/usr/bin/env sh
+#+BEGIN_SRC shell
+SpineProjVer=`rg "Version\((\d+), (\d+), (\d+)\)" views/version.txt | sed -E 's/.*([0-9]+), ([0-9]+), ([0-9]+).*/spine-v\1.\2.\3/'` && \
+ SpineGitVer=`git describe | sed "s/^[a-z_-]\+\([0-9.]\+\)/\1/" | sed "s/\([^-]*-g\)/r\1/" | sed "s/-/./g"` && \
+ SpineGitBranch=`git branch --show-current` && \
+ echo "❯❯ $SpineProjVer - ($SpineGitBranch: $SpineGitVer)"
+#+END_SRC
+
** .envrc-local CHECK MODIFY
- bespoke modify appropriately and generate if needed
@@ -164,6 +181,9 @@ export SpineOUT=./OUTPUT_TEST_sisudocSpine
# ❯❯ sisudoc-spine output processing path (web server e.g.):
#export SpineOUT=/srv/www/spine
#export SpineOUTversioned=${SpineOUT}/${SpineVER}
+# ❯❯ www url doc root
+export SpineURLdocRoot='http://localhost'
+# export SpineURLdocRoot='https://sisudoc.org'
# ❯❯ path configured for cgi search form:
export SpineSearchActionLocal='http://localhost/spine_search'
export SpineSearchActionRemote='https://sisudoc.org/spine_search'
@@ -178,7 +198,7 @@ export SpineDBpath=/var/www/sqlite
#export SpineDBpath=/srv/www/spine/sqlite
#+END_SRC
-* versions GET
+* org includes - versions GET
** direnv
#+NAME: direnv_version
diff --git a/org/config_git.org b/org/config_git.org
index fd0f037..771f7bc 100644
--- a/org/config_git.org
+++ b/org/config_git.org
@@ -45,6 +45,7 @@
!CHANGELOG
!makefile
!version.txt
+!,version
!configuration.txt
!*.json
!*.sdl
diff --git a/org/config_nix.org b/org/config_nix.org
index 9454cb3..d7e0e92 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -66,6 +66,7 @@
runHook postInstall
'';
postInstall = ''
+ echo "❯❯ ./result/bin/spine -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisu-spine-samples/markup/pod/*";
echo `ls -la $out/bin/spine`
$out/bin/spine -v
'';
@@ -233,7 +234,14 @@
shellHook = ''
export Date=`date "+%Y%m%d"`
## set local values in .envrc-local (or here if you must)
- echo " ❯❯ ./result/bin/spine -v --source --pod --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisu-spine-samples/markup/pod/*";
+ echo '❯❯ nix build';
+ SpineProjVer=`rg "Version\((\d+), (\d+), (\d+)\)" views/version.txt | sed -E 's/.*([0-9]+), ([0-9]+), ([0-9]+).*/spine-v\1.\2.\3/'` && \
+ SpineGitVer=`git describe | sed "s/^[a-z_-]\+\([0-9.]\+\)/\1/" | sed "s/\([^-]*-g\)/r\1/" | sed "s/-/./g"` && \
+ SpineGitBranch=`git branch --show-current` && \
+ echo "❯❯ $SpineProjVer - ($SpineGitBranch: $SpineGitVer)"
+ echo '❯❯ $SpineBIN -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/*';
+ echo "❯❯ $SpineBIN -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/*";
+ echo '❯❯ nix flake update && nix flake check && nix flake show';
'';
in
with pkgs-nix; {
@@ -248,6 +256,8 @@
dtools
gnumake
sqlite
+ gnused
+ ripgrep
];
inherit shellHook;
};
@@ -261,6 +271,8 @@
dtools
gnumake
sqlite
+ gnused
+ ripgrep
];
inherit shellHook;
};
@@ -274,6 +286,8 @@
dtools
gnumake
sqlite
+ gnused
+ ripgrep
];
inherit shellHook;
};
@@ -287,6 +301,8 @@
dtools
gnumake
sqlite
+ gnused
+ ripgrep
];
inherit shellHook;
};
@@ -329,6 +345,8 @@
calibre #(suite includes: ebook-viewer)
koreader
foliate
+ gnused
+ ripgrep
];
inherit shellHook;
};
@@ -350,6 +368,8 @@
w3m
# ❯❯ light graphical
#dillo
+ gnused
+ ripgrep
];
inherit shellHook;
};
@@ -367,6 +387,8 @@
source-serif-pro
source-code-pro
texlive.combined.scheme-full
+ gnused
+ ripgrep
];
inherit shellHook;
};
@@ -381,6 +403,8 @@
dtools
gnumake
sqlite
+ gnused
+ ripgrep
];
inherit shellHook;
};
@@ -396,6 +420,8 @@
gnumake
sqlite
perl538Packages.Po4a
+ gnused
+ ripgrep
];
inherit shellHook;
};
diff --git a/org/default_regex.org b/org/default_regex.org
index 5a1842f..1470c76 100644
--- a/org/default_regex.org
+++ b/org/default_regex.org
@@ -601,10 +601,8 @@ static inline_notes_al = ctRegex!(`【(?:[*+]\s+|\s*)(.
static inline_notes_al_special = ctRegex!(`【(?:[*+]\s+)(.+?)】`, "mg"); // TODO remove match when special footnotes are implemented
static inline_notes_al_gen = ctRegex!(`【.+?】`, "m");
static inline_notes_al_gen_text = ctRegex!(`【(?P<text>.+?)】`, "m");
-static inline_notes_al_all_note = ctRegex!(`【(?P<num>\d+|(?:[*]|[+])+)\s+(?P<note>.+?)\s*(≫\s\d+)?\s*】`, "mg"); // ocn of origin would be useful in endnote section
-static inline_notes_al_regular_number_note = ctRegex!(`【(?P<num>\d+)\s+(?P<note>.+?)\s*(≫\s\d+)?\s*】`, "mg"); // ocn of origin would be useful in endnote section
-// static inline_notes_al_all_note = ctRegex!(`【(?P<num>\d+|(?:[*]|[+])+)\s+(?P<note>.+?)\s*】`, "mg");
-// static inline_notes_al_regular_number_note = ctRegex!(`【(?P<num>\d+)\s+(?P<note>.+?)\s*】`, "mg");
+static inline_notes_al_all_note = ctRegex!(`【(?P<num>\d+|(?:[*]|[+])+)\s+(?P<note>.+?)\s*】`, "mg");
+static inline_notes_al_regular_number_note = ctRegex!(`【(?P<num>\d+)\s+(?P<note>.+?)\s*】`, "mg");
static inline_notes_al_special_char_note = ctRegex!(`【(?P<char>(?:[*]|[+])+)\s+(?P<note>.+?)】`, "mg");
static inline_al_delimiter_open_regular = ctRegex!(`【\s`, "m");
static inline_al_delimiter_open_symbol_star = ctRegex!(`【[*]\s`, "m");
diff --git a/org/ocda_functions.org b/org/ocda_functions.org
index 16de3f0..0b997b7 100644
--- a/org/ocda_functions.org
+++ b/org/ocda_functions.org
@@ -4460,7 +4460,7 @@ ST_the_section build_the_blurb_section(Opt) (
if (obj.has.inline_notes_reg) {
if ((obj.text).matchFirst(rgx.inline_notes_al_gen)) {
foreach (m; (obj.text).matchAll(rgx.inline_notes_al_regular_number_note)) {
- _notes ~= "\n\n" ~ m["num"] ~ ". " ~ m["note"] ~ " ≫" ~ obj.metainfo.ocn.to!string;
+ _notes ~= "\n\n" ~ m["num"] ~ ". " ~ m["note"];
notes_[(m["num"])]["ocn"] = obj.metainfo.ocn.to!string;
}
}
@@ -4474,7 +4474,7 @@ ST_the_section build_the_blurb_section(Opt) (
foreach (ref obj; the_document_endnotes_section) {
auto matches = (obj.text).matchAll(rgx.endnote_section_note);
foreach (m; matches) {
- obj.text = m.hit ~ " ≫" ~ notes_[(m["notenumber"])]["ocn"];
+ obj.metainfo.parent_ocn = notes_[(m["notenumber"])]["ocn"].to!int;
}
}
foreach (ref obj; the_document_endnotes_section) {
diff --git a/org/out_text.org b/org/out_text.org
index df5ccb2..7a990a1 100644
--- a/org/out_text.org
+++ b/org/out_text.org
@@ -455,9 +455,9 @@ template munge() {
_ocn = "「" ~ obj.metainfo.ocn.to!string ~ "」";
string _txt = obj.text;
_txt = _txt
- .replaceFirst(rgx.inline_link, ("$1"))
+ .replaceAll(rgx.inline_link, ("$1")) // consider
.replaceFirst(rgx.inline_superscript, ("$1"));
- _txt = special_characters_and_font_face!().general(_txt);
+ _txt = special_characters_and_font_face!().general(_txt) ~ " ≫" ~ obj.metainfo.parent_ocn.to!string;
return _txt ~ newlines;
}
string bookindex(O,M)(O obj, M doc_matters) {
@@ -543,7 +543,6 @@ TODO
WISH
- underline headings?
-- endnote info on calling object ≫\d+
- break para text at set width?
- text wrap at text-line-width specified option
@@ -561,8 +560,7 @@ DONE
- verse
- table
- endnote section
- - CAVEAT: would like to, but do not point back to object number of origin
- REDO gathering of endnotes, (get/tie calling ocn)
+ - point back to object number of origin, use parent_ocn (used e.g. in text output: endnote info on calling object ≫\d+)
- bookindex
- bibliography
- glossary
diff --git a/org/spine_info.org b/org/spine_info.org
index 4a2b128..7459672 100644
--- a/org/spine_info.org
+++ b/org/spine_info.org
@@ -624,6 +624,8 @@ for a document collection you can point to the document collection:
#+NAME: sisudoc_spine_README_command_examples_search_db_cgi_text
#+BEGIN_SRC text
+The CGI search form is built separately in the sisudoc-spine-search-cgi/ directory.
+
Steps:
1. Clone the sisudoc-spine-search-cgi repository
2. Configure views/configuration.txt with your web server settings
@@ -670,7 +672,7 @@ spine -v \
--output=/var/www/html \
~spineMarkupSamples/pod/*
-Note: The CGI search form is built separately in sisudoc-spine-search-cgi/
+Note: The CGI search form is built separately in the sisudoc-spine-search-cgi/ directory.
#+END_SRC
#+NAME: sisudoc_spine_README_command_examples_html_with_links_to_search_form_text