Ebook: Todar's Online Textbook of Bacteriology (archived August 2023)
Author: Kenneth Gregory Todar
- Genre: Biology // Microbiology
- Tags: Todar's Online Textbook of Bacteriology Todars
- Year: 2023
- Publisher: Online
- Language: English
- pdf
# Archiving Todar's Online Textbook of Bacteriology
This documentation outlines the steps to archive an online textbook for offline use. We'll be using various tools and techniques to achieve this. Follow these steps carefully:
## Step 1: Download Dependencies
Before we begin, make sure you have the following dependencies installed on your system:
- **base.css** - use this css to properly format. Add to the same directory where you will be using princexml
Download from: [base.css](https://github.com/arp242/hello-css/blob/master/base.css)
- **Prince XML Converter**
Download from: [Prince XML](https://www.princexml.com/download/)
Ensure that these dependencies are installed and ready to use.
## Step 2: Download the Website
1. Open your terminal.
2. Create a directory for the archived textbook and navigate to it using the following commands:
```shell
mkdir todars
cd todars
```
3. Use `wget` to download the entire website with the necessary options:
```shell
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains textbookofbacteriology.net --no-parent http://textbookofbacteriology.net//
```
This command will recursively download all the website content while preserving its structure.
## Step 3: Convert HTML to PDF
Now that you have the website content, we will convert it to a PDF file using the Prince XML Converter.
1. Organize the HTML files in the desired order. **important: I sorted them manually using the table of contents as my reference**
2. Open your terminal and execute the following command, replacing `[paste html list here in order]` with the list of HTML files in the desired order:
```shell
prince [paste html list here in order] --page-size="US-Folio" --page-margin="20mm" --style=base.css --media="screen" -o ~/combined_all4.pdf
```
This command will use Prince XML to convert the organized HTML files into a single PDF file named `combined_all4.pdf`.
## Step 4: Generate PDF Outlines
To make navigating the PDF easier, you can generate outlines for the PDF using PDF Tocgen.
1. Download PDF Tocgen from its repository: [PDF Tocgen](https://github.com/Krasjet/pdf.tocgen).
2. Follow the installation instructions and Getting Started guide provided in the PDF Tocgen repository.
3. Once installed, use PDF Tocgen to generate outlines for your PDF:
```shell
pdf.tocgen -i ~/combined_all4.pdf -o ~/combined_all4_with_outlines.pdf
```
This command will create a new PDF file named `combined_all4_with_outlines.pdf` with outlines for easy navigation.
This documentation outlines the steps to archive an online textbook for offline use. We'll be using various tools and techniques to achieve this. Follow these steps carefully:
## Step 1: Download Dependencies
Before we begin, make sure you have the following dependencies installed on your system:
- **base.css** - use this css to properly format. Add to the same directory where you will be using princexml
Download from: [base.css](https://github.com/arp242/hello-css/blob/master/base.css)
- **Prince XML Converter**
Download from: [Prince XML](https://www.princexml.com/download/)
Ensure that these dependencies are installed and ready to use.
## Step 2: Download the Website
1. Open your terminal.
2. Create a directory for the archived textbook and navigate to it using the following commands:
```shell
mkdir todars
cd todars
```
3. Use `wget` to download the entire website with the necessary options:
```shell
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains textbookofbacteriology.net --no-parent http://textbookofbacteriology.net//
```
This command will recursively download all the website content while preserving its structure.
## Step 3: Convert HTML to PDF
Now that you have the website content, we will convert it to a PDF file using the Prince XML Converter.
1. Organize the HTML files in the desired order. **important: I sorted them manually using the table of contents as my reference**
2. Open your terminal and execute the following command, replacing `[paste html list here in order]` with the list of HTML files in the desired order:
```shell
prince [paste html list here in order] --page-size="US-Folio" --page-margin="20mm" --style=base.css --media="screen" -o ~/combined_all4.pdf
```
This command will use Prince XML to convert the organized HTML files into a single PDF file named `combined_all4.pdf`.
## Step 4: Generate PDF Outlines
To make navigating the PDF easier, you can generate outlines for the PDF using PDF Tocgen.
1. Download PDF Tocgen from its repository: [PDF Tocgen](https://github.com/Krasjet/pdf.tocgen).
2. Follow the installation instructions and Getting Started guide provided in the PDF Tocgen repository.
3. Once installed, use PDF Tocgen to generate outlines for your PDF:
```shell
pdf.tocgen -i ~/combined_all4.pdf -o ~/combined_all4_with_outlines.pdf
```
This command will create a new PDF file named `combined_all4_with_outlines.pdf` with outlines for easy navigation.
Download the book Todar's Online Textbook of Bacteriology (archived August 2023) for free or read online
Continue reading on any device:
Last viewed books
Related books
{related-news}
Comments (0)