كومنز:رفع سطر أوامر
يمكن الرفع لويكيميديا كومنز باستخدام أدوات سطر الأوامر.
Tools to upload local files
Script | Dependencies | Batch upload | {{Information}} support |
---|---|---|---|
Nichalp's Upload Script | Perl | Yes | 7 licenses |
Anuta | Perl, Python and csv_creator.pl |
Yes | 7 licenses |
Simple Commons Uploader | Python | Yes | only Cc-by-sa-2.0 |
upload.py from Pywikibot | Python | No | none |
سكريبت رفع Nichalp
سكريبت بيرل يقوم بإنشاء ملف CSV بقائمة الصور في مجلد، أدخل جميع المعلومات، مثل الوصف والترخيص والتصنيف وخط العرض وخط الطول وما إلى ذلك، تتضمن أيضا بيانات Exif معينة إلى الصورة مثل بيانات GPS والاسم والترخيص إلخ، بالإضافة إلى ذلك، يمكنك أيضا تدويرها وإعادة تسميتها على الطاير
سكريبت رفع Wmigda
نسخة بايثون من سكريبت رفع Nichalp ولكن ذلك يعتمد على ملف upload.csv الذي يولده أحد Perl Nichalp.
الشرط: على الأقل Perl وبايثون وأحد سكريبتات Nichalp، راجع التوثيق لمزيد من التفاصيل
Fastily's upload script
A Python program which can upload whole folders on your computer with basic information and a category (determined by the name of the enclosing folder).
Tools to upload files from other websites
كسارة فليكر
كسارة فليكر هو برنامج بايثون حر لسهولة vtu عدد كبير من الصور من فليكر إلى ويكيميديا كومنز، تم توثيق البرنامج في mw:Manual:Pywikibot/flickrripper.py.
بايثون ويكيبيديا بوت
يتضمن إطار عمل بايثون أدوات رفع ملفات متنوعة، تتطلب هذه الأدوات تثبيت بايثون وإطار عمل بوت ويكي بايثون، إذا تم التحقق من كل رفع قبل الرفع (راجع خيار التحقق من الوصف أدناه)، فلن يتم اعتباره بوت.
لمعلومات مفصلة عن استخدامه:
لتسجيل الدخول باستخدام هذه الأداة; يحتاج ملف التكوين الخاص بك إلى الإعدادات التالية.
family = 'commons' mylang = 'commons' usernames['commons']['commons'] = 'nick'
الاستعمال:
- Upload.py : لرفع الملفات إلى كومنز.
- Imagecopy.py : نقل الصور في ويكي محلي إلى كومنز.
- Nowcommons.py : حذف صورة في ويكي محلي بالفعل في كومنز.
# -*- coding: utf-8 -*-
import sys
import pywikibot
from pywikibot.specialbots import UploadRobot
def complete_desc_and_upload(filename, pagetitle, desc, date, categories):
#complete this once if applies to all files
description = u"""{{Information
|Description = {{en|1=""" + desc + """}}
|Source = <!-- if applicable: {{own}} --->
|Author = <!-- your name: --->
|Date = """ + date + """
|Permission =
|other_versions =
}}
=={{int:license-header}}==
<!-- your license --->
""" + categories + """
[[Category:Taken with camera 123]]
"""
url = [ filename ]
keepFilename = False #set to True to skip double-checking/editing destination filename
verifyDescription = True #set to False to skip double-checking/editing description => change to bot-mode
targetSite = pywikibot.getSite('commons', 'commons')
bot = UploadRobot(url, description=description, useFilename=pagetitle, keepFilename=keepFilename, verifyDescription=verifyDescription, targetSite=targetSite)
bot.run()
def main(args):
#list each file here
filename = """testimage-1.jpg"""
pagetitle = """testimage-1-from asdfasdfa.jpg"""
desc = """Mount St Helens viewed from ... in the rain"""
date = "2010-04-07"
categories = """[[Category:Locality]]
[[Category:Theme]]
[[Category:View type]]
[[Category:Feature1]]
[[Category:Feature2]]"""
complete_desc_and_upload(filename, pagetitle, desc, date, categories)
#sample with: - local file name identical to file name at Commons
# - date as previous file
# - less quotes (no CR or " in fields)
filename = "testimage-2.jpg"
pagetitle = filename
desc = "Mount St Helens as seen from ... at sunset"
categories = "[[Category:Locality]] [[Category:Theme]] [[Category:View type]] [[Category:Feature1]] [[Category:Feature2]]"
complete_desc_and_upload(filename, pagetitle, desc, date, categories)
if __name__ == "__main__":
try:
main(sys.argv[1:])
finally:
pywikibot.stopme()
للأدوات الأخرى التي تعتمد على بايثون ويكيبيديا بوت; راجع multichill/بوت وerfgoedbot.
BotClasses.php
تمت كتابة بعض برامج البوتات، مثلUser:BrooklynMuseumBot، بلغة PHP استنادا إلى BotClasses.php