<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tessercat.net/index.php?action=history&amp;feed=atom&amp;title=Download_Publisher_Logos</id>
	<title>Download Publisher Logos - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tessercat.net/index.php?action=history&amp;feed=atom&amp;title=Download_Publisher_Logos"/>
	<link rel="alternate" type="text/html" href="https://wiki.tessercat.net/index.php?title=Download_Publisher_Logos&amp;action=history"/>
	<updated>2026-04-08T01:00:22Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://wiki.tessercat.net/index.php?title=Download_Publisher_Logos&amp;diff=14280&amp;oldid=prev</id>
		<title>Steve: added brief description and the code</title>
		<link rel="alternate" type="text/html" href="https://wiki.tessercat.net/index.php?title=Download_Publisher_Logos&amp;diff=14280&amp;oldid=prev"/>
		<updated>2022-12-09T17:26:10Z</updated>

		<summary type="html">&lt;p&gt;added brief description and the code&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This script will download a copy of each publisher's logo on the Regional Data Center.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python3&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/python3&lt;br /&gt;
# Download logo images into the current directory for all publishers &lt;br /&gt;
#   on the WPRDC data portal.&lt;br /&gt;
&lt;br /&gt;
import requests&lt;br /&gt;
&lt;br /&gt;
ORG_LIST_URL = 'https://data.wprdc.org/api/3/action/organization_list'&lt;br /&gt;
ORG_DATA_URL = 'https://data.wprdc.org/api/3/action/organization_show'&lt;br /&gt;
&lt;br /&gt;
orgs = requests.get(ORG_LIST_URL).json()['result']&lt;br /&gt;
&lt;br /&gt;
for org in orgs:&lt;br /&gt;
  print(org, end='')&lt;br /&gt;
  org_data = requests.get(f'{ORG_DATA_URL}?id={org}').json()['result']&lt;br /&gt;
  if &amp;quot;image_display_url&amp;quot; in org_data:&lt;br /&gt;
    img_url = org_data['image_display_url']&lt;br /&gt;
    r = requests.get(img_url)&lt;br /&gt;
    file_ext = org_data['image_url'].split('.')[-1]&lt;br /&gt;
    file_name = f&amp;quot;{org}.{file_ext}&amp;quot;&lt;br /&gt;
    print('.' + file_ext, ' ✅')&lt;br /&gt;
    with open(file_name, 'wb') as f:&lt;br /&gt;
      f.write(r.content)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Steve</name></author>
	</entry>
</feed>