Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Android Devices > enTourage eDGe > enTourage Archive

Notices

 
 
Thread Tools Search this Thread
Old 07-26-2010, 02:51 PM   #1
ericvh
Edge User
 
Merging journals

The performance of the journal app with large journals has led me to work on daily journals and then merge them at some interval. The following script is useful to do the merging, usually I export a group of journals and then run this script over them which merges them into a single journal with tabnames equal to the original journal file names. It would be nice to have this (or something like this) available as a button on the Library screen when you select a group of journals.

#!/bin/bash

function trim
{
x=$(($1-1))
head -n $x /tmp/temp > /tmp/temp2
}

function convert
{
name=`echo $1 | sed s/.esj//g`
echo "<page width=\"396.00\" height=\"540.00\" tabname=\"$name\">"
gzcat $1 | tail +6 > /tmp/temp
lines=`wc -l /tmp/temp`
trim $lines
mv /tmp/temp2 /tmp/temp
#sed s/tabname=\"\"/tabname=\"$name\"/g /tmp/temp
cat /tmp/temp
rm /tmp/temp
}

function wrapper
{
echo "<?xml version=\"1.0\" standalone=\"no\"?>"
echo "<xournal version=\"0.4.2.1\">"
echo "<author>XXXXX</author>"
for ARG in $*
do
convert $ARG
done
echo "</xournal>"
}

wrapper $* | gzip -
 
Old 07-27-2010, 10:26 AM   #2
10tklz
Edge User
 
Agreed. That would be a very helpful feature addition.
 
Advert
Old 07-27-2010, 12:12 PM   #3
dontpanic
Edge User
 
This is a great idea. I can definitely see a demand for it.

DP
 
Old 07-27-2010, 02:06 PM   #4
fgruber
Edge User
 
The opposite may be useful as well. Split a big journal into separate files with names given by the tabname....

Quote:
Originally Posted by dontpanic View Post
This is a great idea. I can definitely see a demand for it.

DP
 
 


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Any Free Academic Journals Out There? MrKyle Reading Recommendations 7 08-08-2010 07:59 PM
Medical Journals and Newspapers drlolly iRex 1 08-25-2009 11:11 AM
Photos from medical journals quek iRex 10 07-28-2009 11:44 AM
Reading medical journals on Kindle DX sr505 Amazon Kindle 0 07-15-2009 11:58 AM


All times are GMT -4. The time now is 04:28 AM.


MobileRead.com is a privately owned, operated and funded community.