/ADIFUtils

ADIF - utility tools for the Amateur Data Interchange Format

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

ADIFUtils

ADIF - utility tools for the Amateur Data Interchange Format

License: GPL

class adif_fields.ADIFfields

__init__(self)

Prepare df_all DataFrame which has all of ADIF field table data. If ADIFfields.csv is existing, df_all is restore from ADIFfields.csv. Othewise fetching web scaping data from adif.org and set df_all.

fetch_fields(self)

Fetching ADIF field data from ADIF V3.1.4 specification in adif.org. All of table data will be saved pd.DataFrame, df_all.

get_all_fields(self) -> pd.DataFrame

Returns df_all as pd.DataFrame.

get_fields(self) -> pd.Series

Returns df_all['Field Name'] as pd.Series.

get_field_list(self) -> list

Returns df_all['Field Name'] as 1D list.

get_table_index(cls) -> list

Returns list of index list. TABLE_INDEX = ['Field Name', 'Data Type', 'Enumeration', 'Description']

save_all_fields(self, csvfilepath=OUT_FILENAME)

Save df_all to csv

save_fields(self, csvfilepath=OUT_FILENAME_FIELD_ONLY)

Save df_all to csv, only Field Name part only.

print_all(self)

Just print df_all on console.

class adif_to_dataframe.AdifToDataFrame

Translate ADIF file (*.adi) to pandas.DataFrame.

Example of output DataFrame

        CALL MODE BAND       FREQ GRIDSQUARE  QSO_DATE TIME_ON QSO_DATE_OFF TIME_OFF RST_RCVD RST_SENT STATION_CALLSIGN MY_GRIDSQUARE                    COMMENT SUBMODE EQSL_QSL_SENT
0     JA4###  FT8  40m   7.043701        N/A  20210206  050800     20210206   050859      -12      -07           JS2IIU        PM85kg  FT8  Sent: -07  Rcvd: -12     N/A           N/A
1     JH7###  FT8  40m   7.043701       QM08  20210206  051415     20210206   051514      -10      -18           JS2IIU        PM85kg  FT8  Sent: -18  Rcvd: -10     N/A           N/A
2     JH7###  FT8  40m   7.043701       QM09  20210206  051545     20210206   051644      -09      -10           JS2IIU        PM85kg  FT8  Sent: -10  Rcvd: -09     N/A           N/A
3     JH7###  FT8  40m   7.043798       QM08  20210206  052245     20210206   052414      -18      -15           JS2IIU        PM85kg  FT8  Sent: -15  Rcvd: -18     N/A           N/A
4     JH8###  FT8  40m   7.043798       QN02  20210206  053645     20210206   053744      -12      -06           JS2IIU        PM85kg  FT8  Sent: -06  Rcvd: -12     N/A           N/A

adif_treeview

Show ADIF data on GUI, tkinter treeview widget. This sample reads csv file converted from original ADIF (*.adi) file by adif_to_dataframe.py module.

  • ADIF files cannot be read by this application in their entirety. Therefore, *.adi files must be read in with adif_to_dataframe.py and converted to csv format.
  • Specify the path to the csv file to be read in the variable sample_csv in adif_to_dataframe.py.
  • The application is just listed in Treeview. Other functions will be developed in the future.

Reference

ADIF

Python

Color code

Badge