Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex

Notices

Reply
 
Thread Tools Search this Thread
Old 04-07-2008, 04:16 AM   #1
ragdoll
Connoisseur
ragdoll began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Oct 2007
Device: iRex iLiad V1
Merging multiple scribbles at one time

I searched the forums but it seems that there's no application able to recursively scan a folder and its subfolders and merge all the scribbles contained.
Is there a way to do it?
I have 140 PDF that must be merged with the corresponding scribbles and it would be way too long if I had to run 140 times the iLiad Companion merge process or the IliadPdfScribbleMerger.
ragdoll is offline   Reply With Quote
Old 04-07-2008, 06:02 AM   #2
kusmi
Connoisseur
kusmi began at the beginning.
 
kusmi's Avatar
 
Posts: 73
Karma: 16
Join Date: Jul 2006
Location: Zurich, Switzerland
What operating-system do you use?

I had the same problem - but had a linux-server running at home, so I configured it that way, so my iLiad automatically uploads the outbox to my linux-server (I just click the iLiad "connect" button -> it will connect to my linux-box to it's windows-share and uploads my outbox, and imports all new documents)

Then I have a cron-job (a linux script, which checks on a regular interval, e.g. 1 minute) if they are new uploaded content. If they are, I automagically convert all the pdfs+scribbles of all files in that folder using the excellent java "iLiadPDFScribbleMerger".

If you are "script-savy" I have uploaded my ruby script, which does all the conversion of the directory - it should also work on windows, if you install a ruby interpreter.

Code:
#!/usr/bin/ruby
#convertScribble.rb

require 'rexml/document'
include REXML

# check, if another script is already running... then stop it

output = `ps uxww | grep "convertScribble.rb" | grep -v "grep" | grep -v "/bin/sh"`
processes =  output.split("\n").length
puts "Running procceses "+output

if (processes > 1)
  puts "Already running, exit now"
  exit	
end
puts "Start Processing"

directories = Dir["/home/michi/iLiad/inbox/*.pdf*"]

directories.each { 
	|item|
	basename = File.basename(item)
	changeTime = File.mtime(item)
	# only execute if modification-time is larger than 1 minute:
	difference = Time.now - changeTime
	puts "Modification of file is "+difference.to_s+" seconds ago" 
	if (difference > 60)
	puts "File is old enough, start processing" 
	# extract XML description
          doc = Document.new File.new("#{item}/manifest.xml")
	  root = doc.root
	  completeDescription = root.elements["metadata/dc-metadata/Description"].text
          fileString = ""
          if (completeDescription != nil)	
	    description = completeDescription.split("\n")	
	    fileString = ""
	    description.each { |desc|
              fileString = fileString + "[" + desc + "] "
            }	
          end
      	  `cp -R "#{item}" "/home/michi/iLiad/inbox-converted/backup/"`
	  `/usr/bin/java -jar "/home/michi/iLiadConvert/iLiad Scribble Merger/ILiadPdfScribbleMerger.jar" -i:"#{item}" -o:"/home/michi/iLiad/inbox-converted/#{basename} #{fileString}Notes_Michi" -m:n -c2:#990033 -c3:#006633`
	  `rm -rf "#{item}"`
	  `chmod -R ugo+rw "/home/michi/iLiad/inbox-converted/backup/"`
	end
}
It does a bit more than just converting - it also checks, that it will not start converting until the pdfs are fully uploaded. Then when I usually scribble the PDFs on my iLiad, I add comments to the pdfs (e.g. wether I read it already, some keywords, etc) and I also include those keywords to the resulting merged PDF...

Perhaps you could adapt this script for your own needs?
kusmi is offline   Reply With Quote
 
Enthusiast
Old 04-07-2008, 06:12 AM   #3
ragdoll
Connoisseur
ragdoll began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Oct 2007
Device: iRex iLiad V1
Quote:
Originally Posted by kusmi View Post
What operating-system do you use?

I had the same problem - but had a linux-server running at home, so I configured it that way, so my iLiad automatically uploads the outbox to my linux-server (I just click the iLiad "connect" button -> it will connect to my linux-box to it's windows-share and uploads my outbox, and imports all new documents)

Then I have a cron-job (a linux script, which checks on a regular interval, e.g. 1 minute) if they are new uploaded content. If they are, I automagically convert all the pdfs+scribbles of all files in that folder using the excellent java "iLiadPDFScribbleMerger".
Wow, complicated!
I'm on Windows Vista, probably I could use windows scripting to do the same, but I don't know anything about windos scripting, yet. However, I only need to merge scribbles contained in a list of directories and have the results in another directory (or in multiple subdirectories).
ragdoll is offline   Reply With Quote
Old 07-30-2008, 01:39 AM   #4
engunneer
Member
engunneer began at the beginning.
 
Posts: 13
Karma: 10
Join Date: May 2008
Location: Pacific Northwest, US
Device: iRex Iliad
I'm working on a windows script to manage the iLiad and pdfs like an iPod and iTunes. It is in the very early stages, but among other things, it will merge anything it sees that needs to be merged. I am using Autohotkey as the language. and the java merging tool I found on this forum.
engunneer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Migrating, Merging and Multiple Calibre Folders daffy4u Calibre 3 06-28-2010 04:53 AM
Problem with merging scribbles to PDF file MikeTr iRex 2 01-15-2010 03:45 AM
Better way of merging Scribbles? Jürgen Hubert iRex 15 08-14-2009 11:04 AM
Consolidating/merging multiple formats flinx1 Calibre 1 05-06-2009 01:17 PM
Merging Scribbles with Pdf jæd iRex 15 12-20-2006 04:40 AM


All times are GMT -4. The time now is 11:20 PM.


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