How to filter for string in newsbeuter then move to folder? - rss

I have 700 news feeds that I need to scan for the keyword/string "Linux" occurring in either title or the content of each new post.
I found how to filter in the docs
news docs
( title =~ "Linux" or content =~ "Linux" )
but I cannot find any indication of how to go the next step and push the message into another folder.
If possible, I am trying to work within the newsbeuter system because right now it opens up firefox perfectly for urls, I just want to avoid scrolling 700 folders.
config:
use-proxy yes
proxy yoda.server.com:3128
browser firefox
How do you filter and move and post based on string in newsbeuter?

Unfortunatelly, Newsbeuter doesn't support any kind of mass-refiling (yet), so what you're asking for can't be done.

Related

Audit Alfresco Share previews

Obsolete Alfresco documentation says:
the download or preview of content are recorded as a single read
However, with Alfresco 5+ preview does not generate any audit event (I just tried).
QUESTION: How to make Alfresco log an audit event when someone previews a document on Alfresco Share? I am not too worried about thumbnails, but at least for the "Document Details" page:
Here is my audit application configuration:
audit.alfresco-access.enabled=true
audit.tagging.enabled=false
audit.filter.alfresco-access.default.enabled=true
audit.filter.alfresco-access.transaction.type=cm:folder;cm:content
audit.filter.alfresco-access.transaction.action=CREATE|READ|UPDATE CONTENT|CHECK IN|DELETE|COPY|MOVE
audit.audit-custom.enabled=true
audit.audit-custom.sub-actions.enabled=false
Your filter for actions is not set right,
Please note that you should be using ; for separating multiple possible values, not |.
So, I think you should be able to get previews and downloads audited with:
audit.filter.alfresco-access.transaction.action=CREATE;READ;UPDATE CONTENT;CHECK IN;DELETE;COPY;MOVE
Please note also that you might want to audit one extra action : READCONTENT

How to change url_alias partially according to a pattern Drupal

How to change url_alias partially according to a pattern?
We have site with reports to users.
We continue to update the reports with new content node but the url_alias kept same.
For example,
/report/report_a
/report/report_a/subreport_1
/report/report_b
…...
Users bookmark the pages. So they can get into the reports directly.
Recently we change the path pattern with /docs/ in front:
/docs/report/report_a
/docs/report/report_a/subreport_1
/docs/report/report_b
…...
Now the new content nodes go to these url_alias.
But the users have booked mark the pages.
So we want to make them previous book marks, url_alias, can be redirected into the new path.
For example,
/report/report_a to be redirected into /docs/report/report_a
/report/report_a/subreport_1 to be redirected into
/docs/report/report_a/subreport_1
That means to make /report/* paths to be redirectly to /docs/report/* paths
Here * is wildcard.
Do the old report pages still exist? You could add a bit of javascript to each page that redirects to the new location...
Can you create aliases for the old nodes? If there are a lot, it probably wouldn't be too hard to run a script that takes all the old paths and creates aliases for them.
In D7, URL Aliases are under Config | Search and metadata
It's probably easiest add a redirect to your .htaccess file. Something like this should work for your example:
Redirect /report/ /docs/report/

CMS links on frontend not converting ie href=[sitetree_link_id=xx]

An issue has been noticed on one of our old sites running 2.4 where when the user creates a link in the CMS content, selecting an existing page to link to, the link is not being converted to the actual URL on the front end and all links are coming through in the format of <a href="[sitetree_link_id=12]">
What would be causing this and how do I fix it?
The tag looks like it's being set incorrectly. It should be [sitetree_link id=12], not [sitetree_link_id=12].
We later added support to the parser for [sitetree_link,id=12] so that links didn't need to contain spaces, but I can't recall if that's in 2.4 or only 3.0+.
Can you confirm that your WYSIWYG insertion is putting in that errant _? If so, you might want to checkout the handleaction_insert function in tiny_mce_imporvements.js to confirm that it has a line like so:
case 'internal':
href = '[sitetree_link id=' + this.elements.internal.value + ']';
If the inserted links don't actually have the errant _ but they aren't being parsed, then try checking your sapphire/_config.php file for this:
ShortcodeParser::get('default')->register('sitetree_link', array('SiteTree', 'link_shortcode_handler'));
If your site makes changes to the ShortcodeParser at all you might have inadvertently turned off sitetree_link support.
If all of that looks in order, perhaps the ShortcodeParser isn't being called for some reason. In HTMLText::forTemplate(), put a debug statement (I like die("I got here!");) to confirm that HTMLText::forTemplate() is actually getting called. If it's not, you might need to manually call it in some pre-processing of your Content variable. Instead of this:
$content = $this->Content;
Do this:
$content = $this->obj('Content')->forTemplate();
I hope that one of those answers help. Either way, it would be great if you could post back, so we could isolate what caused this. It might help us make the API easier to use in SilverStripe 3.1.

Drupal Ubercart 2checkout, what DIRECT RETURN option to choose?

About "Direct Return" it is written here to choose "Header Redirect"
(3. Under Direct Return select Header Redirect.)
https://www.2checkout.com/shopping-cart/ubercart/
But it is written here to choose "Given links back to my website"
(3. Under Direct Return select Given links back to my website.)
http://www.ubercart.org/forum/support/31330/configure_2checkout_payment_ubercart_drupal_6
Do you know if given links back to my website is definitively the option to select?
More info about "How Does The Return Process Work?"
2checkout.com/blog/knowledge-base/merchants/tech-support/passbacks-and-returns/how-does-the-return-process-work/?plain
The return method depends on the version of the extension you are using. If you are using the version found at https://github.com/craigchristenson/ubercart-3-2checkout you use Header Redirect. The 2Checkout extension that is included in the Ubercart core uses Given Links back to my Website. Unfortunately the return function in the 2Checkout module that is included with UberCart has a bug and will not be fixed until the next release. In the mean time I suggest using the extension referenced at the URL above. If you have any trouble with your integration, you can contact 2Checkout directly for integration assistance.
Ok I think that I have found the solution here:
http://www.ubercart.org/project_issue/access_denied_2checkout_order_completion
1
The problem does not appear to be related to SSL. Their is an error in the ubercart 2Checkout return script that is causing this return issue. Ubercart is trying to verify the MD5 hash that is being passed back using a hash of secret word, vendor number, merchant_order_id, total which is incorrect and causing the validation to fail. To correct the issue please open the following file "drupal/modules/ubercart/payment/uc_2checkout/uc_2checkout.pages.inc" and edit line 20 so that it matches the following:
$valid = md5(variable_get('uc_2checkout_secret_word', 'tango') . $_POST['sid'] . $_POST['order_number'] . $_POST['total']);
So it really mean that there is no good 2checkout module for Ubercart and that the only solution is to hack line #20 ?
Ubercart has these issues addressed in the dev branches of UberCart 2 and 3. You can also get just the fixed 2Checkout modules at the URLs below:
UberCart-2 Drupal-6
https://github.com/craigchristenson/ubercart-2-2checkout
UberCart3 Drupal-7
https://github.com/craigchristenson/ubercart-3-2checkout

How to add CC recipients to an e-mail in Plone 4?

I'm quite new to Plone and as you can read in the Title line I'm working with Plone 4.
Despite being new to both plone and Python, I've managed to get a fully working page to send rich text mail messages to user-selected members of my web site.
What I've done is basically clone (i.e. copy and rename) the sendto, sendto_form, and sendto_template and editing them in order to get what i needed.
As I've said it works quite fine but I need to add a CC recipient, but the MailHost.send() method does not allow for a CC header (and though the secureSend method allows for it, it is a deprecated method in Plone 4).
I've also used a template to let the user add an attachment, the template is available at How to send mail with attachments in Plone using a template approach?.
I know that the python email.Header function does exactly what I need, but when I try to import the library I get an insufficient privileges error (I'm logged in as admin).
I've also tried to work around it by using the following approach:
templ="""Subject: %(subject)s
From: "%(send_from_name)s" <%(envelope_from)s>
To: %(send_to_address)s
CC: %(send_cc_address)s
Content-Type: text/html; charset=UTF-8
Reply-To: %(send_from_address)s
%(comment)s
--
%(signature)s
"""
message=templ % variables
context.MailHost.send(message.encode("utf-8"),encode="quoted-printable")
It works almost fine but can't accept accented characters (which are very common in Italian language).
Any ideas?
Thx in advance,
Luca
You're reaching the limits of the secure python scripting environment you can use TTW in plone. The email module is not allowed to be imported in this type of script.
The old secureSend method on the MailHost object used to have an method parameter for cc which seemed to have been removed in the latest version which only has a "send" method and no cc parameter.
This means you'll have to move the code to a product on the file system in a view in order to use the cc part.

Resources