Logging amount of writing time

Discuss the word processor

Logging amount of writing time

Postby julianj99 » Mon Mar 16, 2020 12:56 pm

Is it possible to log how much time I spend writing?

I am a business writer. I usually charge by time taken to write articles, blog posts and suchlike.

For various clients I have been using a rough handwritten note, but I have decided this is less than satisfactory - I get sidetracked answering emails or chasing clients for something.

Is there an app or something I could enable to tell me how much time I have taken on a Writer doc. Something simple - Steam does this for the games I play!
OpenOffice 4.1.7 Windows 10
julianj99
 
Posts: 5
Joined: Mon Mar 16, 2020 12:39 pm

Re: Logging amount of writing time

Postby John_Ha » Mon Mar 16, 2020 1:08 pm

File > Properties ..., shows how long the document has been open but not how long you have been typing. If you were 100% disciplined and you always opened the document > typed > closed the document this would record how long you were working on it.

 Edit: The time only updates if you make a change. The new time is set when the document is saved. 


You could also use the Events (Tools > Customise > Events ...) of opening and closing the document to record those times.

Google for a utility which does a closer match - eg by stopping a timer whenever you are typing. Elapsed time minus timer time is equal to time typing.

Solicitors charge by time - I think in 10 minute increments. Check what they use - see solicitor time recording or time recording software. There are hundreds of programs available.
Last edited by John_Ha on Thu Mar 26, 2020 5:41 pm, edited 1 time in total.
LO 6.3.5.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7357
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Logging amount of writing time

Postby julianj99 » Mon Mar 16, 2020 2:59 pm

Thanks John.

I was hoping there might be something within OO. Opening and closing won't be really relevant, while typing is.

I did try a timer, but it relies on you starting and stopping it. I managed that today (a novelty) and recorded that writing a 750 word article took me 1 hr 10 mins inc spellcheck and upload. But I won't remember to do this in future so it won't be any use.
OpenOffice 4.1.7 Windows 10
julianj99
 
Posts: 5
Joined: Mon Mar 16, 2020 12:39 pm

Re: Logging amount of writing time

Postby RoryOF » Mon Mar 16, 2020 3:12 pm

You should check what /File /Properties says about that file.

If your file is open and actively being worked on, whether for review, editing or insertion, then it is surely chargeable time. All you need to do, for /File /Properties to track your time, is to close the file when you leave off working on it, not leave it open in the background.
Apache OpenOffice 4.1.7 on Xubuntu 18.04.4 (mostly 64 bit version) and very infrequently on Win2K/XP
User avatar
RoryOF
Moderator
 
Posts: 30605
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Logging amount of writing time

Postby John_Ha » Mon Mar 16, 2020 3:25 pm

Search with keystroke logger for utilities which monitor the start and end time of the application you use.

eg see BlackBox Express at Top 10 Best Free Keylogger Software to Monitor Keystrokes in Windows
Attachments
Clipboard01.gif
LO 6.3.5.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7357
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Logging amount of writing time

Postby JeJe » Thu Mar 26, 2020 4:41 pm

The document's total editing time records how much time you spend editing - if you open and close a document without editing it then it isn't changed.

You could use a macro to record your breaks away from editing (see attached document) and the net time would be editing time minus that.

Writing one to record when you're typing and not would be a lot more complicated.
Attachments
time test.odt
(14.13 KiB) Downloaded 3 times
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 789
Joined: Wed Mar 09, 2016 2:40 pm

Re: Logging amount of writing time

Postby julianj99 » Thu Mar 26, 2020 4:48 pm

Thanks to everyone for your suggestions. Opening and closing the file does seem to work well enough for an estimate, and it is a simple procedure, so I am going with that for now.
OpenOffice 4.1.7 Windows 10
julianj99
 
Posts: 5
Joined: Mon Mar 16, 2020 12:39 pm

Re: Logging amount of writing time

Postby JeJe » Thu Mar 26, 2020 6:05 pm

To automatically get time not typing you could use a keyhandler like below:

If you run startkeyhandler then whenever you stop typing for 30 seconds (or whatever number of seconds you choose) it will add the length of pause time to a document property called "Break duration2"

Note: very crude, some niceties with handlers not implemented.

Code: Select all   Expand viewCollapse view
global lastkeyticks

sub startkeyhandler
oXKeyHandler = CreateUnoListener("KeyHandler_", "com.sun.star.awt.XKeyHandler")
thiscomponent.CurrentController.AddKeyHandler(oXKeyHandler)
end sub
sub KeyHandler_Disposing(oEvent)
end sub

function KeyHandler_KeyPressed(oEvent) as boolean
dim sname as string,diffsecs as long,v as string

   curticks = getsystemticks
   IF lastkeyticks <>0 THEN
   diffsecs= (curticks-lastkeyticks)\1000
   if diffsecs> 30 then 'CHANGE 30 TO CHOSEN DELAY

      props = thisComponent.DocumentProperties.UserDefinedProperties
      sname = "Break duration2"
      with props
         if .getPropertySetInfo().hasPropertyByName(sname) = false then
            .addProperty(sname,128,"")
         end if
         v =  .getpropertyvalue(sname)
         v= (val(v) + diffsecs)
         .setpropertyvalue(sname,v)
      end with

   end if
   END IF
   lastkeyticks= curticks
End function

function KeyHandler_KeyReleased(oEvent) as boolean
end function


Edit: forgot global lastkeyticks at the top of the module - added
Edit2: Oops changed code to 30 seconds as per description
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 789
Joined: Wed Mar 09, 2016 2:40 pm

Re: Logging amount of writing time

Postby julianj99 » Fri Mar 27, 2020 9:46 am

Thanks JeJe,

I'm not that techie. So I would add this to Macros and have a button or keypress to run it as normal? Is that how it should be installed?

BTW did you write this specially?

regards

Julian
OpenOffice 4.1.7 Windows 10
julianj99
 
Posts: 5
Joined: Mon Mar 16, 2020 12:39 pm

Re: Logging amount of writing time

Postby JeJe » Fri Mar 27, 2020 12:49 pm

Yeah, this is one of the many little things I've thought of myself but never got round to.

In the attached document I've put the code in a module in the document and set the open document event to start it running.

Edit: note the delay is set to 10 seconds in that file. Running the shopNetTime2 sub will show the net time as previously.
Edit2: as said, very rough and ready, there are lots of little issues like if you open a second window in the document it won't work for typing in that second window etc
Attachments
time test 2.odt
(12.89 KiB) Downloaded 2 times
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 789
Joined: Wed Mar 09, 2016 2:40 pm

Re: Logging amount of writing time

Postby julianj99 » Fri Mar 27, 2020 1:14 pm

Thanks.

Where do I put the Time test document, or do I just open it?
OpenOffice 4.1.7 Windows 10
julianj99
 
Posts: 5
Joined: Mon Mar 16, 2020 12:39 pm

Re: Logging amount of writing time

Postby JeJe » Fri Mar 27, 2020 1:26 pm

Just open it.

You'll need to put the same code in your other document and set the document open event to start the logging.
Alternatively you could put it in MyMacros/Standard Library - but then if you opened more than one document at the same time with the document open events all calling the same set of routines there would be issues.
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 789
Joined: Wed Mar 09, 2016 2:40 pm

Re: Logging amount of writing time

Postby John_Ha » Fri Mar 27, 2020 1:34 pm

See [Tutorial] How to record a macro (and Regular Expressions) for how to put it on a Toolbar and add it as an icon.
Run the macro by Tools > Macros > Run macro..., and navigate to the macro.
You can optionally put the macro name on a Toolbar by r-click the toolbar > Configure ..., and add the macro.
You can choose an icon for it if you want, or draw one (16 x 16 pixels BMP file) and use it.

I think the way to use it is:
1. Open a document and start typing.
2. The phone rings so run the macro
3. Just start typing again.
The macro records the time between running the macro and starting typing again.
LO 6.3.5.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
John_Ha
Volunteer
 
Posts: 7357
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: Logging amount of writing time

Postby JeJe » Fri Mar 27, 2020 1:48 pm

If something logs the breaks automatically and is set to run on the document open event you don't have to do anything... you can forget about it till you want to see how much time you spent not typing.

You just need to choose a sensible interval of time... 10 seconds might be too short as you might spend that amount of time working on the document that doesn't involve typing.. but you can pick whatever.

A proper solution might involve not measuring the pause if there are mouse clicks and other actions besides typing. That effort is like I said, rough and ready.
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 789
Joined: Wed Mar 09, 2016 2:40 pm


Return to Writer

Who is online

Users browsing this forum: MSN [Bot] and 22 guests