-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow specialized markdown header for NNTP posts #129
Comments
The problem is that I don't want to proliferate an ad-hoc standard. These messages are forever, and, I don't want to create the only software that understands them correctly. The convention that DFeed currently uses is not "standardized" by any standards body, but at least it has precedent. There exists other software that understands So, please, file this issue in the Thunderbird bugtracker instead. I did spend some time seeing if it's possible to do this using a Thunderbind extension. Their extension mechanism is both highly limited (when using their explicitly documented APIs) and allows doing some very intrusive changes to the main software (when using the APIs that replace Thunderbird components). It may be possible, but it's not easy, and I couldn't figure it out in a few hours. I'm going to close this because I really feel like I have a responsibility to ensure that the messages that DFeed creates or helps create are as close to standard as possible, to ensure that they remain properly viewable at any point in the future without having to modify each involved software with site-specific hacks. |
OK, well, my current and future efforts here will be to post with markdown, but without dfeed showing the markdown. I guess people will have to live with that. |
Will you file the Thunderbird bug? If you don't want to do it, let me know and I will do it for you. I don't use Thunderbird for newsgroups, so my understanding of the flow of using it that way is only as far as has been described to me. |
I don't know what to file? I don't expect "support markdown" to be a trivial thing for them. Or did you mean to support altering Content-type? |
I think the best way forward in that regard would be for there to be a way to create a Thunderbird extension that allows authoring messages using Markdown. That might involve previewing the rendered result, but at the very least, Thunderbird should have a mechanism of allowing extensions to add |
I don't intend to write a Thunderbird extension, so I have a hard time justifying asking for them to add support for it. You can file if you wish. |
Just tried this out, it works when I'm posting to NG, but doesn't seem to alter or add any headers: https://addons.thunderbird.net/en-US/thunderbird/addon/markdown-here-revival/ but I think it was intended for a different purpose (converting to HTML rather than sending markdown messages). However, it is good to see there is at least some markdown editor that exists. |
OK, here it is: |
OK, here's an idea for a workaround. @schveiguy Can you try running https://gist.github.com/ccb3813d5953e5e7f2c53fe43275f986 and pointing Thunderbird to localhost:4119 instead of nntp.digitalmars.com:119? Let me know if you'd like me to host an instance online if you can't or don't want to run it on your PC. |
Oh that is clever! I'll have to play with it, though it could be a bit smarter on the replacement (if I understand correctly, it replaces ANY instance of I can run it on an internal server. |
Thanks!
Well, only starting on a new line. And only for outgoing data.
Cleverness breeds complexity, complexity breeds bugs, bugs breed unhappiness, etc. Or something. :) Packet fragmentation is maybe a bigger concern. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Seems to be doing something now. Only downside is, it has to reload the entire set of headers (and hasn't downloaded the content). I'll have to see if I can restore the content from backup, as I use the Thunderbird search feature all the time. Will let you know when I get to the point of posting a markdown test. |
You could hack around that as follows:
|
I think it's too late. What I should have done is added a new server instead of replacing the host with the IP (for the test anyway). but I think I can figure out where Thunderbird stores its cache, I have hourly backups, and just restore that. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
FYI, this was a weird issue. Not sure how to solve it, will run in debug mode for now: CyberShadow/ae#51 |
You should announce this workaround on the forum. I know a few people who would use it. |
If this was to be registered on the dub registry, it would be as simple as |
Can I register a gist? |
It's not letting me register a gist. |
No, it has to be a repository. |
Works for me too! |
Yes, hypothetically. I mentioned packet fragmentation. Fixing that properly requires implementing rudimentary understanding of the protocol. |
Thanks for the explanation. As long as it works for me most of the time :) |
I'm thinking I will make an iopipe-based tool that is on dub that does this. The idea is awesome, and with a buffering system, it can be made correct, even with the possibility of fragmentation. All that is necessary is to look for newlines, and then scan for the string |
If you're going to make a better tool, might as well make it only do the rewriting if the line is in the headers part of the message :) |
OK, I think I can swing that. The protocol looks pretty simple, I can use a line splitter to judge where posts start. |
Ugh, the protocol is simple, but complicated enough that I have to know all the commands (At least once that have multi-line commands). Not only that, but std.io isn't mature enough. I have no way to shut down the write end of the socket. Plus async i/o is not there yet, making this quite cumbersome. Here's what I have so far, but it doesn't work right (I haven't even tested the markdown rewrite): https://github.com/schveiguy/nntp-md-adder will continue any discussion there. |
Ah, sounds like a good use case. I think this should fix the two issues in the ae way (also untested): |
If I post via NNTP, my messages do not show up with markdown enabled.
Thunderbird does not allow me to change the
Content-type
header to add themarkup=markdown
piece. If Dfeed could recognize a custom header in addition to theContent-type
header, that would be useful. Then I can have Thunderbird add the header when I want it to show markdown.The text was updated successfully, but these errors were encountered: