From nobody Sun May 21 06:54:11 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QPBBr2TSZz4C8Fd; Sun, 21 May 2023 06:54:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QPBBr0Y3rz3ncv; Sun, 21 May 2023 06:54:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684652052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NnyJOhbks3FvEWr3ieq90cafuI0gWFzZiVCVAImI/sM=; b=RZHZ5wr7mFzYeLXiLNbgVPJhSok/0Gjs4PRn20SA/pDfzZAckFQn9Nyvo3NM/tWxvLsgdJ MWqM2ZN+7sZMXVlGwxXtmtxltaOJtlRe3WrjGsb7i+oifu0I1P4kcrtXUUVKmZukpCgjpJ 7AkcwRQukKw4yAZ/h5oag86su4QPPBNTM4ZPN8qvvZFhy8pTG/16G7eSBavoctRgvDRCyZ gquRk+4Bx+d2CcTn3perjjOaerDSFpkJJinH7BVXf1iqHhdKESEhtm5VNZ4ZgGzLLvYXT2 my3BLUtVqmTfC9lptrEM+6gohBIFLrxqEyi+9iDfShPJzC7HR7zngLK4FW4s2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684652052; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NnyJOhbks3FvEWr3ieq90cafuI0gWFzZiVCVAImI/sM=; b=m2ybpx6WgNR6lXseIXAVP6EY82aUxwiP5og8PoK2gO7rIRo0CQ9YSeGlWjlv8+gD9oKlIm G9EaAMDP53fQthtr1cJwa65x2njmzmOvDmGfpzQFo34iAYV20850j+O3LhMi40K97I7/jm O35cpigvpz34wdSDg9dEM8Dvipwegg7B5K+MSOUjJCI2YNTv8YkrUURKk5EWzMeKzps1qV DMN/NVMUDjbaM0WbVpY75I8C6KFksgxyVzOHhmyrJ5ZiHpEYfoft/ByDTGAuFnQmzF0cDi alZwE5JAwYgO2+Dh6Keht6gGC7lln7GAac2ASebFhsxbARIxD/48OeOVOFhpyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684652052; a=rsa-sha256; cv=none; b=yQpq1T2/308Ow86nFuNdPVjTfb4vYfE6ohOY7lCOjquWXeQlwd6rhG+6jKmODAVYHhcDTC 0hGxNhCcfXwIxCQYNWZrfiayrz2kcoMGToPCKW0J6re1u6QZb94r7oz95WSb0viu4yTAjJ l8UmCNeDstvWsnF5DO2Eqo/ySoC4+bsqw2mHdeuNWvn00Csj05jrdcw9YGW+gkmpMd0C4o /X3WCo/gN19un/0b+fUSLNOMv/TMLQqI67QbmjldeHdpBOyBGOQGgRRKs2yr8Rwa/zeC0P 72gOHzsyKBBxv4FpAA3JM28snrBa8E3ik1+KRRhOMwfksGSBWclcqH8/besF8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QPBBq5KdXzhHt; Sun, 21 May 2023 06:54:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34L6sBMq027472; Sun, 21 May 2023 06:54:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34L6sBd5027471; Sun, 21 May 2023 06:54:11 GMT (envelope-from git) Date: Sun, 21 May 2023 06:54:11 GMT Message-Id: <202305210654.34L6sBd5027471@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: 3d36384ab145 - main - net-p2p/py-ed2k-tools: some last minute style and commentary/spelling fixes. List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d36384ab1450949d189284b6d3fcf005f8b3b81 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=3d36384ab1450949d189284b6d3fcf005f8b3b81 commit 3d36384ab1450949d189284b6d3fcf005f8b3b81 Author: Alexey Dokuchaev AuthorDate: 2023-05-21 06:53:52 +0000 Commit: Alexey Dokuchaev CommitDate: 2023-05-21 06:53:52 +0000 net-p2p/py-ed2k-tools: some last minute style and commentary/spelling fixes. --- net-p2p/py-ed2k-tools/files/patch-fix__sofar.py | 2 +- net-p2p/py-ed2k-tools/files/patch-make__met.py | 4 ++-- net-p2p/py-ed2k-tools/files/patch-temp__summary.py | 13 ++++++++----- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/net-p2p/py-ed2k-tools/files/patch-fix__sofar.py b/net-p2p/py-ed2k-tools/files/patch-fix__sofar.py index a7c4e293e4ab..927f2e52d1fa 100644 --- a/net-p2p/py-ed2k-tools/files/patch-fix__sofar.py +++ b/net-p2p/py-ed2k-tools/files/patch-fix__sofar.py @@ -28,7 +28,7 @@ + print("If you want to create new .met files with this 'bug' corrected, run this") + print("program with the affected .met files as the command line arguments. You") + print("will get new .met files titled X.new, where X was the original .part.met") -+ print("file. Copy these over the top of your originals if you're sure thats what") ++ print("file. Copy these over the top of your originals if you're sure that's what") + print("you want to do.") + print() + print("Of course, Overnet will re-break these files on its next exit. You'll") diff --git a/net-p2p/py-ed2k-tools/files/patch-make__met.py b/net-p2p/py-ed2k-tools/files/patch-make__met.py index 6bd11fea1491..07b23a50d9fb 100644 --- a/net-p2p/py-ed2k-tools/files/patch-make__met.py +++ b/net-p2p/py-ed2k-tools/files/patch-make__met.py @@ -18,7 +18,7 @@ + print("argument, which represents the ed2k:// link provided as the second arg.") + print() + print("Useful for adding things to your download list without actually opening") -+ print("Overnet / Donkey.") ++ print("Overnet/eDonkey2000.") sys.exit( -1 ); temp_dir = sys.argv[ 1 ]; @@ -40,7 +40,7 @@ # Convert the printed hash into a byte representation. # Surely there's an easier way to do this. - new_hash = ""; -+ new_hash = b'' ++ new_hash = b"" while hash: part = hash[ 0 : 2 ]; hash = hash[ 2 : ]; diff --git a/net-p2p/py-ed2k-tools/files/patch-temp__summary.py b/net-p2p/py-ed2k-tools/files/patch-temp__summary.py index 8d100fd34870..46e7db596279 100644 --- a/net-p2p/py-ed2k-tools/files/patch-temp__summary.py +++ b/net-p2p/py-ed2k-tools/files/patch-temp__summary.py @@ -50,7 +50,7 @@ # Set the total downloaded to the file size. down = size; -@@ -71,19 +66,39 @@ if __name__ == "__main__": +@@ -71,19 +66,42 @@ if __name__ == "__main__": bar = "#" * ( WIDTH - 2 ); for gap in gaps: gap_start, gap_end = gaps[ gap ]; @@ -60,7 +60,7 @@ + char_gap_end = int(gap_end / bytes_per_char) bar = bar[ : char_gap_start ] + " " * ( char_gap_end - char_gap_start ) + bar[ char_gap_end : ]; + -+ # Account for CJK characters occupy two terminal spaces ++ # Account for CJK characters occupy two fixed-width spaces. + def char_width(c: str) -> int: + if not c.isprintable(): return 0 + return 2 if unicodedata.category(c) == 'Lo' else 1 @@ -68,15 +68,18 @@ + def visible_len(s: str) -> int: + return sum(char_width(c) for c in s) + ++ # Truncate string to specified limit. If truncation happens ++ # on double-width character (like it would have to be cut in ++ # half), append an extra space for nicer alignment. + def visible_substr_padded(s: str, l: int) -> str: + vislen = 0 + cut_here = 0 + padding = '' + for c in s: + vislen += char_width(c) -+ if (vislen <= l): cut_here += 1 -+ if (vislen == l): break -+ if (vislen > l): padding = ' '; break ++ if vislen <= l: cut_here += 1 ++ if vislen == l: break ++ if vislen > l: padding = ' '; break + return s[:cut_here] + padding # Print out our summary. Limit the filenames.