increase number of BB entries in RSS

This commit is contained in:
KF7EEL 2021-02-28 20:01:29 -08:00
parent 9b19a09eac
commit f4010939dc
3 changed files with 13 additions and 8 deletions

View File

@ -179,7 +179,7 @@ def dashboard_bb_write(call, dmr_id, time, bulletin):
# dash_entries = [] # dash_entries = []
dash_bb.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'bulletin':bulletin}) dash_bb.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'bulletin':bulletin})
with open("/tmp/gps_data_user_bb.txt", 'w') as user_bb_file: with open("/tmp/gps_data_user_bb.txt", 'w') as user_bb_file:
user_bb_file.write(str(dash_bb[:10])) user_bb_file.write(str(dash_bb[:20]))
user_bb_file.close() user_bb_file.close()
logger.info('User bulletin entry saved.') logger.info('User bulletin entry saved.')
#logger.info(dash_bb) #logger.info(dash_bb)

View File

@ -172,7 +172,7 @@ def dashboard_bb_write(call, dmr_id, time, bulletin):
# dash_entries = [] # dash_entries = []
dash_bb.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'bulletin':bulletin}) dash_bb.insert(0, {'call': call, 'dmr_id': dmr_id, 'time': time, 'bulletin':bulletin})
with open("/tmp/gps_data_user_bb.txt", 'w') as user_bb_file: with open("/tmp/gps_data_user_bb.txt", 'w') as user_bb_file:
user_bb_file.write(str(dash_bb[:10])) user_bb_file.write(str(dash_bb[:20]))
user_bb_file.close() user_bb_file.close()
logger.info('User bulletin entry saved.') logger.info('User bulletin entry saved.')
#logger.info(dash_bb) #logger.info(dash_bb)

View File

@ -102,14 +102,19 @@ def get_bb_data():
</td> </td>
</tr> </tr>
''' '''
display_number = 10
for e in dash_bb: for e in dash_bb:
tmp_bb = tmp_bb + '''<tr> if display_number == 0:
<td style="text-align: center;"><strong>&nbsp;''' + e['call'] + '''&nbsp;</strong></td> break
<td style="text-align: center;">''' + str(e['dmr_id']) + '''</td> else:
<td style="text-align: center;"><strong>&nbsp;''' + e['bulletin'] + '''&nbsp;</strong></td> display_number = display_number - 1
<td style="text-align: center;">&nbsp;''' + e['time'] + '''&nbsp;</td> tmp_bb = tmp_bb + '''<tr>
</tr>''' <td style="text-align: center;"><strong>&nbsp;''' + e['call'] + '''&nbsp;</strong></td>
<td style="text-align: center;">''' + str(e['dmr_id']) + '''</td>
<td style="text-align: center;"><strong>&nbsp;''' + e['bulletin'] + '''&nbsp;</strong></td>
<td style="text-align: center;">&nbsp;''' + e['time'] + '''&nbsp;</td>
</tr>'''
return str('<h1 style="text-align: center;">Bulletin Board</h1>' + tbl_hdr + bb_hdr + tmp_bb + tbl_ftr) return str('<h1 style="text-align: center;">Bulletin Board</h1>' + tbl_hdr + bb_hdr + tmp_bb + tbl_ftr)
except: except: