Nature offers bibliographies only in RIS format, and the only way I know to import them in kbibtex is to convert them to bibtex first with cat file.ris| ris2xml | xml2bib > file.bib using bibutils. It would be nice if kbibtex incorporated this function. Also, importing bibliographies in bibtex format would be useful. Reproducible: Always
KBibTeX has support for RIS. The file open dialog allows you to open files of the mime type "application/x-research-info-systems" which should map to *.ris files. As this mime type is not part of the default database of mime types, KBibTeX (should) install this mime type in your system (see the "mime" subdirectory in KBibTeX's sources). As the next step, please see if either the .ris file extension or the "application/x-research-info-systems" are known to your KDE installation. Use "File Associations" control module for that.
I just tried to open http://www.nature.com/nature/journal/v416/n6883/ris/416823a.ris and kbibtex opens it as a text file, even though the filter in the file open dialog includes RIS. The mimetype is "RIS bibliograph file" and kbibtex is set to open it in file associations, as expected. By "import bibliography" I mean that it would be time-saving, when using some websites that only allow downloading of a .bib file, if an import function would append the bibliographies in that file to the file already open. The alternative is to manually copy & paste the bibtex record to a new record, which is more involved, for example, than importing via online search.
Created attachment 84546 [details] KBibTeX's main window showing an opened RIS file
Created attachment 84547 [details] File association settings to use KBibTeX's part to show/open .ris files
As shown in my recently submitted screenshots, opening a .ris file is no problem (I took the KBibTeX 0.5 code). Your description in comment 2 sounds like the file associations in your system are not configured to use KBibTeX's part to open the .ris file. You have to ensure that KBibTeX's part is top in this list.
The configuration regarding kbibtexpart was missing, thanks. Is this a problem with the installation or is everyone supposed to configure this afterwards?
On git master (commit b56e97d3775eb2af2f1c3d7ab8a3997be90496cd), I added a test if KBibTeX is default editor for known bibliographic file formats (BibTeX and RIS for now). Test applies both to the application and the KPart. It works for me, but please test it by setting various (correct and wrong) settings in the File Association module and see if KBibTeX now recognizes and corrects them for you. You may have to restart the File Association module to see the changes KBibTeX performs.
Created attachment 84601 [details] Patch to test whether kbibtex 0.5 is default editor for .bib and .ris files This woks, but some times I must run kbuildsycoca4 before the change in mimetype handling is registered. By the way, the diff to create a new file is invalid as generated by git, because the old file (/dev/null) has line properties -1,1, while only -0,0 is accepted by patch.
(In reply to comment #8) > Created attachment 84601 [details] > Patch to test whether kbibtex 0.5 is default editor for .bib and .ris files I would like to see this patch tested more before backporting it to a stable branch. See kbuildsycoca4 issues below as an example... > This woks, but some times I must run kbuildsycoca4 before the change in > mimetype handling is registered. Addressed in commit 4002280e3cfdb491a376e90cad91e6458d8af56e (master). > By the way, the diff to create a new file is invalid as generated by git, > because the old file (/dev/null) has line properties -1,1, while only -0,0 > is accepted by patch. "git diff" is not equal to the command line tool "diff". Use "git apply" instead of "patch" to apply patches.
Created attachment 84852 [details] Patch to test whether kbibtex 0.5 is default editor for .bib and .ris files Updated the patch and did some tests. It works fine so far and kbuildsycoca runs after the mimetypes are updated.
The code has been backported from master to kbibtex/0.5, see commit 6a2486040d2f768379754d0f9f2b540213ce9aa0 for details.