Skip to content

Refactor dublin core utility#3756

Merged
Siedlerchr merged 5 commits into
JabRef:masterfrom
johannes-manner:dublin-core-utility
Feb 23, 2018
Merged

Refactor dublin core utility#3756
Siedlerchr merged 5 commits into
JabRef:masterfrom
johannes-manner:dublin-core-utility

Conversation

@johannes-manner

@johannes-manner johannes-manner commented Feb 20, 2018

Copy link
Copy Markdown
Contributor

The tool is now implemented as a console application with a read-evaluate-print cycle.
It can be used with and without a jar file and can be used independently of #3704.


  • Change in CHANGELOG.md described
  • Tests created for changes
  • Screenshots added (for bigger UI changes)
  • Manually tested changed features in running JabRef
  • Check documentation status (Updated help page at help.jabref.org?)

The tool is now implemented as a console application with a read-evaluate-print cycle.
*
* @param args
*/
public static void main(String[] args) {

@Siedlerchr Siedlerchr Feb 20, 2018

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the idea, but why not integrate it with the rest of our cli infrastruture?
Maybe as part of an "Importer" or Exporter?
http://help.jabref.org/en/CommandLine#import-file--i-filenameimport-format

/**
* The tool is implemented as a console application with a read-evaluate-print cycle.
*
* @param args

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove empty parameter description 😇

@koppor

koppor commented Feb 20, 2018

Copy link
Copy Markdown
Member

Regarding integration in JabRef: In #3704, I separated the main method completely to be able to offer a non-fat jar...

However, I would agree to integrate everything in our normal CLI and then, in the context of the Java 9 refactorings (#3421) create finer-grained compilation units.

@koppor koppor changed the title Refactored dublin core utility Refactor dublin core utility Feb 21, 2018
@lenhard lenhard added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 21, 2018
Integrated the xmp functionality in the CLI infrastructure
@johannes-manner

Copy link
Copy Markdown
Contributor Author

I integrated the xmp functionality in the CLI infrastructure :)

After exiting my tool with '0' the graphical user interface starts...
@Siedlerchr How can I suppress the GUI?

@Siedlerchr

Copy link
Copy Markdown
Member

When I am right, you just need to call Platform.exit() (at least when it's the javafx application thread start )
Otherwise System.exit(0) (shuts down the Java vm and signals a success)

@johannes-manner

Copy link
Copy Markdown
Contributor Author

Platform.exit() does not work. Therefore I used the other option System.exit(0).

The implementation is now ready for review.
Where can I write the help entry for the http://help.jabref.org/en/CommandLine webpage?

System.exit() because Platform.exit() does not work in this case.
@Siedlerchr

Copy link
Copy Markdown
Member

@johannes-manner Okay, good to hear! Help files are all in their own Repo. Either you click on that Octocat Github thing in the right corner, or you go to that repo:
https://github.com/JabRef/help.jabref.org/blob/gh-pages/en/CommandLine.md

@tobiasdiez tobiasdiez left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but please also add a changelog entry for the additional xmp option.

}
}

public static void main(String[] args) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we actually need this tool as a separate executable now that the functionality is included in the usual CLI?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a convenient tool to add metadata to pdf files. If there is the possiblity to build a standalone jar with the multi-model build, why not use the chance to offer this tool to more users and make this tool more popular?

@Siedlerchr Siedlerchr merged commit 4ddd90a into JabRef:master Feb 23, 2018
@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 23, 2018
Siedlerchr added a commit that referenced this pull request Feb 24, 2018
* upstream/master: (94 commits)
  Add missing localization for Any file
  Refactor dublin core utility (#3756)
  Add Localization
  Update Architecture Tests to catch static imports (#3766)
  Added <any file type> to the Import File Filter Dialog.
  Don't trim when migrating review field (#3761)
  Reorder again
  Rename confirmation into "Merge fields"
  Fix logic
  Reorder checklist in PR template and add "good commit message"
  Replace x11 by unity7
  Include desktop, desktop-legacy, wayland in snapcraft.yaml
  Improve Dublin Core (#3710)
  Incorporate suggestions by @Siedlerchr
  Update JUnit from 5.1.0-M2 -> 5.1.0
  Update Mockito from 2.13.0 -> 2.15.0
  Update wiremock from 2.14.0 -> 2.15.0
  Fix exceptions for jacoco
  update gradle
  Add link to contribute.jabref.org (#3748)
  ...

# Conflicts:
#	src/main/java/org/jabref/gui/JabRefFrame.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants