Half-working:

On the one hand, I misunderstood the documentation and "directories" was 
written to tiddlywiki.info instead of tiddlywiki.files. On the other hand, 
I placed the tiddlywiki.files file in the main directory (where 
tiddlywiki.info is), not in a subdirectory inside "tiddlers". Anyway, the 
tiddlers of the audio files are created.

mywiki/tiddlers/audio/tiddlywiki.files (based 
on https://tiddlywiki.com/#tiddlywiki.files%20Files)

{
  "directories": [
    {
      "path": "./mp3/",
      "filesRegExp": "^.*\\.mp3$",
      "isTiddlerFile": false,
      "fields": {
        "title": {"source": "basename-uri-decoded"},
        "created": {"source": "created"},
        "modified": {"source": "modified"},
        "type": "audio/mp3",
        "tags": ["audio"],
        "text": "",
        "_canonical_uri": {"source": "filename", "prefix": "audio/mp3/"}
      }
    }
  ]
}

The mp3 files are in "mywiki/tiddlers/audio/mp3/" subdirectory. 

BTW playing the sounds not works. For example the "_canonical_uri" of a 
file is "audio/mp3/Caruso-AveMaria.mp3" which can't be found (clicking on 
the link in edit mode drops 404). I've tried to change to 
"./audio/mp3/Caruso-AveMaria.mp3" ("./" prefix) and others like these as 
well, but still not works.

The description of the "_canonical_uri" says it's "The full URI of an 
external image tiddler" (Control Panel -> Info -> Advanced -> Tiddler 
Fields), but "filename" does not sets the full URI to "_canonical_uri" and 
there is no way to get the full path of file (search for 
"basename-uri-decoded" on https://tiddlywiki.com/#%24%3A%2Fboot%2Fboot.js 
to see the possible values of "source" in "_canonical_uri").

Question: how to set up tiddlywiki.files to access to local files?

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b1399b3d-3421-4f62-a995-09e681a9a7d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to