Capturing from GitHub creates a bookmark instead of a markdown and the bookmark crashes the app

Hey!

If I try to capture a GH repo (this for example GitHub - sgan81/apfs-fuse: FUSE driver for APFS (Apple File System)) DT will create bookmark instead of a non-clutered markdown (as requested). Till then, that could be normal, but the problem is that if I click on the bookmark and DT tries to open it, DT crashes.

Please start a support ticket via Help > Report Bug with the Option key held.

1 Like

Done!

Thanks!

WFM, though not with MD uncluttered – the option is greyed out. DT 3.9 on macOS 13.2.1

Do you really want to capture “the repository” or rather the HTML shown on GH when you click on the link you posted? These two things are miles apart, and for “capturing” a repo I’d suggest git clone rather than DT.

Also, when I save the bookmark in DT, clicking on it leads to GH, no crash at all.

I’m using the DT add-on in Firefox to clip.

@lpuerto Same here, when i use the “Clip to DEVONthink” extension in Safari, clipping to a Markdown, it works just fine, as does making a working bookmark when picking that option. macOS 13.2.1 and DEVONthink 3.9. No crashes in DEVONthink.

though not with MD uncluttered

Indeed. Markdown is uncluttered by default. :slight_smile:

What I usually want o capture is the README with the URL and so…

By the way are any of you using a M1 laptop… just in case is a problem related to the m1 version of macOS and not the intel one.

Why not download the Readme? It’s a Markdown file already and not cluttered in any way.

1 Like

I copy paste it with a function that GitHub itself has, but I also want the other things that devonthink capturer put its he markdown file.

I really don’t understand why you are questioning the why I’m doing that…

@BLUEFROG just informed me that the reason of the crash is on the TouchBar. Does any of you have a TouchBar?

I’m trying to understand what you’re doing and why. Since there might, just might, be another, perhaps better way.
Also, you said that you’re trying to capture “a repo”, which is very much not what you’re doing (nor even trying). Just another reason to ask questions.

Another possibility would be to copy the link to the Readme.md (right click) in GitHub and then “Create new Document from Clipboard” in DT. WFM, too.

Yes. And as I said before, capturing the link works for me. But then I’m on Intel, too.

1 Like

Yes, I am on an M1 Air right now so no TouchBar.

What is the best way of capturing a Markdown file from Github, with the ability to easily refresh it in the future (the way one can refresh a Web Archive)?

You can’t by any built-in means. Markdown is a static captured format, not one that refreshes

Write a script that uses curl to download the file and stores it where you want it. Execute the script at regular intervals using cron.

You can write the script in AppleScript or JavaScript so that it tells DT to import the file and delete the previous version. Or something like that.

OTOH: Why are you trying to mimic GitHub here? The most recent version will always be there, so a simple bookmark might be the best solution.

1 Like

I’m aware of that. I just asked chrillek, given the suggestion that “there might, just might, be another, perhaps better way”.

The problem is that the Web Archive of a Markdown file published via Github isn’t rendered all that well in DT.

The file might be there but it ain’t gonna be here if I don’t have an Internet connection. Also, if I search in DT for terms present in the Markdown file published on Github, I’m not going to find it if it’s just a bookmark…

A simple script can convert this to Markdown:

tell application id "DNtp"
	repeat with theRecord in selected records
		set theURL to URL of theRecord
		if type of theRecord is webarchive and theURL ends with ".md" then
			set theMD to source of theRecord
			set theName to name of theRecord
			create record with {name:theName, URL:theURL, type:markdown, content:theMD} in (location group of theRecord)
		end if
	end repeat
end tell
1 Like

Tried it. Didn’t work…

I presume the conversion from webarchive to markdown is the problem. I’ll look into it further when I have time.

Attempting to capture as Markdown from the start (i.e. using the Clip to DEVONthink Safari extension) doesn’t work either…