stephensekula / navierstokes

A bridge between some social networks to improve broadcasting and sharing.
6 stars 3 forks source link

Don't shell out to txt2html, call rfc2html #10

Closed nemobis closed 1 year ago

nemobis commented 7 years ago

Installing txt2html may be impossible for users without root access. The rfc2html module is the only one I could find: seems maintained and does a decent job (it outputs HTML without a body tag).

stephensekula commented 7 years ago

I am on vacation. I will review the request and get back to you in the next few weeks. Thanks for being so proactive!

nemobis commented 7 years ago

I guess this doesn't happen with txt2html?

2017-08-08 19:21:09,040 Il regolamento sulla profilazione di 6 anni di fatto imporrà deep packet inspection generale
<a href="https://t.co/vwcLPJ8q0q
#EUdataP">https://t.co/vwcLPJ8q0q
#EUdataP</a> #dataretention

The first hashtag is appended to the link label for the preceding link or does not display as hashtag: https://identi.ca/wikimediaitalia/note/UMlXz4knRduR4bP78qStyA

stephensekula commented 1 year ago

Old, but not forgotten! I have migrated to Python3 and this suggestion was good. The code you submitted, however, had problems (it passed the html string to markup() but you had deleted the instantiation of that html string). Also, markup wraps text in <pre>...</pre> which is not ideal. I have adopted the core suggestion but implemented the code with some extra steps. Thanks for submitting this!