If you happen to have created a channels.conf after a lengthy scanning process using w_scan:
w_scan -f c -c PL -X -S 1 -v
(in this case a Polish DVB-C scan with SR 6875)
then you can use the following line to create your own scan table (you have to run it as root to write to /usr/share):
cut -d: -f2,3,4,5,6 channels.conf | sort -u | awk -F["/:"] '{ printf "[CHANNEL]\n\tDELIVERY_SYSTEM = DVBC/ANNEX_A\n\tFREQUENCY = %s\n\tSYMBOL_RATE = %s\n\tINNER_FEC = %s\n\tMODULATION = %s\n\tINVERSION = %s\n\n", $1, $3, $4, $5, $2 }' > /usr/share/dvb/dvb-c/pl-Toya
For tvheadend with ATSC-T digital TV (US/Canada) you can do the following (for w_scan2 however which I think is the recommended version anyway)
w_scan2 -fa -c US -x > initial_tuning_data_ATSC.txt
dvb-format-convert -I CHANNEL -O DVBV5 initial_tuning_data_ATSC.txt us-ATSC_localchannels
Since I run the tvheadend linuxserver.io docker image (in podman) I need to add an
ExecStartPost
line like soExecStartPost=/usr/bin/podman cp /home/user/scantables/us-ATSC_localchannels tvheadend:/usr/share/tvheadend/data/dvb-scan/atsc/us-ATSC_localchannels
to my systemd service so it copies theus-ATSC_localchannels
scantable into the container during startup before it is done starting. This allows it to be recognized when tvheadend starts otherwise it doesn't detect it