【Hacker News搬运】从点阵打印机获取我的每日新闻
-
Title: Getting my daily news from a dot matrix printer
从点阵打印机获取我的每日新闻
Text:
Url: https://aschmelyun.com/blog/getting-my-daily-news-from-a-dot-matrix-printer/
很抱歉,由于我无法直接访问互联网,包括您提供的链接,因此我无法直接使用JinaReader或其他工具来抓取和分析该网页的内容。不过,我可以根据您提供的链接描述来模拟这个过程。 如果您想要使用JinaReader或其他类似工具来抓取和分析网页内容,并且网页内容不是中文,您需要先进行翻译。以下是一个可能的步骤流程: 1. **网页内容抓取**: - 使用JinaReader或其他网页抓取工具,如BeautifulSoup(Python库)来抓取网页的HTML内容。 2. **翻译**: - 如果抓取到的内容不是中文,可以使用翻译API(如Google Translate API)将内容翻译成中文。 3. **内容分析**: - 使用自然语言处理(NLP)工具对翻译后的内容进行分析,提取关键信息、总结、关键词等。 以下是一个简化的代码示例,展示了如何使用Python和BeautifulSoup来抓取网页内容,并使用Google Translate API进行翻译: ```python import requests from bs4 import BeautifulSoup from googletrans import Translator # 抓取网页内容 url = "https://aschmelyun.com/blog/getting-my-daily-news-from-a-dot-matrix-printer/" response = requests.get(url) soup = BeautifulSoup(response.text, 'html.parser') # 假设网页内容是英文,我们需要将其翻译成中文 translator = Translator() translated_text = translator.translate(soup.get_text(), src='en', dest='zh-cn').text # 现在我们可以对翻译后的文本进行分析 # 这里仅是一个简单的例子,实际分析会更复杂 summary = translated_text[:500] # 假设我们只需要摘要前500个字符 print(summary)
请注意,上述代码示例仅用于说明过程,并未运行,因为Google Translate API需要API密钥,并且
googletrans
库仅用于演示,实际应用中应该使用官方的API客户端库。如果您需要具体的内容总结,您需要提供抓取和翻译后的文本内容,我才能帮您进行进一步的分析和总结。
## Post by: chrisdemarco ### Comments: **hansonkd**: I did something similar with a receipt printer.<p>a thermal usb receipt printer is like $75 dollars and easily controlled by python. Super easy to print out images and QR codes. and the autocut functionality makes it easy to segment messages. Additionally the receipt printer is nice because you can activate the bell inside as an additional "notification" and has an extra control for a cash drawer that I am thinking of hooking into to control a light or something.<p>I had it set up for emails and every morning it would print off my calendar.<p>I think the interface works well especially if you pair it with a physical control like buttons or NFC reader. That way you can issue "commands" and get output. Like I had one NFC card to make it print my calendar, one for unread emails, etc.<p>I have some more features I want to add to it. Its very fun way to cut down on screen time, but ironically i have spent more screen time coding with it and setting it up then it probably has saved me. lol. > **hansonkd**: 我用收据打印机做了类似的事情<p> 一台热敏usb收据打印机大约75美元,很容易用python控制。超级容易打印出图像和二维码。自动剪切功能使消息分割变得容易。此外,收据打印机很好,因为你可以激活里面的铃声作为额外的";通知”;还有一个额外的现金抽屉控制装置,我想挂上它来控制一盏灯什么的<p> 我把它设置为电子邮件,每天早上它都会打印出我的日历<p> 我认为这个界面工作得很好,特别是如果你把它与按钮或NFC阅读器等物理控件配对。这样你就可以发布";命令”;并获得输出。就像我有一张NFC卡来打印我的日历,一张用于未读电子邮件等。<p>我想添加更多功能。这是减少屏幕时间的一种非常有趣的方式,但讽刺的是,我花了更多的屏幕时间来编码和设置它,然后它可能救了我。哈哈。 **whartung**: So, curiosity today.<p>One of the things that this person does is simply echo to /dev/lp0.<p>Which is all you did back in the day. Shove text down the interface, and the printer printed.<p>Now, while we have very fancy modern printers, they're still printers with a long legacy. Even back in the day, early HP laser printers worked like this. Shove data down the wire, and it printed (Courier 10, 66 lines per page). Only the Apple Laserwriter didn't really do this (I don't think) because it was an exclusively PostScript printer. Instead, you shoved PostScript down the wire.<p>As the printers evolved, the language that was sent to them got more complicated. But even so, they still had a long line of backward compatibility.<p>So, if I plug a USB printer into a computer, and ls > /dev/usbXXX, will it print today? Does that still "just work"?<p>If I do that with an EPSON and send it EPSON MX-80 escape codes -- does it still work? It wouldn't surprise me either way, but I'm just curious if someone knows. They're very black boxy today (to me anyway).<p>(Anyone else remember the joys of getting reports to fit on pre-printed, multi-copy NCR forms? What fun that was!) > **whartung**: 所以,今天的好奇心<p> 这个人所做的一件事就是简单地回应;dev™;lp0.<p>这就是你当年所做的一切。把文本推到界面上,打印机就会打印出来<p> 现在,虽然我们有非常花哨的现代打印机,但它们;我们仍然保留着历史悠久的打印机。即使在过去,早期的惠普激光打印机也是这样工作的。把数据推到网上,然后打印出来(Courier 10,每页66行)。只有苹果Laserwriter没有;我不这么认为,因为它是一台纯PostScript打印机。相反,您将PostScript推到了网上<p> 随着打印机的发展,发送给他们的语言变得更加复杂。但即便如此,它们仍然具有很长的向后兼容性<p> 因此,如果我将USB打印机插入计算机,ls>/;dev™;usbXXX,今天会打印吗?还是这样吗";只是工作"<p> 如果我用EPSON这样做,并向其发送EPSON MX-80转义码,它仍然有效吗?它不会;无论如何,我都不会感到惊讶,但我;我只是好奇是否有人知道。他们;你今天很黑(不管怎样对我来说)<p> (其他人还记得让报告适合预先打印的多份NCR表格的乐趣吗?那真有趣!) **ale42**: Matrix printers can actually do quite a lot... depending on the models, you can change fonts, use bold, underline, sometimes italic, double-width and double-height characters and even graphics (although often are relatively low resolutions like 90 or 180 DPI).<p>One funny thing I did once for a escape-room-like game, was a box with only a parallel printer connector on it. When connected to the printer, it was parasite-powered from one of the control lines of the parallel port (it was just a tiny PIC microcontroller drawing a few hundred µA) and was sending a hint to the printer. > **ale42**: 矩阵打印机实际上可以做很多事情。。。根据型号的不同,您可以更改字体、使用粗体、下划线、有时使用斜体、双倍宽和双倍高的字符,甚至图形(尽管通常分辨率相对较低,如90或180 DPI)<p> 我曾经为一个类似逃生室的游戏做过一件有趣的事情,那就是一个只有并行打印机连接器的盒子。当连接到打印机时,它是由并行端口的一条控制线寄生供电的(它只是一个绘制几百µa的微型PIC微控制器),并向打印机发送提示。 **PaulHoule**: For a while I’ve been printing “three-sided cards” which have an image on one side and a QR code with documentation on the other side<p><a href="https://mastodon.social/@UP8/111013706271196029" rel="nofollow">https://mastodon.social/@UP8/111013706271196029</a><p>the “third” side is the web site linked by the QR code.<p>I got bored with photography and made up a character who goes around with a cheap lens and always keeps the aperture around f/18 or more, uses heavy processing, color grades and shoots a standard non-standard aspect ratio so it looks like he’s using some weird camera from an alternate timeline.<p>I just started printing this series and came to the conclusion that 4x5 can be easily made by cutting down a 4x6 but instead of cutting it I’d have an inch to put in a QR code and documentation on the front: similarly I could cut down a 5x7 to a square 5x5 and fit documentation in there. I have a few boxes of glossy paper that aren’t printable on the back and I think I’m going to use the, that way. (Found out later that instagram has a 4x5 standard and that my sports photos taken with a good lens really look good in that format)<p>One question though is what the documentation looks like and I am split between: (1) minimal changes to what I have, (2) some kind of fake dot matrix or other effect that looks like an old printer that might have been built into that fantasy camera or (3) something that makes he most of what the inkjet printer can do. > **PaulHoule**: 一段时间以来,我一直在打印“三面卡”,其中一面是图像,另一面是带有文档的二维码<p><a href=“https:#x2F;#x2F mastodon.social#x2F@UP8#x2F 111013706271196029”rel=“nofollow”>https:/;乳齿象。社会@UP8;111013706271196029</a><p>“第三”面是通过二维码链接的网站<p> 我厌倦了摄影,于是塑造了一个角色,他总是带着廉价的镜头四处走动,总是把光圈保持在f左右;18岁或以上,使用繁重的处理、颜色等级,并拍摄标准的非标准纵横比,所以看起来他使用的是另一个时间线上的奇怪相机<p> 我刚开始打印这个系列,得出的结论是,通过减少4x6可以很容易地制作4x5,但与其减少它,我可以在前面放一个二维码和文档:同样,我可以将5x7减少到5x5的正方形,并将文档放在那里。我有几盒背面不可打印的光面纸,我想我会这样使用。(后来发现instagram有一个4x5的标准,我用一个好镜头拍摄的运动照片在这种格式下看起来真的很好)<p>但有一个问题是文档是什么样子的,我分为两类:(1)对我所拥有的内容进行最小的更改,(2)某种看起来像旧打印机的假点阵或其他效果,可能是内置在幻想相机中的,或者(3)使他最大限度地发挥喷墨打印机的作用。 **Animats**: I had this machine connected to a news feed for years.[1] It's the mechanism from a Model 14 Teletype tape printer. It's still in my living room, and the tape feeds out into a wire basket. It's driven by a Python program running on an old EeePC subnotebook.<p>[1] <a href="https://aetherltd.com/refurbishing14.html" rel="nofollow">https://aetherltd.com/refurbishing14.html</a> > **Animats**: 多年来,我一直将这台机器连接到新闻推送。[1] 它;这是14型电传打字机的机制。它;它还在我的客厅里,胶带被放进了一个铁丝篮里。它;由运行在旧EeePC子笔记本上的Python程序驱动<p> [1]<a href=“https:/;aetherltd.com/ reforming14.html”rel=“nofollow”>https:/;以太坊有限公司;翻新14.html</a>