From e5da2f69bfc2ef31cbbf993b66a6c835ce54d88e Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sun, 20 Feb 2022 21:17:06 -0500 Subject: pod org file, minor --- org/out_src_pod.org | 166 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 136 insertions(+), 30 deletions(-) (limited to 'org') diff --git a/org/out_src_pod.org b/org/out_src_pod.org index d08cbcc..9d6e54d 100644 --- a/org/out_src_pod.org +++ b/org/out_src_pod.org @@ -30,11 +30,11 @@ template spinePod() { <> void spinePod(T)(T doc_matters) { <> - <> + <> try { <> - <> - <> + <> + <> <> } catch (ErrnoException ex) { // Handle error @@ -80,7 +80,7 @@ assert (doc_matters.src.filename.match(rgx.src_fn)); *** pod zip archive -#+NAME: source_pod_archive +#+NAME: source_pod_archive_zip #+BEGIN_SRC d @system auto pod_archive(Z)( string _source_type, @@ -145,7 +145,7 @@ if (doc_matters.opt.action.source_or_pod) { ** copy :copy: -#+NAME: source_pod_copy_0 +#+NAME: source_pod_archive_prepare_for_zip #+BEGIN_SRC d debug(pod) { writeln(__LINE__, ": ", @@ -398,7 +398,7 @@ auto fn_pod = pths_pod.pod_filename(doc_matters.src.filename).zpod; ** sha256 of pod.zip, zip debug, read zip archive -#+NAME: source_pod_copy_1 +#+NAME: source_pod_copy_info #+BEGIN_SRC d if (exists(fn_pod)) { try { @@ -409,39 +409,19 @@ if (exists(fn_pod)) { writeln(" ", doc_matters.src.filename, " > "); } if (doc_matters.opt.action.pod) { - writefln(" %s\n %s %-(%02x%)", fn_pod, "sha256", data.sha256Of); + writefln("%s\n. %-(%02x%)::%s . %s.zip", fn_pod, data.sha256Of, data.length, doc_matters.src.filename_base); } } - debug(pod) { + if (doc_matters.opt.action.debug_do_pod) { try { auto zipped = new ZipArchive((fn_pod).read); foreach (filename, member; zipped.directory) { auto data = zipped.expand(member); - writeln("> ", filename, " length ", data.length); + writeln(". ", ((data).sha256Of).toHexString, "::", data.length, " . ", filename); } } catch (ZipException ex) { // Handle errors } - if (doc_matters.src.filename == "dr_doc/media/text/en/the_wealth_of_networks.yochai_benkler.sst") { - assert( - ((data).sha256Of).toHexString - == "626F83A31ED82F42CF528E922C1643498A137ABA3F2E5AFF8A379EA79EA22A1E", - "\npod: sha256 value for " - ~ doc_matters.src.filename - ~ " has changed, is now: " - ~ ((data).sha256Of).toHexString - ); - } - if (doc_matters.src.filename == "dr_doc/media/text/en/sisu_markup_stress_test.sst") { - assert( - ((data).sha256Of).toHexString - == "AAE0C87AB3F6D5F7385AEEA6EE661F56D40475CFE87AD930C78C9FE07FFB0D91", - "\npod: sha256 value for " - ~ doc_matters.src.filename - ~ " has changed, is now: " - ~ ((data).sha256Of).toHexString - ); - } } } catch (ErrnoException ex) { // Handle errors @@ -449,7 +429,7 @@ if (exists(fn_pod)) { } #+END_SRC -** source pod zip +** source pod zip UNUSED #+NAME: source_pod_zip #+BEGIN_SRC d @@ -513,3 +493,129 @@ if (exists(fn_pod)) { #+END_SRC * __END__ +** pod gitignore +*** pod/{pods/} + +#+NAME: pod_gitignore +#+BEGIN_SRC sh +# git ls-files --others --exclude-from=.git/info/exclude +,* +!.gitignore +!COPYRIGHT +!README +!shell.nix +!packages.nix +!version.txt +!pod/ +!pod/.dr/config_local_site +# pod.manifest +!pod/*/ +!pod/*/pod.manifest +# conf/sisu_document_make +!pod/*/conf/ +!pod/*/conf/sisu_document_make +# media/text +!pod/*/media/ +!pod/*/media/text/ +!pod/*/media/text/*/ +!pod/*/media/text/*/*.sst +!pod/*/media/text/*/*.ssm +!pod/*/media/text/*/*.ssi +!pod/*/media/text/*/index.html.in +# media/image +!pod/*/media/image/ +!pod/*/media/image/*.png +!pod/*/media/image/*.jpg +!pod/*/media/image/*.PNG +!pod/*/media/image/*.JPG +# tools/po4a +!pod/*/tools/ +!pod/*/tools/Makefile +!pod/*/tools/bin/ +!pod/*/tools/bin/*.sh +!pod/*/tools/po4a/ +!pod/*/tools/po4a/pot/ +!pod/*/tools/po4a/pot/*.sst.pot +!pod/*/tools/po4a/pot/*.ssm.pot +!pod/*/tools/po4a/pot/*.ssi.pot +!pod/*/tools/po4a/pot/index.html.in.pot +!pod/*/tools/po4a/po/ +!pod/*/tools/po4a/po/*/ +!pod/*/tools/po4a/po/*/*.sst.po +!pod/*/tools/po4a/po/*/*.ssm.po +!pod/*/tools/po4a/po/*/*.ssi.po +!pod/*/tools/po4a/po/*/index.html.in.po +# depreciate, separate from media/text use tools +!pod/*/media/text/Makefile +!pod/*/media/text/bin/ +!pod/*/media/text/bin/*.sh +!pod/*/media/text/pot/ +!pod/*/media/text/pot/*.sst.pot +!pod/*/media/text/pot/*.ssm.pot +!pod/*/media/text/pot/*.ssi.pot +!pod/*/media/text/pot/index.html.in.pot +!pod/*/media/text/po/ +!pod/*/media/text/po/*/ +!pod/*/media/text/po/*/*.sst.po +!pod/*/media/text/po/*/*.ssm.po +!pod/*/media/text/po/*/*.ssi.po +!pod/*/media/text/po/*/index.html.in.po +# skip +.dub/** +tmp/** +*_.org +*_.d +*_.txt +*_ +*~ +\#* +*.\#* +#+END_SRC + +*** document pod structure + +#+NAME: pod_gitignore +#+BEGIN_SRC sh +# git ls-files --others --exclude-from=.git/info/exclude +,* +!.gitignore +!pod.manifest +!conf/ +!conf/sisu_document_make +!media/ +!media/text/ +!media/text/*/ +!media/text/*/*.sst +!media/text/*/*.ssm +!media/text/*/*.ssi +!media/image/ +!media/image/*.png +!media/image/*.jpg +!media/image/*.PNG +!media/image/*.JPG +#!media/** +#!*.sst +#!*.ssm +#!*.ssi +#!**/*.sst +#!**/*.ssm +#!**/*.ssi +#+END_SRC + +*** pod po4a structure + +#+NAME: pod_gitignore +#+BEGIN_SRC sh +# git ls-files --others --exclude-from=.git/info/exclude +,* +!.gitignore +!pot/ +!pot/*.sst.pot +!pot/*.ssm.pot +!pot/*.ssi.pot +!po/ +!po/*/ +!po/*/*.sst.po +!po/*/*.ssm.po +!po/*/*.ssi.po +#+END_SRC -- cgit v1.2.3