NaNoGenMo / 2021

National Novel Generation Month, 2021 edition.
44 stars 8 forks source link

Computer Product Catalog #48

Open savetz opened 3 years ago

savetz commented 3 years ago

I'm making some sort of computer product catalog. Each page will have a company and product name, a photo with overlayed text, and some sort of specs or description of the product.

I have written the code for company and product name generation, though I could use more seed words. I am using a set of photos from an old book of computer terminals that I scanned years ago. The next big part will be the product specifications/description generation, which I don't have a solid plan for yet. If I stick with my current plan to have 120 products, I will need to generate about 420 words of description per product.

I'm thinking maybe I will combine the photo and text into a markdown file, then somehow generate a PDF from that. I don't know how to do that yet.

Here's a sample of my work in progress: %python3 productnames.py Cyberomegaard Computer Programming 160 Sigmapetaphobe Disembarrassment Teramebies Random-Access Memory Picotebi Access Internetphyte Psikappa Symbol Gammanano Computer Speaker 690000000 Megakappa Party Sigmaphi Cellular Automatonasis Yottasigma Tommy Flowersoid 74

180101_0071 180101_0028

lee2sman commented 3 years ago

This looks great. I am doing somewhat similar kind of work with my #25 so great to be in company!

If you produce a markdown file there are many conversion options to get to PDF, depending on your comfort with command line software.

For example, pandoc is an incredible conversion software. I am using pandoc and applying a CSS stylesheet to get the particular book aesthetic I want. Then I am going to export to PDF. So my own pipeline looks like:

pandoc --self-contained -s input_file.md -c path/to/stylesheet.css --metadata title="My Book Title" -o output_file.html

From there I will likely export from the browser to PDF, but one could easily build in markdown -> pdf directly, if you have Latex support.

More info here.

Here's a more extensive guide to making beautiful pdfs and epubs from markdown

I don't really work in python myself but i also see options like this

savetz commented 2 years ago

pandoc

Wow, thank you @lee2sman for the incredibly useful reply! Thanks to your pointers, I'm now generating a PDF from markdown right from the command line.

I now have a book of product names and photos, one per page, with the margins and fonts that I prefer, in a PDF file. Next will be generating specs and notes about the products... you know, the actual 50,000 words ::yikes::

Screen Shot 2021-11-21 at 3 50 29 PM Screen Shot 2021-11-21 at 3 51 24 PM
savetz commented 2 years ago

Made good progress today — added product descriptions (pulling random sentences from a directory of real, old computer products) and "sample output" (pulling from the linux 'fortune' command.) Up to about 37,500 words. Next, need to add some sort of product specification chart.

Screen Shot 2021-11-21 at 11 08 52 PM
savetz commented 2 years ago

My book "1982 Fauxsumer Electronics Show Product Catalog" is complete, weighing in at 50,926 words. A catalog of products available at a 1982 computer show that I invented.

View or download the PDF: https://archive.org/details/1982-fauxsumer-electronics-show-product-catalog

See the code: https://github.com/savetz/1982-Fauxsumer-Electronics-Show-Product-Catalog

Enjoy the cover and two sample pages right here:

cover sample1 sample2
anjchang commented 2 years ago

Wow this brings back memories of part catalogs for hardware and chips! I still have some laying around. Awesome cover, drew me right in. Pictures look great with the overlaid skewed marketing text--those juxtapositions! I even started thumbing through to see what cool gadgets we could get. Maybe the "IotaLambda Laser Printer" The sample outputs were very promising. Take my m0n3y$ please! 👍