Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shrianshchari/samples_to_discord
Convert txt files into a readable, compressed format for use in the Smogon discord
https://github.com/shrianshchari/samples_to_discord
discord python smogon
Last synced: 22 days ago
JSON representation
Convert txt files into a readable, compressed format for use in the Smogon discord
- Host: GitHub
- URL: https://github.com/shrianshchari/samples_to_discord
- Owner: shrianshChari
- License: gpl-3.0
- Created: 2023-12-24T04:18:21.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-04T19:30:48.000Z (10 months ago)
- Last Synced: 2024-03-04T20:56:05.745Z (10 months ago)
- Topics: discord, python, smogon
- Language: Python
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tbolt's SmogCord Resources Formatting Tool
It's a Python script that will turn this:```
OU Resources
Note that many resources on the forums will be outdated because of the Indigo Disk DLC.
OU Simple Questions and Answers: https://www.smogon.com/forums/threads/simple-questions-simple-answers-thread.3710772/
OU Room on Showdown: https://play.pokemonshowdown.com/overused
OU Discord: https://discord.com/invite/Pgn3Nrb
```into this:
```
__OU Resources__
Note that many resources on the forums will be outdated because of the Indigo Disk DLC.
**OU Simple Questions and Answers:**
**OU Room on Showdown:**
**OU Discord:** https://discord.com/invite/Pgn3Nrb
*Last Updated *
```### Prerequisites
- You'll need to have [Python 3.6 or later](https://www.python.org/) installed.
- You also need to be know how to run Python scripts on the [command line](https://realpython.com/run-python-scripts/#how-to-run-python-scripts-from-the-command-line)### How to use
1. Edit the file to add or remove resources.
2. Run `python samples_to_disc.py ` where `` represents the file whose command you want to update.
3. Copy the output of this Python program.
4. In the Smogon Discord, type `/custom edit` and hit Enter.
5. Type the name of the command you want to update (it should match the name of the file you just edited). If you're not sure what commands there are, check the "Chatot Bot Commands" thread of the "#comp-read-me" forum channel.
6. Delete the "Prints" part of the command and paste in the output of the Python program that you copied earlier.
7. Hit "Submit" and now it should work!### Notes
- First line of the file is treated as the title and has an underline.
- Each line can be separated into a "Resource Name: Link" format. The "Resource Name" part is bolded and the link is modified so that Smogon threads aren't as long and most websites (except for Discord invites) cannot display embeds for conciseness.
- If a line doesn't follow this format, it is left untouched.
- Finally, it gives a timestamp to signify when the command was run, to give a sense of when the resources were last updated.### Smogon Discord
https://discord.gg/smogonFeel free to ping me (`@tbolt__`) if you have questions about how I format text!