vladris / tinkerer

Python blogging engine
https://vladris.com/tinkerer
Other
305 stars 81 forks source link

Timestamp with post time (hh:mm:ss) #60

Closed moigagoo closed 10 years ago

moigagoo commented 10 years ago

It would be really cool if we could have publication time in the post timestamp.

This is useful if you write several posts a day. It's vital for blogs used to indicate some online service status.

vladris commented 10 years ago

What would publication time be though? The time sphinx build is invoked?

moigagoo commented 10 years ago

Good point.

Yes, the time Sphinx build is invoked for the first time (no need to update it on further page modifications; though it'd be great to also have the Last edit field, but that's optional).

sgillies commented 10 years ago

@moigagoo In my Atom feed extension, I get the last modified time of a post's .rst file using os.path.getmtime(): https://github.com/sgillies/rutherford/blob/master/rutherford/__init__.py#L80. Published time as well as date would be good, I agree.

vladris commented 10 years ago

By design, Tinkerer does not save this kind of state (build time, first build etc.). The scenario is definitely valid, but I wouldn't add this kind of state tracking to Tinkerer core, as not everyone needs it and it adds a lot of complexity. This timestamp might also mean different things to different people (first build time, last build time, publish time etc.).

I have no issue with this being implemented as an extension (if anyone volunteers :)), but I wouldn't add this to the core logic.

moigagoo commented 10 years ago

@vladris Quite understandable :-)

Making Sphinx extensions is really hairy, but I'll give it a shot.

vladris commented 10 years ago

Half of Tinkerer is actually Sphinx extensions (tinkerer/ext), and so is all of tinkerer-contrib, so you can look there for some examples.

I will close this as Won't Fix.