Opened 2 years ago

Closed 21 months ago

#26763 closed enhancement (wontfix)

Generate tweets from Metrics news feed

Reported by: irl Owned by: irl
Priority: High Milestone:
Component: Archived/Metrics Bot Version:
Severity: Normal Keywords:
Cc: hiro, metrics-team Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Now that there is an ATOM feed, we can syndicate this via the metrics-bot accounts.

https://metrics.torproject.org/news.atom

Child Tickets

Change History (7)

comment:1 Changed 2 years ago by irl

Cc: metrics-team added
Owner: changed from metrics-team to irl
Status: newaccepted
Type: defectenhancement

Will look at this this week.

comment:2 Changed 2 years ago by irl

Cc: hiro added; irl removed
Status: acceptedneeds_information

This is an excellent candidate for implementation using Huginn, which hiro has a machine for on greenhost.

For now, setting to needs_information until the details of the machine are available to set this up.

comment:3 Changed 2 years ago by irl

Status: needs_informationaccepted

Will look at this this week. hiro has provided me with details for a Huginn instance.

comment:4 Changed 2 years ago by irl

Ok, so I've come up with the following two agents that should consume the RSS feed and create nicely formatted tweets.

The formatter should always truncate titles so that tweets are never more than 280 chars. When it does this it should add an ellipsis.

{
  "schema_version": 1,
  "name": "tor-metrics",
  "description": "Pipeline for Tor Metrics events",
  "source_url": false,
  "guid": "eebb7901f99b08495379a92d32e11cb5",
  "tag_fg_color": "#ffffff",
  "tag_bg_color": "#5bc0de",
  "icon": "tachometer",
  "exported_at": "2018-07-31T14:42:06Z",
  "agents": [
    {
      "type": "Agents::EventFormattingAgent",
      "name": "Tor Metrics News Tweet Formatter",
      "disabled": false,
      "guid": "6afc600330eda3301787876417d9204b",
      "options": {
        "instructions": {
          "message": "News entry added for {{last_updated | date:\"%d %b\"}}: {{title | truncate:200}} https://metrics.torproject.org/news.html",
          "agent": "{{agent.type}}"
        },
        "matchers": [

        ],
        "mode": "clean"
      },
      "keep_events_for": 0,
      "propagate_immediately": false
    },
    {
      "type": "Agents::RssAgent",
      "name": "Tor Metrics News",
      "disabled": false,
      "guid": "a97c03cd19c1b6a4bf9b4e7a2fb109d1",
      "options": {
        "expected_update_period_in_days": "10",
        "clean": "false",
        "url": "https://metrics.torproject.org/news.atom"
      },
      "schedule": "every_1h",
      "keep_events_for": 0
    }
  ],
  "links": [
    {
      "source": 1,
      "receiver": 0
    }
  ],
  "control_links": [

  ]
}

hiro: Does this look reasonable to you?

I think I'll let it run for a while to see how it updates when we update the feed before plugging the Twitter account into it.

comment:5 Changed 21 months ago by notirl

Priority: MediumHigh

Need to check if this was working.

comment:6 Changed 21 months ago by irl

There seems to be unicode errors in the output, so this wasn't working great.

comment:7 Changed 21 months ago by irl

Resolution: wontfix
Status: acceptedclosed

This concludes the experiment, I think for now we don't have the capacity to get this going.

Note: See TracTickets for help on using tickets.