Markdown (.md) datatype for Multiview
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2279 from 2003/4/10
    From: France
    Hello,

    i would like to create a Markdown (.md) datatype to read Markdown files to Multiview.

    Is there a "tutorial" with how to create a generic datatype for MorphOS?

    What includes i need please?

    Thanks for your answer.
  • »29.01.25 - 10:15
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    connor
    Posts: 585 from 2007/7/29
    You should not invest in datatypes anymore, Reggae is the successor of datatypes for many years. I think the SDK has examples.
  • »29.01.25 - 10:28
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2279 from 2003/4/10
    From: France
    Quote:

    connor a écrit :
    You should not invest in datatypes anymore, Reggae is the successor of datatypes for many years. I think the SDK has examples.

    Thanks for your answer, i think Reggae it was for multimedia datatypes only.
  • »29.01.25 - 10:44
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    connor
    Posts: 585 from 2007/7/29
    Maybe you are right. If I go here https://www.morphos-team.net/intro and then to Reggae it does not mention text types. I thought the idea of Reggae was to make datatypes obsolete and do all media exchange (image, sound, video, text, HTTP ...) in a modern technology that supports streaming. Because: why have two technologies for the same or similar thing? I thought datatypes are only kept for legacy programs and all new ones should use Reggae for all data decoding and encoding. Also text files or binaries can become very large but usually for source codes or markdown they might not grow so large.

    [ Edited by connor 29.01.2025 - 12:07 ]
  • »29.01.25 - 11:04
    Profile
  • MorphOS Developer
    Nadir
    Posts: 165 from 2003/3/17
    We mainly use scintilla.mcc to display text except for more complicated types such as html or amigaguide. Multiview uses scintilla to display source code for instance.
  • »29.01.25 - 12:48
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2279 from 2003/4/10
    From: France
    Quote:

    Nadir a écrit :
    We mainly use scintilla.mcc to display text except for more complicated types such as html or amigaguide. Multiview uses scintilla to display source code for instance.


    Thanks Nadir for this precision, i didn't know that.

    Markdown support should need a specific datatype no? scintilla.mcc use only plain text (with colored syntaxes) and it maybe difficult to add Markdown support into it?

    I would like to create this datatype for MorphOS, could be possible?
  • »29.01.25 - 13:05
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3140 from 2003/3/5
    From: Canada
    Reggae is generally for streaming media, less for interactive stuff like text display (interactive: handling selection, etc).
  • »29.01.25 - 13:28
    Profile Visit Website
  • MorphOS Developer
    jacadcaps
    Posts: 3140 from 2003/3/5
    From: Canada
    @Papiosaur

    I think you'll find it hard to do. Markdown was designed for web and it won't be an easy task to handle all of its quirks with no HTML-capable viewer. Not saying it's impossible, just saying it'll be hard.

    Rather than a datatype, I'd start with a MUI application for displaying markdown and a custom MUI class to draw it. You will likely want to use Cairo to render text / images / etc since that'll let you use full Unicode.

    I'd also recommend using ObjectiveC-MUI for all this since that's the quickest way to get started and removes a lot of boilerplate.
  • »29.01.25 - 13:34
    Profile Visit Website
  • MorphOS Developer
    Nadir
    Posts: 165 from 2003/3/17
    Quote:

    Papiosaur wrote:

    Markdown support should need a specific datatype no? scintilla.mcc use only plain text (with colored syntaxes) and it maybe difficult to add Markdown support into it?




    I thought you wanted something like a simple text viewer using a partial implementation of Markdown (to e.g. show readme files and so on with some formatting). This should be possible to do using Scintilla, although thinking about it you would still have an issue with for instance headers given that Scintilla uses a fixed line height.

    If you want a full Markdown implementation, I agree with Jacek that this would be quite a difficult task without relying on for instance an HTML viewer. It would definitely be nice with a MUI custom class capable of that though.
  • »29.01.25 - 16:09
    Profile
  • Acolyte of the Butterfly
    Acolyte of the Butterfly
    Georg
    Posts: 114 from 2004/4/7
    There's also amigaguide.datatype sources in AROS sources. Initially written by Stefan Ruppert. And a port of this to MorphOS including sources on Aminet: "AmigaGuideDT.lha"

    Earlier version of MorphOS did not yet have amigaguide.datatype. The later versions which have it: I don't know if it's based on something existing before elsewhere or written from scratch.
  • »29.01.25 - 16:38
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Samurai_Crow
    Posts: 171 from 2009/12/10
    From: Minnesota, USA
    The AmigaGuide datatype sources on AROS were very incomplete, last I looked. The HTMLview.mcc linked above is complete enough to view the styles used by MarkDown but written in C++ so multiple layers of OOP in place (compile-time for C++, runtime for datatypes).
  • »29.01.25 - 16:49
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3140 from 2003/3/5
    From: Canada
    Quote:

    Georg wrote:
    Earlier version of MorphOS did not yet have amigaguide.datatype. The later versions which have it: I don't know if it's based on something existing before elsewhere or written from scratch.




    We ship the amigaguide.datatype by Stefan Ruppert, but Multiview doesn't actually use it. It has its own MUI-based implementation.
  • »29.01.25 - 18:44
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2279 from 2003/4/10
    From: France
    I have started a tool to convert Markdown file to HTML.

    It's possible for me for the moment, others solutions are complexe for the moment.

    I think it will be available soon.

    I must convert many Markdown files before release it, so if you have some Markdown files to convert, i can send you HTML and you say me if it Ok for you or not and i try to improve the conversion.

    The goal is to be more exact possible.
  • »29.01.25 - 21:20
    Profile Visit Website