[fgX] Feeder Extended [Deleted]

farang

Well-known member
farang submitted a new resource:

[fgX] Feeder Extended - Auto translate your imported RSS Feed news using Google Translate.

If your sites language differs from the RSS Feed that you import news from, you may want to translate the imported feed items before publishing them. That is a tedious and time consuming work. One service that can help is, of course, Google Translate. With this add-on it can be done automatically which should save you some time.

After installing this add-on you will be able to specify the source language of each RSS feed as well as the...

Read more about this resource...
 
Last edited:
GOOGLE TRANSLATE API
To use this add-on for auto translations, you need to create a project on Google Cloud Platform.

If you don't already have one, you need to create a Google Account.

Then create a project in the Google Cloud Platform Console and enable the API.

Follow the page flow and set up the credentials. In the "New Credentials" dropdown, choose API Key. Then you choose Server key. Give the server API key a suitable name. You can write "My server API Key" or whatever you find suitable.

Then You should limit the Server API key to only accept requests from the IP address(es) of your web server(s) where your XenForo runs. If You have a interval of IP-addresses you may specify them using CIDR format. (For example you could write 201.202.203.0/24 to allow access from all the hosts in the IP range 201.202.203.1 - 201.202.203.255) Make sure this gets right or you may encounter problems to access your Server API later.

Click create and you will get the server API key. Copy that key into admin control panel-->options-->Google Integration-->Google Translate Server API key. Keep the key secret.

Then You need to create a billing account. At the time of writing this you can have a free trial (Sign up for a free trial and you'll get $300 in credit and 60 days to explore Google Cloud Platform) go to https://console.cloud.google.com/freetrial

In the blue menu there is an icon with three lines, click it to set up billing. If that's not working go to https://console.cloud.google.com/billing

You MUST set up billing for the API to work!

At the moment of writing this, translating a RSS entry of 300-400 characters would cost you $0.006 – $0.008.
 
Last edited:
Any thoughts about adding regex based text editing to this add-on? I'm seeking to be able to do text replacement/removal on incoming RSS feeds.
 
Any thoughts about adding regex based text editing to this add-on? I'm seeking to be able to do text replacement/removal on incoming RSS feeds.

I think it wouldn't be very difficult to add that functionality...

However, if you are willing to make the same substitutions for all posts (not only posts made by the feeder import) You can actually use my other add-on [fgX] Advanced Censoring 1.1.0 I just tried it and it works also while importing feeds. Would that be an option for You?

[fgX] Advanced Censoring 1.1.0 can be set to exclude forums so if your incoming RSS feeds are posted into a separate forum you could exclude all other forums if you wish. If that isn't good enough I can consider adding the possibility to specify a list of forum id:s after each replacement strings.

Please let me know what you think. Thanks!
 
Ist there any chance you could include an optional routine to strip out images from RSS feeds while importing? As all those images are copyrighted material this can lead to major problems, as we had to found out while importing a feed from a sports site. The photografer, who isn´t related to the sport site itself, sent us an 400 EUR invoice for the unauthorized use of his image - and as our lawyer advised us, we had to pay. Nasty trap.. :/
 
farang updated [fgX] Feeder Extended with a new update entry:

Version 1.1.0 released!

New features in version 1.1.0

Feed item replacement patterns and replacements

Feed item replacement patterns and replacements using regular expressions is an advanced function that let's you replace (or remove) text in the imported feeds title and message. You may want to remove certain words, certain links or maybe you'd like to exclude images since they are probably copyrighted material.

Read the rest of this update entry...
 
Ist there any chance you could include an optional routine to strip out images from RSS feeds while importing? As all those images are copyrighted material this can lead to major problems, as we had to found out while importing a feed from a sports site. The photografer, who isn´t related to the sport site itself, sent us an 400 EUR invoice for the unauthorized use of his image - and as our lawyer advised us, we had to pay. Nasty trap.. :/

Hi @Sperber, I agree. I believe that many site ownersare importing feeds and not aware about the copyrighted material that automatically gets republished.

Anyway, I decided to implement your requested functionality. I made it universal so it can not only strip out images. It can be used for many purposes. Try it out and let me know what you think. There are a few samples provided with the add-on that you can use to strip out images. Please let me know if you need some help.
 
Hi @Sperber, I agree. I believe that many site ownersare importing feeds and not aware about the copyrighted material that automatically gets republished.

Anyway, I decided to implement your requested functionality. I made it universal so it can not only strip out images. It can be used for many purposes. Try it out and let me know what you think. There are a few samples provided with the add-on that you can use to strip out images. Please let me know if you need some help.

Thx for implementing that needed feature. Just bought your addon and hope I can find the time to test this out this evening.
 
Thx for implementing that needed feature. Just bought your addon and hope I can find the time to test this out this evening.

Thanks! If You have any questions or stumble upon any problems please just let me know here so I can help you. :D
 
farang updated [fgX] Feeder Extended with a new update entry:

Version 1.2.0 released!

New features in version 1.2.0

We already had an option to specify included keywords. Now you can use a combination of included and excluded keywords.

We are adding the ability to exclude certain feed items by specifying keywords (or part of words) .

Excluded keyword filtering (optionally) filters a feed using a keyword(s), so only feed entries that doesn't contain any of the given keyword(s) will be imported. You can specify multiple keywords separated by a comma sign.

Read the rest of this update entry...
 
Will this allow me to limit the incoming article to say a paragraph or 2 ? Many times the authors don't like the whole article posted but rather a portion with a link ?
 
Will this allow me to limit the incoming article to say a paragraph or 2 ? Many times the authors don't like the whole article posted but rather a portion with a link ?

Good idea @Mark87

A replacement pattern like
Code:
"/^(.{1,200}[^\s]*).*$/s", "$1"
will limit the length of the feed item text to 200 characters. There is a problem with that though... The feed item text may contain HTML tags for links and images. Unless those are removed first, the replacement will break those tags.

It can probably be made in several steps. The following code example will remove all HTLM anchors (links) (and any images within them), all other image tags, and after that is done, truncate the text to a maximum of 200 characters.

Code:
"/<a.+<\/a>/iU", ""
"/<img.+>/iU", ""
"/^(.{1,200}[^\s]*).*$/s", "$1"

That might do the job and if your feed provider is using other html tags the can be removed in a similar way.

If you enter the above code in the text box "Feed item replacement patterns and replacements", click Save Feed, Edit the feed again and click "Preview Feed Entry" You will see how a sample imported feed item will look like. Repeat that many times.

I see the need though to simplify this. Thanks to you, I've got some ideas for future versions of this add-on.
  • Option to specify max number of sentences. Truncation at sentence breaks.
  • Option to specify max number of words. Truncation at word breaks.
  • Option to specify a max character length. Truncating to a maximum length
  • Option for minimum length. Excluding feed items that are too short. (Maybe as a result of replacements)
If You decide to try this add-on out and you have some questions, please don't hesitate to post them here. :D
 
Last edited:
If you add a max number of words incoming to the add on I am in. That's something I really need. Thank you for responding (y)
 
If you add a max number of words incoming to the add on I am in. That's something I really need. Thank you for responding (y)

I've actually already started to implement the ideas that You gave me. I think that I will be able to release a new version of this add-on tomorrow with the following options:
  • Option to specify a max feed item text length (per feed). (Words and HTML tags will be respected and will not be cut off) (HTML code will not be counted into the text length)
  • Option to specify a minimum feed item text length.
  • Option to specify ellipses if text was truncated. Typically 3 dots "..."
Feed title length is not included when determining the text length. The text length will be determined after that any "Feed item replacements" has been made but before translation (if specified).

Edit: The text length will be determined BEFORE that any "Feed item replacements" has been made AND before translation (if specified).
 
Last edited:
I've actually already started to implement the ideas that You gave me. I think that I will be able to release a new version of this add-on tomorrow with the following options:
  • Option to specify a max feed item text length (per feed). (Words and HTML tags will be respected and will not be cut off) (HTML code will not be counted into the text length)
  • Option to specify a minimum feed item text length.
  • Option to specify ellipses if text was truncated. Typically 3 dots "..."
Feed title length is not included when determining the text length. The text length will be determined after that any "Feed item replacements" has been made but before translation (if specified).
Wow that is huge. Please let me know once there has been an updated version and I will buy it. We want to feed from English site and translate to indonesia. Pf course we will need to manually do some revision

Thank you for this great idea!
 
farang updated [fgX] Feeder Extended with a new update entry:

Version 1.3.0 released!

New features in version 1.3.0

  • Minimum feed item character count. Feed items with text shorter than the specified minimum length will be excluded from the import.

  • Maximum feed item character count. Feed items with text longer than the specified maximum length will be truncated.

  • Option to specify a suffix that will be added after the feed item text if it gets truncated.

Read the rest of this update entry...
 
Thanks, just purchased :-)
Can anyone please help me with formatting the replacement pattern to change:
12023289-thumb.jpg" width="90" height="60" />
to
12023289.jpg" />
 
Back
Top Bottom