~brettgilio/org-webring

2 2

Added "Syndicates List" entry to TODO.

Details
Message ID
<877dtmmaft.fsf@gnu.org>
DKIM signature
missing
Download raw message
Hello all.

Just wanted to bring your attention to a possibility for future
implementation. A possible feature will be to implement a way to parse
the current list of feeds being fetched and format them nicely in a
presentable "syndicates list" format. I have added an entry for this to
the README [https://sr.ht/~brettgilio/org-webring/] and opened a TODO
[https://todo.sr.ht/~brettgilio/org-webring/8].

If anybody has any ideas for how to do this, I encourage patches or
development on a new branch, as well as responses to this email for
collaboration.

Brett Gilio
Details
Message ID
<877dtlztqv.fsf@posteo.ro>
In-Reply-To
<877dtmmaft.fsf@gnu.org> (view parent)
DKIM signature
pass
Download raw message
Brett Gilio <brettg@gnu.org> writes:

> If anybody has any ideas for how to do this, I encourage patches or
> development on a new branch, as well as responses to this email for
> collaboration.

Hi,

The easiest place to plug such a thing seems to be in
org-webring--get-items-from-url, altough the name of the function
doesn't exactly match this extra functionality. Adding this to the
let-form in that function should generate a very primitive
syndicates.org file.

--8<---------------cut here---------------start------------->8---
(when org-webring-display-syndicates
  (with-temp-buffer
    (insert (format "* [[%s][%s]]\n" source-link source-title)) (insert
    (org-webring--feed-text-prop feed 'description)) (insert "\n")
    (append-to-file (point-min) (point-max) "syndicates.org")))
--8<---------------cut here---------------end--------------->8---

Pair that with a file reset for "syndicates.org" in
org-webring-generate-webring and you have a base.

This thing, in theory, can be extremely customizable. Some stuff I can
think of right now:
- switch between headlines or lists (requires just replacing a "*" with
a "-" on our part)
- custom #+TITLE for the document
- extra top level Org directives (let the user add stuff like #+SUBTITLE
or set custom #+OPTIONS)
- the path of the generated syndicates list should be customizable too
- let the user toggle the inclusion of descriptions for each feed

Here's a sketch for a generated Org file:

--8<---------------cut here---------------start------------->8---
#+TITLE: Syndicates
#+SUBTITLE: Customized by user, as the options below
#+OPTIONS: num:nil toc:nil

* [[https://drewdevault.com/blog.html][Blogs on Drew DeVault's blog]]

Recent content in Blogs on Drew DeVault's blog

* [[https://emersion.fr/blog/][emersion]]

Recent content in Blog on emersion
--8<---------------cut here---------------end--------------->8---

> Take the current value of `org-webring-urls', and parse it formatting
> into an org-file with each element of the list being a subheading or
> hyphen-constructed list. When org-webring-display-syndicates is true
> run the parsing function, then place a link to the resultant ORG->HTML
> file in the attributes section.

In the todo issue (cited above), you mention "the resultant
ORG->HTML". I just want to understand this better: you just want to
create and Org file, not do the exporting to HTML for the user, right?
Everyone has their own weird setup for publishing with Org and they
might want to plug the syndicates list in there somehow by themselves.

> Maybe exporting to org for ORG->HTML is not the best presentation,
> though. Open to other suggestions.

Org-webring is mainly for use on websites, so I don't see what better
formats we could use.

Cheers,
Sergiu
Details
Message ID
<87a6yh4eky.fsf@gnu.org>
In-Reply-To
<877dtlztqv.fsf@posteo.ro> (view parent)
DKIM signature
missing
Download raw message
Alexandru-Sergiu Marton <brown121407@posteo.ro> writes:


> Hi,
>
> The easiest place to plug such a thing seems to be in
> org-webring--get-items-from-url, altough the name of the function
> doesn't exactly match this extra functionality. Adding this to the
> let-form in that function should generate a very primitive
> syndicates.org file.
>
> (when org-webring-display-syndicates
>   (with-temp-buffer
>     (insert (format "* [[%s][%s]]\n" source-link source-title)) (insert
>     (org-webring--feed-text-prop feed 'description)) (insert "\n")
>     (append-to-file (point-min) (point-max) "syndicates.org")))
>
>
> Pair that with a file reset for "syndicates.org" in
> org-webring-generate-webring and you have a base.

I wonder if perhaps it would be more expressive to use a when-let/if-let
form, and craft a new function with that. In the original
`org-webring--get-items-from-url' function we don't necessarily need the
xml-node-children elements. At least I don't think we do, I haven't
tested such an implementation. What do you think?

>> Take the current value of `org-webring-urls', and parse it formatting
>> into an org-file with each element of the list being a subheading or
>> hyphen-constructed list. When org-webring-display-syndicates is true
>> run the parsing function, then place a link to the resultant ORG->HTML
>> file in the attributes section.
>
> In the todo issue (cited above), you mention "the resultant
> ORG->HTML". I just want to understand this better: you just want to
> create and Org file, not do the exporting to HTML for the user, right?
> Everyone has their own weird setup for publishing with Org and they
> might want to plug the syndicates list in there somehow by themselves.
>

Correct. We should /NOT/ handle the HTML construction.

>> Maybe exporting to org for ORG->HTML is not the best presentation,
>> though. Open to other suggestions.
>
> Org-webring is mainly for use on websites, so I don't see what better
> formats we could use.

I wrote this section when I was rather sleepy. I think I meant that
perhaps generating a new Org file is not the best option, as perhaps a
separate page for the syndicates list is not all that useful (as
compared to perhaps having a list of syndicates on org-webring
itself). I don't know. I think I am partial to having a separate page,
especially with the extensibility you mentioned in mind.

Brett Gilio
Export thread (mbox)