Commons:कमांड-पंक्ति अपलोड
कमांड-पंक्ति उपकरणों की मदद से विकिमीडिया कॉमन्स पर अपलोड करना संभव है।
लोकल फ़ाइलें अपलोड करने के उपकरण
स्क्रिप्ट | निर्भरताएँ | बैच अपलोड | {{Information}} का समर्थन |
---|---|---|---|
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 का अपलोड स्क्रिप्ट
एक Perl स्क्रिप्ट जो किसी फ़ोल्डर में चित्रों की कड़ी के साथ एक CSV फ़ाइल बनाता है। विवरण, लाइसेंस, श्रेणी, अक्षांश, देशांतर जैसी सारी जानकारी डालें। चित्रों में विशिष्ट EXIF डेटा भी एम्बेड करता है, जैसे GPS डेटा, नाम, लाइसेंस, आदि। साथ ही, आप उन्हें आराम से घुमा सकते हैं और उनका नाम बदल सकते हैं।
Wmigda का अपलोड स्क्रिप्ट
Nichalp के अपलोड स्क्रिप्ट का एक Python संस्करण जो Nichalp के दो Perl स्क्रिप्ट्स में से एक द्वारा निर्मित upload.csv फ़ाइल पर निर्भर है।
आवश्यकता: कम-से-कम Perl और Python और Nichalp के दो स्क्रिप्ट्स में से एक; अधिक जानकारी के लिए प्रलेख देखें
Fastily का अपलोड स्क्रिप्ट
एक Python प्रोग्राम जो बुनियादी जानकारी और एक श्रेणी (फ़ोल्डर के नाम से निर्धारित) के साथ पूरे फ़ोल्डर्स अपलोड कर सकता है।
दूसरी वेबसाइटों से फ़ाइलें अपलोड करने के लिए उपकरण
Flickrripper एक मुक्त Python प्रोग्राम है जिससे Flickr से बहुत सारे चित्रों को एक साथ आसानी से विकिमीडिया कॉमन्स अपलोड किया जा सकता है। प्रोग्राम को mw:Manual:Pywikibot/flickrripper.py पर प्रलिखित किया गया है।
Python विकिपीडिया बॉट
Python फ़्रेमवर्क में फ़ाइल अपलोड करने के कई उपकरण शामिल हैं। इन उपकरणों को Python फ़्रेमवर्क और pywikibot फ़्रेमवर्क की आवश्यकता होती है। अगर हर अपलोड को अपलोड करने से पहले जाँचा जाए (नीचे verifyDescription विकल्प देखें), इसे बॉट नहीं माना जाएगा।
इसके प्रयोग पर विस्तृत जानकारी के लिए:
इस उपकरण से लॉग-इन करने के लिए आपकी कॉन्फ़िगरेशन फ़ाइल को निम्न सेटिंग्स की आवश्यकता है।
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()
pywikipediabot पर आधारित दूसरे उपकरणों के लिए multichill/bot और erfgoedbot देखें।
BotClasses.php
User:BrooklynMuseumBot जैसे कुछ बॉट्स, BotClasses.php के आधार पर PHP में लिखे गए थे।