emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Implement RSS_FEED_URL option keyword
@ 2015-12-10 21:20 Arun Isaac
  2015-12-10 21:33 ` Arun Isaac
  2015-12-26 14:00 ` Nicolas Goaziou
  0 siblings, 2 replies; 6+ messages in thread
From: Arun Isaac @ 2015-12-10 21:20 UTC (permalink / raw)
  To: Emacs orgmode


[-- Attachment #1.1: Type: text/plain, Size: 573 bytes --]


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.


[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rss-feed-url.patch --]
[-- Type: text/x-diff, Size: 2513 bytes --]

From c0447601cd77ae8877f7ea42bdadcc4179cd0113 Mon Sep 17 00:00:00 2001
From: Arun Isaac <theroarofthedragon@gmail.com>
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<title>%s</title>
 <atom:link href=\"%s\" rel=\"self\" type=\"application/rss+xml\" />
-- 
2.6.3


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Implement RSS_FEED_URL option keyword
  2015-12-10 21:20 [PATCH] Implement RSS_FEED_URL option keyword Arun Isaac
@ 2015-12-10 21:33 ` Arun Isaac
  2015-12-26 14:00 ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Arun Isaac @ 2015-12-10 21:33 UTC (permalink / raw)
  To: Emacs orgmode

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Arun Isaac <theroarofthedragon@gmail.com> writes:

> 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.

Elaborating on this:

Currently, the feed is always assumed to be on the root of the server,
and the generated feed URL is something like
"http://foo.org/blog.xml". But, the user might want to have the feed in
some subdirectory on the server (something like
"http://foo.org/feeds/blog.xml").

As far as I understand, there is currently no way to do this. Hence, I
implemented RSS_FEED_URL to fill this void.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJWae+eAAoJEC4l7othgCuzpEwH/jSzkCt5529C6gGP3pMY7qb2
CgH7PaY86z3mmZWtcEysb0yGd/yQEPDezG3y2NMrUvnJthT0S1XCWTvzgtPrSYGn
+fRpoSLVDc+EIbC6WahAEXk5fAEi569EWEByfkCERvhqV5qSAeOfwelLmtaS5zAJ
j2aNHe0//+bCBNI1pKzOucQ2roY4nFQ8TRHDVLbM092Fm9pD093adMHpOILA/5vm
L88NHBz7Qm15zaDKyDFMwSHybjYk3V4bTF4m+VV7LE/W07aiq5tDHQsDRu0wo4jI
pGUWcJb9EdLdNwKavvzMKBGmdkCJp64iUwmbT7c/tozv+rU5l3bWalQ1ZI2klc0=
=v8WT
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Implement RSS_FEED_URL option keyword
  2015-12-10 21:20 [PATCH] Implement RSS_FEED_URL option keyword Arun Isaac
  2015-12-10 21:33 ` Arun Isaac
@ 2015-12-26 14:00 ` Nicolas Goaziou
  2015-12-26 14:49   ` Arun Isaac
  2016-02-22 17:04   ` Arun Isaac
  1 sibling, 2 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2015-12-26 14:00 UTC (permalink / raw)
  To: Arun Isaac; +Cc: Emacs orgmode

Hello,

Arun Isaac <theroarofthedragon@gmail.com> writes:

> 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.

Thank you for the patch.

Although it is not strictly necessary for applying patches to contrib
libraries, did you sign FSF papers already? It can matter if we consider
moving this library into core some day.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Implement RSS_FEED_URL option keyword
  2015-12-26 14:00 ` Nicolas Goaziou
@ 2015-12-26 14:49   ` Arun Isaac
  2016-02-22 17:04   ` Arun Isaac
  1 sibling, 0 replies; 6+ messages in thread
From: Arun Isaac @ 2015-12-26 14:49 UTC (permalink / raw)
  To: Emacs orgmode

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]


> Although it is not strictly necessary for applying patches to contrib
> libraries, did you sign FSF papers already? It can matter if we consider
> moving this library into core some day.

I have initiated the process. I will get back to you once it is
complete.


[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Implement RSS_FEED_URL option keyword
  2015-12-26 14:00 ` Nicolas Goaziou
  2015-12-26 14:49   ` Arun Isaac
@ 2016-02-22 17:04   ` Arun Isaac
  2016-02-25  9:11     ` Nicolas Goaziou
  1 sibling, 1 reply; 6+ messages in thread
From: Arun Isaac @ 2016-02-22 17:04 UTC (permalink / raw)
  To: Emacs orgmode

[-- Attachment #1: Type: text/plain, Size: 601 bytes --]

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Arun Isaac <theroarofthedragon@gmail.com> writes:
>
>> I have implemented a new option keyword, RSS_FEED_URL, for the RSS
>> exporter backend.

This is a patch I submitted some time back.

> Although it is not strictly necessary for applying patches to contrib
> libraries, did you sign FSF papers already? It can matter if we consider
> moving this library into core some day.

My FSF copyright assignment process is now complete. What details should
I submit here to have my patch included in org mode? Do let me know.

Thanks,
Arun I.

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Implement RSS_FEED_URL option keyword
  2016-02-22 17:04   ` Arun Isaac
@ 2016-02-25  9:11     ` Nicolas Goaziou
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2016-02-25  9:11 UTC (permalink / raw)
  To: Arun Isaac; +Cc: Emacs orgmode

Hello,

Arun Isaac <theroarofthedragon@gmail.com> writes:

> My FSF copyright assignment process is now complete. What details should
> I submit here to have my patch included in org mode? Do let me know.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-02-25  9:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-10 21:20 [PATCH] Implement RSS_FEED_URL option keyword Arun Isaac
2015-12-10 21:33 ` Arun Isaac
2015-12-26 14:00 ` Nicolas Goaziou
2015-12-26 14:49   ` Arun Isaac
2016-02-22 17:04   ` Arun Isaac
2016-02-25  9:11     ` Nicolas Goaziou

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).