Tinderbox Forum

Autofetch couldn't retrieve a note

I’m trying to get Autofetch to work, but am not sure if I’m doing things properly.

What I did in a note
set URL to the path of a plain text file (not RTF) by dragging the file to the URL field. It has as url now in the form of: /Users/myuser/Documents/text.txt
Checked Autofetch checkmark.

Then I get the warning AutoFetch couldn’t retrieve a note: URL of my text file.

I don’t know what could cause a reading error? Any pointers in the right direction are appreciated.

(edited to add I’m on Version 7.2.2 (b277))

Your $URL does not contain a URL, just a local path. You need to use the file:// protocol, e.g.:

file:///Users/myuser/Documents/text.txt
(yes, that is three slashes at the start!). such an approach works for me, albeit on v8.x but I assume the above error is what’s stopping it work for you.

Thank you Mark, that fixes it.

1 Like

I’ve updated my notes on $URL and URL data-type attributes to reflect this edge case (i.e. accessing a local asset via a URL rather than File-type attribute so as to use AutoFetch).

1 Like

hi @mwra , one follow-up question. From what I read on the forum here I concluded that autofetch should be able to fetch markdown files. I find that it only works if the file extension is .txt, but not when the file is markdown text but has a file extension .md. It does not throw an error or anything, but it doesn’t show the file content in the note. sametext.txt gets shown, sametext.md doesn’t. Can I influence somewhere which/how file extensions are treated?

I think this is one to take to formal support (info@eastgate.com) as we’re just fellow users here. Autofetch was designed to web assets and pre-dated Markdown by >10 years. I’ve no idea what sort of filtering is applied to fetched assets—web or local—as it’s has never been documented. At the time it was created it was for HTML & RSS feeds. I’m not aware of any user-configurable control for this.

I’d agree that it would be useful for Markdown to be recognised, though I’d guess it may need a change to the app internals, i.e. likely isn’t possible before the next release at the earliest.

HTH :slight_smile:

Thank you @mwra, it’s always a bit of a search to find the point between something that is clear and documented, but I just couldn’t find in the exisitng material, and something that requires ‘official’ response. So yes, it helps to know this maybe isn’t a newbie question after all. I’ll mail Mark / Eastgate.

1 Like

Autofetching .md files treats them at text file in Tinderbox 8.8.1.

I don’t know about Tinderbox 7.2.2, which has just celebrated its fourth birthday.

1 Like

Thank you very much Mark, just replied to your mail, and returned here to add your answer…only to find you already did that. Thanks! (took out an update subscription just now)

1 Like