- 1 Pivotal Container Service Packs Plenty of New Features in PKS 1.1 Update
- 2 Canonical Extends Ubuntu 18.04 LTS Linux Support to 10 Years
- 3 OpenStack Open Infrastructure Pilot Projects from A to Z
- 4 U.S. Supercomputers Lead Latest Top500 Performance Ranking
- 5 Dell EMC Enhances VxBlock, VxRail Hyperconverged Infrastructure
Web Automation: Generating Dynamic Tables of Contents Page 3
The Glue: the "Main" function
Extracting those three functions from the code cleans it up quite a bit (although there is still room for another function or two). So now we have to build a system that utilizes those functions to perform our four tasks:
- Obtain a list of directories
For every directory, open the
index.htmlfile and extract the title of the page
- Print back the title, with a link to the page
- Dive into the directory, and back to Step 1
If you were wondering why I was concerned with "depth" back in the Functions section, here's where it will make sense. I use the depth of the folder, to stratify where in an unordered list the item belongs (how "deep" in the list). This give our table of contents a more readable, and understandable feel, than just throwing out a flat list of links:
IT Solutions Builder TOP IT RESOURCES TO MOVE YOUR BUSINESS FORWARD
Which topic are you interested in?
What is your company size?
What is your job title?
What is your job function?
Searching our resource database to find your matches...