[Therion] Metapost snippets out-source-able fromthconfig/layout?
Christian Rößler
chr_rossi at kartan.de
Wed May 11 00:15:21 CEST 2016
Am Mittwoch, 11. Mai 2016, 08:13:13 schrieb Bruce <bruce at tomo.co.nz>:
Hallo Bruce,
> A Therion principle. Write once, use many times.
> Be cautious however and balance the 'centralised layout' idea against
> the contrary advantage of having each mine or 'collection of mines' in
> self contained folders that can be moved to different machines or
> environments without breaking links to outsourced locations.
yes. I have centralized my meager three Therion maps, and then one of my
colleagues asked me about the nice map I have sent to him, which program I
made them with etc. pp., got interest and asked me about the source files
to see for herself. And then I nearly archive-packed and sent…
> As most of 'my' cave systems are constrained to several square km in
> area, I have a single master layout for those at the top folder level.
> If I want to separate out just one cave from a sub folder and say give
> to someone else I only have to copy the 'central layout file' to that
> folder and one or two input statements to change to make the sub
> project work.
> There is a balance between totally centralised and having each
> subproject completely self contained if its folder is removed from its
> parent. A choice. See the links in my reply to Henry just now.
…not enough, I mean with missing centralized layout and metapost files;
exactly, what you meant above. Funny coincidence, but perhaps to be
expected. I have solved it as following:
therion directory
| |-- metapost file
| |-- centralized layout, input'ing metapost file in same dir
|
|-project directory
|-- symlink to centralized layout
|-- (normally unneeded) symlink to metapost file
|-- thconfig input'ing centralized layout in _same_ directory (./)
(I hope this is readable)
That way I can edit the centralized layout and metapost file in therion
directory before recompiling, as: thconfig -> centr. layout -> (following
symlink) -> centr. layout in therion directory.
And if I archive I just need to dereference the symlinks (no editing of
files), so I archive the directory as following:
project directory
|-- centralized layout (dereferenced symlink)
|-- metapost file (via previously unneded symlink to metapost file)
But: If I forget to dereference the symlinks while packing, or forget the
(while working) unneeded symlink to the metapost file, this would break.
And I would need more unneeded symlinks, if I decide to input more than
one metapost file. And this way does only work with OS's capable of
symlinks; I am not sure whether windows could do such.
But's but: This dereferencing method gives me an easy route to hew any
project directory from the mineral lode, so to say, for others and for me,
if the need arises.
So I am going that route, but - as you correctly warned - with care.
Another coincidence was the parallel discussion about several layouts per
map export, as I noticed I lost eg. the map comments when wholly
centralized. So I add, if needed, another layout zusaetze (addons) for
stuff I would not or could not centralize to the map export.
So thanks, Bruce, and Ladislav, and also Henry for asking the right
question at the right time for me to use, and of course Martin, and a
hearty Glückauf (or what cavers greet themselves) to you all!
Christian
More information about the Therion
mailing list