314r-app / pf2eBattleTracker_issues

Issues, bug reports and feedbacks for the Pathfinder 2e Battle tracker android application.
1 stars 0 forks source link

[0.4.10] Export to Markdown Weird in Discord #13

Closed wyrdR closed 3 days ago

wyrdR commented 1 month ago

Great app!

Just some small problems with Play by Discord.

A single underscore either side of line triggers italic text.

A double underscore triggers underline.

This ends up looking pretty odd.

Examples below:

With ___ separators:

Screenshot_20240505-205549-906~2

Suggested seperator:

Generated code:

## Round 2, turn of : Valeros
**Grippli Archer (2)** | HP: 44/44 |
AC: 20 Fort: 9 Ref: 11 Will: 10 
___ 
**Grippli Archer** | HP: 10/44 | *Critically wounded* |
AC: 20 Fort: 9 Ref: 11 Will: 10 
___ 
**Ezren** | HP: 41/53 |
___ 
:star: **Valeros** | HP: 38/78 | *Wounded* |
Frightened 2 
___ 
**Giant Dragonfly** | HP: 60/60 |
AC: 21 Fort: 12 Ref: 14 Will: 9 
2d6 persistent Fire damage (10rd)
___ 
**Merisiel** | HP: 56/56 |
___ 
**Grippli Greenspeaker** | HP: 71/71 |
AC: 21 Fort: 10 Ref: 13 Will: 13 
___ 
**Kyra** | HP: 48/48 |
Stunned 1 
___ 
**Grippli Archer (1)** | HP: 44/44 |
AC: 20 Fort: 9 Ref: 11 Will: 10 
___ 

With suggested seperator:

Screenshot_20240505-210325

Suggested code:

## Round 2, turn of : Valeros
**Grippli Archer (2)** | HP: 44/44 |
AC: 20 Fort: 9 Ref: 11 Will: 10 
— 
**Grippli Archer** | HP: 10/44 | *Critically wounded* |
AC: 20 Fort: 9 Ref: 11 Will: 10 
— 
**Ezren** | HP: 41/53 |
— 
:star: **Valeros** | HP: 38/78 | *Wounded* |
Frightened 2 
— 
**Giant Dragonfly** | HP: 60/60 |
AC: 21 Fort: 12 Ref: 14 Will: 9 
2d6 persistent Fire damage (10rd)
— 
**Merisiel** | HP: 56/56 |
— 
**Grippli Greenspeaker** | HP: 71/71 |
AC: 21 Fort: 10 Ref: 13 Will: 13 
— 
**Kyra** | HP: 48/48 |
Stunned 1 
— 
**Grippli Archer (1)** | HP: 44/44 |
AC: 20 Fort: 9 Ref: 11 Will: 10 
— 

Or maybe there's a better option for horizontal lines in Discord?

wyrdR commented 1 month ago

Surrounding the ___ with backquotes does the trick…

But I think this might break other applications .

314r-app commented 1 month ago

Hello and thank you for the bug report. I didn't know that Discord do not use exactly the markdown standard. 3 underscores is supposed to display an horizontal line in Markdown, not just ___, as in the image below:

Screenshot 2024-05-05 at 15-48-25 StackEdit

But in discord it seems to consider the underscore only as the tag for underlining, even after a line break. I didn't find a way to make nice horizontal line on Discord text message, so I went with --- which is also displaying a horizontal line in normal markdown, and display just --- in Discord.

I pushed the new version 0.4.11 with this change. It should be available to download in few hours when the playstore page will update.

wyrdR commented 1 month ago

Ah, what are standards for but to ignore? 😂

I'm pretty sure this has been pointed out to Discord over the years. ¯_(ツ)_/¯

Thanks heaps for that; very prompt!

But there is now a blank line between every dashed line.

See below:

## Round 2, turn of : Valeros
**Grippli Archer (2)** | HP: 44/44 |
AC: 20 Fort: 9 Ref: 11 Will: 10

---

**Grippli Archer** | HP: 10/44 | *Critically wounded* |
AC: 20 Fort: 9 Ref: 11 Will: 10

---

**Ezren** | HP: 41/53 |

---

:star: **Valeros** | HP: 38/78 | *Wounded* |
Frightened 2

---

…

I think it's more compact without the extra spaces. For example:

## Round 2, turn of : Valeros
**Grippli Archer (2)** | HP: 44/44 |
AC: 20 Fort: 9 Ref: 11 Will: 10
---
**Grippli Archer** | HP: 10/44 | *Critically wounded* |
AC: 20 Fort: 9 Ref: 11 Will: 10
---
**Ezren** | HP: 41/53 |
---
:star: **Valeros** | HP: 38/78 | *Wounded* |
Frightened 2
---
…

Thanks,

@wyrdR

On Mon, 6 May 2024, 00:00 314r-app, @.***> wrote:

Closed #13 https://github.com/314r-app/pf2eBattleTracker_issues/issues/13 as completed.

— Reply to this email directly, view it on GitHub https://github.com/314r-app/pf2eBattleTracker_issues/issues/13#event-12707477726, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWTIMJRZP5RH7HMWGIQ5M3ZAY3OJAVCNFSM6AAAAABHHUKPB6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSG4YDONBXG43TENQ . You are receiving this because you authored the thread.Message ID: @.*** .com>

wyrdR commented 1 month ago

Email messed formatting up….

But there is now a blank line between every dashed line.

See below:

## Round 2, turn of : Valeros
**Grippli Archer (2)** | HP: 44/44 |
AC: 20 Fort: 9 Ref: 11 Will: 10 

--- 

**Grippli Archer** | HP: 10/44 | *Critically wounded* |
AC: 20 Fort: 9 Ref: 11 Will: 10 

--- 

**Ezren** | HP: 41/53 |

--- 

:star: **Valeros** | HP: 38/78 | *Wounded* |
Frightened 2 

--- 

…

Result Screenshot_20240506-140955

I think it's better to be more compact like this:

## Round 2, turn of : Valeros
**Grippli Archer (2)** | HP: 44/44 |
AC: 20 Fort: 9 Ref: 11 Will: 10 
--- 
**Grippli Archer** | HP: 10/44 | *Critically wounded* |
AC: 20 Fort: 9 Ref: 11 Will: 10 
--- 
**Ezren** | HP: 41/53 |
--- 
:star: **Valeros** | HP: 38/78 | *Wounded* |
Frightened 2 
--- 
…
314r-app commented 1 month ago

Yes, the blank lines before and after are required to make it work with standard Markdown.

What I could do is add an option in the dialog before exporting to select a "discord format" and remove this lines in this case.

wyrdR commented 1 month ago

That sounds good to me.

@wyrdR

On Mon, 6 May 2024, 19:55 314r-app, @.***> wrote:

Yes, the blank lines before and after are required to make it work with standard Markdown.

What I could do is add an option in the dialog before exporting to select a "discord format" and remove this lines in this case.

— Reply to this email directly, view it on GitHub https://github.com/314r-app/pf2eBattleTracker_issues/issues/13#issuecomment-2095600041, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWTIMJGVCZJY5Y67O2ZMKDZA5HPPAVCNFSM6AAAAABHHUKPB6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJVGYYDAMBUGE . You are receiving this because you were mentioned.Message ID: @.***>

wyrdR commented 1 month ago

How about something like this for an ultra-compact output?

## Round 1, turn of : Poppy

- ⭐ **Poppy** | HP: 18/18 |
  - AC: 15 Fort: 5 Ref: 5 Will: 8 
- **Bepoe** | HP: 11/14 |
  - AC: 18 Fort: 3 Ref: 9 Will: 5 
  - Sickened 1, Hidden
- ~~**Young Sea Serpent A**~~ | HP: 0/20 :skull_and_crossbones:
- ~~**Young Sea Serpent B**~~ | HP: 0/20 :skull_and_crossbones: 
- **Hands** | HP: 19/25 |
  - AC: 15 Fort: 8 Ref: 6 Will: 3 
- **Refur** | HP: 16/16 |
  - AC: 16 Fort: 5 Ref: 8 Will: 6

Round 1, turn of : Poppy

wyrdR commented 1 month ago

This also looks neat. That's an endash before HP which I like for clean, simple separators.

Also, since they're modifiers, saving throws should usually be prefixed with + or -

314r-app commented 1 month ago

Ok i'm noting that. I will put the +/- for the saves in any case.

For replacing the horizontal line delimitation with a bullet point list, I will add a setting "Compact format" to select or not. I will take care of this in the next days.

314r-app commented 1 month ago

Hello, I added new options in the menu to export to markdown:

I also added "Display reaction" for PC or NPC.

Here is an example of the "compact format" rendered on Discord. What do you think about it ?

compact

wyrdR commented 1 month ago

Looks awesome. Great work.

314r-app commented 3 days ago

Thank you, I'm closing the issue.