semvec/pypi-packages huggingface dataset:
x2y 0.1.0
x2y: convert line ending between DOS, Mac and Unix
License: MIT
Keywords: text,conversion

x2y
===

Convert line ending between DOS, Mac (pre OS X) and Unix

Where:

-  DOS = '\\r\\n'
-  Mac = '\\r' (OS9)
-  Unix = '\\n'

Note: Mac here is OS9 and earlier. OS X line endings are Unix.

Examples
--------

Convert From Unix To DOS Line Endings
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. code:: shell

    $ x2y -f unx -t dos file.txt

The above command will convert Unix line ending to DOS line endings. The
result is written back in to the source file.

If you want to write to another file use the -o or -d options (see
below).

.. code:: shell

    $ x2y -o output.txt -f unx -t dos file.txt

Will write the converted file to output.txt

.. code:: shell

    $ x2y -d outputs -f unx -t dos file.txt

Will save converted files to the outputs directory.

To back up the source file use the -b option. For example:

.. code:: shell

    $ x2y -b bak -f unx -t dos file.txt

Will rename the source file with a ".bak" extensions before writing the
converted file.

Installation
------------

.. code:: shell

    pip install x2y

Usage
-----

.. code:: shell

    usage: x2y [options] --from line-ending --to line-ending File [File ...]

    x2y: convert line ending between DOS, Mac (pre OS X) and Unix

    positional arguments:
      File                  Files to convert

    optional arguments:
      -h, --help            show this help message and exit
      --version             show program's version number and exit
      --debug               Turn on debug logging.
      --debug-log FILE      Save debug logging to FILE.
      -b BACKUP EXTENTSION, --backup BACKUP EXTENTSION
                            Save a backup of the input file by renaming with
                            BACKUP EXTENTSION. Ignored if the -o option is given.
                            Default: None.
      -d DIRECTORY, --directory DIRECTORY
                            Save extracted text to DIRECTORY. Ignored if the -o
                            option is given.
      -f {dos,mac,unx}, --from {dos,mac,unx}
                            Line ending to convert from.
      -o FILE, --output FILE
                            Save extracted text to FILE. If not given, the output
                            file is named the same as the input file but with a
                            txt extension. The extension can be changed with the
                            -e option. Files are opened in append mode unless the
                            -X option is given.
      -t {dos,mac,unx}, --to {dos,mac,unx}
                            Line ending to convert to.
      -A, --suppress-file-access-errors
                            Do not print file/directory access errors.
docstringargs 0.2.1
Argparse builder using function docstrings
License: MIT
Keywords: argparse

Python module to conveniently build an argparse config based on function docstrings.

License: MIT

Copyright (c) 2011-2014, Chris Angelico

Permission is hereby granted, free of charge, to any person obtaining a copy of 
this software and associated documentation files (the "Software"), to deal in 
the Software without restriction, including without limitation the rights to 
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
of the Software, and to permit persons to whom the Software is furnished to do 
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE.