Extension:कार्गो

From mediawiki.org
This page is a translated version of the page Extension:Cargo and the translation is 36% complete.
मीडियाविकि एक्सटेंशन मैन्युअल
Cargo
प्रकाशन की स्थिति: स्थिर
कार्यान्वयन विशेष पृष्ठ , API , पार्सर फंक्शन
विवरण एक एक्सटेंशन जो साँचों में निहित डेटा के भंडारण और क्वेरीयिंग की अनुमति देता है।
लेखक Yaron Koren <yaron57@gmail.com> (Yaron Korenवार्ता)
नवीनतम संस्करण 3.5.1 (मार्च २०२४)
संगतता नीति Master में पीछे की तरफ से संगतता है।
MediaWiki 1.37+
डेटाबेस बदलता है हाँ
Composer mediawiki/cargo
टेबल cargo_tables
cargo_pages
cargo_backlinks
लाइसेंस GNU साधारण सार्वजनिक लाइसेंस 2.0 या अधिक
डाउनलोड करें
उदाहरण एक पृष्ठ जिसमें #cargo_query के विभिन्न कॉल्स हैं
  • $wgCargoFileDataColumns
  • $wgCargoDrilldownLargestFontSize
  • $wgCargoDecimalMark
  • $wgCargoDefaultStringBytes
  • $wgCargoAllowedSQLFunctions
  • $wgCargoHideNamespaceName
  • $wgCargoPageDataColumns
  • $wgCargoMaxVisibleHierarchyDrilldownValues
  • $wgCargoDrilldownSmallestFontSize
  • $wgCargoIgnoreBacklinks
  • $wgCargoRecurringEventMaxInstances
  • $wgCargoDefaultMapService
  • $wgCargoStoreUseTemplateArgsFallback
  • $wgCargoLegacyNullLuaFieldsAsEmptyString
  • $wgCargoTablesPrioritizeReplacements
  • $wgCargoDigitGroupingCharacter
  • $wgCargoDefaultQueryLimit
  • $wgCargoDrilldownNumRangesForNumbers
  • $wgCargo24HourTime
  • $wgCargoMaxQueryLimit
  • $wgCargoDrilldownUseTabs
  • $wgCargoMapClusteringMinimum
  • $wgCargoDrilldownMinValuesForComboBox
  • recreatecargodata
  • deletecargodata
  • runcargoqueries
Quarterly downloads 88 (Ranked 72nd)
Cargo एक्सटेंशन को अनुवादित करें
मुद्दे अधूरे कार्य · बग की रिपोर्ट करें

कार्गो मीडियाविकि का एक विस्तार है जो साँचों के लिए कॉल्स में निहित डेटा को स्टोर और क्वेरी करने का एक हल्का तरीका प्रदान करता है, जैसे इन्फ़ोबॉक्स। यह Semantic MediaWiki एक्सटेंशन की अवधारणा के समान है, लेकिन स्थापना में आसानी और उपयोग में आसानी सहित कई फायदे प्रदान करता है।

कार्गो अपने सभी डेटा को डेटाबेस तालिकाओं में संग्रहीत करता है, जिसे मीडियाविकि के अपने डेटाबेस (डिफ़ॉल्ट) या एक अलग डेटाबेस में रखा जा सकता है। अधिकांश भाग के लिए, प्रत्येक संग्रहीत साँचा प्रत्येक संबंधित साँचे के पैरामीटर के लिए कॉलम के साथ, एक एकल डेटाबेस टेबल में अपना डेटा संग्रहीत करता है। इसके कुछ अपवाद हैं: टेम्प्लेट फ़ील्ड्स का संचालन जो मूल्यों की सरणियों/सूचियों को रखता है, और अधिकांश डीबी सिस्टम में उन डेटा प्रकारों की खराब मूल हैंडलिंग के कारण भौगोलिक निर्देशांक रखने वाले फ़ील्ड अधिक जटिल हैं। और सभी डेटा को एक डाटाबेस टेबल में स्टोर करने के लिए कई टेम्प्लेट सेट किए जा सकते हैं।

विस्तार कई पार्सर कार्यों को परिभाषित करता है; ये तीन सबसे महत्वपूर्ण हैं:

  • #cargo_declare - एक टेम्पलेट के ‎<noinclude> भाग के भीतर रखा गया; यह एक तालिका के लिए स्कीमा को परिभाषित करता है।
  • #cargo_store - एक पंक्ति को कार्गो तालिका में संग्रहीत करता है; आमतौर पर एक टेम्पलेट के ‎<includeonly> भाग के भीतर रखा जाता है।
  • #cargo_query - एसक्यूएल घटकों का उपयोग करते हुए, एक या अधिक कार्गो डेटा तालिकाएँ पूछता है।

अन्य परिभाषित पार्सर कार्य हैं:

  • #cargo_attach - एक टेम्पलेट को कहीं और घोषित तालिका में पंक्तियों को जोड़ने के रूप में परिभाषित करता है।
  • #cargo_compound_query - एकाधिक प्रश्नों के परिणाम एक ही स्थान पर प्रदर्शित करता है।
  • #cargo_display_map - एक बिंदु दिखाने वाला नक्शा प्रदर्शित करता है।
  • #recurring_event - पुनरावर्ती घटना के लिए तिथियां प्रिंट करता है; #cargo_store द्वारा उपयोग के लिए।

कार्गो इस संग्रहीत डेटा के माध्यम से देखने और ड्रिलिंग करने के लिए विभिन्न इंटरफेस को भी परिभाषित करता है। As such, it adds the following special pages:

  • Special:CargoQuery
  • Special:CargoTableDiagram
  • Special:CargoTables
  • Special:Drilldown

कार्गो का परीक्षण किया गया है, और माई एसक्यूएल और पोस्टग्रेएसक्यूएल डेटाबेस सिस्टम के साथ काम करता है। सिद्धांत रूप में, यह एसक्यूएललाईट का भी समर्थन करता है, लेकिन यह एसक्यूएललाईट के साथ अच्छी तरह से परीक्षण नहीं किया गया है और काम नहीं कर सकता है।

कार्गो एक्सटेंशन के इस संस्करण के लिए MediaWiki 1.35+ की आवश्यकता है।

कार्गो के बारे में अधिक जानने के लिए नेविगेशन बार में पृष्ठों पर क्लिक करें, यह कैसे काम करता है, इसका उपयोग कैसे करें और इसे कैसे स्थापित करें।

Installation

Configuration

Below are Cargo's global configuration settings along with their default values.

To configure Cargo to use a separate database instead of the MediaWiki database, the following settings are provided:

Separate database configuration settings
Setting Default Description
$wgCargoDBtype null Database type.
$wgCargoDBserver null Host name or IP address of database server.
$wgCargoDBname null Name of the database.
$wgCargoDBuser null Database username.
$wgCargoDBpassword null The password for $wgCargoDBuser.
$wgCargoDBprefix null Database table name prefix.
$wgCargoDBRowFormat null Data base row format.

For character configuration as related to numbers, the following configuring settings are provided:

Character configuration settings
Setting Default Description
$wgCargoDecimalMark . Decimal character for numbers.
$wgCargoDigitGroupingCharacter , Thousands digit separator.

The remaining global configuration settings are as follows:

Setting Default Description
$wgCargoAllowedSQLFunctions [] Sets allowed SQL functions. See Using SQL Functions for defaults.
$wgCargoRecurringEventMaxInstances 100 The number of max instances to store for recurring events with no set end date.
$wgCargoDefaultStringBytes 300 The default number of characters for fields of type Page, String, Wikitext string, File, URL, Email
$wgCargoDefaultQueryLimit 100 Number of results to show for #cargo_query if no limit is set
$wgCargoMaxQueryLimit 5000 The maximum allowed number of results for #cargo_query
$wgCargo24HourTime false If true uses 24-hour time for Datetime field types.
$wgCargoDefaultMapService OpenLayers Sets the default map service to Google Maps, if set to googlemaps, to Leaflet if set to leaflet, and to OpenLayers if set to openlayers.
$wgCargoGoogleMapsKey null API key for Google Maps, for the googlemaps display format.
$wgCargoMapClusteringMinimum 80 If the number of map points displayed is greater than the value of $wgCargoMapClusteringMinimum, the map displays the locations in "clusters" instead of individual points, for readability. If set to a very high number, does not display clustering.
$wgCargoDrilldownUseTabs true Displays Special:Drilldown table names as tabs at the top instead of a vertical list at the side.
$wgCargoDrilldownSmallestFontSize -1 If set to a positive number, sets the smallest font size, in pixels, for a tag-cloud-style display of filter values.
$wgCargoDrilldownLargestFontSize -1 If set to a positive number, sets the largest font size, in pixels, for a tag-cloud-style display of filter values.
$wgCargoDrilldownMinValuesForComboBox 40 Sets the minimum number of values before their display is converted to a combo box, instead of individual links.
$wgCargoDrilldownNumRangesForNumbers 5 For fields/filters of type Integer or Float, specifies the number of "buckets" into which values are divided.
$wgCargoMaxVisibleHierarchyDrilldownValues 30 If set to a positive integer, specifies the maximum number of values shown at a time for any hierarchy field (All the top-level values are shown irrespective of this value). The values are hidden beyond a certain depth of the hierarchy such that the count of total visible values is at most this number.
$wgCargoTablesPrioritizeReplacements false If true, all tables having a replacement appear at the top of the Special:CargoTables page, instead displaying them in alphabetical order.
$wgCargoPageDataColumns [] The set of fields to store in the _pageData Cargo table. See Storing page data .
$wgCargoFileDataColumns [] The set of fields to store in the _fileData Cargo table. See Storing file data .
$wgCargoHideNamespaceName [6] Array of namespaces to hide from query results.
$wgCargoLegacyNullLuaFieldsAsEmptyString false Null results to the Lua Cargo query function should return as string rather than nil. This allows you to rollback a breaking change from early 2022. New wikis created after this time should not enable this.
$wgCargoStoreUseTemplateArgsFallback true Enable the behavior that looks for template arguments that match the template's declared table to fill columns.


यह भी देखें

  • Manual:Managing data in MediaWiki – एक सिंहावलोकन और तुलना।
  • DynamicPageList – पृष्ठों से डेटा निकालने की अनुमति देता है।
  • Semantic MediaWiki – पृष्ठों के भीतर डेटा के भंडारण और पूछताछ की अनुमति देता है।
  • WikiDB – सिमेंटिक गुणों के समान कुछ डेटाबेस सुविधाएँ प्रदान करता है।
  • Wikibase – के भाग के रूप में संरचित डेटा का प्रतिनिधित्व और हेरफेर करने की अनुमति देता है विकिडाटा परियोजना.