Skip to content

Commit f45fafd

Browse files
authored
Merge pull request #8 from 9yz/v1.2
v1.2
2 parents c805956 + 7f9b5b4 commit f45fafd

3 files changed

Lines changed: 311 additions & 75 deletions

File tree

substitutions/ts_photoMechanicVariables.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ fbas {mnameshort}
1515
focallength {czoom}
1616
folder {mfolder}
1717
fldr {mfolder}
18+
foldernum {fprefix;{mfolder};3}
19+
fldn {fprefix;{mfolder};3}
1820
height {ch}
1921
h {ch}
2022
y {ch}
@@ -84,13 +86,15 @@ copyright {mcopyright}
8486
copy {mcopyright}
8587
source {msource}
8688
srce {msource}
89+
description {mdescription}
8790

8891
// TIme & Date
8992
ampm {tampm}
9093
date {tdate}
9194
shot {tdate}
9295
day {tday}
9396
dow {tdayp}
97+
dow3 {fpfx;{tdayp};3}
9498
hour {thour12}
9599
hour24 {thour}
96100
h24 {thour}
@@ -107,6 +111,7 @@ mnap {tmonthps}
107111
second {tsecond}
108112
sec {tsecond}
109113
time {ttime}
114+
110115
// Special Variables
111116
nl \n
112117

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Some substitutions that may be useful for a variety of purposes
2+
3+
// Plural detector. Returns "1" if the string that's passed in ends with -es or -s but not -is or -ss. "0" otherwise
4+
ispluralinput [[mheadline]]
5+
// ispluralinput <replace with your input>
6+
isplural [[fOr;
7+
[[\
8+
f=;[[fSfx;[[ispluralinput]];2]];es\
9+
]];\
10+
[[\
11+
f&&;\
12+
[[f=;[[fSfx;[[ispluralinput]];1]];s]];\
13+
[[f!;[[fAnyEq;[[fSfx;[[ispluralinput]];2]];is;ss]]]]\
14+
]]\
15+
]]
16+
17+
18+
// n-inator - returns "n" if the supplied string starts with a vowel. Intended to be used to turn "a" into "an" when the following word dictates.
19+
ninatorinput [[mheadline]]
20+
// ninatorinput <replace with your input>
21+
ninator [[fBch;\
22+
[[fAnyEq;\
23+
[[fPfx;[[ninatorinput]];1]];
24+
\a;e;i;o;u\
25+
]]\
26+
;n]]
27+
28+
// an-inator - Returns "a " if the input string is plural or "an " if the input string is plural and starts with a vowel; "" otherwise.
29+
aninatorinput [[mheadline]]
30+
// aninatorinput <replace with your input>
31+
aninator [[fBch;\
32+
// plural checker
33+
[[f!;[[fOr;[[f=;[[fSfx;[[aninatorinput]];2]];es]];[[f&&;[[f=;[[fSfx;[[aninatorinput]];1]];s]];[[f!;[[fAnyEq;[[fSfx;[[aninatorinput]];2]];is;ss]]]]]]]]]];\
34+
// n-inator
35+
a[[fBch;[[fAnyEq;[[fPfx;[[aninatorinput]];1]];a;e;i;o;u]];n]]\
36+
]]
37+

0 commit comments

Comments
 (0)