PetScan/it: Difference between revisions
Content deleted Content added
Updating to match new version of source page |
Updating to match new version of source page |
||
(38 intermediate revisions by 2 users not shown) | |||
Line 1:
<languages/>
{{2022 Coolest tool award|PetScan|Reusable|float=right}}
[https://petscan.wmflabs.org/ PetScan] è un potente strumento di interrogazione. L'interrogazione viene preparata tramite sottomissione di un modulo a PetScan. Inoltre, potete verificare le [http://magnusmanske.de/wordpress/?p=385 motivazioni sottese a questo strumento].
<span id="Introduction"></span>
=== Introduzione ===
PetScan
<span id="Pages_from_Wiki(m/p)edia"></span>
====Pagine da Wiki(m|p)edia====
Queste pagine sono definite nelle sezioni "Categorie", "Proprietà pagina" e "Template e collegamenti". Puoi cercare pagine in base alla loro categoria, all'utilizzo di specifici template, ai link da o verso specifiche pagine; poi filtrare i tuoi risultati limitandoli a certi namespace, alle modifiche di bot o di umani, in base alla data della modifica più recente o della creazione della pagina ecc. Queste tre sezioni rappresentano le vecchie funzionalità di CatScan2. Il risultato dell'interrogazione è quindi definito come "sorgente categoria".
<span id="Other_sources"></span>
====Altre sorgenti====
In questa sezione
<span id="Wikidata"></span>
===Wikidata===
In questa sezione
====Output====
Qui
<span id="Defining_your_query"></span>
===Definire la richiesta===
I campi che possono essere impostati nel modulo per
{| class="wikitable"
! Campo
Line 36 ⟶ 37:
! Nota
|-
| Lingua ||
|-
| Progetto || Il progetto Wikimedia
|-
| Profondità || Profondità dell'albero delle categorie in cui cercare. "0" significa escludere le sottocategorie. || "0" ||
|-
| Categorie || Lista delle categorie, una per riga senza il prefisso "category:". || Vuoto || <span class="mw-translate-fuzzy">Apporre <nowiki>"|"</nowiki> e un numero di fianco al nome di una categoria stabilirà la profondità per questo singolo albero delle categorie, sovrascrivendo la profondità scelta nel campo Profondità</span>
|-
| Categorie da escludere || Lista di categorie, come sopra. Saranno accettate soltanto le pagine che non sono incluse in queste categorie.
Line 48 ⟶ 49:
|-
| Combinazione || Come devono essere usate le categorie di cui sopra:
* Lista della categorie: Elenca le sottocategorie
* Intersezione: Tutte le pagine che sono in tutti gli alberi delle categorie
* Unione: Tutte le pagine che sono in almeno un albero delle categorie
* Differenza: Tutte le pagine che sono soltanto in uno degli alberi delle categorie
* Almeno (N): Tutte le pagine che sono in almeno N alberi delle categorie
Al momento le opzioni disponibili sono "
| "
|-
| Namespace || I namespace da usare come potenziali pagine || (
|-
| Redirect || || Entrambi ||
Line 63 ⟶ 65:
* Box 2: contengono uno dei template forniti
* Box 3: non contengono alcuno dei template forniti
| Vuoto || Questa opzione sembra essere compatibile soltanto coi template definiti nel namespace "
|-
| Link in ingresso || || ||
Line 82 ⟶ 84:
| Ordina || Funzionalità non ancora disponibile, che stabilirebbe i criteri di ordinamento per l'output. || ||
|-
| Lista manuale || Permette di fornire una lista di pagine (precedute dal prefisso del namespace) o di elementi di Wikidata da un determinato progetto || || <div class="mw-translate-fuzzy">
È importante usare i codici corretti per specificare i progetti: * Wikipedia in italiano: "itwiki"
* Wikisource in italiano: "itwikisource" o "itwikisourcewiki"
* Wikinews in italiano "itwikinews"
* Wikidata: "wikidatawiki"
</div>
|-
| Wikidata || Ottieni l'elemento Wikidata, se disponibile. || ||
|-
| Formato || Formato
| ||
|-
Line 96 ⟶ 100:
|-
|}
===Know-how===
<span id="PetScan_ID_(PSID)"></span>
====PetScan ID (PSID)====
Line 112 ⟶ 116:
* Il link interwiki [[:petscan:]] può essere usato per generare scorciatoie a interrogazioni permanenti, ad esempio <nowiki>[[petscan:</nowiki>''PSID''<nowiki>]]</nowiki>
<span id="Create_Wikidata_items_for_Wikipedia_articles_that_don't_have_one_yet_(Creator_functionality)"></span>
==== Creare elementi di Wikidata per voci di Wikipedia che ne sono prive (funzionalità Creator) ====
* Creare un'interrogazione che dia come risultato una lista di pagine di Wikipedia (o di un altro progetto diverso da Wikidata), oppure incollare una lista in "Altre sorgenti/Lista manuale"
* <s>Nella sezione "Proprietà pagina" selezionare "Redirect=No"</s> ''Questo ora è fatto automaticamente; puoi modificarlo se davvero vuoi dei redirect nella tua lista!''
* Nella sezione "Wikidata", selezionare "Solo pagine senza elemento" per l'opzione "Pagine ed elementi"
* Eseguire l'interrogazione
* I risultati avranno degli elementi aggiuntivi a fianco all'intestazione "Risultati" (a meno che non si abbia ancora compiuto l'accesso a [https://tools.wmflabs.org/widar/ WiDaR], nel qual caso si vedrà invece il link apposito)
* Tutte le pagine per le quali non c'è un esatto abbinamento in alcuna etichetta o alias su Wikidata sono segnate di default con una spunta.
* Si può aggiungere o rimuovere la spunta manualmente, se necessario.
* Si possono aggiungere delle dichiarazioni di default nel box relativo alle dichiarazioni; queste saranno aggiunte a tutti i tuoi nuovi elementi. Ad esempio, per creare soltanto elementi relativi a persone, aggiungere "P31:Q5". Si possono aggiungere più dichiarazioni in questo modo (una per riga). Nota: è necessario che P e Q siano maiuscole - altrimenti le dichiarazioni non verranno aggiunte (senza alcuna notifica esplicita).
* È possibile aggiungere descrizioni di default per i nuovi elementi, come ad esempio <syntaxhighlight lang="text" inline>Dde:"some description"</syntaxhighlight> per una descrizione in tedesco.
*
* Per eseguire la ricerca direttamente nel browser, cliccare "Esegui", oppure "Esegui in background" per eseguirla da un server Wikimedia. Vedi [[d:Special:MyLanguage/Help:QuickStatements|Help:QuickStatements]] per ulteriori informazioni.
{{mbox|type=delete|text=
<span id="Add/remove_statements_for_Wikidata_items"></span>
==== Aggiungere/togliere dichiarazioni agli elementi Wikidata ====
<div lang="en" dir="ltr" class="mw-content-ltr">
==== Referrer ====
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
''(V2 only)'' If you open PetScan from another tool to let the user create a query, you can pass the <code>referrer_url</code> and <code>referrer_name</code> (defaults to <code>referrer_url</code>) parameters. <code>referrer_url</code> should have a <code>{PSID}</code> string which will be replaced with the PSID the user sees. Once a query was run, a box at the top of the page will prompt the user to return to the original tool, using the PSID-modified <code>referrer_url</code>.
</div>
<span id="Examples"></span>
===Esempi===
<span id="Articles_in_a_WikiProject"></span>
===='''Voci in un progetto'''====
<div lang="en" dir="ltr" class="mw-content-ltr">
A request on the Talk page of this Manual: Find all mainspace articles within "WikiProject UK geography". Starting with a default PetScan submission form, just add "WikiProject UK geography" to the first box of the Templates row, and, just below, select "Use talk pages instead". ''[https://petscan.wmflabs.org/?templates_yes=WikiProject+UK+geography&templates_use_talk_yes=1 Here is the query filled out.]'' Hit "Do it!" at bottom. When run on 16 August 2015, the query required 1.5 seconds to run, and yielded a list of 21,408 articles. The list appears BELOW the submission form (which remains on your screen), so you have to scroll down to see the results.
</div>
<span id="Dablinks_within_a_WikiProject"></span>
===='''Link ambigui in un progetto'''====
<div lang="en" dir="ltr" class="mw-content-ltr">
Editors working on disambiguation seek to enlist members of a content area WikiProject, specifically WikiProject Canada, to help. A PetScan report is designed to find all articles having ambiguous links that are within the given WikiProject. Criteria applied:
::::#Articles having ambiguous links are within "Category:All articles with links needing disambiguation", so paste "All articles with links needing disambiguation" into the PetScan Categories field.
::::#Depth is set arbitrarily to 9, meaning that articles as far as 9 subcategories down from the "needing disambiguation" parent category will be found. (Searching to that depth is not necessary in this case but doesn't hurt.)
Line 156 ⟶ 169:
:::*When submitted on 16 August 2015, the query took 31 seconds to run, and results were a list of 255 articles. The results show BELOW the PetScan submission form, which remains in place, so you may see no change on your screen. You have to know to scroll down to find the results! That request was run with default Output format "HTML".
:::*To obtain the results in a Wikitable, in order to share them at a subpage of the WikiProject, the request could be revised to select Format "WIKI". This time the results, in wikitable markup, replace the PetScan submission form on your screen.
:::*To make a more useful list for disambiguators, set up so that DabSolver will open up on any item clicked, a several step process can be followed. Here the results were saved to Tab-Separated format instead, then brought into Excel, then a column was composed which concatenated simple text strings with the results, then that resulting column was copy-pasted. The results were pasted over to the English language Wikipedia page [[w:Wikipedia:Canadian Wikipedians' notice board/ArticlesNeedingDisambiguation2015-08-17]] and were posted also within a scrolling window in [[en:Wikipedia_talk:Canadian_Wikipedians'_notice_board#help_needed_on_ambiguous_links_in_wp:Canada_articles|discussion at the WikiProject Canada talk page]]. <span class="mw-notalk">--[[User:Doncram|Doncram]] ([[User talk:Doncram|talk]]) 19:50, 24 August 2015 (UTC)<small> link adjusted. [[User:DexDor|DexDor]] ([[User talk:DexDor|talk]]) 06:58, 29 March 2016 (UTC)</small></span>
</div>
<span id="Detecting_pages_that_have_an_anomalous_combination_of_namespace_and_category/ies"></span>
====Individuare pagine che hanno combinazioni anomale di namespace e categorie====
<div lang="en" dir="ltr" class="mw-content-ltr">
PetScan can be used to find pages that are in a category (or combination of categories) that is not appropriate for pages in a particular namespace - e.g. Wikipedia administration pages that are in a category that should only contain encyclopedic articles. This can then be fixed (e.g. by moving an article to the correct namespace or by editing a discussion to insert a missing ":" where a category is being referred to). The first step in this process is to identify (using PetScan) categories that cause incorrect categorization (e.g. Wikipedia administration categories that are in article categories).
</div>
<span id="Find_uncategorized_photo_contributions_in_Commons_in_a_given_language"></span>
====Trovare foto non categorizzate su Commons in una certa lingua====
<div lang="en" dir="ltr" class="mw-content-ltr">
(Based on [[Grants:Learning patterns/Treasures or landmines: detecting uncategorized, language-specific uploads in Commons]]. See the motivation and full explanation there! Thank you to wikimedia user [[User:Spiritia]] and other contributors/commenters there for contributing this! )
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
Run a query using PetScan with the following settings:
</div>
<!--- begin Query copied from the Grant page, then adapted --->
Line 172 ⟶ 194:
Project = wikimedia
Depth = 1
Categories = <span lang="en" dir="ltr" class="mw-content-ltr">Uncategorized files</span>
Combination = ☑ Subset
Namespaces = ☑ File
Templates : Has all of these templates = <
Format: ☑ Extended data for files ☑ File usage data
<!--- end Query --->
<div lang="en" dir="ltr" class="mw-content-ltr">
The English language code is "en"; the Romanian language code is "ro". To find uncategorized photos uploaded by users using Romanian language, a version of the query (with html output, and without autorun) is:
</div>
:[https://petscan.wmflabs.org/?language=commons&project=wikimedia&depth=1&categories=Uncategorized+files&ns%5B6%5D=1&templates_yes=ro&ext_image_data=1&file_usage_data=1 https://petscan.wmflabs.org/?language=commons&project=wikimedia&depth=1&categories=Uncategorized+files&ns%5B6%5D=1&templates_yes=ro&ext_image_data=1&file_usage_data=1]
<div lang="en" dir="ltr" class="mw-content-ltr">
As of 15 March 2016, after hitting "run" the query requires about 105 seconds to finish, and yields 1748 uncategorized photos.
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
Notes:
#The "Language =" field is not used to select the desired language; the desired language code is set in the "Template" field instead.
#The language code is case-sensitive in the query! So for example use "ro" not "RO".
#To generate the results there, Format: ☑ Wiki was chosen, instead of the default output of Html.
</div>
Divertiti! Ancora grazie soprattutto all'[[User:Spiritia|utente Spiritia]]!
<span id="Items_with_no_statements"></span>
====Elementi senza dichiarazioni====
<div lang="en" dir="ltr" class="mw-content-ltr">
[https://petscan.wmflabs.org/?language=en&project=wikipedia&ns%5B0%5D=1&wpiu_no_statements=1&interface_language=en&active_tab=tab_wikidata The option "Has no statements"] can be used to find:
*items without statements for a category at Wikipedia (sample: [https://petscan.wmflabs.org/?language=en&project=wikipedia&depth=1&categories=United%20States%20geography%20stubs&show_redirects=no&common_wiki=wikidata&wikidata_item=with&wpiu_no_statements=1&interface_language=en&active_tab=tab_wikidata&doit=&al_commands=P17%3AQ30 en:Category:United States geography stubs])
*items without statements for an entire Wikipedia language version (sample: [https://petscan.wmflabs.org/?language=so&project=wikipedia&ns%5B0%5D=1&show_redirects=no&wikidata_source_sites=sowiki&wikidata_label_language=so&wpiu_no_statements=1&interface_language=en&active_tab=tab_other_sources "sowiki"])
</div>
<span id="d:Help:Import_Template:Bio_from_itwiki"></span>
====[[d:Help:Import Template:Bio from itwiki|Importazione del Template:Bio da Wikipedia in italiano]]====
Passi per importare il template, alcuni usando PetScan.
<div lang="en" dir="ltr" class="mw-content-ltr">
==== Get the sitelinks for a certain project from a SPARQL query ====
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
* Indicate the project on the 'Categories' tab. E.g. <code>de</code> for '''Language''' and <code>wikipedia</code> in '''Project''' to use the German language edition of Wikipedia.
* In '''Other sources''' enter your SPARQL query
* Make sure to select '''From categories''' from the '''Use wiki''' options
* Press '''Do it'''
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
This could be useful to get the pageviews of a specific set of pages, based on a SPARQL query. You can save this to a [https://tools.wmflabs.org/pagepile/ Pagepile] (check the '''Output''' tab), then enter that Pagepile ID in [https://tools.wmflabs.org/massviews/ Massviews Analysis] (select 'Page Pile' from the '''Source''' dropdown).
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
==== Get a list of Wikidata items with exclusions based on a SPARQL query ====
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
Let's say you got a list of people with Wikidata ID's (QIDs) that you want to add an occupation (P106) of 'jewellery designer' (Q2519376) to, maybe with a tool like [https://tools.wmflabs.org/quickstatements/ QuickStatements]. However, you don't want to add this occupation to items that already ''have that occupation''. Here's how to do that with PetScan:
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
* Have your list of QIDs in a text file, with each QID on a new line
* In the tab 'Other sources', paste this text into the field called 'Manual list'
* In the form 'Wiki' enter the string <code>wikidatawiki</code>
* In the field 'SPARQL' enter your SPARQL query. In this example, this query will give all humans with an occupation of 'jewellery designer':
</div>
*: <code><nowiki>
select ?item where {
?item wdt:P31 wd:Q5;
Line 225 ⟶ 267:
}
</nowiki></code>
<div lang="en" dir="ltr" class="mw-content-ltr">
* Finally, you want to make an exclusion, so in the field 'Combination' add the string <code>manual NOT sparql</code> to get all the QIDs from the 'manual list', but ''without'' the items from the SPARQL query.
* Hit 'Do it!'
</div>
<span id="Add_your_example_here..."></span>
====Aggiungi il tuo esempio qui...=====
<div lang="en" dir="ltr" class="mw-content-ltr">
== Bug reports, feature requests, code base ==
</div>
* [https://github.com/magnusmanske/petscan_rs/ <span lang="en" dir="ltr" class="mw-content-ltr">PetScan on GitHub</span>]
<span id="See_also"></span>
== Pagine correlate ==
* [[wikitech:Nova Resource:Petscan|<span lang="en" dir="ltr" class="mw-content-ltr">Petscan project information on Wikitech</span>]]
<div lang="en" dir="ltr" class="mw-content-ltr">
== External links ==
</div>
* [https://www.youtube.com/watch?v=i7BR4ZcnzHg <span lang="en" dir="ltr" class="mw-content-ltr">Training video from EduWiki 2023</span>]
* [https://www.youtube.com/watch?v=qopYfcxYzGQ <span lang="en" dir="ltr" class="mw-content-ltr">Wiki World Heritage User Group: Capacity Building PetScan Training 2021</span>]
{{Special:PrefixIndex/{{FULLPAGENAME}}/ |hideredirects=1 |stripprefix=1}}
[[Category:PetScan]]
[[Category:Tools and scripts{{#translation:}}]]
|