|
| 1 | +PyADIF-File Examples |
| 2 | +==================== |
| 3 | +For all examples it is expected that PyADIF-File is installed properly in the system wide site-packages |
| 4 | +and you run Python >= 3.10 as well |
| 5 | + |
| 6 | + # pip install pyadif-file |
| 7 | + |
| 8 | +**Have fun!** |
| 9 | + |
| 10 | + |
| 11 | +gen_big_adi |
| 12 | +----------- |
| 13 | +This tool generates huge ADIF files in ADI or ADX format. |
| 14 | +This files can be used for performance testing your code. |
| 15 | + |
| 16 | + gen_big_adi.py [NUMBER_QSOS] [-x] |
| 17 | + |
| 18 | +Per default it generates a 1000 QSO sized ADI file |
| 19 | + |
| 20 | + # gen_big_adi.py -x 10000 |
| 21 | + |
| 22 | +This will generate a 10000 QSO ADX file. |
| 23 | + |
| 24 | + |
| 25 | +csv2adi |
| 26 | +------- |
| 27 | +This tool converts an ADI file to CSV or vice versa. |
| 28 | +As CSV field seperator `;` is used. |
| 29 | + |
| 30 | + csv2adi.py [INPUT] [OUTPUT] [-n] |
| 31 | + |
| 32 | +Generate ADI from CSV (use `-n` to omit a header) |
| 33 | + |
| 34 | + # csv2adi.py file.csv file.adi |
| 35 | + |
| 36 | +Generate CSV from ADI |
| 37 | + |
| 38 | + # csv2adi.py file.adi file.csv |
| 39 | + |
| 40 | + |
| 41 | +nu_plugin_adi |
| 42 | +------------- |
| 43 | +This one provides a plugin to use ADI format inside [Nushell](https://www.nushell.sh/) easily. |
| 44 | + |
| 45 | +The plugin provides `to adi` and `from adi`. |
| 46 | + |
| 47 | +It's just the start of development so do not be afraid of some misbehaviour. |
| 48 | +I learned Nushell just two weeks ago and couldn't resist. |
| 49 | + |
| 50 | +Register plugin in running Nushell |
| 51 | + |
| 52 | + # plugin add ./nu_plugin_adi.py |
| 53 | + # plugin use adi |
| 54 | + |
| 55 | +Show the first 10 QSOs from ADI file as table (`from adi` is automatically run from `open` on .adi files) |
| 56 | + |
| 57 | + # open file.adi | first 10 |
| 58 | + |
| 59 | +Once information is represented as a table, all Nushell doors are wide open... |
| 60 | + |
| 61 | +Find all QSO with a portable station in ADI, select some columns only |
| 62 | +and store them to CSV (using non default separator `;`) |
| 63 | + |
| 64 | + # open file.adi | where CALL =~ "/P" | select QSO_DATE TIME_ON CALL BAND MODE | to csv -s ";" | save file.csv |
| 65 | + |
| 66 | +Convert CSV to ADI (using non default separator `;`) |
| 67 | + |
| 68 | + # open file.csv --raw | from csv -s ";" | to adi | save file.adi |
| 69 | + |
| 70 | +You get it? Be amazed! I am! Totally! |
0 commit comments