adi export mimetype

9 posts / 0 new
Last post
kk4ggl
adi export mimetype

When I download an adi file from QRZ, the saved file "file --mime-type" shows text/plain. When I export from CQRLog, "file --mime-type" shows audio/x-hx-aac-adif. How can I export so that the file is associated with the correct mimetype?

oh1kh
adi export mimetype

Mime type is tied to name extension of filename. I.E ".adi" by default your linux thinks all ".adi" files are audio files.
With your file browser you should be able to right click filename and select program to open that file with.

Once you have selected your favorite text editor for that program double click on ".aid" file opens it to that editor.

https://askubuntu.com/questions/586476/how-to-assign-set-a-mime-type-to-...

--
Saku
OH1KH

kk4ggl
adi export mimetype

When I download an adi file from QRZ, the file icon looks like a page of text, both in OpenSuse and Raspberry Pi Buster. When I export an adi from CQRLog, the file icon looks like a musical note. The file system originally thinks it is a music file. Setting the default application for the extension will allow opening by a text editor, but if an adi file is actually a music file, double clicking would then try to open using a text editor. Why does exporting from CQRLog result in a file icon for music and a mimetype for a music file?

Rick, KK4GGL

oh1kh
adi export mimetype

Hi
That downloaded file may have one linefeed before any text line.

Make adif export from cqrlog. Open adi file with text editor. Place cursor before first word "ADIF" and press enter to get one
empty line before "ADIF". Save file.
Reload your browser view (if it does not do it by itself).

The "note" icon changes to "letter" icon.

Reason is that linux command "file" false detects full ascii adif file to have binary contents,
I can add "add an empty line to every adif header" to todo list. How ever this is just an cosmetic change, not so important.

--
Saku
OH1KH

kk4ggl
adi export mimetype

I entered the blank line and the system recognized the file as plain text.

I have included a file showing the headers from the CQRLog adi and one downloaded from QRZ using FireFox. I tried to include it in the post reply, but I couldn't get it to format properly.

File: 

Rick, KK4GGL

kk4ggl
adi export mimetype

I have included a file to preserve formatting. When I deleted the adi file header used by CQRLog and replaced it with one formatted like the one form QRZ, but with the information from the CQRLog adi export, and saved the file, the system recognized the adi file as a plain text file.

I hope this information can be useful for you.

File: 

Rick, KK4GGL

kk4ggl
adi export mimetype

I think I have found the cause of the mimetype issue.
I have been working in Raspberry Pi OS/Buster and Opensuse 15.3

I reformatted the exported adi header on the Raspberry Pi like I did in Opensuse. It worked.

Then I used the original adi export file from CQRLog and removed ADIF from the header, saved the file and the mimetype changed to plain text. This worked in OpenSuse 15.3 and RPi/Buster. I would expect it to also work in Debian and derivatives.

I hope this information may be of some use to you.

Rick, KK4GGL

oh1kh
adi export mimetype

--
Saku
OH1KH

kk4ggl
adi export mimetype

Thanks

Rick, KK4GGL