doesliverpool / weeknote-generator Goto Github PK
View Code? Open in Web Editor NEWCollects reports of #weeknotes and collates them into a blog post
Collects reports of #weeknotes and collates them into a blog post
It doesn't pick up the image from tweets with links to Flickr, e.g. https://twitter.com/huffeec/status/614915699748810753. It should.
Now we've got Slack channels for DoES, we should pull #weeknotes from there, like we did for IRC.
We should add an id='section-name'
to each of the h3
tags to let people point to specific sections in the weeknotes by adding #section-name
to the end of the URL.
With the setup in #31 requiring a few different operations to be run regularly, rather than just the "collect info and create draft blog post" setup, it'd be good to move it into Docker
so we can easily deploy it alongside optimism
. (That also gets it off my server and onto DoES-owned infrastructure).
Currently there's no metric on how many issues have been updated in the past week (only new + closed). Could we add a metric in the issue summary line, for example:
Summary: 170 open (N modified), 316 closed
Where N is number updated within past week. Should just be a case of including the updated
search term in to query used for new tickets.
Ruby kinda melts my brain otherwise I'd submit a PR for this.
If there's too much activity on the Somebody Should list (can there ever be too much activity on it...?!) then we hit the API rate-limit.
https://developer.github.com/v3/#rate-limiting apparently tells us how to switch to authenticated access, which gives us a better rate-limit.
It seems 34sp.com have installed some "helpful" anti-phishing scanning software, so the emailed weeknotes have started containing annoying warnings about some of the links. My guess is that the links don't match the link text, BICBW.
Specifically this tweet:
https://twitter.com/mcknut/status/576422500130811904
On this weeknotes:
http://doesliverpool.com/weeknotes/week-197-strange-new-machines-and-floating-robots/
Now we can get 280 character tweets (and actually since they started moving people being replied to, URLs, and media into extended attributes) we don't see all of the included text in the blog post.
We should update the code to pull things out correctly.
When someone weeknotes a URL, Twitter often decides to truncate the version that's displayed. That seems to be the version that's used for both the display and the href in the generated HTML for the weeknotes, which means that those links don't work.
Assuming it's possible to run the relevant search on Twitter, it would be good to pick up any tweets marked with #weeknotes from anyone we're following (or anyone on a given Twitter list?).
That will, for example, let me reuse the script for @mcqn_ltd weeknotes without having to tweet everything twice to different twitter accounts, and will make it easier to explain how to get things onto the weeknotes (as we can assume most people likely to add weeknotes are being followed by @DoESLiverpool)
e.g. Mastodon
If the @DoESLiverpool account tweets itself and doesn't include @DoESLiverpool in the tweet (so just #weeknotes) then those tweets aren't caught and included at present. They should be.
Needs to generate the list of upcoming events from pulling in the DoES Liverpool google calendar.
Instagram have put the "app" which accesses their API into their "sandbox" mode, because they've decided to change how their API access works but didn't deign to use the email address they already had to, y'know, actually inform the people using the API that they'd be effectively turning off access to it on 1st June.
So we need to submit the app for review, but before we can do that, we need to provide a link to a privacy policy... (and so will need to write a privacy policy...)
We're getting lots of retweets of our individual weeknote entries now (Yay!), which means there are lots of duplicates to remove from the blog post.
Would be good to spot ones that are just pure RTs, without any differing content, and omit them from the list. We can't just look for "RT", as sometimes they'll be a manual retweet with "#weeknotes" added...
The tweets https://twitter.com/DoESLiverpool/status/658954080346337280 and https://twitter.com/cheapjack/status/660412054793289728 have multiple images, but they didn't all get through to the weeknotes.
If you open a private window in Firefox (just in case you're logged into Twitter, which doesn't seem to always show the problem) then it will block the images when you view the weeknotes:
If you open the web console you'll see:
Looks like it depends on the user's tracking protection setting (that's set to strict on private windows, which is why that triggers it, but other users might have that set similarly in non-private windows) - https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Privacy/Tracking_Protection
Should be set up so it runs on a cron-job each Monday, and then either emails the results (for easy cut-and-paste) or generates a draft blog post and emails [email protected] (which will need creating) to remind someone to post them :-)
Some events in the calendar have their name enclosed in quotes, like "Friends of the Earth". This is so their name shows up properly on DoorBot. The weeknote generator should strip them out, because it doesn't need the "grouping"
At present the weeknotes have been running from one of my servers. Now we're going to be serving images too it really should (rather than just should) be on DoES infrastructure.
The server being used by optimism
might as well do double-duty; particularly once #33 is done.
e.g. http://doesliverpool.com/weeknotes/week-113-much-project-building/ includes the Velociraptor image twice. Parser should notice this and suppress subsequent uses.
We have an event on currently that repeats on Tuesday, Wednesday, Thursday and Friday each week. It's currently showing in the week notes just on the Tuesday.
Can use the ruby code at http://www.mcqn.com/cgi-bin/weeknotecalc to do so.
Some of the times for events (but not all) show up in UTC rather than local time - for example, in this week's weeknotes the Maker Night time was correct, but the Artists' Network event was an hour out.
Looking at the ical feed, it seems that the incorrect events don't have a timezone value set.
Either pick the oldest issue, or a random open issue. Could even be the "Issue of the week" inviting people to swarm on it. Or multiple issues, or the script picks multiple issues but "the editor" (hello @amcewen ) can triage.
A message about how to send content for publishing on the website for DoES community members should be included at the end of each post.
Twitter have changed their API to one which changes how multiple images are attached. This means that at present multiple images get included as a URL in the end of the tweet, rather than pulled out and included inline in the blog post.
https://dev.twitter.com/overview/api/upcoming-changes-to-tweets details the changes, but I couldn't get a quick fix to sort it. It might get fixed with an update to the Twitter gem, but I don't know when that will happen (obv. we could work out the fix and then send a pull request too...)
Entries in the events calendar that are marked as "Private" are missing some of their details when they show up (just as busy) in the public ical feed.
That causes the script to fail when creating the WeeknoteEvent
. On line 42 of weeknote_event.rb
:
html = html + "\n<td><a href=\""+ical_ev.description+"\">"+ical_ev.summary.gsub('"', '')+"</a></td>"
Because ical_ev.description
is nil
. summary
is set to "Busy".
We should skip any such events, rather than crash 😁
To raise the visibility of the things-that-need-doing, we should try adding the open/closed issue count, and ideally "opened this week" and "closed this week" to the blog post.
See https://developer.github.com/v3/issues/ for some of the relevant Github API documentation, although
curl -i "https://api.github.com/repos/doesliverpool/somebody-should"
gives a chunk of JSON containing the basic counts (appending /issues to that give you JSON of all the issues)
At least some images are using http://
, would be better to use https://
URLs where possible. I looked at the code and did notice a hardcoded http://
but I wasn't sure just changing that would be appropriate and I was a bit overwhelmed by the config file!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.