Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Migrating out of ELO-Office
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
miwalter
n00b
n00b


Joined: 10 Dec 2004
Posts: 66

PostPosted: Fri Jan 14, 2005 4:46 pm    Post subject: HOWTO: Migrating out of ELO-Office Reply with quote

Hi,

I currently had the problem of migrating my ELO-Database (ELO is a document management system for windows by ELO-Digital) to linux.

So I would like to share my way of migrating out of ELO with you - please bear in mind that I'm a script-n00b. But it works :roll:

Prequisits
- a shared partition (vfat - not ntfs)
- ELO-Office
- Gentoo
- my "script"
- dos2unix ("emerge dos2unix")

0. Boot into windows 8O

1. Export the data using ELO-Office
Click on "file"-"export" and export the whole archive into some empty folder (e.g. "Z:\Medien\elo" which corresponds to the linux-path "/home/miwalter/Medien/elo").
You will end with a lot of numbered directories and files - with corresponding ".esw"-files (they hold the descriptive information from the ELO-Database we will use to rename the files soon).

2. Boot to gentoo
Paste the following "script" to "~/bin/eloren" and make it executable ("chmod +x ~/bin/eloren"):
Code:

#!/bin/sh

for fl in $(ls)
do
  flo="$(echo $fl | sed s/\.esw//)"
  if [ -d $flo ]
  then
    echo "cd $flo"
    echo "$0"
    echo "cd -"
    cd $flo
    $0
    cd -
    echo "checking $fl"
    dos2unix -q -n $fl $fl.unix
# Leerzeichen und Kram aus der Description entfernen (gegen "_" tauschen)
# ich sollte dringend mal sed lernen...
    sd="$(cat $fl.unix | grep SHORTDESC | sed s/\SHORTDESC=// | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\\./_/)"
    rm $fl.unix
    if [[ "$sd" = '' ]]
    then
      echo "is nich"
    else
      echo "mv $flo $sd"
      mv $flo $sd
    fi
  else
    echo "$fl" > $$.tmp
    if cat $$.tmp | grep esw > /dev/null
    then
      rm $$.tmp
      if cat $fl | grep SHORTDESC > /dev/null
      then
        dos2unix -q -n $fl $fl.unix
        ex="$(cat $fl.unix | grep DOCEXT | sed s/\DOCEXT=\.//)"
        sd="$(cat $fl.unix | grep SHORTDESC | sed s/\SHORTDESC=// | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\ /_/ | sed s/\\./_/)"
        rm $fl.unix
        echo "rm $fl"
        echo "mv $flo.* $sd.$ex"
        rm $fl
        mv $flo.* $sd.$ex
#      else
#        echo "$fl -- keine SHORTDESC!"
    fi
    else
      rm $$.tmp
    fi
  fi
done


3. Start the migration

- Change to the path where you exported to (e.g. "/home/miwalter/Medien/elo")
- run the script "~/bin/eloren"
- wait until it's finished (it will output quite a lot of information)

That's it.

How is the script working?
I'm wondering myself :D
Well ok. It dives into the directory-structure of the exported elo-archive and searches for files which hold the description of the elo-elements (*.esw) - but it also has to recurse into the directory-structure (that's the way ELO holds the information).
for files:
Using the esw-filess, it then searches for the information SHORTDESC, which holds the descriptive text which should be the filename of the information-element. The file-extension is saved in "DOCEXT".
After these informations are gathered, it removes the esw-file and renames the numbered exportfile to the description + extension.
for directories:
The script first calls itself using the found directory and then renames the directory to it's descriptive name.

Limits
A description with more than ten spaces is not handled correctly. Maybe someone can fix that.

HTH,
Mirko

P.S. Don't hold me responsible if you loose everything in your partition, your computer or your gf. It worked for me though.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum