This project converts Microsoft Learn courses into PDF files by downloading and processing the content of courses and modules.
- Convert Microsoft Learn courses to PDF format.
- Download HTML content of modules and units.
- Process and convert HTML content into PDF files.
- Merge individual unit PDF files into a single PDF of the entire course.
You can either use the default API hosted on the server or run your own API locally.
You can access the web interface and generate PDFs using the default hosted API:
-
Run the server with:
bun index.js
-
Open a browser and visit:
http://localhost:3000
-
Enter the Microsoft Learn course URL and follow the steps provided in the interface.
To use your own instance of the API:
-
Clone the repository:
git clone https://github.com/edgarburgues/ml2pdf.git cd ml2pdf
-
Install the dependencies:
bun install
-
Start the API locally with:
bun index.js
-
Once the API is running on your machine, configure the web interface to use your local instance.
- Bun: Runtime environment.
- Puppeteer: For handling navigation and PDF generation from HTML.
- pdf-lib: To combine and process PDF files.
- Ensure a stable internet connection while running the program.
- Temporary files generated during the process are automatically deleted after PDFs are merged.
- If an error occurs during the process, temporary files may not be deleted automatically, and you may need to delete them manually.
If you prefer to run the application using Docker:
-
Build the Docker image:
docker build -t ml2pdf .
-
Run the container:
docker run -p 3000:3000 ml2pdf
This project is licensed under the MIT License. See the LICENSE file for details.