Files
clear-linux-documentation/source/_scripts/_python
Kevin Putnam a6204a18cb Adds manpages to reference section of Clear Linux docs (#1110)
* Build manpages with "make man".

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Adds "make man" to github workflows.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Remove shell script dependency.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Change git URLs to https.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Moved git clone to Makefile.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Fixed typo.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Adding pandoc install.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Moved to Makefile.

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* First commit toward programmatic creation of manpages.rst

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Multiple updates:

1. man-pages.rst now generated by script.
2. Updated Makefile and make.bat with "man" and "clean-man" recipes.
3. Fixed typo in conf.py.
4. Many improvements to manpages.py

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>

* Updated readme for man pages and added man-pages.rst

Signed-off-by: Kevin Putnam <kevin.putnam@intel.com>
2020-05-01 12:23:21 -07:00
..
2019-08-14 10:17:20 -07:00

bundle_lister.py

bundle_lister.py is a Python (3.6.0) web scraper and html file generator. First, it clones the clr-bundles directory. Second, it parses the content of all bundles in the clr-bundles/ directory and the packages file. Third, it uses Jinja2 template engine to output the result as: bundles.html.txt. This file is copied to reference/bundles location, and it is invoked in bundles.rst, which currently appears as Available bundles.

bundle_lister.py automates clear linux documentation so it reflects current bundles and packages per developer updates to the clr-bundles GitHub repository. Therefore, it increases efficiency, automatically aligns documentation with Clear Linux Engineering development, and it eliminates potential for human error, and saves labor hours in contrast to the previous manual method.

bundle_lister.py will be invoked in a bash script in the source/Makefile of clear-linux documentation. Therefore, bundle_lister.py will automatically create newly scraped and parsed data upon each build of the website and output an accurate, up-to-date table showing all bundles and packages for interested developers and admins.

See requirements.txt for dependencies necessary to run this application.

Built in:Python==3.6.0

To run bundle_lister.py in the terminal, enter: python bundle_lister.py.

Note: The cloned_repo directory must remain in the parent directory in order for this code to work; the template.html must remain as well.

Note: A successful build will produce a file bundles.html.txt showing a table of current bundles and pundles (packages) alphabetized, with a (UTC) time and date stamp in the upper right corner.

~$~