Print service

edited November -1 in Development

What is the purpose of Print Service | Copy option?

It seems to dump the entire service into a stream of text with no line breaks, or song breaks.

So I tried Copy as HTML which does what it says.

So how do I get the plain service text inc line breaks and song breaks into Word or Notepad.

I think I might have to write some code to Un-html the text?
Or print the html to a file printer.

Any other ideas?
Thanks
Martin

Comments

  • edited June 2012
    Hi Martin,

    This is a bug, and is already on our tracker. Unfortunately, having had a look at it myself (and speaking to the other devs), seems like quite a lot, which isn't a core feature or a show stopper.

    Phill
  • edited June 2012

    The software team are doing a brilliant job, very well done to everyone, but I do want to wave the flag for fixing the print service problem: 

    There are a few folk who cannot see long-distance and so cannot see projected songs and they do appreciate a printed copy. There are also frail folk who cannot easily stand and once the person in front of them stands up, our frail member can no longer see the screen so he/she too appreciates a printed copy, just in order to be included in that part of the service.

    I know it takes time, but don't underestimate the importance of "print service".  It's a feature that will help make sung worship with OpenLP much more accessible.  The guy who will be fixing "Print service" is going to be a very important contributor.

  • edited June 2012

    Hi Steve,

    Every Feature Request is just as important to someone else as this one might be to you. Each contribution is "very important" to someone, even if just the developer who added it! The Print Service as far as "Printing" is concerned works fine, the only issue is with the copy and paste.

    Although someone will try and get to it eventually, as OpenLP's primary purpose is to project song words to a screen, it is this area where we have our primary focus. At the end of the day line breaks can be easily added back in by the user.

    We won't forget this, and will try and get to it eventually, but waving flags isn't going to help. 

    Jonathan.

  • edited June 2012

    Interesting in that Copy to Text and paste works for me on Linux fine.

    The text looks like what has been pasted below. 

     

    Service Sheet

     A 01234

    dasdfaDF

    dasdfaDF#1111111111111111111

    dasdfaDF

    dasdfaDF##

    Author unknown

    CCLI License: 149

     

     A Great And Mighty Wonder

    A Great and mighty wonder 

     

  • edited June 2012

    I disagree that this is just flag waving...

    It's a show stopper for some of us who need to produce printed service sheets from our projection systems.

    Without this feature we are unable to implement openlp unless I get someone to spend a lot of time retyping service sheets.

    I posted my hack earlier that I'm using to get "copy to text" working.

    But it is a big deal as far as implementation goes for some of us.

    Martin

  • edited June 2012

    Martin, as gushie already stated "OpenLP's primary purpose is to project song words to a screen". So although we do of course hope to fix this eventually, it falls outside our primary purpose, so it's not a priority at the moment. Whether or not something is a big deal for some people does not affect the primary purpose of the OpenLP project.

    It's great that you've found a solution for yourself by editing the source. This is the beauty of open source software: you have the freedom to do whatever you like with it; you don't have to be constrained by others' priorities!

    If you're a programmer, you could even fix this issue for everyone yourself. See the wiki about getting involved in OpenLP development.

  • edited June 2012

    Out of interest, in churches that use OpenLP, how are folk preparing their printed song sheets for those who need printed sheets?

  • edited June 2012

    We set up our service - then use printservice and copy (using my fix in this thread to get the verses spaced properly) and then paste into Word and tidy up. Have proposed a merge for the code - so will see if I'm doing development/launchpad right.

    I am working on a new feature that will not copy duplicates of every repeated verse/chorus - but use a short version for example "Hallelujah ..." for every time chorus "Hallelujah sing to Jesus" gets repeated.

    But we are not doing new features until 2.0 is realised - so will have to wait.

    Martin

     

     

  • edited June 2012

    We've got some large print versions of the Songs of Fellowship books, and most of the songs we do are in these.

    For the rest, we don't introduce new songs very often, so it's not much of a problem to copy and paste one or two songs into Word as and when necessary, clean them up and print them. These sheets are then usually handed back at the end of the service, and we file them and re-use them next time we do that song. 

    However we don't have many people who need printed sheets, most are happy with the screen.

  • edited June 2012

    In our church, anybody that wants the printed words also want the music. The worship team leader prints off a few copies of the lyrics with the music. Of course we still have the stubborn people that refuse to look at the screen let alone sing a new song but hey, it's only been a couple years. They'll come around.

  • edited June 2012

    We have a large collection of Word documents on a computer, one document per song. Someone copies and pastes the required documents into a service sheet and then prints half-a-dozen copies of that service sheet.  I like what Martin has in mind, it should simplify things. 

  • edited June 2012

    and I have finally got my code working across platforms ...

    There is a broken feature in QtGui.QTextDocument.toPlainText() that renders both \u2028 and \u2029 as \n

    so we lose the \r at the end of each verse. 

    So my code grabs the QTextDocument text using a TextCursor just before it goes to the clipboard and I do a few string replacements with the correct end of lines, and hey presto it now works as it should on linux and windows.

    But ... before I propose a merge I will run it past the guys in IRC to ensure I am complying with coding standards ..

    I was too hasty last time ....

    If my solution is accepted  it will then be fairly easy to add a new copy formatted button to the print service, and do the deduplication routine maybe with some options (bold first lines ? etc) - but that's all new feature so again will seek IRC advice.

    Launchapd is new to me ... so still finding my feet .... but loving python.

    I've started coding all my utilities in it at work - even what I would have used dos batch files for in the past LOL

     

     

  • edited June 2012

    OK code triple tested and proposed for a merge .....

  • edited June 2012

    Good work! Quite a few people will be happy to see this fixed for 1.9.11, myself included :-)

  • edited July 2012

    This comment has been superceded by newer code awaiting a merge - left here for the record!

    it does work but is not the solution I ended up with.

    //// was 

    Well if you're happy to run it from source this fix works for me:-

    In file openlp\core\ui\printserviceform.py

    in v 1.9.10 line 218 .... looks like this

                        if not verse_def or verse_def != slide[u'verseTag']:
                            text_div = self._addElement(u'div', parent=div,
                                classId=u'itemText')
                        else:
                            self._addElement(u'br', parent=text_div)

    The fix is to add

    self._addElement(u'br', parent=text_div)

    before the else, so it looks like:-

                        if not verse_def or verse_def != slide[u'verseTag']:
                            text_div = self._addElement(u'div', parent=div,
                                classId=u'itemText')
                            self._addElement(u'br', parent=text_div)
                        else:
                            self._addElement(u'br', parent=text_div)

    This fixes the copy so it spaces cleanly as text.
    It does break "copy to html" but I don't care at the moment.

    Martin

     

     

     

     

     

Sign In or Register to comment.