| 1 |
#!/usr/bin/env python3 |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
# |
| 4 |
# Copyright (C) 2009-2022 Jerry Casiano |
| 5 |
# |
| 6 |
# This program is free software: you can redistribute it and/or modify |
| 7 |
# it under the terms of the GNU General Public License as published by |
| 8 |
# the Free Software Foundation, either version 3 of the License, or |
| 9 |
# (at your option) any later version. |
| 10 |
# |
| 11 |
# This program is distributed in the hope that it will be useful, |
| 12 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 |
# GNU General Public License for more details. |
| 15 |
# |
| 16 |
# You should have received a copy of the GNU General Public License |
| 17 |
# along with this program. |
| 18 |
# |
| 19 |
# If not, see <http://www.gnu.org/licenses/gpl-3.0.txt>. |
| 20 |
|
| 21 |
try: |
| 22 |
import pandas as pd |
| 23 |
except ImportError: |
| 24 |
import __main__ |
| 25 |
print("Error : {}\n".format(__main__.__file__)) |
| 26 |
print(" This script depends on pandas.") |
| 27 |
print(" https://pandas.pydata.org/\n") |
| 28 |
exit(1) |
| 29 |
|
| 30 |
# Microsoft Vendor Listing |
| 31 |
# Excellent, only?!, source of font foundry information |
| 32 |
URL = "https://docs.microsoft.com/en-us/typography/vendors/" |
| 33 |
CREDIT = "Courtesy of Microsoft Typography - {}".format(URL) |
| 34 |
|
| 35 |
INDEX = 0 |
| 36 |
ID = 1 |
| 37 |
NAME = 2 |
| 38 |
|
| 39 |
def list_vendors () : |
| 40 |
vendor_list = pd.read_html(URL) |
| 41 |
for entry in vendor_list: |
| 42 |
for vendor in entry.itertuples(): |
| 43 |
yield (str(vendor[ID]), str(vendor[NAME])) |
| 44 |
return |