Markdown (.md) datatype for Multiview
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    Ok, I have the same problem on Mos.
    I need to do some debugging, because it works on Linux/MacOs and it is valgrind free.
    So it might be some problem with the SDK/Compiler.

    [ Edited by eliot 31.01.2025 - 11:16 ]
    regards
    eliot
  • »31.01.25 - 12:15
    Profile
  • MorphOS Developer
    jacadcaps
    Posts: 3191 from 2003/3/5
    From: Canada
    Quote:

    So it might be some problem with the SDK/Compiler.


    Doubt it. Is that a libnix or ixemul binary? For libnix, you set the stack size like:

    unsigned long __stack = (2 * 1024 * 1024);
  • »31.01.25 - 15:20
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    I will have a try!
    regards
    eliot
  • »31.01.25 - 16:13
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    Ok, it's now working:
    md2html.lha

    If it is usable for you I will also upload it to morpohos-storage.
    regards
    eliot
  • »31.01.25 - 16:55
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2374 from 2003/4/10
    From: France
    Thanks for the new exe. Just tested but unfortunally there are problems in the conversion with MD tested (https://github.com/samuilivanov/cpp-cdogs-sdl/blob/master/README.md)

    But there is a big problem here, if a MD file is not writed correctly, there is "bugs" during conversion...

    Is there a complete MD file to test with all possible correct syntaxes to see if the HTML conversion is correct?
  • »31.01.25 - 17:11
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    Sorry, I did not had any time to check the README.md you pointed to.
    But I added a Makefile for MorphOS native builds to the repository.
    You can now compile it directly on MorphOS and have a look into the code if you like.


    [ Edited by eliot 01.02.2025 - 13:46 ]
    regards
    eliot
  • »01.02.25 - 14:46
    Profile
  • Moderator
    Kronos
    Posts: 2400 from 2003/2/24
    Quote:

    Papiosaur wrote:

    A strange thing, if i compile without -noixemul (via cmake) all work fine, i obtain the lib and the exe and the exe work.




    Well guess what "-noixemul" means no IX (POSIX/UNIX) emulation which results in the linker complaining about those POSIX functions used but not provided.

    Now most of these have native Amiga/MorphOS counterparts which can be used instead, but since you didn't provide the actual linker error we can't even guess of which those would be.
  • »01.02.25 - 18:58
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    https://github.com/samuilivanov/cpp-cdogs-sdl/blob/6bcfaf4cc7b4a138cf33fb9792150576a2be5e2c/README.md

    works here with maddy.
    regards
    eliot
  • »01.02.25 - 20:35
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    cmark.lha with -noixemul
    regards
    eliot
  • »01.02.25 - 20:51
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    Sorry, I did not use the Makefile.
    But you can build it on your own with cmake:

    Code:

    git clone https://github.com/commonmark/cmark.git
    cd cmark
    makedir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS=-noixemul ../
    cmake --build . --target cmark_exe --config Release
    ...
    src/cmark --version
    cmark 0.31.1 - CommonMark converter
    (C) 2014-2016 John MacFarlane
    ...


    That's all you need to do.

    [ Edited by eliot 02.02.2025 - 07:07 ]
    regards
    eliot
  • »02.02.25 - 07:58
    Profile
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 478 from 2003/7/26
    From: Wroclaw/Poland
    Quote:

    Papiosaur wrote:
    @Andre:
    Work perfect! thanks a lot for your help.

    I have uploaded it on the storage:
    https://www.morphos-storage.net/?id=2316980

    Great! Now we can try using the tool to join an editor with MultiView (or WebBrowser) to show an HTML preview on demand. Maybe someone will use ARexx to implement it. It could work.
    Thank you, Papiosaur and Andre, for the tool!

    [ Edited by MDW 07.02.2025 - 14:47 ]
  • »07.02.25 - 13:33
    Profile Visit Website
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2374 from 2003/4/10
    From: France
    Open FlowStudio, create a file with this code and save it to sys:prefs/Ambient/Filtypes/text/x-md
    and you could read a conversion of your MD file in HTML format on Wayfarer.

    Code:
    AMTD
    1
    Type text/markdown
    Name Markdown document
    Match
    PatternHint #?.(md|MD)
    Name #?.(md|MD)
    End
    Action
    Name Read Markdown file
    Event DoubleClick
    Command AMIGADOS cmark %sf >RAM:T/file.html
    Command AMIGADOS openurl file:///RAM:T/file.html
    Flag cd source
    End
    End


    I'm not a specialist of Mimetype, maybe it could be improved.
  • »07.02.25 - 15:39
    Profile Visit Website
  • MDW
  • Order of the Butterfly
    Order of the Butterfly
    MDW
    Posts: 478 from 2003/7/26
    From: Wroclaw/Poland
    It works! Now I have the motivation to learn and get used to MarkDown syntax. :)
  • »07.02.25 - 17:12
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    Markdown uses relative links to other files.
    If create it in a different dir, those links wont work!
    regards
    eliot
  • »07.02.25 - 18:19
    Profile
  • Yokemate of Keyboards
    Yokemate of Keyboards
    Papiosaur
    Posts: 2374 from 2003/4/10
    From: France
    Quote:

    eliot a écrit :
    Markdown uses relative links to other files.
    If create it in a different dir, those links wont work!

    Yes, i saw a Markdown file could have some links to others MD file present in the same root like the README.md from cmark archive with a "benchmarks" link. In this case, just doubleclick to benchmarks.md present in the same path (in Ambient window) to open it in Wayfarer at the place of README.md.

    It's not a perfect solution, but we can easiest surf on internet links too present in the MD files.

    After it there is other sort of link (to a text file for example), the user can copy the html file from RAM:T/file.html to the original path, normally all links should work correctly. Depend of the MD files converted.
  • »07.02.25 - 18:35
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    An pictures an other stuff? Same problem!
    regards
    eliot
  • »07.02.25 - 18:55
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    https://github.com/eliot-exdev/exdev-gfx/blob/master/README.md
    regards
    eliot
  • »07.02.25 - 19:43
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    eliot
    Posts: 631 from 2004/4/15
    Yes, as said. If you create it elsewhere, they cannot be found.
    regards
    eliot
  • »08.02.25 - 05:46
    Profile