Ask Your Question
0

Is there a hidden command line switch to find text or bookmark? [closed]

asked 2013-07-18 02:40:15 +0100

TonyR gravatar image

updated 2013-07-19 12:20:44 +0100

oweng gravatar image

I know I can jump to a bookmark in a LO text document from a LO calc document using a hyperlink to a URL like file:///<path>/filename.odt#bookmark

But I need to do other stuff as well, and there are thousands of such hyperlinks, so instead I hyperlinked to a target file that is associated with a .bat file. The .bat file in turn parses the filename passed to it by the hyperlink, stores various text using "set var=value" statements, and does some other command line stuff; so far so good.

But near the end of this process I need to open the .odt file, and jump to a place determined some of the already-known text or bookmark. But I can find no useful command line switches or any other way to achieve this.

I wasted days not knowing that I need to use the control key to click the hyperlink, so this time as I head down that same path again, I thought it might be more prudent to ask about this problem. All ideas would be appreciated.

In case it's relevant, the .bat file is...

set WPth=%1%

set WPth=%WPth:"=%

set WPth=%WPth:~2,-5% c:

set FNam=%WPth:~-8%

set WPth=%WPth:~0,-8%

cd %WPth%

del .bak !a. !b.* !c.* !m.*

copy %1% !a.mid

MidiCopy -tracks !a.mid > !a.txt

copy !mute.txt !m.txt

d !a.txt !m.txt -lstrip.mac

miditrim !b.mid !c.mid

"c:\Program Files\LibreOffice 4.0\program\swriter.exe" !c.mid !Lyrics.odt#%FNam%

"c:\Program Files\Foobar2000\Foobar2000.exe" !c.mid

The end of the 2nd last line stuffs up (obviously) because it doesn't like the #%FNam% on the end (borrowed from hyperlink format in a vain attempt). Midicopy.exe, d.exe, miditrim.exe are 16 bit DOS progs for which I don't have 32 bit replacements. The purpose of all this is so I can click in one place in my master music list to both play the relevant .mid file and display the relevant lyrics (which are all in one big .odt file). Also, !mute.txt contains a list of MIDI track names corresponding to instruments that will be played live (at least the lead vocals, and often also some harmonies, backup vocals, and maybe bass, drums, keyboards and/or guitars). The little DOS programs strip out all ... (more)

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2015-11-03 23:28:05.417517

1 Answer

Sort by » oldest newest most voted
0

answered 2013-07-19 12:19:30 +0100

oweng gravatar image

I know of no command line option that provides this functionality. You appear to be referring to cursor position i.e., the initial view of a document that is to be presented upon opening. In the OpenDocument v1.2 specification, section 3.11 defines Cursor position setting:

To represent a text cursor position within a document, a processing instruction with PITarget opendocument (see §2.6 of [XML1.0]) should be used. The name of the cursor position processing instruction, cursor-position, shall follow the PITarget opendocument. The processing instruction may have arbitrary implementation-defined attributes.

Note: Where a text cursor position is not sufficient to recreate a document view, producers may use arbitrary document specific settings in addition to a cursor position processing instruction.

Usually the cursor position is saved in the document once the user details are filled in. What you are suggesting appears to be the ability to override this stored value with a command line parameter. Whether a (hidden) command line option is available would require a developer to confirm.

I could not find a related enhancement request, so please raise one if you require this functionality. Please include as much information as possible and be sure to mark your bug as an "enhancement". The QA team will be happy to triage your bug in the bug tracker. If you do raise a bug, please report the reference number back here in the form "fdo#123456".

Thanks!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-07-18 02:40:15 +0100

Seen: 518 times

Last updated: Jul 19 '13