Posts

Showing posts from May, 2024

Extract a list of files from a folder and paste it into a document, in MS Windows, GNU/Linux and macOS.

Image
ABSTRACT Article on how to copy a list of files in a folder and paste the list into an open document. The operation is performed only with resources internal to the tested operating systems, which are MS Windows, GNU/Linux (Arch, Fedora and Ubuntu) and macOS, although in the last one, only in command-line mode. 1. Topic of this article. 2. Command line solution in MS Windows. 3. Command-line solution in GNU/Linux and macOS. 4. Graphical solution in Windows with File Explorer. 5. Graphical solution in Linux with File Manager. 1. Topic of this article. Have you ever had a folder on your computer full of files and need to insert the list of those files in a page you are editing? It happens to me often for file lists to be inserted at the end of court documents. In this article, I describe a couple of solutions that I have personally tried, in the MS Windows environment and in various UNIX -derived operating systems, i.e., some GNU/Linux distributions, particul...

A Python program to copy text from various PDFs and collect it into a single document in Markdown language.

Image
1. Subject of this article. 2. Python source analysis. 3. The full source code in Python. 1. Subject of this article. The goal is to generate a simple program to collect the text contained in various PDFs generated directly from word processing programs and insert the various fragments into a single document in Markdown language by separating the fragments with second-level headings corresponding to the name of the source documents. The "hands-on" solution is to copy the text from the individual documents, one by one, and paste it into a second document. Or you could build a simple application in Python that does all the work automatically, saving an amount of time directly proportional to the number of documents to be processed. The script , generated with the help of Copilot ( because I am not a programmer), requires the installation of the PyPDF2 library. Warning: this article does NOT discuss optical character recognition (OCR). For that topic, yo...