# Path: ranger.py
# ARGV = sys.argv[1:sys.argv.index('--')] if '--' in sys.argv else sys.argv[1:]


import re
from ranger import PY3
from ranger.container.fsobject import FileSystemObject
# This file is part of ranger, the console file manager.
# License: GNU GPL version 3, see the file "AUTHORS" for details.

from __future__ import (absolute_import, division, print_function)



N_FIRST_BYTES = 256
CONTROL_CHARACTERS = set(list(range(0, 9)) + list(range(14, 32)))
if not PY3:
    CONTROL_CHARACTERS = set(chr(n) for n in CONTROL_CHARACTERS)

# Don't even try to preview files which match this regular expression:
PREVIEW_BLACKLIST = re.compile(r"""
        # look at the extension:
        \.(
            # one character extensions:
                [oa]
            # media formats:
                | avi | mpe?g | mp\d | og[gmv] | wm[av] | mkv | flv
                | vob | wav | mpc | flac | divx? | xcf | pdf
            # binary files:
                | torrent | class | so | img | py[co] | dmg
        )
        # ignore filetype-independent suffixes:
            (\.part|\.bak|~)?
        # ignore fully numerical file extensions:
            (\.\d+)*?

# Path: ranger.py
# ARGV = sys.argv[1:sys.argv.index('--')] if '--' in sys.argv else sys.argv[1:]


# Path: ranger/container/file.py
import re
from ranger import PY3
from ranger.container.fsobject import FileSystemObject

# This file is part of ranger, the console file manager.
# License: GNU GPL version 3, see the file "AUTHORS" for details.

from __future__ import (absolute_import, division, print_function)



N_FIRST_BYTES = 256
CONTROL_CHARACTERS = set(list(range(0, 9)) + list(range(14, 32)))
if not PY3:
    CONTROL_CHARACTERS = set(chr(n) for n in CONTROL_CHARACTERS)

# Don't even try to preview files which match this regular expression:
PREVIEW_BLACKLIST = re.compile(r"""
        # look at the extension:
        \.(
            # one character extensions:
                [oa]
            # media formats:
                | avi | mpe?g | mp\d | og[gmv] | wm[av] | mkv | flv
                | vob | wav | mpc | flac | divx? | xcf | pdf
            # binary files:
                | torrent | class | so | img | py[co] | dmg
        )
        # ignore filetype-independent suffixes:
            (\.part|\.bak|~)?
        # ignore fully numerical file extensions:
            (\.\d+)*?

        $