From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arun Isaac Subject: [PATCH] Implement RSS_FEED_URL option keyword Date: Fri, 11 Dec 2015 02:50:19 +0530 Message-ID: <87io4657cc.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:53853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a78di-0000GK-Kh for emacs-orgmode@gnu.org; Thu, 10 Dec 2015 16:20:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a78de-0004hF-2e for emacs-orgmode@gnu.org; Thu, 10 Dec 2015 16:20:38 -0500 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]:34643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a78dd-0004h4-JQ for emacs-orgmode@gnu.org; Thu, 10 Dec 2015 16:20:34 -0500 Received: by pacwq6 with SMTP id wq6so53238781pac.1 for ; Thu, 10 Dec 2015 13:20:32 -0800 (PST) Received: from steel ([223.227.96.196]) by smtp.gmail.com with ESMTPSA id b17sm20414354pfj.43.2015.12.10.13.20.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Dec 2015 13:20:31 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Emacs orgmode --=-=-= Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" --==-=-= Content-Type: text/plain Hi, I have implemented a new option keyword, RSS_FEED_URL, for the RSS exporter backend. The RSS_FEED_URL goes into the atom:link element that identifies the feed's own URL. http://www.rssboard.org/rss-profile#namespace-elements-atom-link Currently, the feed URL is assumed to be html-link-home or publishing-directory concatenated with the output filename of the feed. This need not necessarily be so. So, the RSS_FEED_URL option keyword is introduced to let the user customize the feed URL. Please review the patch and consider for inclusion. Thanks, Arun Isaac. --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWaeyTAAoJEC4l7othgCuznEAIAKzs6+QrQrMEPOoG3tLZbm0Y JT67ybABcUAjp9NTquHfyJtcZrvPPnAYuvOTXG+6UMGxJN0cGNi8tojtSEElvdo5 GMgbJpbrXjWvKVcg8Zq0lIgyVewJppAS8Pd0jQ4RRibzumNy/pCQmAQ5Ksh4xqXt Y4KItLNnXJLsHBTiMP4JGRCxaJoPbHQQuqehBYU6qMa4RG2Q7A1iRREy1kSIlnto QWHZKldFiWXcB7GrSvaTZdK8ebVX+vvNXINTqrbILxpcKHrQDFUUgS+7xEM+1LJ3 8J8JaewEDiJKLi+mbzU7xFeiCXHODrUTHC95EDNER3tIGJNfGq73aN6E13GUU8Q= =j3R4 -----END PGP SIGNATURE----- --==-=-=-- --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=rss-feed-url.patch >From c0447601cd77ae8877f7ea42bdadcc4179cd0113 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Fri, 11 Dec 2015 02:12:59 +0530 Subject: [PATCH] ox-rss: Implement RSS_FEED_URL option keyword * contrib/lisp/ox-rss.el (org-rss-build-channel-info): Try to use the specified RSS_FEED_URL option keyword as publink before resorting to concatenating blogurl with output filename. The RSS_FEED_URL goes into the atom:link element that identifies the feed's own URL. Currently, the feed URL is assumed to be html-link-home or publishing-directory concatenated with the output filename of the feed. This need not always be so. So, the RSS_FEED_URL option keyword is introduced to let the user customize the feed URL. --- contrib/lisp/ox-rss.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/contrib/lisp/ox-rss.el b/contrib/lisp/ox-rss.el index 4cdfe0e..39fce30 100644 --- a/contrib/lisp/ox-rss.el +++ b/contrib/lisp/ox-rss.el @@ -31,10 +31,11 @@ ;; `org-rss-export-as-rss' (temporary buffer) and `org-rss-export-to-rss' ;; (as a ".xml" file). ;; -;; This backend understands two new option keywords: +;; This backend understands three new option keywords: ;; ;; #+RSS_EXTENSION: xml ;; #+RSS_IMAGE_URL: http://myblog.org/mypicture.jpg +;; #+RSS_FEED_URL: http://myblog.org/feeds/blog.xml ;; ;; It uses #+HTML_LINK_HOME: to set the base url of the feed. ;; @@ -127,6 +128,7 @@ When nil, Org will create ids using `org-icalendar-create-uid'." (:with-toc nil nil nil) ;; Never include HTML's toc (:rss-extension "RSS_EXTENSION" nil org-rss-extension) (:rss-image-url "RSS_IMAGE_URL" nil org-rss-image-url) + (:rss-feed-url "RSS_FEED_URL" nil nil t) (:rss-categories nil nil org-rss-categories)) :filters-alist '((:filter-final-output . org-rss-final-function)) :translate-alist '((headline . org-rss-headline) @@ -331,10 +333,11 @@ as a communication channel." (image (url-encode-url (plist-get info :rss-image-url))) (ifile (plist-get info :input-file)) (publink - (concat (file-name-as-directory blogurl) - (file-name-nondirectory - (file-name-sans-extension ifile)) - "." rssext))) + (or (plist-get info :rss-feed-url) + (concat (file-name-as-directory blogurl) + (file-name-nondirectory + (file-name-sans-extension ifile)) + "." rssext)))) (format "\n%s -- 2.6.3 --=-=-=--