Subject: how to upload minutes in markdown format?

From: Paul Kyzivat <[email-masked]>
Date: Sun, 1 Aug 2021 12:55:35 -0400

I've got minutes for my session in codimd. How do I get them into 
meeting materials as minutes?

I made a copy in a file called IETF 111 RUM Minutes.md. Then I went to 
meeting materials, clicked upload minutes, and browsed for this file. 
But when I click Upload I get the error:

Upload Content-Type (application/octet-stream) is different from the 
observed mime-type (text/plain)

How do I get this accepted? (I'm doing this from MacOS.)

	Thanks,
	Paul

---

From: Yaron Sheffer <[email-masked]>
Date: Sun, 01 Aug 2021 20:01:29 +0300

I posted the same question to the tools list some time ago, unfortunately none of the answers worked for me. I've been uploading minutes from a Linux VM since. ☹

Thanks,
	Yaron

On 8/1/21, 19:56, "WGChairs on behalf of Paul Kyzivat" <[email-masked] on behalf of [email-masked]> wrote:

    	Thanks,
    	Paul

---

From: Robert Sparks <[email-masked]>
Date: Sun, 1 Aug 2021 15:07:21 -0500

Paul -

The answer, for the moment, is that your system or browser needs to be 
told to supply a saner content-type when uploading files that end with .md.

The fastest way I've found in OS/X is to tell it to open files ending in 
.md with your favorite text editor.

Teaching the datatracker to just accept octet-stream isn't great as we 
can't then avoid unintentional uploads of things that aren't really a 
text type.

Skim this thread for more 
insights:https://mailarchive.ietf.org/arch/msg/tools-discuss/M-jFx3S1y3Zg54ib5UlPlxX2egI/

This has also been reported here: 
https://trac.ietf.org/trac/ietfdb/ticket/3163

RjS

---

From: Paul Kyzivat <[email-masked]>
Date: Mon, 2 Aug 2021 10:33:54 -0400

As a workaround, could the tools recognize foo.md.txt as markdown?

	Thanks,
	Paul

On 8/1/21 4:07 PM, Robert Sparks wrote:
>> I posted the same question to the tools list some time ago, 
>> unfortunately none of the answers worked for me. I've been uploading 
>> minutes from a Linux VM since. ☹
>>
>> Thanks,
>>     Yaron
>>
>> On 8/1/21, 19:56, "WGChairs on behalf of Paul Kyzivat" 
>> <[email-masked] on behalf of [email-masked]> wrote:
>>

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 2 Aug 2021 16:36:26 +0200

On 2021-08-01, at 18:55, Paul Kyzivat <[email-masked]> wrote:
> 
> I've got minutes for my session in codimd. How do I get them into meeting materials as minutes?

The summary was:

Get HTML from CodiMD, upload that.

Grüße, Carsten

---

From: Spencer Dawkins at IETF <[email-masked]>
Date: Mon, 2 Aug 2021 09:36:06 -0500

Thanks, Robert, for the update and for more details.

I haven't been able to force a sane MIME type on my system, but it's worth
noting a couple of things:

   - If you just cut and paste CodiMD minutes into a text document and
   upload that, you get something that's not formatted the way you'd expect
   Markdown to be formatted, but it's human-readable, and may work well enough
   for you. .
   - Michael Richardson and I have noticed that CodiMD and the datatracker
   don't seem to format our Cellar working group notes the same way (and I
   remember Robert saying the first time I heard someone ask him about
   datatracker support for Markdown, "which version of Markdown do we need to
   support?", so that's not a new mystery), so you may want to check the
   results in the datatracker and make sure that what you've got works for
   you..

Best,

Spencer

On Sun, Aug 1, 2021 at 3:07 PM Robert Sparks <[email-masked]> wrote:

> insights:
> https://mailarchive.ietf.org/arch/msg/tools-discuss/M-jFx3S1y3Zg54ib5UlPlxX2egI/
>
> > On 8/1/21, 19:56, "WGChairs on behalf of Paul Kyzivat" <
> [email-masked] on behalf of [email-masked]> wrote:
> >

---

From: "STARK, BARBARA H" <[email-masked]>
Date: Mon, 2 Aug 2021 15:02:12 +0000

If you've got Ubuntu running on something, using the Ubuntu Text Editor to edit and save the markdown, and then upload that to datatracker (I use Firefox on Ubuntu to interact with datatracker) works great.
Barbara

---

From: Robert Sparks <[email-masked]>
Date: Mon, 2 Aug 2021 10:13:18 -0500

When I've done that, it came with some breaking html/css that did truly 
bad things (with the ToC in particular) when viewed on the document's 
main page.

RjS

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 2 Aug 2021 17:16:13 +0200

On 2021-08-02, at 17:13, Robert Sparks <[email-masked]> wrote:
> 
> When I've done that, it came with some breaking html/css that did truly bad things (with the ToC in particular) when viewed on the document's main page.

You mean you used the CodiMD page and the datatracker sanitizer destroyed it?

You could also download HTML or Raw HTML from the CodiMD menu; Christian didn’t say which one he did.

This is all a bit hard to test because one shouldn’t wills-nilly upload minutes.

Grüße, Carsten

---

From: Robert Sparks <[email-masked]>
Date: Mon, 2 Aug 2021 10:43:37 -0500

> You could also download HTML or Raw HTML from the CodiMD menu; Christian didn’t say which one he did.

Testing in a local instance, bad things happen with the "HTML" download, 
but the results with "Raw HTML" are more reasonable.

But .md would be better.

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 2 Aug 2021 17:52:14 +0200

On 2021-08-02, at 17:43, Robert Sparks <[email-masked]> wrote:
> 
> Testing in a local instance, bad things happen with the "HTML" download, but the results with "Raw HTML" are more reasonable.

Great.  No problems with ancient charsets invading?

> But .md would be better.

That’s what I wrote de-gfm for.

de-gfm the-markdown-i-got-from-codimd.md >the-markdown-i-ll-upload.md

(Add a -b to avoid the not-so-bright markdown “feature” of using spaces at the end of the line.)

Grüße, Carsten

---

From: Paul Kyzivat <[email-masked]>
Date: Mon, 2 Aug 2021 12:16:32 -0400

> (Add a -b to avoid the not-so-bright markdown “feature” of using spaces at the end of the line.)

I don't get it. The problem isn't with the bits in the file. The problem 
is that MacOS insists on reporting that a .md file has content type 
octent-stream. IIUC, if it would simply report it as text/plain then all 
wood be ok.

Lacking a fix for that problem, can we have datatracker recognize 
.md.txt as indicating an intent to upload markdown? The tools are 
already doing a workaround by recognizing .md as markdown even though 
the actual content type being sent is text/plain.

	Thanks,
	Paul

---

From: Carsten Bormann <[email-masked]>
Date: Mon, 2 Aug 2021 18:55:56 +0200

On 2021-08-02, at 18:16, Paul Kyzivat <[email-masked]> wrote:
> 
> I don't get it. The problem isn't with the bits in the file.

There is more than one problem.

> The problem is that MacOS insists on reporting that a .md file has content type octent-stream. IIUC, if it would simply report it as text/plain then all wood be ok.

The content-type is sent by the browser.
We probably have different browsers, and nobody takes care of reporting which browser is being used when things fail.

I have never been able to get any of my browsers to upload the right media type (text/markdown), so I can’t help with that part.
They all do send text/plain (well, Chrome sometimes text/html).

To get there, you probably have to open a directory with an .md file in it in Finder, single-click that file, and CMD-I.
Choose a markdown presentation application (I use Marked) or text editor (Geany?) of your choice under “open with”, then click “change all”.

All that said, I stand by my recommendation for keeping sanity:
Get “Raw HTML” from CodiMD and upload that.

> Lacking a fix for that problem, can we have datatracker recognize .md.txt as indicating an intent to upload markdown? The tools are already doing a workaround by recognizing .md as markdown even though the actual content type being sent is text/plain.

Sounds good to me.  

You'll still will have the problem with different interpretation of line breaks about which there was some discussion at tools-discuss; the little tool de-gfm was written as a workaround until the Great Unified Datatracker Markdown Solution is implemented.

Grüße, Carsten

---

From: Paul Kyzivat <[email-masked]>
Date: Mon, 2 Aug 2021 13:15:53 -0400

> We probably have different browsers, and nobody takes care of reporting which browser is being used when things fail.

I've tried Firefox and Chrome.

> Choose a markdown presentation application (I use Marked) or text editor (Geany?) of your choice under “open with”, then click “change all”.

I've tried that. I have .md associated with textedit.

Even so, when the extension is set to .md Finder Get Info (CMD-I) 
reports the Kind:Document, whereas it reports .txt as Kind:text.
(AFAICT MacOS doesn't report literal mime type. Do browsers derive mime 
type from Kind?)

> Get “Raw HTML” from CodiMD and upload that.

That will be my fallback.

> You'll still will have the problem with different interpretation of line breaks about which there was some discussion at tools-discuss; the little tool de-gfm was written as a workaround until the…

I haven't encountered that problem yet.

	Thanks,
	Paul

---

From: Robert Sparks <[email-masked]>
Date: Mon, 2 Aug 2021 14:49:16 -0500

Dropping the list for a moment.

> (AFAICT MacOS doesn't report literal mime type. Do browsers derive 
> mime type from Kind?)

Using firefox's developer tools -> Networking view into what's sent, my 
system uploads as follows:

> -----------------------------21552262633498723647489224942
> Content-Disposition: form-data; name="file"; filename="stir.md"
> Content-Type: text/markdown
Finder reports the given file as Kind: Markdown Text (though if I 
associate it with other editors, it may say Markdown Document, but the 
Content-Type the browsers choose to use later remains the same.

Do you have XCode installed? If so, does what finder shows you change 
away from simply Type: Document to Type: Markdown (mumble) if you tell 
it to open all files of that type with XCode?

RjS

---

From: Bob Hinden <[email-masked]>
Date: Mon, 2 Aug 2021 13:46:51 -0700

Hi,

> On Aug 2, 2021, at 10:15 AM, Paul Kyzivat <[email-masked]> wrote:
> 

For what it is worth, I had no uploading issues using MacOS 10.14 using a .md file directly from Codimd, or after I edited the file with emacs.  I was using Chrome (92.0.4515.107) at the time.

Bob

> Even so, when the extension is set to .md Finder Get Info (CMD-I) reports the Kind:Document, whereas it reports .txt as Kind:text.
> (AFAICT MacOS doesn't report literal mime type. Do browsers derive mime type from Kind?)
>

---

From: Jay Daley <[email-masked]>
Date: Tue, 3 Aug 2021 08:53:31 +1200

> On 3/08/2021, at 7:49 AM, Robert Sparks <[email-masked]> wrote:
> 
> Using firefox's developer tools -> Networking view into what's sent, my system uploads as follows:
> 
> Finder reports the given file as Kind: Markdown Text (though if I associate it with other editors, it may say Markdown Document, but the Content-Type the browsers choose to use later remains the same.
> 
> Do you have XCode installed? If so, does what finder shows you change away from simply Type: Document to Type: Markdown (mumble) if you tell it to open all files of that type with XCode?

Just tested this.  If XCode is set at the default for .md files then MacOS reports them as "Kind: Markdown Document".  If I set SublimeText, Atom or Bear as the default then it is "Kind: Markdown Text".

Jay 

-- 
Jay Daley
IETF Executive Director
[email-masked]

---

From: Paul Kyzivat <[email-masked]>
Date: Mon, 2 Aug 2021 17:33:31 -0400

On 8/2/21 4:53 PM, Jay Daley wrote:

> Just tested this.  If XCode is set at the default for .md files then 
> MacOS reports them as "Kind: Markdown Document".  If I set SublimeText, 
> Atom or Bear as the default then it is "Kind: Markdown Text".

Hmm. So it sounds like if you change the file type of a file, then it 
looks up the default application for that extension and then looks for 
UTIs declared by that app. Does that sound right?

So to get things working I need to have an app that understands markdown 
associated with .md.

So much for markdown being so simple that you don't need a markdown editor.

	Thanks,
	Paul

---

From: "Martin Thomson" <[email-masked]>
Date: Tue, 03 Aug 2021 07:46:23 +1000

> UTIs declared by that app. Does that sound right?

Seems plausible.  On windows, a registry hack works.  Stick the following in a file and load it.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.md]
"Content Type"="text/markdown"
@="md_auto_file"
"PerceivedType"="text"

---

From: Jay Daley <[email-masked]>
Date: Tue, 3 Aug 2021 09:48:54 +1200

> On 3/08/2021, at 9:33 AM, Paul Kyzivat <[email-masked]> wrote:
> 

I just tested what happens if I switch it back to XCode and it stays as "Kind: Markdown Text" so it sounds like there is a one-off mess created during an XCode upgrade/install.

My UTI for .md is now unchanging as

	mdls -name kMDItemContentTypeTree Features.md

always gives

	kMDItemContentTypeTree = (
	    "net.daringfireball.markdown",
	    "public.plain-text",
	    "public.text",
	    "public.data",
	    "public.item",
	    "public.content"
	)

> 
> Hmm. So it sounds like if you change the file type of a file, then it looks up the default application for that extension and then looks for UTIs declared by that app. Does that sound right?

Yes.

And when you change the default app for a specific file type then it uses that apps UTI for that file type, which may differ from other apps UTIs.  This makes sense when you consider that file types such as .dat can vary wildly between apps.

> 
> So to get things working I need to have an app that understands markdown associated with .md.

Yes. SublimeText or Atom are both free and useful.

But if you could run the mdls command above first so that we can see what the old UTI is, that would be helpful.

> So much for markdown being so simple that you don't need a markdown editor.

This seems to be an Apple mistake not a Markdown system crash.

Jay

-- 
Jay Daley
IETF Executive Director
[email-masked]

---

From: "Deen, Glenn (NBCUniversal)" <[email-masked]>
Date: Mon, 2 Aug 2021 22:09:13 +0000

Hi Spencer,

On 8/2/21, 7:37 AM, "WGChairs on behalf of Spencer Dawkins at IETF" <[email-masked]<mailto:[email-masked]> on behalf of [email-masked]<mailto:[email-masked]>> wrote:

I haven't been able to force a sane MIME type on my system, but it's worth noting a couple of things:

·         If you just cut and paste CodiMD minutes into a text document and upload that, you get something that's not formatted the way you'd expect Markdown to be formatted, but it's human-readable, and may work well enough for you. .
My experience has been that it does work for the minutes I’ve posted.  Here’s the markdown minutes from ADD @ IETF 111 in Data tracker (https://datatracker.ietf.org/doc/minutes-111-add/).    It’s in markdown, and is formatted correctly and things like links work properly.
To get this into datatracker all I did on my Mac was:
  (1) cut & paste the minutes from Comid into a minutes.md doc on my mac.
  (2)  Do some light editing – such as putting 2 blank likes between paragraphs so they show up with 1 in the formatted version.
  (3) upload minutes.md to datatracker using chrome.
Datatracker recognizes this file as markdown for it lists under other version: Markdown as the only choice.
I’m not sure what’s different on my Mac system compared to others who are having problems getting this to work, but it was really about 10 minutes worth of effort to go from Comid to datatracker.
-glenn

---

From: Jen Linkova <[email-masked]>
Date: Tue, 3 Aug 2021 12:05:50 +1000

> Get HTML from CodiMD, upload that.

I tried that initially but the result was unreadable:
https://datatracker.ietf.org/meeting/111/materials/minutes-111-panrg-00.html

-- 
SY, Jen Linkova aka Furry

---

From: "Deen, Glenn (NBCUniversal)" <[email-masked]>
Date: Tue, 3 Aug 2021 02:27:22 +0000

On 8/2/21, 1:54 PM, "WGChairs on behalf of Jay Daley" <[email-masked]<mailto:[email-masked]> on behalf of [email-masked]<mailto:[email-masked]>> wrote:

On 3/08/2021, at 7:49 AM, Robert Sparks <[email-masked]<mailto:[email-masked]>> wrote:

Interesting,  XCode is the default markdown editor on my Mac, and uploads work for me.

-glenn

---

From: Robert Sparks <[email-masked]>
Date: Mon, 2 Aug 2021 21:35:50 -0500

The trouble is encountered when someone has not installed Xcode or some 
other app that registers the markdown UTI 
(https://en.wikipedia.org/wiki/Uniform_Type_Identifier).

Without that, os/x believes the type is simply "Document", and browsers 
use application/octet-stream when uploading.

 From someone on such a system that ran a helpful test:

> $ mdls -name kMDItemContentType -name kMDItemContentTypeTree -name 
> kMDItemKind ./Untitled.md
> kMDItemContentType     = "dyn.ah62d4rv4ge8043a"
>     "dyn.ah62d4rv4ge8043a",
>     "public.data"
> kMDItemKind            = "Document" 
vs what happens when something's registered .md:

> % mdls -name kMDItemContentType -name kMDItemContentTypeTree -name 
> kMDItemKind ./whatever.md
> kMDItemContentType     = "net.daringfireball.markdown"
>     "public.content",
>     "public.plain-text"

On 8/2/21 9:27 PM, Deen, Glenn (NBCUniversal) wrote:
>
> On 8/2/21, 1:54 PM, "WGChairs on behalf of Jay Daley" 
> <[email-masked] <mailto:[email-masked]> on 
> behalf of [email-masked] <mailto:[email-masked]>> wrote:
>
>
>
>         Even so, when the extension is set to .md Finder Get Info
>         (CMD-I) reports the Kind:Document, whereas it reports .txt as
>         Kind:text.
>     associate it with other editors, it may say Markdown Document, but
>     the Content-Type the browsers choose to use later remains the same.
>
>     Do you have XCode installed? If so, does what finder shows you
>     change away from simply Type: Document to Type: Markdown (mumble)
>     if you tell it to open all files of that type with XCode?
>
> MacOS reports them as "Kind: Markdown Document".  If I set 
> SublimeText, Atom or Bear as the default then it is "Kind: Markdown Text".
>

---

From: Robert Sparks <[email-masked]>
Date: Mon, 2 Aug 2021 21:38:34 -0500

> https://datatracker.ietf.org/meeting/111/materials/minutes-111-panrg-00.html

Use the "Raw HTML" option instead of the "HTML" option, and it won't be 
as disturbed.

But, we're going to figure out a way to allow markdown to come across 
without acrobatics (at least on the chair's part).

---

From: Paul Kyzivat <[email-masked]>
Date: Tue, 3 Aug 2021 12:26:52 -0400

I installed Xcode and made it the default for .md.

I think this has given me a solution, but I'm still getting odd and 
conflicting info.

I downloaded the markup directly from CodiMD in markdown format. If I do 
a Get Info from the finder on the resulting file I get "Kind:Markdown 
Document".  but then when I do:

$ mdls -name kMDItemContentType -name kMDItemContentTypeTree -name 
kMDItemKind "IETF 111 RUM Minutes.md"

I get:

Note that kMDItemKind="Document", not "Markdown Document", conflicting 
with Get Info.

Double clicking this file brings me to Xcode.

I uploaded this file to meeting materials as minutes (replacing my prior 
upload of the Raw HTML from CodiMD.) Double clicking this displays the 
html form. (I don't know how to tell if what data tracker is storing is 
markdown or html.)

So I think by problem has been resolved even if I don't fully understand 
what MacOS is doing.

	Thanks,
	Paul

On 8/2/21 5:33 PM, Paul Kyzivat wrote:
>>> away from simply Type: Document to Type: Markdown (mumble) if you 
>>> tell it to open all files of that type with XCode?
>>

---

From: Spencer Dawkins at IETF <[email-masked]>
Date: Tue, 3 Aug 2021 19:57:23 -0500

Hi, Martin and Deen,

On Mon, Aug 2, 2021 at 5:09 PM Deen, Glenn (NBCUniversal) <
[email-masked]> wrote:

> Hi Spencer,
>
>
>
> On 8/2/21, 7:37 AM, "WGChairs on behalf of Spencer Dawkins at IETF" <
> [email-masked] on behalf of [email-masked]>
> wrote:
>
>
>
> ·         If you just cut and paste CodiMD minutes into a text document
> and upload that, you get something that's not formatted the way you'd
> expect Markdown to be formatted, but it's human-readable, and may work well
> enough for you. .
>
> My experience has been that it does work for the minutes I’ve posted.
> Here’s the markdown minutes from ADD @ IETF 111 in Data tracker (
> https://datatracker.ietf.org/doc/minutes-111-add/).    It’s in markdown,
> and is formatted correctly and things like links work properly.
>
>   (2)  Do some light editing – such as putting 2 blank likes between
> paragraphs so they show up with 1 in the formatted version.
>

It may be that Martin and I are the only working group chairs at the IETF
with Windows 10 systems ... 😂

Thank you both for your help! I've made the registry change Martin
described in his note, and I'll check that out the next time I'm uploading
meeting minutes for Cellar.

Best,

Spencer

> I’m not sure what’s different on my Mac system compared to others who are
> having problems getting this to work, but it was really about 10 minutes
> worth of effort to go from Comid to datatracker.
>
> -glenn
>
>
>
>
>