Giter VIP home page Giter VIP logo

Comments (7)

bertsky avatar bertsky commented on July 21, 2024

As for the PageViewer CLI call, in the simplest case we could add a simple button in the XmlView action bar. We should offer some way to configure the exact command line to use, though. Perhaps in the menu under a new "settings" widget? As a first step, we could just query an environment variable, so we would have to do e.g. export PAGEVIEWER="java -jar path/to/JPageViewer.jar" before starting ocrd_browser.

from browse-ocrd.

mikegerber avatar mikegerber commented on July 21, 2024

PageViewer does not know of OCR-D's relative path convention

jpageviewer () {
	_jpageviewer_resolve_dir=`dirname "$1"` 
	if [ -e "$_jpageviewer_resolve_dir"/../mets.xml ]
	then
		_jpageviewer_resolve_dir="$_jpageviewer_resolve_dir"/.. 
	fi
	java -Dhttp.proxyHost=http-proxy.sbb.spk-berlin.de -Dhttp.proxyPort=3128 -jar $_jpageviewer_jar --resolve-dir "$_jpageviewer_resolve_dir" "$1"
	unset _jpageviewer_resolve_dir
}

(Of course, the proxy settings are specific to my environment)

from browse-ocrd.

bertsky avatar bertsky commented on July 21, 2024

@mikegerber thanks for sharing your recipe – but I think in this case we don't need to guess where the workspace directory is relative to the PAGE file path, because we already control all (absolute) paths. We can just call whatever the user configured as base command and append --resolve-dir workspace-directory page-file image-file. (The resolve-dir arg is still useful because the use might want to change to a different file interactively.)

from browse-ocrd.

bertsky avatar bertsky commented on July 21, 2024

#21 brought a partial fix.

from browse-ocrd.

mikegerber avatar mikegerber commented on July 21, 2024

Without re-inventing the wheel for displaying PAGE annotations,

Not sure if avoiding re-inventing the wheel is the right thing here, it's just drawing a few polygons... Page Viewer is good but it also has the problem that it's hard to fix problems or add functionality

from browse-ocrd.

bertsky avatar bertsky commented on July 21, 2024

Not sure if avoiding re-inventing the wheel is the right thing here, it's just drawing a few polygons... Page Viewer is good but it also has the problem that it's hard to fix problems or add functionality

I fully agree – hence this recommendation

from browse-ocrd.

hnesk avatar hnesk commented on July 21, 2024

You were right, that wheel wasn't that hard to reinvent.
In the pageview-branch (#30) there is an experimental PageViewer like view. I expect bugs, because it required some structural changes to other parts of browse-ocrd, so any testing is much appreciated.

from browse-ocrd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.