mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-01 00:28:18 +00:00
tool: add datetime to scraped bluetooth_* files
This commit is contained in:
parent
6104991b22
commit
b436f1776a
@ -21,7 +21,8 @@ Copyright 2017, BlueKitchen GmbH
|
||||
|
||||
header = '''
|
||||
/**
|
||||
* bluetooth_company_id.h generated from Bluetooth SIG website for BTstack
|
||||
* bluetooth_company_id.h generated from Bluetooth SIG website for BTstack by tool/bluetooth_company_id.py
|
||||
* {datetime}
|
||||
*/
|
||||
|
||||
#ifndef __BLUETOOTH_COMPANY_ID_H
|
||||
@ -109,4 +110,4 @@ with open(gen_path, 'wt') as fout:
|
||||
scrape_page(fout, 'https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers')
|
||||
fout.write(trailer)
|
||||
|
||||
print('Scraping successful!\n')
|
||||
print('Scraping successful!\n')
|
||||
|
@ -17,8 +17,9 @@ Copyright 2016, BlueKitchen GmbH
|
||||
'''
|
||||
|
||||
header = '''/**
|
||||
* bluetooth_data_types.h generated from Bluetooth SIG website for BTstack
|
||||
* bluetooth_data_types.h generated from Bluetooth SIG website for BTstack by tool/bluetooth_data_types.py
|
||||
* {url}
|
||||
* {datetime}
|
||||
*/
|
||||
|
||||
#ifndef __BLUETOOTH_DATA_TYPES_H
|
||||
|
@ -17,7 +17,8 @@ Copyright 2016, BlueKitchen GmbH
|
||||
|
||||
header = '''
|
||||
/**
|
||||
* bluetooth_gatt.h generated from Bluetooth SIG website for BTstack
|
||||
* bluetooth_gatt.h generated from Bluetooth SIG website for BTstack tool/bluetooth_gatt.py
|
||||
* {datetime}
|
||||
*/
|
||||
|
||||
#ifndef __BLUETOOTH_GATT_H
|
||||
@ -63,4 +64,4 @@ with open(gen_path, 'wt') as fout:
|
||||
scrape_page(fout, 'https://www.bluetooth.com/specifications/gatt/descriptors')
|
||||
fout.write(trailer)
|
||||
|
||||
print('Scraping successful!\n')
|
||||
print('Scraping successful!\n')
|
||||
|
@ -20,6 +20,7 @@ Copyright 2017, BlueKitchen GmbH
|
||||
header = '''/**
|
||||
* bluetooth_sdp.h generated from Bluetooth SIG website for BTstack by tool/bluetooth_sdp.py
|
||||
* {page}
|
||||
* {datetime}
|
||||
*/
|
||||
|
||||
#ifndef __BLUETOOTH_SDP_H
|
||||
@ -93,7 +94,7 @@ def scrape_attributes(fout, tree, table_name):
|
||||
|
||||
def scrape_page(fout, url):
|
||||
print("Parsing %s" % url)
|
||||
fout.write(header.format(page=url))
|
||||
fout.write(header.format(page=url,datetime=str(datetime.datetime.now())))
|
||||
|
||||
# get from web
|
||||
r = requests.get(url)
|
||||
@ -175,4 +176,4 @@ with open(gen_path, 'wt') as fout:
|
||||
scrape_page(fout, 'https://www.bluetooth.com/specifications/assigned-numbers/service-discovery')
|
||||
fout.write(trailer)
|
||||
|
||||
print('Scraping successful!\n')
|
||||
print('Scraping successful!\n')
|
||||
|
Loading…
Reference in New Issue
Block a user