Blog: Example

3D printing notes

Blender for design. (AppImage)

Cura for slicing. (AppImage)

Crealty3d Ender 3.

TTTThis

Lubuntu 18.04

Don't use newer Lubuntu, they suck (no internet).

TTTThis

Qemu Virtual Machine Manager (KVM)

After VirtualBox turned bad (everyone says it's much slower, and it can't even be installed on lots of OSs anymore), people are turning to Qemu, which is better anyway because it's FOSS.

It uses qcow2 files (currently), not .vdi files (which VirtualBox uses). You can 'migrate' .vdi files to become qcow files (use your old VirtualBox VMs in Qemu) but I haven't done that yet.


Install was not simple, but did work.

To make shared folders in the current Qemu, you have to go to Memory > checkmark on 'Enable shared memory', then click the button at the bottom of the list 'Add hardware', then go to 'File System' and here you keep driver as 'virtiofs' (this is just for LinuxHost-LinuxGuest, I've read, not for Windows). Set your source path (yes the actual path) to where you want your sharedFolder to be on your Host (create this folder also). For Target path, just put the NEWdIRECTORYnAME of the folder on your Guest (don't put the actual path to it, just the name). ... Now inside the GuestOS, do sudo mkdir path/to/your/NEWdIRECTORYnAME ... then (still inside the Guest, do sudo mount -t virtiofs NEWdIRECTORYnAME /path/to/your/NEWdIRECTORYnAME (the first name has to be the same as you entered in your Qemu settings a minute ago). Now it should be working on both sides.

TTTThis

Crop edges off photos (ImageMagick)

(If you want to screenshot first, and want to rotate the screen: xrandr -o left (and use xrandr -o normal to return to regular view).)

Open Terminal in the folder with all the images and

convert *.png -shave 90x280 shaved*.png
TTTThis

Convert pdf to text (several-step process)

Uses qpdf, imagemagick, ocrmypdf, and pdftotext.


0 Rename pdf to orig.pdf

1 Extract the paragraph from the pdf

  • qpdf orig.pdf --pages . 100-110 -- just-the-chapter.pdf

2 Create vr.pdf (VeryReadable)

  • convert -density 288 just-the-chapter.pdf output-%02d.jpg
  • convert output*.jpg -level 25% final-%02d.jpg
  • convert final*.jpg vr.pdf

3 Create text layer on vr.pdf as a new pdf

  • ocrmypdf -l spa vr.pdf vr-layer-spa.pdf

4 Convert that new pdf to .txt

  • pdftotext -layout vr-layer-spa.pdf chapter-spa.txt

5 Delete everthing except the new txt file and the new layered pdf * rm output* && rm final* && rm vr.pdf && rm just-the-chapters.pdf

All at once:

qpdf orig.pdf --pages . 318-419 -- just-the-chapters.pdf && convert -density 288 just-the-chapters.pdf output-%02d.jpg && convert output*.jpg -level 25% final-%02d.jpg && convert final*.jpg vr.pdf && ocrmypdf -l spa vr.pdf bookonech9-10.pdf && pdftotext -layout bookonech9-10.pdf bookonech9-10.txt && rm output* && rm final* && rm vr.pdf && rm just-the-chapters.pdf

TTTThis