aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sdp/source
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2018-07-16 22:39:09 -0400
committerRalph Amissah <ralph@amissah.com>2019-04-10 15:14:15 -0400
commitfc2471c91966186fc7bc0a5ac2217496c9e43eea (patch)
treedd288cff39e82017e7c41bf8e2f084ad29c62bca /src/sdp/source
parent0.26.4 file renames, cleaning, reorganisation (diff)
0.26.5 sqlite output, focus
Diffstat (limited to 'src/sdp/source')
-rw-r--r--src/sdp/source/paths_source.d13
-rw-r--r--src/sdp/source/read_config_files.d21
-rw-r--r--src/sdp/source/read_source_files.d9
3 files changed, 23 insertions, 20 deletions
diff --git a/src/sdp/source/paths_source.d b/src/sdp/source/paths_source.d
index 8d3aefe..5637c80 100644
--- a/src/sdp/source/paths_source.d
+++ b/src/sdp/source/paths_source.d
@@ -180,6 +180,19 @@ template PathMatters() {
} else {_k = "en"; }
return _k;
}
+ string doc_uid() {
+ string _uid;
+ if (is_pod && !(pod_name.empty)) {
+ if (pod_name.baseName == filename_base) {
+ _uid = filename_base ~ "." ~ filename_extension ~ _sep ~ lng;
+ } else {
+ _uid = pod_name.baseName ~ _sep ~ filename_base ~ "." ~ filename_extension ~ _sep ~ lng;
+ }
+ } else {
+ _uid = _sep ~ filename_base ~ "." ~ filename_extension ~ _sep ~ lng;
+ }
+ return _uid;
+ }
string docname_composite_unique_per_src_doc() {
/+
z pod name if any + src filename + lng code
diff --git a/src/sdp/source/read_config_files.d b/src/sdp/source/read_config_files.d
index 9d976a5..56ba065 100644
--- a/src/sdp/source/read_config_files.d
+++ b/src/sdp/source/read_config_files.d
@@ -32,10 +32,8 @@ static template configReadInSiteTOML() {
config_file_str = conf_file.readText;
break;
}
- }
- catch (ErrnoException ex) {
- }
- catch (FileException ex) {
+ } catch (ErrnoException ex) {
+ } catch (FileException ex) {
}
}
return config_file_str;
@@ -69,10 +67,8 @@ static template configReadInDocTOML() {
config_file_str = conf_file.readText;
break;
}
- }
- catch (ErrnoException ex) {
- }
- catch (FileException ex) {
+ } catch (ErrnoException ex) {
+ } catch (FileException ex) {
}
}
return config_file_str;
@@ -89,8 +85,7 @@ static template configTOML() {
TOMLDocument _toml_conf;
try {
_toml_conf = parseTOML(configuration); // parseTOML(cast(string)(configuration));
- }
- catch(ErrnoException e) {
+ } catch(ErrnoException e) {
stderr.writeln("Toml problem with content for ", conf_toml_filename);
stderr.writeln(e.msg);
}
@@ -172,10 +167,8 @@ static template readConfigDoc() {
config_file_str = conf_file.readText;
break;
}
- }
- catch (ErrnoException ex) {
- }
- catch (FileException ex) {
+ } catch (ErrnoException ex) {
+ } catch (FileException ex) {
}
}
if (config_file_str.length > 0) { break; }
diff --git a/src/sdp/source/read_source_files.d b/src/sdp/source/read_source_files.d
index 28a660a..271adfa 100644
--- a/src/sdp/source/read_source_files.d
+++ b/src/sdp/source/read_source_files.d
@@ -85,13 +85,10 @@ static template SiSUrawMarkupContent() {
}
source_txt_str = fn_src.readText;
}
- }
- catch (ErrnoException ex) {
- }
- catch (UTFException ex) {
+ } catch (ErrnoException ex) {
+ } catch (UTFException ex) {
// Handle validation errors
- }
- catch (FileException ex) {
+ } catch (FileException ex) {
// Handle errors
}
std.utf.validate(source_txt_str);