项目作者: olegsu

项目描述 :
Sync RSS feed to targets
高级语言: Go
项目地址: git://github.com/olegsu/rss-sync.git
创建时间: 2020-05-04T15:21:55Z
项目社区:https://github.com/olegsu/rss-sync

开源协议:

下载


RSS-Sync

RSS-Sync will sync you rss feed into support targets (Trello atm).
I use it as to sync my favourite podcasts and add them to my Trello board so I dont forget to listen.

  • The input to the program is feed.yaml file that describes the rss, targets and the binding between them [FEED].
  • It uses go template as templat engine together with gomplate to extend the functionality
    • {{ .feed }} - to access the feed tol level properties as it parsed using gofeed (items are removed)
    • {{ .item }} - to access the current rss item that matched to the filters
    • {{ .source }} - to access the current source from feed.yaml
    • {{ .binding }} - to access the current binding from feed.yaml
    • {{ .target }} - to access the current target from feed.yaml
  • open-integration pipeline - read more about open-intergration

For example:

  1. targets:
  2. # Unique name of the target
  3. - name: This Week List
  4. trello:
  5. # Trello API token - https://trello.com/app-key
  6. token: '{{ env.Getenv "TRELLO_TOKEN" }}'
  7. # Trello application ID - https://trello.com/app-key
  8. application-id: '{{ env.Getenv "TRELLO_APP_ID" }}'
  9. # Trello board id - get it from the URL
  10. board-id: '{{ env.Getenv "TRELLO_BOARD_ID" }}'
  11. # Trello list id - get if from https://trello.com/b/{board-id}.json
  12. list-id: '{{ env.Getenv "TRELLO_LIST_ID" }}'
  13. # Data about the card to be created
  14. card:
  15. title: '[{{ .source.name }}] Listen to: {{ .item.title }}'
  16. description: "{{ .feed.title }}\nLink: {{ .item.link }}\nDescription: {{ .item.description }}"
  17. # Lables ID's
  18. labels: []
  19. sources:
  20. # Unique name of the target
  21. - name: Making History
  22. # RSS feed url
  23. url: https://www.ranlevi.com/feed/mh_network_feed
  24. # set of filter to run on each RSS item
  25. # all the filter must to pass in order to pass the item to the target
  26. filter:
  27. # name of the filter can be anything
  28. # the value must be "true" at the end of the templating process in order to consider the filter as successful
  29. # only items that been released in the last 24 hours
  30. just-released: '{{ ((time.Now).Add (time.Hour -24)).Before (time.Parse "Mon, 02 Jan 2006 15:04:05 -0700" .item.published) }}'
  31. # In some cased the RSS feed is username-password protected
  32. # auth:
  33. # username: '{{ env.Getenv "USERNAME" }}'
  34. # password: '{{ env.Getenv "PASSWORD" }}'
  35. # binding between rss and target
  36. bindings:
  37. - name: Making History
  38. rss: Making History
  39. target: This Week List