user-documentation icon indicating copy to clipboard operation
user-documentation copied to clipboard

http://help.jabref.org/en/CustomImports/

Open oscargus opened this issue 9 years ago • 7 comments

The code example is not valid (e.g. Util.createNeutralId()). Also, there are references to SourceForge.

Finally, are there any existing custom importers that we would like to add directly to JabRef?

oscargus avatar Feb 04 '16 07:02 oscargus

Link to click: http://help.jabref.org/en/CustomImports/ https://docs.jabref.org/import-export/customimports

If you have a better code example, just edit the page :smiley:

koppor avatar Feb 04 '16 07:02 koppor

That may happen eventually. :-) Just thought it was better to put it here as a reminder.

oscargus avatar Feb 04 '16 07:02 oscargus

OK, so I updated the example and it works. I was also thinking about adding this example to the source repository so that it can be used for testing. However, I have currently two problems:

  1. Where should I add the source? I do not really want the source to be in a package and if I add a java-file to e.g. src/test/resources/net/sf/jabref/importer/fileformat (which may make sense) it complains when I remove the package line.
  2. How should a test like this be executed? One would need to script javac -classpath JabRefXX.jar file.java and once that is done, one can add the resulting class-file and then run an import test.

oscargus avatar Feb 04 '16 08:02 oscargus

Good idea to add it as a test. I think if you add the class directly under \src\test\java\net\sf\jabref\importer, then it will compile along with the rest and you can just access it as a normal class. You can also try to make it a private class in the test file.

tobiasdiez avatar Feb 04 '16 09:02 tobiasdiez

That is somehow what I would like to avoid just to make sure that the importer is actually imported and not just part of JabRef. Although, it is indeed a good idea to add it to make sure the example is actually working. My purpose was rather (which wasn't clear, I agree) to test the custom import mechanism rather than that particular example.

oscargus avatar Feb 04 '16 09:02 oscargus

Is there a way to include e.g. source code? I just realized that there are five different version of the page and it would be nice to not copy and paste to every version...

oscargus avatar Feb 04 '16 12:02 oscargus

@oscargus While the post is from February, I can now tell you, that it is now possible to have code blocks, same way as here on github. The site now supports GFM:. http://kramdown.gettalong.org/parser/gfm.html

Siedlerchr avatar Sep 09 '16 16:09 Siedlerchr