clragon / swan

bring elegance to your flutter discussions
https://discord.gg/rflutterdev
MIT License
3 stars 0 forks source link

improve stackoverflow mirror #2

Closed clragon closed 10 months ago

clragon commented 10 months ago

Rough outline for the idea:

  1. check if text is over 2000 chars
  2. detect all codeblocks
  3. cut all code blocks to 200 chars, store full text in map
  4. cut the entire text to 2000 chars
  5. check which code blocks are still present
  6. upload the full text of all cut code blocks which are still present to pastebin
  7. add titles with links to all cut code blocks
  8. check if the message exceeds 2000, then cut the code blocks to reach 2000
  9. create files with the title and full text
  10. post message