GithubHelp home page GithubHelp logo

joey-bolts / news_importer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from beechit/news_importer

0.0 1.0 0.0 103 KB

Toolset to import news from rss feeds/html content into EXT:news

PHP 92.51% HTML 7.11% CSS 0.37%

news_importer's Introduction

TYPO3 news importer (ext:news_importer)

Import news feeds into your TYPO3 CMS

Current supported resources:

  • RSS feeds (atom,rss2,etc)
  • (X)HTML pages
  • XML content

Features:

  • Supports POST request (for example to do a login request)
  • Supports sub requests (use found url in first feed to fetch content/details)
  • Can import images
  • Only import items that contain a certain keyword
  • Add default image when no image found in imported item
  • CommandController to automatically import items
  • Backend module to manual import items
  • Notification by email when new items are imported (when automatically imported)

Status:

The extension is still beta but it is used already in multiple live projects

Requirements:

  • TYPO3 => 6.2.12

Getting started

After installation of the extension:

  • Create a record "Import source" on a define page/storage. (Listview -> add -> Import source)
  • Enter the url of the desired import feed
  • Add a mapping for the items (see example mapping configurations)
  • Add news storage pid were the imported news items will be saved
  • Adjust/add other fields

After defining which items to import:

  • Create a scheduler task
  • Choose Extbase command controller
  • Select Command controller command: NewsImporter ImportNews:run
  • Adjust settings to your preferences (frequency etc)

NOTE:

  • In the import source there is an additional setting for interval!
  • Importing can also be invoked by cmdline with ./typo3cms importnews:run (typo3_console ext have to be installed)

Example mapping configurations:

Import RSS Feed as external news items:

items = item
item {
        guid = guid
        title = title
        externalurl = link
        type {
                defaultValue = 2
        }
        bodytext = description
        datetime {
                selector = pubDate
                strtotime = 1
        }
        image {
                selector = enclosure
                attr = url
        }
}

Import RSS feed with multiple images:

items = item
item {
        guid = guid
        title = title
        externalurl = link
        type {
                defaultValue = 2
        }
        bodytext = description
        datetime {
                selector = pubDate
                strtotime = 1
        }
        image {
                selector = enclosure
                attr = url
                multiple = 1
        }
}

Import custom RSS feed with multiple related links:

items = item
item {
        guid = guid
        title = title
        externalurl = link
        type {
                defaultValue = 2
        }
        bodytext = description
        datetime {
                selector = pubDate
                strtotime = 1
        }
        image {
                selector = enclosure
                attr = url
        }
        related_links {
                selector = related_link
                multiple {
                        # fetch attr href from each
                        uri = href

                        # alternative way of fetching attr value and using other mapping options
                        title {
                                attr = title
                                wrap = See also: |
                        }
                }
        }
}

Setting a default value can done by e.g. default author:

author.defaultvalue = Authorname

Todo:

Improve debug/test options for rss/html parsing/fetching

news_importer's People

Contributors

frans-beech-it avatar ruudsilvrants avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.