Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow uploading into any collection #29

Merged
merged 1 commit into from
Oct 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions wikiteam3/uploader/uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,6 @@
from wikiteam3.utils.util import ALL_DUMPED_MARK, UPLOADED_MARK, XMLRIVISIONS_INCREMENTAL_DUMP_MARK, is_empty_dir, mark_as_done, is_markfile_exists

DEFAULT_COLLECTION = 'opensource'
TEST_COLLECTION = 'test_collection'
"""
items here are expected to be automatically removed after 30 days.
(see <https://archive.org/details/test_collection?tab=about>)
"""
WIKITEAM_COLLECTION = 'wikiteam'
""" Only admins can add/move items to this collection. """

IDENTIFIER_PREFIX = "wiki-"

@dataclass
Expand Down Expand Up @@ -545,7 +537,7 @@ def main():
parser.add_argument("-kf", "--keys_file", default="~/.wikiteam3_ia_keys.txt", dest="keys_file",
help="Path to the IA S3 keys file. (first line: access key, second line: secret key)"
" [default: ~/.wikiteam3_ia_keys.txt]")
parser.add_argument("-c", "--collection", default=DEFAULT_COLLECTION, choices=[DEFAULT_COLLECTION, TEST_COLLECTION, WIKITEAM_COLLECTION])
parser.add_argument("-c", "--collection", default=DEFAULT_COLLECTION)
parser.add_argument("--dry-run", action="store_true", help="Dry run, do not upload anything.")
parser.add_argument("-u", "--update", action="store_true",
help="Update existing item. [!! not implemented yet !!]")
Expand Down