frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Text2troff – automatically converts plain text to TROFF format

https://github.com/jazzfan2/text2troff
1•robtoscani•1h ago
I) TEXT2TROFF is a bash script that uses a combination of awk and sed filters to convert a plain-text-file into TROFF text format, by inserting TROFF request and 'ms' macro commands. The result is sent to standard output, and can be processed further with available 'troff' tools with 'ms' macro package, preferrably GNU groff_ms(7), to produce typeset PostScript-, PDF-, HTML- or terminal ('nroff') output. As an alternative to processing a text-file, text2troff can also read (text) input from a pipe.

The functionality includes interpretation of chapter headers, paragraphs, emphasized text, bullet item lists (whether or not nested), tables, footnotes and 'code blocks' (definition see below). It offers various options to set general text font family, style, size and color, the number of text columns per page, representation of chapter headers, paragraphs and tables, as well as end-of-sentence behavior. An option to automatically generate and include a Table of Contents (TOC) is present as well.

text2troff offers an alternative to pandoc(1) for producing TROFF text output, by attempting to minimize as much as possible the degree of formatting required in the input text, yet enabling still highly acceptable text typesetting based on a very limited set of simple conventions. These are used by text2troff as criteria by which to 'best-guess' the intended layout of the text.

The output produced by this program shouldn't be considered as more than an approximation of any full-blown end result. Further polishing can be done by any additional manual placement of TROFF-requests and/or ms macros if chosen for. Main intent for developing this program was the wish to be able to turn a quick-and-dirty piece of plain text into a decently sophisticated document 'at the push of a button', with enough options to vary its appearance.

II) TEXT2TROFF_TABLE is a bash script that uses awk filtering to convert tabulated lines in a plain-text-file into TROFF formatted tables by inserting table requests and ms macros. All lines not interpreted as table lines are passed on unchanged. The result is sent to standard output, and can be processed further with available 'troff' tools with 'ms' macro package, preferrably GNU groff_ms(7), to produce typeset PostScript-, PDF-, HTML- or terminal ('nroff') output. As an alternative to processing a text-file, text2troff_table can also read (text) input from a pipe.

III) TROFFORM is a bash script that activates a chosen document format (including ancient AT&T variants) within a TROFF text and deactivates any alternate document formats. It does so by reducing the number of dots prefixed to the ms macro belonging to the chosen format to one (1), and by prefixing two (2) dots to all other document formats ms macros. Unaffected text lines are passed on unchanged, and the result is sent to standard output.

The output can be processed further with available 'troff' tools with 'ms' macro package, preferrably GNU groff_ms(7), to produce typeset PostScript-, PDF-, HTML- or terminal ('nroff') output. As an alternate to processing a text-file, trofform can also read (text) input from a pipe.

Prerequisite for evoking any of the ancient/authentic AT&T document formats is the presence on the system of the original AT&T 'tmac.s' file with special macros. This special 'tmac.s' macro-file is in the public domain, can be found on the web, and should preferrably be renamed differently as to avoid collisions with the natively installed ms-macro files. In order to process the output correctly, groff must be given option -M with the path to the directory where the AT&T macro-file resides.

trofform can be called both interactively (by options -I and -h) and non-interactively (by specifying no or any of the other options).

Amazon's unprecedented gamble on AI redemption might just work

https://economist.com/business/2026/03/25/amazons-unprecedented-gamble-on-ai-redemption-might-jus...
1•andsoitis•21s ago•0 comments

Meta and YouTube found negligent in landmark social media addiction case

https://www.theverge.com/policy/900654/meta-google-instagram-youtube-social-media-addiction-trial...
2•benwerd•55s ago•0 comments

Multi-Vector Retrieval at Sub-Millisecond Latency

https://mixpeek.com/blog/colqwen2-muvera-multimodal-late-interaction
1•Beefin•1m ago•0 comments

Show HN: A Technique for Self-Improving Agents

1•dataviz1000•4m ago•0 comments

21,864 Yugoslavian .yu Domains

https://jacobfilipp.com/yu/
1•freediver•6m ago•0 comments

Show HN: MonkePay – Charge AI Agents per API Request in USDC

https://www.monkepay.xyz/
2•iamalibaig•13m ago•0 comments

Show HN: Room Service – understand what's filling your Mac

3•ardacankirkoc•14m ago•1 comments

Will you pay for this? – meet to LinkedIn post

1•zeelpatel27•15m ago•0 comments

Better Auth Usage (plugin)

https://github.com/EggerMarc/better-auth-usage
2•eggermarc•17m ago•1 comments

How A Spartan Revolutionized Baseball

https://msutoday.msu.edu/news/2026/03/spartan-revolutionize-baseball
1•rmason•17m ago•1 comments

Inside the covert operation to bring down the party threatening Orbán's rule

https://telex.hu/direkt36/2026/03/25/inside-the-covert-operation-to-bring-down-the-party-threaten...
1•chpatrick•17m ago•1 comments

Show HN: First autonomous AI agent purchase via open protocol (UCP)

https://ucpchecker.com/blog/first-autonomous-ai-agent-purchase-ucp
1•benjifisher•20m ago•0 comments

Postal Service to Impose Its First-Ever Fuel Surcharge on Packages

https://www.wsj.com/us-news/postal-service-to-impose-first-ever-fuel-surcharge-on-packages-73b5e0fd
3•bookofjoe•21m ago•1 comments

iOS 26.5 update adds age verification in the UK

https://www.theverge.com/tech/900284/apple-ios-26-4-uk-age-verification
1•treebrained•21m ago•0 comments

Kern – AI agents built for coworking

https://kern-ai.com/
1•obilgic•22m ago•0 comments

Tmux Replacement for Agentic Workflows

https://github.com/nmelo/initech
1•nmelo•22m ago•0 comments

Uploading to Wikimedia Commons with AI

https://daniel.lawrence.lu/blog/2026-03-25-uploading-to-wikimedia-commons-with-ai/
2•plun9•23m ago•0 comments

AutoGaze removes redundant video patches before passing into a ViT or MLLM

https://autogaze.github.io/
1•MayCXC•23m ago•0 comments

Cannabis Through the Ages

https://thereader.mitpress.mit.edu/cannabis-through-the-ages/
2•samizdis•26m ago•0 comments

The U.S. is blocking router approvals unless they are manufactured domestically

https://www.igorslab.de/en/the-u-s-is-blocking-new-router-approvals-unless-they-are-manufactured-...
2•tablets•28m ago•0 comments

So Long KubeSail

1•vocatan•30m ago•0 comments

To Get a Government Contract in 38 States, You Must Pledge Not to Boycott Israel

https://www.aclu.org/news/free-speech/congress-laws-suppressing-boycotts-israel-are-unconstitutio...
5•KoftaBob•31m ago•0 comments

Show HN: Rostra – Scroll the Greats

https://www.readrostra.com
1•richhwang•31m ago•0 comments

Show HN: I coded Podhoc – Podcast generator to learn on the go

https://podhoc.com
2•davidpelayo•33m ago•0 comments

NASA's plan for nuking Gateway and sending it to Mars

https://arstechnica.com/space/2026/03/here-is-nasas-plan-for-nuking-gateway-and-sending-it-to-mars/
2•LorenDB•36m ago•1 comments

Bruno: The Git-native API client

https://www.usebruno.com
1•ahamez•36m ago•0 comments

BRINC's new police drone uses Starlink, carries Narcan, chases vehicles at 60mph

https://arstechnica.com/gadgets/2026/03/brincs-new-police-drone-uses-starlink-carries-narcan-chas...
1•LorenDB•36m ago•0 comments

AI and Git Worktree: a multi-agent setup that works

https://www.memmof.dev/writing/git-worktree-ai-agents
1•AnhTho_FR•39m ago•0 comments

ClassicPress 2.7.0 Release Notes

https://forums.classicpress.net/t/classicpress-2-7-0-release-notes/6512
4•ethanpil•42m ago•0 comments

Robotics Needs Fewer Roboticists

https://www.a16z.news/p/robotics-needs-fewer-roboticists
2•sebg•45m ago•0 comments