[Dachs-support] Few questions on non-fits data

Markus Demleitner msdemlei at ari.uni-heidelberg.de
Tue Apr 26 09:43:30 CEST 2022


Hi Yan,

On Mon, Apr 25, 2022 at 03:24:58PM +0000, Yan Grange wrote:
> On 25/04/2022 17:11, Markus Demleitner wrote:
> (first of all: sorry for our email server messing up the URL, seems like 
> Microsoft wants to know when I click which link I click on).

Yeah -- if I had a Euro for every time the stupid "safeurl" thing
munged an important link (of course, they're mutilating namespace or
vocabualry URIs, too), I could buy half the IVOA their favourite
beverage.  We really need to tell our adminstrations or CIOs or
whoever unleashes such horrors on us that they are a really bad idea.

> So we may have it easier, or harder: We’ve basically got a csv where the 
> file name is a file name. However I don’t really understand how to tell 
> Dachs that that file should be served by dachs, because I think the 
> source will contain basically the csv file itself (that I’d not 
> necessarily want to share).

You *could* use the static renderer for that and just not treat the
PDFs as products (cf.
<http://docs.g-vo.org/DaCHS/ref.html#the-static-renderer>).

But I'd probably go through the product table anyway.  Here's how I'd
do it (I think; again: untested):

  <csvGrammar names="localname,meta1,meta2">
    (whatever else)
    <rowfilter procDef="//products#define">
      <bind name="accref">"\schema/data/"+ at localname</bind>
      <bind name="path">"\schema/data/"+ at localname</bind>
      <bind name="fsize">os.path.getsize(
        rd.getAbsPath("data/"+ at localname))</bind>
      (again, think about previews)
    </rowfilter>
  </csvGrammar>

Now that I'm drawing this up, I think I'd be in on a collaborative
hacking on this in the Interop's gathertown...

        -- Markus


More information about the Dachs-support mailing list