{"id":1052,"date":"2016-08-14T23:04:22","date_gmt":"2016-08-15T06:04:22","guid":{"rendered":"http:\/\/technofovea.com\/blog\/?p=1052"},"modified":"2016-08-14T23:04:22","modified_gmt":"2016-08-15T06:04:22","slug":"python-script-easily-import-screenshots-to-steam","status":"publish","type":"post","link":"http:\/\/technofovea.com\/blog\/archives\/1052","title":{"rendered":"Python script: Easily import screenshots to Steam"},"content":{"rendered":"<p>Recently I wanted to upload some very old TF2 screenshots with Steam&#8217;s screenshot-tool, only to realize that it isn&#8217;t as simple as dropping them into a folder. You&#8217;ve got to rename them correctly, generate thumbnails, and (sometimes) restart the Steam-client so it sees them. Rather than manually making dozens of specially-named thumbnails, I decided to automate it. Fortunately I already had the Python Imaging Library installed, which makes the thumbnail-generation easy.<\/p>\n<p>I&#8217;ve uploaded the script to <a href=\"https:\/\/gist.github.com\/DHager\/7cbc02e78ee6a186f6829c8af71db22f\">this Github gist<\/a>.<\/p>\n<p>Assuming you have Python and PIL, just drop the script into the Steam screenshots folder you want to populate, for example <code>C:\\Program Files\\Steam\\userdata\\{userid}\\780\\remote\\{gameid}\\screenshots\\<\/code>. Then you can just drag-and-drop image files onto it (or pass them as command-line arguments) and it will do the rest. (<code>780<\/code> is the app-id for the Steam screenshot tool.)<\/p>\n<p><a href=\"http:\/\/technofovea.com\/blog\/wp-content\/uploads\/2016\/08\/blogpost1.png\"><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-1120\" src=\"http:\/\/technofovea.com\/blog\/wp-content\/uploads\/2016\/08\/blogpost1-300x131.png\" alt=\"Steam Screenshot Migrator\" width=\"300\" height=\"131\" srcset=\"http:\/\/technofovea.com\/blog\/wp-content\/uploads\/2016\/08\/blogpost1-300x131.png 300w, http:\/\/technofovea.com\/blog\/wp-content\/uploads\/2016\/08\/blogpost1-768x335.png 768w, http:\/\/technofovea.com\/blog\/wp-content\/uploads\/2016\/08\/blogpost1.png 898w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"http:\/\/technofovea.com\/blog\/wp-content\/uploads\/2016\/08\/blogpost2.png\"><img loading=\"lazy\" class=\"aligncenter size-medium wp-image-1121\" src=\"http:\/\/technofovea.com\/blog\/wp-content\/uploads\/2016\/08\/blogpost2-300x77.png\" alt=\"Steam Screenshot Migrator\" width=\"300\" height=\"77\" srcset=\"http:\/\/technofovea.com\/blog\/wp-content\/uploads\/2016\/08\/blogpost2-300x77.png 300w, http:\/\/technofovea.com\/blog\/wp-content\/uploads\/2016\/08\/blogpost2.png 677w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Once the new files exist, you may need to restart Steam for it to notice. Unfortunately, all the effort of preserving the original date-information doesn&#8217;t seem to matter after uploading: Only an &#8220;uploaded on&#8221; date is visible through Steam&#8217;s website. Oh well, at least my local records are in-order.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I wanted to upload some very old TF2 screenshots with Steam&#8217;s screenshot-tool, only to realize that it isn&#8217;t as simple as dropping them into a folder. You&#8217;ve got to rename them correctly, generate thumbnails, and (sometimes) restart the Steam-client so it sees them. Rather than manually making dozens of specially-named thumbnails, I decided to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10,4],"tags":[26,32],"_links":{"self":[{"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/posts\/1052"}],"collection":[{"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/comments?post=1052"}],"version-history":[{"count":9,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/posts\/1052\/revisions"}],"predecessor-version":[{"id":1124,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/posts\/1052\/revisions\/1124"}],"wp:attachment":[{"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/media?parent=1052"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/categories?post=1052"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/technofovea.com\/blog\/wp-json\/wp\/v2\/tags?post=1052"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}