User talk:Vexations/list sources

From WikiProjectMed
Jump to navigation Jump to search

@ThatMontrealIP and Mtheletter: you asked how to print a list of all the sources in an article using a Python script? This is a basic example. The way I use it is (assume I've called the script sl):

sl Artemisia Gentileschi | xargs open

I use it for all kinds of things, like finding duplicate citations with

 sl Artemisia_Gentileschi | sort | uniq -d

Note that the title needs to be in quotes if it includes brackets or quotes. For example

 sl "Susanna and the Elders (Artemisia Gentileschi, Pommersfelden)"

Have fun. Vexations (talk) 18:22, 12 June 2020 (UTC)[reply]