Annotate PDFs On Linux With PDFrankenstein

On Windows and Mac machines, it’s not too troublesome to add text or drawings (such as signatures) to PDF files, but [Mansour Behabadi] found that on Linux machines, there didn’t seem to be a satisfying way or a simple tool. Being an enterprising hacker, [Mansour] set out to fill that gap, and the way it works under the hood is delightfully hacky, indeed.

The main thing standing in the way of creating such a tool is that the PDF format is a complex and twisty thing. Making a general-purpose PDF editing tool capable of inserting hyperlinks, notes, images, or drawings isn’t exactly a weekend project. But [Mansour] didn’t let that stop him; he leveraged the fact that tools already exist on Linux that can read and create PDF files, and tied them all together into what was at one point “a horrific patchwork of tools” which inspired the name pdfrankenstein.

The tool is a GUI that uses Inkscape and qpdf to convert a PDF page to an SVG file, set it as a locked background, then let the user add any annotations they desire, using Inkscape as the editor. After changes are made, the program removes the background, overlays the annotations back onto the originals, and exports a final file. Annotations can therefore be anything that can be done in Inkscape.

Curious about these and other tools for handling PDFs? We’ve shared some programs and tricks when we previously covered dealing with the PDF format in Linux.

Soap Mouse Is A Slippery Interface For Mid-Air Input

We all have those gnarly hacks that we still think about years after we first saw them. For serial tipster [Inne], one of those is [Patrick Baudisch]’s soap mouse, which is a DIY device for mousing in mid-air that uses components from off the shelf and around the house.

How does it work? The guts are encased in plastic shaped like a flattened pill, which slips into a fuzzy sock. By squeezing it a bit, the plastic pill rotates, spinning the outward-facing sensor round and round. Although we briefly reported on the soap mouse way back in 2006, we think it deserves to be in the spotlight today, especially since there’s a complete PDF guide to building one that’s optimized for gaming. If you want a regular pointing device instead, the conversion is described within.

[Patrick] uses a CompUSA (RIP) mouse in the guide, but any sufficiently slim and also short mouse should work as long as it has a decently long focal range, which is necessary for the sensor to see the hull. Plenty of travel mice out there should fit the bill.

The hull itself is made from two small (empty) bottles of hand sanitizer, chosen for their size, shape, and clarity of plastic. The outermost housing is a baby sock with a snap sewn on. [Patrick] says moving the sock against the plastic is difficult, and has tried various methods for lubrication, such as a bit of mineral oil inside some plastic bags.

Be sure to check out the video after the break, which does a great job of explaining everything from the various types of interaction to construction in 5½ minutes.

Since 2006, [Patrick] has held workshops where people have built their own soap mice. Have you built one? Let us know in the comments. And don’t forget about the Digi-Key-sponsored Odd Inputs and Peculiar Peripherals contest, which runs through July 4th. Declare your independence from regular keyboards and mice and win big!

Continue reading “Soap Mouse Is A Slippery Interface For Mid-Air Input”

AI Attempts Converting Python Code To C++

[Alexander] created codex_py2cpp as a way of experimenting with Codex, an AI intended to translate natural language into code. [Alexander] had slightly different ideas, however, and created codex_py2cpp as a way to play with the idea of automagically converting Python into C++. It’s not really intended to create robust code conversions, but as far as experiments go, it’s pretty neat.

The program works by reading a Python script as an input file, setting up a few parameters, then making a request to OpenAI’s Codex API for the conversion. It then attempts to compile the result. If compilation is successful, then hopefully the resulting executable actually works the same way the input file did. If not? Well, learning is fun, too. If you give it a shot, maybe start simple and don’t throw it too many curveballs.

Codex is an interesting idea, and this isn’t the first experiment we’ve seen that plays with the concept of using machine learning in this way. We’ve seen a project that generates Linux commands based on a verbal description, and our own [Maya Posch] took a close look at GitHub Copilot, a project high on promise and concept, but — at least at the time — considerably less so when it came to actual practicality or usefulness.

A purple PCB with many DIP chips including a 6502

Hackaday Prize 2022: Reuse Those DIP Chips To Make A 1980s-Style Single-Board Computer

With the Great Chip Shortage still delaying deliveries of new components, now might be a good time to look around your lab and inspect those piles of chips that you thought “might come in handy one day”. Chances are you’ll find a good stack of 74xx series logic, once ubiquitous but today mostly obsolete thanks to powerful microcontrollers and FPGAs. It would be a shame to let them go to waste, so why not use them to make a neat 1980s-style computer?

With this idea in mind, [Anders Nielsen] designed the ABN6502: a single-board computer based on the venerable 6502 processor, but with relatively modern interfaces like a VGA monitor output, a PS/2 keyboard connector and even a wireless module to simplify firmware uploads from a PC. One design requirement was to minimize the number of new components needed; the average hacker interested in building the ABN6502 will probably have many of the chips lying around somewhere in their workshop.

The component list reads like a typical bill of materials for a 6502-based computer, but comes with a lot of flexibility to allow for part subsititution. For the CPU, both the classic NMOS 6502 as well as the modern CMOS-based 65C02 are supported, along with their 6522 companion chip that provides I/O ports and timers. A ROM socket can hold either modern, fast flash chips or traditional but slow UV-erasable EPROMs.

Instead of using DRAM chips with their complicated refresh requirements, [Anders] went for 32 KB of SRAM to implement the main memory; unaffordable in the ’80s but easily available today. Standard 74xx series logic chips glue all the components together, again with several options to add or remove features as the user prefers. Pin headers bring out the I/O ports for easy connection to external peripherals.

The ABN6502’s software library is currently limited to a bootloader, but a complete development toolchain based on the CC65 compiler should make it easy to develop all kinds of programs on this platform. We’ve already featured the clever wireless ROM flashing system, as well as a demonstration of the 6502 driving RGB LEDs.

Continue reading “Hackaday Prize 2022: Reuse Those DIP Chips To Make A 1980s-Style Single-Board Computer”

3D Print Glass With A Laser Cutter

We’re all familiar with FDM 3D printing, and some of the more well-heeled or adventurous among us may even have taken a faltering step into the world of SLA printers. But for most of us there’s a step further in 3D printing that remains beyond our reach. SLS, or Selective Laser Sintering, creates prints from powder by melting it layer by layer using a laser, and has the advantage of opening up more useful materials than the polymer stock of the other methods. It’s not entirely unreachable though, as [Kenneth Hawthorn] shows us by using a laser cutter to produce SLS prints from powdered glass.

He evolved the technique of repeated fast passes with the laser to gradually melt more glass together as opposed to slower passes. He achieved a resolution as low as 0.1 mm, though he found a better glass color when the laser was less tightly focused. It raises the concern that glass powder is abrasive and thus a threat to any mechanism, thus he’s being extremely careful with the fan settings.

This may not be quite in the league of an SLS printer costing thousands of dollars, but it’s a technique that bears more investigation and could no doubt be refined for more custom fused glass creations. He tells us he was inspired by a previous Hackaday post about sintering sand, and of course we’d like to remind readers of a 3D printer that did the same job with the power of the sun.

The Box: Think Outside Of It

There’s no single recipe for creativity, as far as I know. But this week on the Podcast, Tom Nardi and I were talking about a number of hacks that were particularly inventive, out-of-the-box, or just simply “how did they think of that?”. One possible route to something new is learning from other disciplines.

We were talking about an inspiring video about 3D printing fabrics. At the moment, the design world is going crazy for all things 3DP, so it’s no surprise to see someone with a design background asking herself how to make stuff that comes off the 3D printer more flexible, and fit her needs a little bit better. But what if those of us on the building-purely-functional side of things took what the fabric folks learned and applied it to our work? You’d get something like this hybrid approach to folding mechanisms, or this approach to remove supports from your prints.

I’m continually surprised by how much the home-gamer can learn from industry, and this week was also no exception. [Anne Ogborn]’s piece on handling bulk material draws mostly on the hard work of engineers who are worried about properly emptying gigantic grain silos or feeding tons of screws into small boxes to ship out to customers. But the same physics are at work when you’re designing an automatic dry cat food dispenser for your next vacation, just on a smaller scale.

How about you? What things have you learned from other disciplines, possibly entirely unrelated ones, that have helped you with your hacking?

A modified Ghostbusters Proton Pack

Track Down Ghosts In Your WiFi With The Pwnton Pack

If there’s something weird in your Network Neighborhood, who you gonna call? If you want your WiFi troubles diagnosed in style, try calling [Travis Kaun] — he might just show up wearing the amazing Pwnton Pack. Built from a replica Proton Pack similar to those used in the 1984 classic Ghostbusters, it’s a portable wireless security diagnostics kit that should be able to pinpoint any weaknesses in your wireless network.

Inside, it’s got a Mark VII WiFi Pineapple, which is a portable device designed for security testing purposes, as well as a Raspberry Pi running Pwnagotchi: a deep learning-based WiFi sniffer that aims to capture those network packets that help maximize your chances of brute-forcing the WPA key. These two devices are connected to an array of antennas, including a cool rotating 5 GHz panel antenna to scan the surrounding area.

Naturally, the Pwnton Pack also includes a Neutrona Wand, which in this case contains a 2.4 GHz Yagi antenna hooked up to an ESP32 programmed to perform deauthentication attacks. An Arduino Nano drives an LED matrix that shows scrolling Pac-Man ghosts, while a dedicated sound board provides movie sound effects. The whole system is powered by three LiPo battery packs, and can even be remotely operated if desired.

Sadly, it doesn’t come with one of those ghost traps to suck up wayward WiFi networks, but the range of tools available should help to catch any kind of weird phantoms hiding in your system. We’ve spotted a few Proton Packs before, but never one with such advanced functionality. Security testing systems tend to be a bit less conspicuous, after all. Continue reading “Track Down Ghosts In Your WiFi With The Pwnton Pack”