Sort, filter, and limit results at /packets #23
|
@ -6,6 +6,7 @@ db_frames_fields = ("id",
|
|||
"comment",
|
||||
"course",
|
||||
"created",
|
||||
"created_unix",
|
||||
"format",
|
||||
"frame",
|
||||
"from",
|
||||
|
|
|
@ -5,6 +5,7 @@ import aprs
|
|||
import json
|
||||
import aprslib
|
||||
import configparser
|
||||
import time
|
||||
|
||||
def read_config():
|
||||
config = configparser.ConfigParser()
|
||||
|
@ -46,6 +47,7 @@ def main():
|
|||
a['station_call'] = config['Settings']['station_call']
|
||||
a['station_lat'] = config['Settings']['station_lat']
|
||||
a['station_lon'] = config['Settings']['station_lon']
|
||||
a['created_unix'] = int(time.time())
|
||||
print(a)
|
||||
# Make this a string and deal with it later (probably a mistake)
|
||||
a['path'] = str(a['path'])
|
||||
|
|
|
@ -8,6 +8,7 @@ CREATE TABLE frames (
|
|||
comment TEXT,
|
||||
course REAL,
|
||||
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
created_unix INT,
|
||||
format TEXT,
|
||||
frame TEXT,
|
||||
"from" TEXT,
|
||||
|
|
Loading…
Reference in New Issue
Block a user