Skip to content

Commit 1f911c0

Browse files
authored
Merge pull request WikiTeam#424 from simonliu99/master
Add dump date to item identifier
2 parents d7b6924 + d947d75 commit 1f911c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: uploader.py

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ def upload(wikis, config={}, uploadeddumps=[]):
7373
for dump in dumps:
7474
wikidate = dump.split('-')[1]
7575
item = get_item('wiki-' + wikiname)
76+
if item.exists and config.append_date and not config.admin:
77+
item = get_item('wiki-' + wikiname + '-' + wikidate)
7678
if dump in uploadeddumps:
7779
if config.prune_directories:
7880
rmline='rm -rf %s-%s-wikidump/' % (wikiname, wikidate)
@@ -284,6 +286,7 @@ def main(params=[]):
284286
parser.add_argument('-c', '--collection', default='opensource')
285287
parser.add_argument('-wd', '--wikidump_dir', default='.')
286288
parser.add_argument('-u', '--update', action='store_true')
289+
parser.add_argument('-d', '--append_date', action='store_true')
287290
parser.add_argument('listfile')
288291
config = parser.parse_args()
289292
if config.admin:

0 commit comments

Comments
 (0)