惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
D
Docker
GbyAI
GbyAI
B
Blog RSS Feed
博客园 - 司徒正美
博客园 - Franky
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
AI
AI
O
OpenAI News
Attack and Defense Labs
Attack and Defense Labs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
S
Secure Thoughts
博客园 - 聂微东
L
LINUX DO - 最新话题
U
Unit 42
SecWiki News
SecWiki News
A
Arctic Wolf
Schneier on Security
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
Visual Studio Blog
量子位
The Cloudflare Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
Last Week in AI
Last Week in AI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
Latest news
Latest news

Henri Sivonen’s pages

Parin vuoden tutkimattomuus crates.io: Rust Package Registry Asiakirjatonta toimintaa It’s not wrong that "🤦🏼‍♂️".length == 7 Koulutartuntojen tilastointimenettely Perusteasiakirjoja hallussapitämättä ikärajoitettu Asiantuntijat ja nukkuva vallan vahtikoira Koronapassilausunto Suppealla tietopohjalla ohimeneväksi väitetty Text Encoding Menu in 2021 The Text Encoding Submenu Is Gone An HTML5 Conformance Checker Not Part of the Technology Stack Browser Technology Stack Bogo-XML Declaration Returns to Gecko A Look at Encoding Detection and Encoding Menu Telemetry from Firefox 86 Why Supporting Unlabeled UTF-8 in HTML on the Web Would Be Problematic Rust Target Names Aren’t Passed to LLVM Toimintamalli Activating Browser Modes with Doctype Johtopäätöksiä mallin rakenteesta Tehtävänmäärittelyä kirjoittamatta ja kuolemia laskematta laumasuojamallinnettu Character Encoding Menu in 2014 Erillissuosituksen tarpeettomuudesta yleissuosituksen poikkeukseksi? STM:n maskiaikajana Rust 2021 Oma-aloitteisesti mallinnettu Kokopinovaatimuksin kilpailutettu chardetng: A More Compact Character Encoding Detector for the Legacy Web Varauksia paisutellen tiedotettu Perusteasiakirjoitta tiedotettu Always Use UTF-8 & Always Label Your HTML Saying So IME Smoke Testing The Validator.nu HTML Parser About the Hiragino Fonts with CSS It’s Time to Stop Adding New Features for Non-Unicode Execution Encodings in C++ Rust 2020 The Last of the Parsing Quirks About about:blank Rust 2019 a Web-Compatible Character Encoding Library in Rust How I Wrote a Modern C++ Library in Rust Using cargo-fuzz to Transfer Code Review of Simple Safe Code to Complex Code that Uses unsafe A Rust Crate that Also Quacks Like a Modern C++ Library #Rust2018 No Namespaces in JSON, Please A Lecture about HTML5 Julkisesti luotettu varmenne ikidomainille TLS:ää (SSL:ää) varten -webkit-HTML5 Lists in Attribute Values The Sad Story of PNG Gamma “Correction” If You Want Software Freedom on Phones, You Should Work on Firefox OS, Custom Hardware and Web App Self-Hostablility HTML5 Parser Improvements ARIA in HTML5 Integration: Document Conformance (Draft, Take Two) Schema.org and Pre-Existing Communities Lowering memory requirements by replacing Schematron HTML5 Parsing in Gecko: A Build Introducing SAX Tree NVDL Support in Validator.nu HOWTO Avoid Being Called a Bozo When Producing XML An Unofficial Q&A about the Discontinuation of the XHTML2 WG Thoughts on HTML5 Becoming a W3C Recommendation Four Finnish Banks Training Users to Give Banking Credentials to Another Site Unimpressed by Leopard Sergeant Semantics The Content Sink Inheritance Diagram – 2006-06-30 What is EME? About Points and Pixels as Units The Performance Cost of the HTML Tree Builder Social Media Impression Management The spacer Element Is Gone Openmind 2006 Performance Mistake XHTML and Mobile Devices WebM-Enabled Browser Usage Share Exceeds H.264-Enabled Browser Usage Share on Desktop (in StatCounter Numbers) HTML5 Parser-Based View Source Syntax Highlighting Vendor Prefixes Are Hurting the Web Accept-Charset Is No More Dualroids Writing Structural Stylable Document in Mozilla Editor ISO-8859-15 on haitallinen Hourglass The Scientific Method According to Hixie Maemo Source Code Karpelan lukkovertaus ontuu Digitaalisesta arkistoinnista ARIA in HTML5 Integration: Document Conformance (Draft) XHTML—What’s the Point? (Draft, incomplete) Mac OS X Browser Comparison HOWTO Spot a Wannabe Web Standards Advocate An Idea About Intermediate Language Trees and Web UI Generation Thoughts on Using SSL/TLS Certificates as the Solution to Phishing Bureaucracy Meets the Web Europe Day HOWTO Establish a 100% Literacy Rate What to Do with All These Photos? Charmod Norm Checking Validator Web Service Interface Ideas DTDs Don’t Work on the Web EFFI’s Day in Court
Photo Group Feed
Henri Sivonen · 2011-12-22 · via Henri Sivonen’s pages

Flickr doesn’t provide feeds for private groups. It doesn’t provide feeds for comments on photos in a group, either. It is reasonable to want such feeds, so here’s a script that generates them on your HTTP server.

Installation

  1. Make sure you have Python 2.4 installed.

  2. Make sure you have Pygenx installed where Python 2.4 can find it.

  3. Make sure you have Beej’s Python Flickr API installed where Python 2.4 can find it. (My copy of Beej’s Python Flickr API has this patch applied.)

  4. Download the script. It is licensed under the MIT/expat license.

  5. Get a Flickr API key for a desktop application and the associated shared secret.

  6. Make a directory for the output of the script. This directory should be served out by your HTTP server. E.g. /path/to/www/root/directory/. Also make subdirectories /path/to/www/root/directory/feed/ and /path/to/www/root/directory/comments/feed/.

  7. Make a file at /path/to/www/root/directory/updated.txt and write a single ASCII zero (“0”) as the contents of the file. (The script doesn’t make this file for you to prevent accidental writing in directories that haven’t been prepared this way. And because I am lazy.)

  8. Limit HTTP access to the directory using HTTP Basic authentication to keep your group private.

  9. Configure your HTTP server to serve .xhtml files as application/xhtml+xml and .atom files as application/atom+xml.

  10. Add index.xhtml and index.atom as directory index file names.

  11. Edit the #! line of the script to point to your Python 2.4 interpreter.

  12. Edit the configuration variables.

    • groupId is the NSID of the group.

    • groupUrlName is the name of the group shown in the Flickr group URL, i.e. groupUrlName part in http://flickr.com/groups/groupUrlName/.

    • rootUrl is the root of the URL hierarchy for the stuff generated by the script. E.g. "http://example.com/directory/".

    • rootDir is the directory you created in step #6 above: e.g. "/path/to/www/root/directory/".

    • fetchCount is the number of latest photos to show. The technical maximum is 500 and the API TOS maximum is 30.

    • flickrAPIKey is your Flickr API key.

    • flickrSecret is the shared secret associated with your API key.

  13. Give the execute permission to the script.

  14. Run the script from the command line.

  15. Assuming that you are running the API library with my patch, copy the authorization URL to your browser, grant access and then press return on the command line to let the script continue. The authentication token will be saved.

  16. Add the script to your .crontab so that the script is run periodically.

  17. Add files /path/to/www/root/directory/style.css and /path/to/www/root/directory/comments/style.css so that the XHTML views appear to your liking. (Mine look like this: style.css for the pool view and style.css for the comments view.)

  18. Announce the URLs (see below) and the access credentials in the Flickr group description.

URLs

Assuming that your rootUrl is “http://example.com/directory/”, the URLs are:

  • http://example.com/directory/ – an XHTML view of the latest photos including titles and comment counts

  • http://example.com/directory/feed/ – an Atom feed of the latest photos

  • http://example.com/directory/comments/ – an XHTML view of the comments on the latest photos

  • http://example.com/directory/comments/feed/ – an Atom of the comments on the latest photos

Known Issues

  • Some feed readers have issues with the feeds. Not my bug. The feeds are generated according to the RFC and have been checked with Feed Validator. Makers of broken feed readers should fix their products.

  • IE doesn’t grok application/xhtml+xml. Not my bug. Known workarounds are installing MathPlayer or upgrading to Firefox or Opera.

  • The comments are the comments on the latest photos—not the latest comments. New comments on old photos don’t show up. This is to avoid the run time and number of API requests growing as the group pool gets larger.

  • Using this script with public groups may violate the Flickr API TOS by replicating Flickr-provided functionality. Don’t blame me if Flickr thinks that you are replicating “the essential user experience of Flickr.com”.