Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5977793
retrieveDjvuMetaData.sh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
582 B
Referenced Files
None
Subscribers
None
retrieveDjvuMetaData.sh
View Options
#!/bin/sh
runDump
()
{
local
ret
# djvudump is faster than djvutoxml (now abandoned) as of version 3.5
# https://sourceforge.net/p/djvu/bugs/71/
"
$DJVU_DUMP
"
file.djvu
>
dump
ret
=
"
$?
"
if
[
"
$ret
"
-ne
0
]
;
then
echo
"djvudump failed with exit code
$ret
"
1
>
&
2
rm
-f
dump
fi
}
runTxt
()
{
local
ret
# Text layer
if
!
"
$DJVU_TXT
"
--detail
=
page
file.djvu
>
txt
;
then
rm
-f
txt
fi
ret
=
"
$?
"
if
[
"
$ret
"
-ne
0
]
;
then
echo
"djvutxt failed with exit code
$ret
"
1
>
&
2
rm
-f
txt
fi
}
if
[
-n
"
$DJVU_DUMP
"
]
;
then
runDump
fi
if
[
-n
"
$DJVU_TXT
"
]
;
then
runTxt
fi
exit
0
File Metadata
Details
Attached
Mime Type
text/x-shellscript
Expires
Sat, Oct 3, 20:06 (3 d, 5 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
dc/8c/73292983552ab5c983a1ee7b8784
Default Alt Text
retrieveDjvuMetaData.sh (582 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment