[Expo-tech] 1/ Survey scans were re-named which then broke

Wookey wookey at wookware.org
Mon Feb 24 00:24:18 GMT 2020


On 2020-02-23 23:06 -0000, Philip Sargent (Gmail) wrote:
> Re: Renamed and uploaded to expo.survex.com
> 
> Becka wrote (on GitHub):
> "surveyscans/2018/2018#23/CatLitterPlan.jpg" was changed to "surveyscans/2018/
> 2018#23/plan-catlitter.jpg"
> "surveyscans/2018/2018#46/ntdwyt_plan.jpg" was changed to "surveyscans/2018/
> 2018#46/plan-ntdwyt.jpg"
> 
> I see that someone (maybe me) had already renamed it back to CatLitterPlan.jpg
> I have inserted a dummy JPG file that wallets.py will recognise instead:
> plan-catlitter-dummy-file.jpg
> 
> I have just this second renamed /plan-ntdwyt.jpg back to /ntdwyt-plan.jpg too.
> 
> A change to the wallets.py code means that plans are identified if they either
> start or end with the word "plan" in the name now, instead of just at the
> beginning. ditto for "elev"

Better to just have a naming scheme and stick to it, rather than
allowing more options and adding complexity in this way. Putting
in dumy files is clearly madness. And if/when we rename the pics,
make sure that any embedded survey paths get changed too. (A tool for
that would make it easier/more reliable).

We do have a scheme, and it's been well-used:
surveyscans/2018/2018#46/plan.jpeg and
surveyscans/2018/2018#46/elev.jpeg

Optionally having indices when there is more than one per
survey. (plan1.jpeg, plan2.jpeg)

.jpg and .png also allowed (but png discouraged for size reasons).

Not convinced embedding surveynames is clever. It's sometimes
convenient but it's messy and encourages spaces and windows/linux
capitalisation issues. The wallet number tells you what it is - making
sure that lookup is easy is the thing to concentrate on, not trying to
embed lots of metadata into the filename.


Wookey
-- 
Principal hats:  Linaro, Debian, Wookware, ARM
http://wookware.org/



More information about the Expo-tech mailing list