JabRef / user-documentation

User documentation of JabRef
https://docs.jabref.org/
Creative Commons Attribution Share Alike 4.0 International
46 stars 112 forks source link

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

Open oscargus opened 8 years ago

oscargus commented 8 years ago

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?

koppor commented 8 years ago

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:

oscargus commented 8 years ago

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

oscargus commented 8 years ago

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.
tobiasdiez commented 8 years ago

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.

oscargus commented 8 years ago

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 commented 8 years ago

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...

Siedlerchr commented 8 years ago

@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