[Moin-user] Can one set the creation and modify dates of an article?

Gnarlodious gnarlodious at gmail.com
Wed Feb 10 13:37:56 EST 2010


Persistent cuss, ain't you?

Here is what to do:

1) Learn programming. Open the Terminal application

2) Type "python" (minus the quotes) and press return key

3) Select&drag&drop or, copy&paste these commands into Terminal:
import time
timeString='2010-02-10 04:40:30'
int(time.mktime(time.strptime(timeString,'%Y-%m-%d %H:%M:%S')))

the resulting number will be the UNIX timestamp for the timeString
variable, in this case 1265802030

4) Open your FTP app and navigate to your server's dynamic pages folder.

5) Open the relevant edit-log file and where it says:

1264823835000000	00000002	SAVE	Computer(2f)Shell(2f)ExifTool

paste the Unix number into the first field overwriting the long number

6) Save that file and load the page to see if it works

-- Gnarlie

On 2/10/10, Chris G <cl at isbd.net> wrote:
> On Wed, Feb 10, 2010 at 03:47:24PM +0100, R.Bauer wrote:
>> Chris G schrieb:
>> > On Tue, Feb 09, 2010 at 02:19:21PM -0800, Eric Johnson wrote:
>> >> On 02/09/2010 02:11 PM, Chris G wrote:
>> >>> I want to put some articles into my wiki and 'pretend' they were put
>> >>> there a long time ago so that the date sequence of articles makes
>> >>> sense (this is for holiday narratives and things like that).
>> >>>
>> >>> Can this be done in moinmoin, i.e. is there some sort of macro or
>> >>> action one can use to allow one to put a date into an article which
>> >>> would get used as its creation and/or modify date?
>> >>>
>> >>> Something like:-
>> >>>
>> >>>     <<CreationDate(2009-01-04)>>
>> >>>
>> >>>
>> >> I believe that MoinMoin gets this information from the "edit-log" file
>> >> in each page folder.  With direct access to the raw data, you can dummy
>> >> up whatever "history" you want.
>> >>
>> >> You also want to put the same entries in the "edit-log" file for the
>> >> whole wiki.
>> >>
>> > So I want a macro/plugin that allows me to set the information that
>> > gets written to the edit-log files.  I don't fancy manipulating them
>> > directly as the dates are in 'seconds since 1970-01-01' format by the
>> > look of it.
>> >
>>
>> @DATE@ or @SIG@ at the time you write the article (HelpOnVariables)
>>
> I'm very confused by that bit of HelpOnVariables.
>
> The line about @DATE@ says:-
>
>      @DATE@  Current date in the system's format
> <<Date(2004-08-30T06:38:05Z)>>  2004-08-30
>
> what's this actually mean?  Does it mean that entering:-
>
>     <<Date(@DATE@)>>
>
> will output the current date at the time of entry?
>
>
>> A macro showing the first entry of the edit log should not be that
>> complicated. As a starting point look at the example of
>> http://moinmo.in/MoinAPI/Beispiele#logfile.editlog
>>
> Yes, but how can I *set* the first entry of the edit log?
>
> --
> Chris Green
>
>
> ------------------------------------------------------------------------------
> SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
> Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
> http://p.sf.net/sfu/solaris-dev2dev
> _______________________________________________
> Moin-user mailing list
> Moin-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/moin-user
>




More information about the Moin-user mailing list