Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Make help output consistent: import and export formats #9937

Closed
wants to merge 11 commits into from
Closed

CLI: Make help output consistent: import and export formats #9937

wants to merge 11 commits into from

Conversation

desperadomzc
Copy link
Contributor

@desperadomzc desperadomzc commented May 22, 2023

Fixes JabRef#429

Modify the method printUage() in file: src/main/java/org/jabref/cli/JabRefCLI.java

Make the import and export format of cli output consistent.

Compulsory checks

image

@koppor koppor mentioned this pull request May 22, 2023
@koppor
Copy link
Member

koppor commented May 22, 2023

Help output:

usage: jabref [OPTIONS] [BIBTEX_FILE]

Options: [-a <FILE[.aux],FILE[.bib] FILE>] [-asfl] [-b] [--console] [-d <KEY1[,KEY2][,KEYn] | all>]
       [--debug] [--embeddBibfileInPdf <CITEKEY1[,CITEKEY2][,CITEKEYn] | PDF1[,PDF2][,PDFn] | all>]
       [-f <FETCHER:QUERY>] [-g] [-h] [-i <FILE[,FORMAT]>] [-ib <BIBTEXT_STRING>] [--importToOpen
       <FILE[,FORMAT]>] [-m <QUERY,FILE[,FORMAT]>] [-n] [-o <FILE[,FORMAT]>] [-p <[FILE]>] [-v] [-w
       <CITEKEY1[,CITEKEY2][,CITEKEYn] | PDF1[,PDF2][,PDFn] | all>] [--writeXMPtoPdf
       <CITEKEY1[,CITEKEY2][,CITEKEYn] | PDF1[,PDF2][,PDFn] | all>] [-x <[FILE]>]
 -a,--aux <FILE[.aux],FILE[.bib] FILE>                                                 Sublibrary
                                                                                       from AUX to
                                                                                       BibTeX: '-a
                                                                                       thesis.aux,ne
                                                                                       w.bib'
 -asfl,--automaticallySetFileLinks                                                     Automatically
                                                                                       set file
                                                                                       links
 -b,--blank                                                                            Do not open
                                                                                       any files at
                                                                                       startup
    --console                                                                          Show console
                                                                                       output (only
                                                                                       when the
                                                                                       launcher is
                                                                                       used)
 -d,--prdef <KEY1[,KEY2][,KEYn] | all>                                                 Reset
                                                                                       preferences:
                                                                                       '-d
                                                                                       mainFontSize,
                                                                                       newline' or
                                                                                       '-d all'
    --debug                                                                            Show debug
                                                                                       level
                                                                                       messages
    --embeddBibfileInPdf <CITEKEY1[,CITEKEY2][,CITEKEYn] | PDF1[,PDF2][,PDFn] | all>   Embed
                                                                                       BibTeXEntry
                                                                                       in PDF.: '-w
                                                                                       pathToMyOwnPa
                                                                                       per.pdf'
 -f,--fetch <FETCHER:QUERY>                                                            Run fetcher:
                                                                                       '-f
                                                                                       Medline/PubMe
                                                                                       d:cancer'
 -g,--generateCitationKeys                                                             Regenerate
                                                                                       all keys for
                                                                                       the entries
                                                                                       in a BibTeX
                                                                                       file
 -h,--help                                                                             Display help
                                                                                       on command
                                                                                       line options
 -i,--import <FILE[,FORMAT]>                                                           Import file:
                                                                                       '-i
                                                                                       library.bib'
 -ib,--importBibtex <BIBTEXT_STRING>                                                   Import
                                                                                       BibTeX: '-ib
                                                                                       @article{entr
                                                                                       y}'
    --importToOpen <FILE[,FORMAT]>                                                     Same as
                                                                                       --import, but
                                                                                       will be
                                                                                       imported to
                                                                                       the opened
                                                                                       tab
 -m,--exportMatches <QUERY,FILE[,FORMAT]>                                              Matching: '-i
                                                                                       db.bib -m
                                                                                       author=Newton
                                                                                       ,search.htm,h
                                                                                       tml'
 -n,--nogui                                                                            No GUI. Only
                                                                                       process
                                                                                       command line
                                                                                       options
 -o,--output <FILE[,FORMAT]>                                                           Export an
                                                                                       input to a
                                                                                       file: '-i
                                                                                       db.bib -o
                                                                                       db.htm,html'
 -p,--primp <[FILE]>                                                                   Import
                                                                                       preferences
                                                                                       from a file:
                                                                                       '-p
                                                                                       prefs.xml'
 -v,--version                                                                          Display
                                                                                       version
 -w,--writeMetadatatoPdf <CITEKEY1[,CITEKEY2][,CITEKEYn] | PDF1[,PDF2][,PDFn] | all>   Write
                                                                                       BibTeXEntry
                                                                                       as metadata
                                                                                       to PDF.: '-w
                                                                                       pathToMyOwnPa
                                                                                       per.pdf'
    --writeXMPtoPdf <CITEKEY1[,CITEKEY2][,CITEKEYn] | PDF1[,PDF2][,PDFn] | all>        Write
                                                                                       BibTeXEntry
                                                                                       as XMP
                                                                                       metadata to
                                                                                       PDF.: '-w
                                                                                       pathToMyOwnPa
                                                                                       per.pdf'
 -x,--prexp <[FILE]>                                                                   Export
                                                                                       preferences
                                                                                       to a file:
                                                                                       '-x
                                                                                       prefs.xml'

Available import formats:
  BibTeX         : bibtex
  Biblioscape    : biblioscape
  CFF            : cff
  Citavi XML     : citavi
  Copac          : cpc
  EndNote XML    : endnote
  INSPEC         : inspec
  ISI            : isi
  MODS           : mods
  MSBib          : msbib
  Medline/PubMed : medline
  Medline/PubMed Plain : medlineplain
  Ovid           : ovid
  PDFcontent     : pdfcontent
  PDFembeddedbibfile : pdfembeddedbibfile
  PDFmergemetadata : pdfmergemetadata
  PdfVerbatimBibText : pdfverbatimbibtext
  REPEC New Economic Papers (NEP) : repecnep
  RIS            : ris
  Refer/Endnote  : refer
  SilverPlatter  : silverplatter
  XMP-annotated PDF : xmp

Available export formats:
  HTML           : html
  Simple HTML    : simplehtml
  DocBook 5.1    : docbook5
  DocBook 4      : docbook4
  DIN 1505       : din1505
  BibO RDF       : bibordf
  HTML table     : tablerefs
  HTML list      : listrefs
  HTML table (with Abstract & BibTeX) : tablerefsabsbib
  Harvard RTF    : harvard
  ISO 690 RTF    : iso690rtf
  ISO 690        : iso690txt
  Endnote        : endnote
  OpenOffice/LibreOffice CSV : oocsv
  RIS            : ris
  MIS Quarterly  : misq
  CSL YAML       : yaml
  Old OpenOffice/LibreOffice Calc format : oocalc
  OpenDocument spreadsheet : ods
  MS Office 2007 : MSBib
  MODS           : mods
  Plain XMP      : xmp
  XMP-annotated PDF : pdf
  Embedded BibTeX : bib


Please report issues at https://github.com/JabRef/jabref/issues.
Batchvorgang abbrechen (J/N)? 

@ThiloteE ThiloteE changed the title Fix issue 429 Fix issue 429 - CLI: Make help output consistent: import and export formats May 22, 2023
@ThiloteE ThiloteE changed the title Fix issue 429 - CLI: Make help output consistent: import and export formats CLI: Make help output consistent: import and export formats May 22, 2023
@ThiloteE ThiloteE added the cli label May 22, 2023
@calixtus
Copy link
Member

Hello @desperadomzc, thanks for your changes. However, there are still some issues and code duplications. I already made some quick additions, but when I tried to push on your branch, I realized that you used your main branch to make a pull request and you disabled the option for the maintainers to push on your branch. Therefor I am unable to push my additions. So I will close this PR one and reopen a new one on our repository, so we can continue to work on this. Your work will of course be credited when this is merged into main. Thanks!

@desperadomzc
Copy link
Contributor Author

Thank you all! @koppor @calixtus @ThiloteE I and my teammates will open the option for the maintainers to push on our branch later. Sorry for the inconvenience we brought to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make help output consistent: import and export formats
4 participants