Proposal to organize Scoop bucket manifest files into subfolders for better browsing #4549
StarsbySea
started this conversation in
Ideas
Replies: 1 comment
-
Hi everyone, To help speed up the implementation of the proposal, I have written a demo Python script that achieves the goal. Please take a look: import os
import shutil
# Specify the directory to operate on
dir_path = '/path/to/directory'
# Traverse all the files in the directory
for file_name in os.listdir(dir_path):
# Get the first letter or digit of the file name
first_char = file_name[0].lower()
if not first_char.isalnum():
continue
# Construct the subdirectory path
sub_dir_path = os.path.join(dir_path, first_char)
# If the subdirectory does not exist, create it
if not os.path.exists(sub_dir_path):
os.mkdir(sub_dir_path)
# Move the file to the subdirectory
file_path = os.path.join(dir_path, file_name)
new_file_path = os.path.join(sub_dir_path, file_name)
shutil.move(file_path, new_file_path)
print('Done!')
I hope this will be helpful in moving forward with the proposal. Thank you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As Scoop already supports installing files from subfolders in a bucket, and the number of manifest files in the main bucket has exceeded 1000, browsing the files on the GitHub webpage is inconvenient. The message "Sorry, we had to truncate this directory to 1,000 files. 173 entries were omitted from the list." is shown. Therefore, I propose that we organize the manifest files into subfolders similar to the winget-pkgs repository. This would make browsing and maintaining the manifest files easier and more efficient.
Thank you for considering this proposal.
Beta Was this translation helpful? Give feedback.
All reactions