Skip to content

Instantly share code, notes, and snippets.

@jhanschoo
Last active February 1, 2022 22:24
Show Gist options
  • Select an option

  • Save jhanschoo/bcd6d08d1e0f4b5d52735287f39ca924 to your computer and use it in GitHub Desktop.

Select an option

Save jhanschoo/bcd6d08d1e0f4b5d52735287f39ca924 to your computer and use it in GitHub Desktop.

Revisions

  1. jhanschoo revised this gist Sep 11, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions localc2csv.sh
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    #!/usr/bin/env sh
    # localc2csv.sh [--outdir OUTPIT_DIR] FILE [FILE...]

    # Uses LibreOffice to convert a file to csv format, preserving
    # Unicode characters in UTF-8
  2. jhanschoo revised this gist Jun 14, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion localc2csv.sh
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,4 @@
    ## convert-to parameters; know-how is scattered across forum threads.

    /Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to \
    "csv:Text - txt - csv (StarCalc):44,34,76,1,1/1:" $@
    "csv:Text - txt - csv (StarCalc):44,34,76,1,1/1:" "$@"
  3. jhanschoo revised this gist Jun 14, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion localc2csv.sh
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,4 @@
    ## convert-to parameters; know-how is scattered across forum threads.

    /Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to \
    "csv:Text - txt - csv (StarCalc):44,34,76,1,1/1:" "$*"
    "csv:Text - txt - csv (StarCalc):44,34,76,1,1/1:" $@
  4. jhanschoo created this gist Jun 14, 2016.
    14 changes: 14 additions & 0 deletions localc2csv.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/usr/bin/env sh

    # Uses LibreOffice to convert a file to csv format, preserving
    # Unicode characters in UTF-8
    # Assumes LibreOffice is installed to /Applications in MacOS.
    # for documentation on the arguments, c.f.
    # https://ask.libreoffice.org/en/question/2641/convert-to-command-line-parameter/
    # https://help.libreoffice.org/Common/Starting_the_Software_With_Parameters
    # https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options
    ## Unfortunately, LibreOffice documentation does not adequately cover
    ## convert-to parameters; know-how is scattered across forum threads.

    /Applications/LibreOffice.app/Contents/MacOS/soffice --headless --convert-to \
    "csv:Text - txt - csv (StarCalc):44,34,76,1,1/1:" "$*"