Hacker News new | ask | show | jobs
by throwaway5371 1557 days ago
offtopic: I really wish reading preformatted text files on ios safari was good.. I have to export the file to Books in order to read it properly
5 comments

I just tried it out on iOS in Safari's reader mode, and it looks quite good. What don't you like about the output?
The file has diagrams that are meant to be viewed on a screen with enough space to leave long lines unbroken. If you attempt to get things to fit onto a single line by turning the phone sideways, it just zooms the text, instead of reflowing the text onto a larger line width. The problem exists in both the default rendering and the reader view.

Opening in iBooks essentially prints the text file to a PDF, which defaults to US Letter paper size, which has the effect of making line widths large enough for most 80-character text files to fit without awkward mid-line soft breaks.

The only other solution I know of is to manually zoom the page out to 50%. Luckily the zoom setting is saved by domain, so in this case if you want all raw githubusercontent files to view zoomed out iOS will remember that, but on domains where it’s a mix of text and HTML it’s more annoying.

Firefox reader mode is nice for taking various webpages, whether it's a news article with bloated JS, a wiki page, simple plaintext etc and giving it a common presentation that you can configure to your liking.

No clue if that's a solution for you on iOS but it's a great feature.

> No clue if that's a solution for you on iOS but it's a great feature.

Unfortunately, iOS browsers tends to be just reskins of Safari (because it's required by Apple).

Reader mode would work in such a reskin I think, but Safari has its own reader mode anyway.

The original Readability was a bookmarklet that worked in any browser.

I think people need to use text files less. Or at least stop hard-wapping them.
I love text files and kinda like hard wrapping as well.
Does that mean that a browser shouldn't be able to display a text file with explicit line breaks, though?
Hard-wrapping is my bane. Especially in RFCs.