DangerOnTheRanger / maniwani

Imageboard software for the 21st century
MIT License
75 stars 11 forks source link

Markdown vs 8chan formatting #116

Open DonaldTsang opened 5 years ago

DonaldTsang commented 5 years ago
  1. reddit spacing issues
    • It is not recommended to allow reddit space
  2. bold/italic, underline, strikethrough
  3. Greentext, NuText, Redext, Spoilers
    • >this should be light green
    • <this should be pink
    • ==8chan style redtext==
    • click spoilers vs scroll spoilers
    • Cascaded spoilers
  4. Text size options
    • Allow board owners to prevent large-font text to be posted
  5. LaTeX option
  6. RainbowText (Easter Egg)
  7. Tables and bullet points
  8. Monospace text (inline and paragraphs)
  9. Custom board emojis
DonaldTsang commented 5 years ago

Some other fun formatting

def bold_franktur(char_num): # already done
    if 65 <= char_num <= 90: # upper
        return char_num - 65 + 0x1d56c
    else if 97 <= char_num <= 122: # lower
        return char_num - 97 + 0x1d586
    else if 48 <= char_num <= 57: # number
        return  char_num - 48 + 0x1d7ce
    else: return char_num # not alphabet

def franktur(char_num):
    if 65 <= char_num <= 90: # upper
        if char_num == 67: return 0x212d # C
        elif char_num == 72: return 0x210c # H
        elif char_num == 73: return 0x2111 # I
        elif char_num == 82: return 0x211c # R
        elif char_num == 90: returm 0x2128 # Z
        else: return char_num - 65 + 0x1d504
    else if 97 <= char_num <= 122: # lower
        return char_num - 97 + 0x1d51e
    else: return char_num # not alphabet

def bold_cursive(char_num):
    if 65 <= char_num <= 90: # upper
        return char_num - 65 + 0x1d4d0
    else if 97 <= char_num <= 122: # lower
        return char_num - 97 + 0x1d4ea
    else if 48 <= char_num <= 57: # number
        return  char_num - 48 + 0x1d7ce
    else: return char_num # not alphabet

def cursive(char_num):
    if 65 <= char_num <= 90: # upper
        if char_num == : return 0x212c # B
        elif char_num == : return 0x2130 # E
        elif char_num == : return 0x210b # H
        elif char_num == : return 0x2110 # I
        elif char_num == : returm 0x2112 # L
        elif char_num == : returm 0x2133 # M
        elif char_num == : returm 0x211b # R
        else: return char_num - 65 + 0x1d49c
    else if 97 <= char_num <= 122: # lower
        if char_num == : return 0x212f # e
        elif char_num == : return 0x210a # g
        elif char_num == : return 0x2134 # o
        return char_num - 97 + 0x1d4b6
    else: return char_num # not alphabet

def typewriter(char_num):
    if 65 <= char_num <= 90: # upper
        return char_num - 65 + 0x1d670
    else if 97 <= char_num <= 122: # lower
        return char_num - 97 + 0x1d68a
    else if 48 <= char_num <= 57: # number
        return  char_num - 48 + 0x1d7f6
    else: return char_num # not alphabet
DangerOnTheRanger commented 5 years ago

It is not recommended to allow reddit space

In general I would prefer to follow the principle of least surprise and allow things like "reddit spacing" (which is simply standard paragraph start/end behavior when using Markdown). If users are told that posts can be written in Markdown, that behavior - an empty line signals the start of a new paragraph - should be kept to prevent breaking that principle.

bold/italic, underline, strikethrough Monospace text (inline and paragraphs)

I don't understand - this is something already implemented and can be done in the standard Markdown way.

>this should be light green

Blockquotes/greentexts have been green for some time now, I believe. They don't currently keep the angle bracket in the rendered output (standard Markdown behavior, again), but this is easily added back via CSS if you really want it.

<this should be pink ==8chan style redtext==

I'm not really a fan of that syntax nor of the whole concept in general, I'll admit; it's very much an 8chan thing and I'd rather not see Maniwani become more like 8chan/vichan for the sake of being more like 8chan and would rather see it develop its own identity.

click spoilers vs scroll spoilers

The current mouseover spoilers are fine, in my opinion. How do you think other spoiler styles would differ in terms of use cases?

Cascaded spoilers

I think the current spoiler implementation already does this, but it's been a while since I've checked.

Allow board owners to prevent large-font text to be posted

I think this is reasonable, though I would prefer to have a more general post filter. I don't have much interest in implementing this sort of thing myself at this time, but I would accept a PR.

LaTeX option

This feels like overcomplicating things, to me (maintenance of.a Latex render, associated security, how does Latex embedded in Markdown work, etc.) I would rather not do this myself until I saw a Maniwani deployment that would benefit from such a thing, and even then I would probably be rather hesitant and prefer to implement better support for Latex documents as attachments.

RainbowText (Easter Egg)

I'd consider accepting a PR for this, though I don't have the time to work on this sort of thing myself at the moment.

Tables and bullet points

Bullet point lists are already implemented (Maniwani uses Python-Markdown for rendering and thus does basically all expected Markdown stuff); there's no standard way on doing tables in Markdown. If someone else made a PR for table support I'd accept it.

Custom board emojis

I'd accept a PR for this after some discussion on how the syntax would work, I think.

DonaldTsang commented 5 years ago

I'm not really a fan of that syntax nor of the whole concept in general, I'll admit; it's very much an 8chan thing and I'd rather not see Maniwani become more like 8chan/vichan for the sake of being more like 8chan and would rather see it develop its own identity.

Well what do you have in mind, or do you have nothing that sets itself apart? If it is the latter you might want to put in some time and consider the branding of your product.

The current mouseover spoilers are fine, in my opinion. How do you think other spoiler styles would differ in terms of use cases?

I think that there are ways of doing highlights and other ways of interacting with the "black box" that would make it unique

I think this is reasonable, though I would prefer to have a more general post filter. I don't have much interest in implementing this sort of thing myself at this time, but I would accept a PR.

Understandable, that should be a good feature.

This feels like overcomplicating things, to me (maintenance of.a Latex render, associated security, how does Latex embedded in Markdown work, etc.) I would rather not do this myself until I saw a Maniwani deployment that would benefit from such a thing, and even then I would probably be rather hesitant and prefer to implement better support for Latex documents as attachments

Future proofing for a more /tech/ related audience. But people often disables it in 8chan, so maybe put this on the back burner.

(rainbow text) I'd consider accepting a PR for this, though I don't have the time to work on this sort of thing myself at the moment.

Fair enough. Will make one function for it

Bullet point lists are already implemented (Maniwani uses Python-Markdown for rendering and thus does basically all expected Markdown stuff); there's no standard way on doing tables in Markdown. If someone else made a PR for table support I'd accept it.

Might wanna take a look at CommonMark and GithubFlavoredMarkdown, they both have tables.

(custom board emojis) I'd accept a PR for this after some discussion on how the syntax would work, I think.

Here are some examples that you can take a read on, this is the key feature that could set ManiWani apart from the others. I would recommend taking a look into how project platforms like GitHub, and social platforms like Slack, Gitter and Discord does it. (They are all markdown based) The jist of it is :{shorthand for emoji}: (the shorthand in between two colons) But the issue is that people use colon way to often, so there needs a mechanism that limits the length of the shorthand, OR have a different prefix/suffix token for this to make it less common. Consider that 8chan used to have a BBCode option and it slowly moved to their own custom format.