Skip to content

Commit 3b1526f

Browse files
committed
#63 - Update link references of ownership from nexB to aboutcode-org
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent db9dd08 commit 3b1526f

29 files changed

+1253
-686
lines changed

NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# ScanCode is a trademark of nexB Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/extractcode for support or download.
6+
# See https://github.com/aboutcode-org/extractcode for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#

README.rst

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ ExtractCode
44

55
- license: Apache-2.0
66
- copyright: copyright (c) nexB. Inc. and others
7-
- homepage_url: https://github.com/nexB/extractcode
7+
- homepage_url: https://github.com/aboutcode-org/extractcode
88
- keywords: archive, extraction, libarchive, 7zip, scancode-toolkit, extractcode
99

1010
Supports Windows, Linux and macOS on 64 bits processors and Python 3.6 to 3.9.
@@ -83,7 +83,7 @@ libmagic) to select the most appropriate extractor or decompressor function.
8383
It can handle multi-level archives such as tar.gz and can extract recursively
8484
any nested archives.
8585

86-
Visit https://aboutcode.org and https://github.com/nexB/ for support and download.
86+
Visit https://aboutcode.org and https://github.com/aboutcode-org/ for support and download.
8787

8888

8989
We run CI tests on:
@@ -109,7 +109,7 @@ In this case, you will need to provide a working and compatible libarchive and
109109
find them:
110110

111111
- **a typecode-libarchive and typecode-7z plugin**: See the standard ones at
112-
https://github.com/nexB/scancode-plugins/tree/main/builtins
112+
https://github.com/aboutcode-org/scancode-plugins/tree/main/builtins
113113
These can either bundle a libarchive library, a 7z executable or expose a
114114
system-installed libraries.
115115
It does so by providing plugin entry points as ``scancode_location_provider``
@@ -121,8 +121,8 @@ find them:
121121

122122
See for example:
123123

124-
- https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_libarchive-linux/setup.py#L40
125-
- https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_libarchive-linux/src/extractcode_libarchive/__init__.py#L17
124+
- https://github.com/aboutcode-org/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_libarchive-linux/setup.py#L40
125+
- https://github.com/aboutcode-org/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_libarchive-linux/src/extractcode_libarchive/__init__.py#L17
126126

127127
And in the same way, the ``scancode_location_provider`` for ``extractcode_7zip``
128128
should point to a ``LocationProviderPlugin`` subclass with a ``get_locations()``
@@ -132,8 +132,8 @@ find them:
132132

133133
See for example:
134134

135-
- https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_7z-linux/setup.py#L40
136-
- https://github.com/nexB/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_7z-linux/src/extractcode_7z/__init__.py#L18
135+
- https://github.com/aboutcode-org/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_7z-linux/setup.py#L40
136+
- https://github.com/aboutcode-org/scancode-plugins/blob/4da5fe8a5ab1c87b9b4af9e54d7ad60e289747f5/builtins/extractcode_7z-linux/src/extractcode_7z/__init__.py#L18
137137

138138
- use **environment variables** to point to installed binaries:
139139

@@ -181,14 +181,14 @@ ExtractCode will use these environment variables if set:
181181
- EXTRACTCODE_LIBARCHIVE_PATH : the path to the ``libarchive.so`` libarchive
182182
shared library used to support some of the archive formats. If not provided,
183183
ExtractCode will look for a plugin-provided libarchive library path. See
184-
https://github.com/nexB/scancode-plugins/tree/main/builtins for such plugins.
184+
https://github.com/aboutcode-org/scancode-plugins/tree/main/builtins for such plugins.
185185
If no plugin contributes libarchive, then a final attempt is made to look for
186186
it in the PATH using standard DLL loading techniques.
187187

188188
- EXTRACTCODE_7Z_PATH : the path to the ``7z`` 7zip executable used to support
189189
some of the archive formats. If not provided, ExtractCode will look for a
190190
plugin-provided 7z executable path. See
191-
https://github.com/nexB/scancode-plugins/tree/main/builtins for such plugins.
191+
https://github.com/aboutcode-org/scancode-plugins/tree/main/builtins for such plugins.
192192
If no plugin contributes 7z, then a final attempt is made to look for
193193
it in the PATH.
194194

configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright (c) nexB Inc. and others. All rights reserved.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/ for support or download.
6+
# See https://github.com/aboutcode-org/ for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

configure.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@rem Copyright (c) nexB Inc. and others. All rights reserved.
55
@rem SPDX-License-Identifier: Apache-2.0
66
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
7-
@rem See https://github.com/nexB/ for support or download.
7+
@rem See https://github.com/aboutcode-org/ for support or download.
88
@rem See https://aboutcode.org for more information about nexB OSS projects.
99

1010

extractcode

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
66
# ScanCode is a trademark of nexB Inc.
7-
# See https://github.com/nexB/extractcode for support or download.
7+
# See https://github.com/aboutcode-org/extractcode for support or download.
88
# See https://aboutcode.org for more information about nexB OSS projects.
99
#
1010
# A minimal shell wrapper to the CLI entry point fo ExtractCode

extractcode.ABOUT

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ about_resource: .
22
copyright: copyright (c) nexB. Inc. and others
33
description: A mostly universal archive extractor using 7zip, libarchive and the
44
Python standard library for reliable archive extraction on Linux, Windows and
5-
macOS. It is used by ScanCode toolkit and related projects.
5+
macOS. It is used by ScanCode toolkit and related projects.
66
keywords: archive, extraction, libarchive, 7zip, gzip, xz, lzma, bzip2, tar, ar, cpio, scancode-toolkit
7-
homepage_url: https://github.com/nexB/extractcode
7+
homepage_url: https://github.com/aboutcode-org/extractcode
88
holder: nexB. Inc. and others
99
holder_contact: [email protected]
1010
license_expression: apache-2.0

extractcode.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@rem SPDX-License-Identifier: Apache-2.0
55
@rem See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
66
@rem ScanCode is a trademark of nexB Inc.
7-
@rem See https://github.com/nexB/extractcode for support or download.
7+
@rem See https://github.com/aboutcode-org/extractcode for support or download.
88
@rem See https://aboutcode.org for more information about nexB OSS projects.
99

1010
@rem A wrapper to ExtractCode command line entry point

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license = Apache-2.0
66
description = A mostly universal archive extractor using 7zip, libarchive and the Python standard library for reliable archive extraction.
77
long_description = file:README.rst
88
long_description_content_type = text/x-rst
9-
url = https://github.com/nexB/extractcode
9+
url = https://github.com/aboutcode-org/extractcode
1010

1111
author = nexB. Inc. and others
1212
author_email = [email protected]

src/extractcode/NOTICE

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
# ScanCode is a trademark of nexB Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/extractcode for support or download.
6+
# See https://github.com/aboutcode-org/extractcode for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#

src/extractcode/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ScanCode is a trademark of nexB Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/extractcode for support or download.
6+
# See https://github.com/aboutcode-org/extractcode for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

@@ -123,7 +123,8 @@ def remove_backslashes_and_dotdots(directory):
123123
continue
124124
try:
125125
new_path = as_posixpath(filename).strip('/')
126-
new_path = posixpath.normpath(new_path).replace('..', '/').strip('/')
126+
new_path = posixpath.normpath(
127+
new_path).replace('..', '/').strip('/')
127128
new_path = posixpath.normpath(new_path)
128129
segments = new_path.split('/')
129130
directory = join(top, *segments[:-1])

src/extractcode/api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ScanCode is a trademark of nexB Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/extractcode for support or download.
6+
# See https://github.com/aboutcode-org/extractcode for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

src/extractcode/archive.py

+37-25
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ScanCode is a trademark of nexB Inc.
44
# SPDX-License-Identifier: Apache-2.0
55
# See http://www.apache.org/licenses/LICENSE-2.0 for the license text.
6-
# See https://github.com/nexB/extractcode for support or download.
6+
# See https://github.com/aboutcode-org/extractcode for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
99

@@ -102,7 +102,7 @@ def should_extract(location, kinds, ignore_pattern=()):
102102
"""
103103
location = os.path.abspath(os.path.expanduser(location))
104104
ignore_pattern = {
105-
extension : 'User ignore: Supplied by --ignore'
105+
extension: 'User ignore: Supplied by --ignore'
106106
for extension in ignore_pattern
107107
}
108108
should_ignore = is_ignored(location, ignore_pattern)
@@ -218,10 +218,13 @@ def get_handlers(location):
218218
raise Exception('Maximum level of archive nesting is two.')
219219

220220
# default to False
221-
type_matched = handler.filetypes and any(t in ftype for t in handler.filetypes)
221+
type_matched = handler.filetypes and any(
222+
t in ftype for t in handler.filetypes)
222223
if TRACE_DEEP:
223-
logger.debug(f' get_handlers: handler.filetypes={handler.filetypes}')
224-
mime_matched = handler.mimetypes and any(m in mtype for m in handler.mimetypes)
224+
logger.debug(
225+
f' get_handlers: handler.filetypes={handler.filetypes}')
226+
mime_matched = handler.mimetypes and any(
227+
m in mtype for m in handler.mimetypes)
225228
exts = handler.extensions
226229
if exts:
227230
extension_matched = exts and location.lower().endswith(exts)
@@ -230,7 +233,7 @@ def get_handlers(location):
230233
print(
231234
f' get_handlers: matched type: {type_matched}, '
232235
f'mime: {mime_matched}, ext: {extension_matched}' % locals()
233-
)
236+
)
234237

235238
if (
236239
handler.strict
@@ -247,7 +250,8 @@ def get_handlers(location):
247250
if type_matched or mime_matched or extension_matched:
248251
if TRACE_DEEP:
249252
handler_name = handler.name
250-
logger.debug(' get_handlers: yielding handler: %(handler_name)r' % locals())
253+
logger.debug(
254+
' get_handlers: yielding handler: %(handler_name)r' % locals())
251255
yield handler, type_matched, mime_matched, extension_matched
252256

253257

@@ -267,7 +271,8 @@ def score_handlers(handlers):
267271
# increment kind value: higher kinds numerical values are more
268272
# specific by design
269273
score += handler.kind
270-
if TRACE_DEEP: logger.debug(f' score_handlers: score += handler.kind {score}')
274+
if TRACE_DEEP:
275+
logger.debug(f' score_handlers: score += handler.kind {score}')
271276

272277
# increment score based on matched criteria
273278
if type_matched and mime_matched and extension_matched:
@@ -384,13 +389,15 @@ def extract_twice(location, target_dir, extractor1, extractor2):
384389

385390
# extract this intermediate payload to the final target_dir
386391
try:
387-
inner_archives = list(fileutils.resource_iter(temp_target, with_dirs=False))
392+
inner_archives = list(fileutils.resource_iter(
393+
temp_target, with_dirs=False))
388394
if not inner_archives:
389395
warnings.append(location + ': No files found in archive.')
390396
else:
391397
for extracted1_loc in inner_archives:
392398
if TRACE:
393-
logger.debug('extract_twice: extractor2: %(extracted1_loc)r' % locals())
399+
logger.debug(
400+
'extract_twice: extractor2: %(extracted1_loc)r' % locals())
394401
warnings.extend(extractor2(extracted1_loc, abs_target_dir))
395402
finally:
396403
# cleanup the temporary output from extractor1
@@ -415,14 +422,17 @@ def extract_with_fallback(location, target_dir, extractor1, extractor2):
415422
try:
416423
warnings = extractor1(abs_location, temp_target1)
417424
if TRACE:
418-
logger.debug('extract_with_fallback: temp_target1: %(temp_target1)r' % locals())
425+
logger.debug(
426+
'extract_with_fallback: temp_target1: %(temp_target1)r' % locals())
419427
fileutils.copytree(temp_target1, abs_target_dir)
420428
except:
421429
try:
422-
temp_target2 = str(fileutils.get_temp_dir(prefix='extractcode-extract2-'))
430+
temp_target2 = str(fileutils.get_temp_dir(
431+
prefix='extractcode-extract2-'))
423432
warnings = extractor2(abs_location, temp_target2)
424433
if TRACE:
425-
logger.debug('extract_with_fallback: temp_target2: %(temp_target2)r' % locals())
434+
logger.debug(
435+
'extract_with_fallback: temp_target2: %(temp_target2)r' % locals())
426436
fileutils.copytree(temp_target2, abs_target_dir)
427437
finally:
428438
fileutils.delete(temp_target2)
@@ -446,7 +456,8 @@ def try_to_extract(location, target_dir, extractor):
446456
try:
447457
warnings = extractor(abs_location, temp_target)
448458
if TRACE:
449-
logger.debug('try_to_extract: temp_target: %(temp_target)r' % locals())
459+
logger.debug(
460+
'try_to_extract: temp_target: %(temp_target)r' % locals())
450461
fileutils.copytree(temp_target, abs_target_dir)
451462
except:
452463
return warnings
@@ -685,7 +696,7 @@ def try_to_extract(location, target_dir, extractor):
685696
XzHandler = Handler(
686697
name='xz',
687698
filetypes=('xz compressed',),
688-
mimetypes=('application/x-xz',) ,
699+
mimetypes=('application/x-xz',),
689700
extensions=('.xz',),
690701
kind=regular,
691702
extractors=[extract_xz],
@@ -695,7 +706,7 @@ def try_to_extract(location, target_dir, extractor):
695706
LzmaHandler = Handler(
696707
name='lzma',
697708
filetypes=('lzma compressed',),
698-
mimetypes=('application/x-xz',) ,
709+
mimetypes=('application/x-xz',),
699710
extensions=('.lzma',),
700711
kind=regular,
701712
extractors=[extract_lzma],
@@ -705,7 +716,7 @@ def try_to_extract(location, target_dir, extractor):
705716
TarXzHandler = Handler(
706717
name='Tar xz',
707718
filetypes=('xz compressed',),
708-
mimetypes=('application/x-xz',) ,
719+
mimetypes=('application/x-xz',),
709720
extensions=('.tar.xz', '.txz', '.tarxz',),
710721
kind=regular_nested,
711722
extractors=[extract_xz, extract_tar],
@@ -715,7 +726,7 @@ def try_to_extract(location, target_dir, extractor):
715726
TarLzmaHandler = Handler(
716727
name='Tar lzma',
717728
filetypes=('lzma compressed',),
718-
mimetypes=('application/x-lzma',) ,
729+
mimetypes=('application/x-lzma',),
719730
extensions=('tar.lzma', '.tlz', '.tarlz', '.tarlzma',),
720731
kind=regular_nested,
721732
extractors=[extract_lzma, extract_tar],
@@ -726,7 +737,8 @@ def try_to_extract(location, target_dir, extractor):
726737
name='Tar gzip',
727738
filetypes=('gzip compressed',),
728739
mimetypes=('application/gzip',),
729-
extensions=('.tgz', '.tar.gz', '.tar.gzip', '.targz', '.targzip', '.tgzip',),
740+
extensions=('.tgz', '.tar.gz', '.tar.gzip',
741+
'.targz', '.targzip', '.tgzip',),
730742
kind=regular_nested,
731743
extractors=[extract_tar],
732744
strict=False
@@ -735,7 +747,7 @@ def try_to_extract(location, target_dir, extractor):
735747
TarLzipHandler = Handler(
736748
name='Tar lzip',
737749
filetypes=('lzip compressed',),
738-
mimetypes=('application/x-lzip',) ,
750+
mimetypes=('application/x-lzip',),
739751
extensions=('.tar.lz', '.tar.lzip',),
740752
kind=regular_nested,
741753
extractors=[extract_lzip, extract_tar],
@@ -745,7 +757,7 @@ def try_to_extract(location, target_dir, extractor):
745757
TarZstdHandler = Handler(
746758
name='Tar zstd',
747759
filetypes=('zstandard compressed',),
748-
mimetypes=('application/x-zstd',) ,
760+
mimetypes=('application/x-zstd',),
749761
extensions=('.tar.zst', '.tar.zstd',),
750762
kind=regular_nested,
751763
extractors=[extract_zstd, extract_tar],
@@ -755,7 +767,7 @@ def try_to_extract(location, target_dir, extractor):
755767
TarLz4Handler = Handler(
756768
name='Tar lz4',
757769
filetypes=('lz4 compressed',),
758-
mimetypes=('application/x-lz4',) ,
770+
mimetypes=('application/x-lz4',),
759771
extensions=('.tar.lz4',),
760772
kind=regular_nested,
761773
extractors=[extract_lz4, extract_tar],
@@ -788,7 +800,7 @@ def try_to_extract(location, target_dir, extractor):
788800
LzipHandler = Handler(
789801
name='lzip',
790802
filetypes=('lzip compressed',),
791-
mimetypes=('application/x-lzip',) ,
803+
mimetypes=('application/x-lzip',),
792804
extensions=('.lzip',),
793805
kind=regular,
794806
extractors=[extract_lzip],
@@ -798,7 +810,7 @@ def try_to_extract(location, target_dir, extractor):
798810
ZstdHandler = Handler(
799811
name='zstd',
800812
filetypes=('zstandard compressed',),
801-
mimetypes=('application/x-zstd',) ,
813+
mimetypes=('application/x-zstd',),
802814
extensions=('.zst', '.zstd',),
803815
kind=regular_nested,
804816
extractors=[extract_zstd],
@@ -808,7 +820,7 @@ def try_to_extract(location, target_dir, extractor):
808820
Lz4Handler = Handler(
809821
name='lz4',
810822
filetypes=('lz4 compressed',),
811-
mimetypes=('application/x-lz4',) ,
823+
mimetypes=('application/x-lz4',),
812824
extensions=('.lz4',),
813825
kind=regular_nested,
814826
extractors=[extract_lz4],

0 commit comments

Comments
 (0)