Comments (5)
As far as I know, no, this library doesn't provide any color or formatting support. I'd be happy for this library to host such behavior. Feel free to elaborate on how you'd like the feature to work or propose a patch (PR) to implement the behavior.
from irc.
Thanks for the response. I do not quite know how this would be accomplished. But being that this is THE go-to python library for IRC, it only seems right that it have the ability to format IRC text with color, bold, italic, strikethrough, reset, underline, monospace, etc?
Importing another library can always be done and I've used https://pypi.org/project/irccodes/ in combination with your IRC library with success (some minor errors on syntax wherein the color codes uses single or double digit numbers, so it throws an error in the code if not formatted properly with the code that follows the color code.)
You don't tell a doctor how to do a doctor's work, so I recognize you could implement this better than me and I will leave the "how" up to you!
Let me know your thoughts!
from irc.
Can you say more about what it is you'd like to see? Are you wanting to add support for sending color codes or receiving them (or both)? Another way you could help is to write the documentation for the (yet unimplemented) feature, which could be used to infer what the behavior should be.
I've used https://pypi.org/project/irccodes/
Perhaps you could share what you've done before, perhaps as a link to another repo, as PR to the "examples" of this project, or as some code inline.
I recognize you could implement this better than me
I appreciate the respect, but unfortunately, I'm mostly a legacy maintainer of this project. I'm happy to keep it going and supported, but for new features, they'll have to come from the community (which in practice means the people who want features will have to implement them). This project is very much interested in accepting contributions, so now it's just a matter of finding someone willing to learn the code and devise an implementation.
from irc.
inside the bot code the user is writing they can simply do
from irccodes import colored
server.privmsg(event.target, colored(text="This text will be blue", color="blue"))
and thats it really. If jaraco wanted to integrate the code into the library, that wouldn't be that hard either, if you look at the source of irccodes on git, its quite simple, basically he would just need to include the source of it in his library, or simply create a new function accessible to the bot to just add the hex code to color the text being output. But importing irccodes is just as easy.
from irc.
inside the bot code the user is writing they can simply do
from irccodes import colored server.privmsg(event.target, colored(text="This text will be blue", color="blue"))
I don't see anything that needs to change in the irc library to support that usage. Any client that wishes to have color can just depend on irc
and irccodes
and then color the text appropriately when sending messages.
Feel free to elaborate on how you'd like to see the use-case changed to be better than what you've already described, but for now, I don't see anything to do here, so I'm closing (but happy to re-open if appropriate).
from irc.
Related Issues (20)
- After joining a channel, how do I get a list of usernames? HOT 1
- 'AioReactor' object has no attribute 'scheduler' HOT 3
- set_keepalive resulting into "irc.client.ServerNotConnectedError: Not connected."
- Empty quit message raises IndexError
- encoding outgoing messages seems to remove "\x1d" HOT 1
- Docs builds failing HOT 1
- IRCFoldedCase no longer folding HOT 1
- The addition of new numeric event names for SASL broke heisenbridge, which was using numeric codes. HOT 3
- SSL Support HOT 1
- `irc.connection.Factory.connect` should support `ssl.SSLContext.wrap_socket` with the `server_hostname` parameter HOT 1
- How to list channels HOT 2
- Error when attempting to join multiple channels HOT 2
- IRC Bot reconn strategy question HOT 3
- ResourceWarnings in test_reconnects_are_stable HOT 6
- How to use data from one event handler in a different one? HOT 3
- Receive public messages HOT 1
- SASL example HOT 4
- 20.4.1 installs `docs` into site-packages HOT 2
- Add type annotations
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from irc.