Skip to content

Commit

Permalink
強制上傳新版本。
Browse files Browse the repository at this point in the history
  • Loading branch information
kanasimi committed Dec 16, 2024
1 parent 9df4f1f commit c1b3850
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion routine/20181016.import_earthquake_shakemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ function check_media(media_data, product_data, detail, index, length) {
wiki.page(wiki.to_namespace(
// 'File:' +
media_data.filename, 'File'), function(page_data) {
// console.trace(page_data, detail);

// Skip exists file on Wikimedia Commons
if (!CeL.wiki.content_of.page_exists(page_data) || detail.was_updated) {
CeL.log((index + 1) + '/' + length + ' '
Expand All @@ -184,6 +186,8 @@ function check_media(media_data, product_data, detail, index, length) {

} else {
CeL.log('check_media: File exists: ' + media_data.filename);
// 強制上傳新版本。
upload_media(media_data, product_data, detail);
}
}, {
rvprop : 'ids'
Expand Down Expand Up @@ -314,7 +318,9 @@ function upload_media(media_data, product_data, detail) {
},

structured_data : {
// 描繪內容 (P180) [[Commons:Structured data/Modeling/Depiction]]
// depicts (P180) 描繪內容
// earthquake (Q7944) 地震
// topographic map (Q216526) 地形圖
depicts : 'Q7944'
}
});
Expand Down

0 comments on commit c1b3850

Please sign in to comment.