~brettgilio/org-webring

4 2

Re: [PATCH] Add support for atom feeds

Jamie Beardslee
Details
Message ID
<87ft89n3fz.fsf@jamzattack.xyz>
DKIM signature
pass
Download raw message
> Get the first 19 characters of the timestamp and replace "T" with a
> space. What do you think?

Done :)

I don't actually have access to 26, so please let me know whether this
works.

This patch should be applied on top of the previous one.

--
Jamie

Re: [PATCH] Add support for atom feeds

Details
Message ID
<87zh6h1lcn.fsf@gnu.org>
In-Reply-To
<87ft89n3fz.fsf@jamzattack.xyz> (view parent)
DKIM signature
missing
Download raw message
Jamie Beardslee <jdb@jamzattack.xyz> writes:

>> Get the first 19 characters of the timestamp and replace "T" with a
>> space. What do you think?
>
> Done :)
>
> I don't actually have access to 26, so please let me know whether this
> works.
>
> This patch should be applied on top of the previous one.
>
> --
> Jamie

Hi Jamie, thanks for the patches! Sergiu and I have been reviewing them
and they are currently in process for merging.

Brett Gilio

Re: [PATCH] Add support for atom feeds

Details
Message ID
<87blixwhbj.fsf@posteo.ro>
In-Reply-To
<87ft89n3fz.fsf@jamzattack.xyz> (view parent)
DKIM signature
pass
Download raw message
Jamie Beardslee <jdb@jamzattack.xyz> writes:

> I don't actually have access to 26, so please let me know whether this
> works.
>
> This patch should be applied on top of the previous one.

It does work! Thanks. We'll integrate this very soon.

One more thing regarding timestamps. Our hack works nice for now, but I
found something interesting.

parse-time-string turns out to be more flexible than I thought. We can
even add timezone info at the end of our hacky format if we manage to
extract it correctly from the Atom timestamps.

--8<---------------cut here---------------start------------->8---
(parse-time-string "2016-03-25 16:24:56 +0300")
=> (56 24 16 25 3 2016 nil nil 10800)
--8<---------------cut here---------------end--------------->8---

Now, what we need to extract from the ISO 8601 dates is the
time-numoffset component (look at the spec from the RFC I send in a
previous email). What bites us in the ass though is that time-numoffset
is not always there and that there may be some optional time-secfrac
before it. That means we can't always extract it based on position, like
before.

Maybe if time-offset is "Z", we should use "+0000". Otherwise, if it
starts with either a plus or a minus, take the sign along with the next
5 characters and dump the ":".

A problem would be how we reach the time-offset. Maybe find the first
"+"/"-"/"Z" after the time-minute? We know exaclty where that ends.

Just thought this was worth sharing.

I think we'll merge those patches without worrying more about timezones
now and we can integrate it after we have basic Atom feeds working. Or
if someone gets it done in the time it will take for me to apply those
patches, I'd be happy to include it too.

-- 
Sergiu

Re: [PATCH] Add support for atom feeds

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

> Now, what we need to extract from the ISO 8601 dates is the
> time-numoffset component (look at the spec from the RFC I send in a
> previous email). What bites us in the ass though is that time-numoffset
> is not always there and that there may be some optional time-secfrac
> before it. That means we can't always extract it based on position, like
> before.
>
> Maybe if time-offset is "Z", we should use "+0000". Otherwise, if it
> starts with either a plus or a minus, take the sign along with the next
> 5 characters and dump the ":".

I think this is a good (probably temporary) workaround. However, how
common is it really to have time-secfrac in the case of ATOM feeds?

> A problem would be how we reach the time-offset. Maybe find the first
> "+"/"-"/"Z" after the time-minute? We know exaclty where that ends.

If nothing else, we just dump it and set all zone info to +0000. I'm
going to ping Amin Bandali and see if he knows more about this.

Brett Gilio

Re: [PATCH] Add support for atom feeds

Details
Message ID
<87r1rtch6s.fsf@gnu.org>
In-Reply-To
<87o8mx1keg.fsf@gnu.org> (view parent)
DKIM signature
missing
Download raw message
Hey all, the ATOM feed implementation has been merged. The version has
been bumped to 1.5. I added a when condition to require iso8601 on Emacs
27+, and now there is just one issue with documentation but otherwise we
are ready for a 1.5 tag.

Brett Gilio
Export thread (mbox)