Montag, 26. März 2018

Blast Web Interface and Python script for automatic update


BLAST ("Basic Local Alignment Search Tool") finds regions of similarity between biological sequences. The task was to do this with local oligos and to establish a web interface.

General Webinterface you find here
https://blast.ncbi.nlm.nih.gov/Bblast viroblastlast.cgi

A stand alone program for BLAST called blast+
https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Download

I found the nice Web interface Viroblast from Deng et al. 2007
https://indra.mullins.microbiol.washington.edu/viroblast/docs/aboutviroblast.html
You can download the software from
James Mullins
Department of Microbiology
University of Washington
https://els.comotion.uw.edu/express_license_technologies/viroblast

The most important thing is to fix the path to your blast+ programs in the vironblast.ini file.

 blast+: /usr/bin/
for example.

 Create a new database for your Viroblast

To create a new database out of the fasta file you had to install
blast+ from NCBI
https://blast.ncbi.nlm.nih.gov/Blast.cgi?CMD=Web&PAGE_TYPE=BlastDocs&DOC_TYPE=Download

You need the program makeblastdb.

1. Type in in the terminal:
makeblastdb -in   -dbtype 'nucl' -out

makeblastdb - program from blast+ NCBI
in - input
out -output
dbtype - 'nucl' for nucleotides, 'prot' for proteins

2. Copy the new database files to
viroblast/db ,protein or nucleitides sub folder

3. That viroblast know something about the new database, you had to configure the viroblast.ini file.

You can use several databases.
Here write for a nucleotide database (in one line!)

blastn: database_name1 => name_to_display1,database_name1 => name_to_display1,and so on


Python script to automate the tasks

Here is a Python script to automate the task.
The script starts with cron job daily.


import pandas as pd
import re
import os 

import time

path_excel=''
path_viroblast_db='
'
path_viroblast_ini='
'

file = path_excel + 'AG_XX.xlsx' 



# Read the Excel file
xl = pd.ExcelFile(file)


# Read the sheet names in the excel file
sheets_excel=xl.sheet_names

# Load a sheet into a DataFrame by name: df1
df1 = xl.parse(sheets_excel[0])

# slice columns 1- 3
df1=df1.iloc[:,0:3]
# rename column title
df1.columns=['primer_index','primer_name','sequence']

# create a fasta format string for the fasta file
primer_number=''
fasta=''

#find empty cells in  Excel, NaN, Not a number
def isNaN(num):
    return num != num
# fasta format
for index,row in df1.iterrows():
    if not isNaN(row['sequence']):
        # delete all white spaces in sequence
        sequence = ''.join(row['sequence'].split())
        primer_number=row['primer_index']

        fasta=fasta+'>'+str(row['primer_index'])+"|"+str(row['primer_name'])+'\n'+str(sequence)+'\n'


#write to fasta file
with open(path_viroblast_db+ primer_number+'.fa','w') as my_file:
    my_file.write(fasta)



#makeblastdb execute with fasta file and output name
os.system('makeblastdb'+' -in '+ path_viroblast_db+primer_number +'.fa'+" -dbtype 'nucl' -out "+path_viroblast_db+primer_number)

#viroblast.ini update
ini_txt=''
with open(path_viroblast_ini+'viroblast.ini','r') as ini_file:
    for line in ini_file:
        m=re.search(r"XXX_\d{5}",line)
        if m:
            old=m.group()
            #print(m)
            line=line.replace(old,primer_number)
            ini_txt=ini_txt + line
        else:
            ini_txt=ini_txt + line

# write the new viroblast.ini    
with open(path_viroblast_ini+'viroblast.ini','w') as ini_file_new:
    ini_file_new.write(ini_txt) 


time_now=time.asctime()
# write log-file
with open(path_viroblast_ini+'lui.log','a') as log_file:
    log_file.write(primer_number+';'+time_now+'\n')












Freitag, 29. Dezember 2017

Raspberry Pi Public Display - Infoboard - broadcast messages and information for students, lecturers, teachers, staff and visitors

Raspberry Pi Public Display - broadcast messages and information for students, lecturers, teachers, staff and visitors 

Version 14.3.21

Montag, 13. November 2017

Mac OSX SFTP Server

You had to upload big files to your Mac. Macs offers an build in SFTP Server.
Port is 22, which is open at University.

see following webpage:

https://www.chainsawonatireswing.com/2012/08/09/how-to-set-up-an-sftp-server-on-a-mac-then-enable-a-friend-to-upload-files-to-it-from-their-iphone-ipad-or-other-idevice/


1. Create a folder for SFTP files

In Finder crate a folder, for example /sftpupload on your Mac System Hard disk.
With Command + I open the "get info" window.
Sharing and Permission -> everyone to "Read & Write"


2. Create User for SFTP

Open System Preferences
Users & Groups
After unlock for Administrator add an user by click to the "+"
"New Account" -> "Sharing only"
Type in a name for example "sftpuser" (FTP as name does not work!)
After user is created click to the user with right mouse and "advanced options"
Login shell: /bin/bash
Home directory:

3. File Sharing

Open System Preferences
Sharing
Activate "File Sharing"
Shared Folders: add your created folder, for example "sftpupload "
Mark "sftpupload" and go to Users:
Add your created user sftpuser.
Permit Read (Only), write (dropbox) or Read & Write permission

4. Activate SFTP

 Open System Preferences
Sharing
Activate "Remote Login"
Allow Access for : add your created user sftpuser


Donnerstag, 20. April 2017

Windows Server 2016 Install - BW-PC5 - Error 0x80300024

I tried to install Windows Server 2016 on
BW-PC5
Fujitsu P957.
128 GB SSD.

Install Windows Server 2016.
Choose the hard disk to install, I got the message
Error 0x80300024

To create a partition on the SSD produce the error 0xe7d8f710

I did the following.

1. Unplug all additional had drives (in my case a 1 TB Hard drive)

2. Windows install program, go to repair
command prompt
diskpart

list disk
select disk 0 (in my case the SSD is number 0)
list part
select part 1 (I had 2 partitions)
delete part
select part 2
delete part

clean (very important this deletes the mbr partition table)

Restart the windows installation program

Choose Custom installation.

Create the partition on your SSD.

Successfully install Windows 2016 on SSD.

Freitag, 10. März 2017

GUS Staining - Python program

GUS Staining - Python program


Download - GUS staining Python.

The task is automatically quantify the images of GUS staining.
https://en.wikipedia.org/wiki/GUS_reporter_system

Normally you can do this with ImageJ
http://www.ipb.uni-tuebingen.de/kurs/comp/5_bildbearb/kurs05_06.html#gus


I wrote a program in Python (2.7 and 3.x). 
This program measure all files beginning with 'GUS' and ending with 'png' in the actual folder. 
Write the result to a file.
For control the image and the marked areas will be shown. 





The complete program and example files, see download above.

Dienstag, 28. Februar 2017

Bacula restore Linux

bconsole

Thanks to Andreas Keck.

Default directory is /opt/bacula/working


Client name is tu-xxx

Preperation restore:


echo "list clients" | /opt/bacula/bin/bconsole | grep -i tu-xxx
echo "list jobtotals" | /opt/bacula/bin/bconsole | grep -i tu-xxx
echo "list jobs" | /opt/bacula/bin/bconsole | grep -i tu-xxx
  (you get jobid, first column)
echo "list joblog jobid=xxxxxx" | /opt/bacula/bin/bconsole | grep -i tu-xxx


Start Restore:


  Start bconlole
/opt/bacula/bin/bconsole
  Now you are connetet to bacula server. Prompt is *

restore client=tu-xxx where=
 6
     (6: Select backup for a client before a specified time)
2015-11-10 00:25:07
     (time stamp from previous output, list joblog jobid=xxxxxx)
cd
     (navigate to the file/directory which should be restored)
ls
     (shows listing of the cwd)
mark adjtime
     (mark file, in example /etc/adjtime)
Output:1 file marked.
done


Following message appear:

Bootstrap records written to /opt/bacula/working/unixxx.bsr

The Job will require the following (*=>InChanger):
   Volume(s)                 Storage(s)                SD Device(s)
===========================================================================
  
    yyy-disk1-1271       FileChanger-yyy          FileChanger-yyy       

Volumes marked with "*" are in the Autochanger.


1 file selected to be restored.

Using Catalog "uniyyy"
Run Restore job
JobName:         DefaultRestore
Bootstrap:       /opt/bacula/working/unixxx.bsr
Where:          
Replace:         Always
FileSet:         FullSet
Backup Client:   tu-xxx
Restore Client:  tu-xxx
Storage:         FileChanger-ZDV
When:            2015-11-20 16:39:07
Catalog:         uniyyy
Priority:        10
Plugin Options:  *None*
 

OK to run? (yes/mod/no):

  yes                      (restore starts, jobid will be shown)
  quit                     (leave the bconsole)

with
  echo "list joblog jobid=xxxxxx" | /opt/bacula/bin/bconsole

you can watch the restore

Montag, 27. Februar 2017

Bacula restore with Windows

Start bconsole


Default working directory
c:\Program files\bacula\working
 This will be altert by c:/temp see below.
Or you can choose any other folder. Create the folder before  you start bconsole.




Name of the client computer (tu-xxxx)

Open bconsole
Use Windows Start : Bacula : bconsole
or you can execute
c:\Program files\bacula\bconsole.exe



messages -i grep
print the recent messages.




Begin the restore:


 restore client=tu-wwwblast where=c:/temp
  Eingabe von:  6
     (6: Select backup for a client before a specified time)
  2015-11-10 00:25:07
     (time stamp from previous output, list joblog jobid=xxxxxx)
  cd
     (navigate to the file/directory which should be restored)
  ls
     (shows listing of the cwd)
 mark testfile
     (mark file, in example testfile)
  Output:1 file marked.
  done
  Output:

Bootstrap records written to /opt/bacula/working/xxx.bsr

The Job will require the following (*=>InChanger):
   Volume(s)                 Storage(s)                SD Device(s)
===========================================================================
  
    XXX-incr-disk1-1271       FileChanger-XXX           FileChanger-XXX       

Volumes marked with "*" are in the Autochanger.


1 file selected to be restored.

Using Catalog "xxxxxx"
Run Restore job
JobName:         DefaultRestore
Bootstrap:       /opt/bacula/working/xxx.bsr
Where:           c:/temp
Replace:         Always
FileSet:         FullSet
Backup Client:   tu-xxx
Restore Client:  tu-xxx
Storage:         FileChanger-ZDV
When:            2015-11-20 16:39:07
Catalog:         xxx
Priority:        10
Plugin Options:  *None*
OK to run? (yes/mod/no):

  yes                      (restore will be done, jobid will show)
  quit                     (quit bconsole)

with
  echo "list joblog jobid=xxxxxx" | /opt/bacula/bin/bconsole

you can show the log

Chemstation on Windows 10, 64 bit

Basically I followed the instruction of Jim Beach

http://jbbeach.com/files/Chemstation/Installation_of_ChemStation_on_64_bit_Windows_7.pdf

Install on Windows 10, 64 bit
Agilent ChemStation Rev. B. 04.01 SP1
  • Install Microsoft .NET Framework 3.5
  • Install Chemstation Software from Install CD
    run setup.exe in XP compatibility mode
    Path is c:\
To run 64 bit I used the CorFlags.exe from Microsoft SDK  NetFx 6.6.2 Tools.
This path is used
C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\CorFlags.exe
Maybe for you a different path.

  • Open Command prompt with Admin rights
  • for %A in (C:\Chem32\CORE\*) do ("C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\CorFlags.exe" %A /32BIT+)

    Hint: not all files are working, maybe you get the message:
    corflags : error CF008 : The specified file does not have a valid managed header

Start ChemStation
Add Instrument wizard will opened and you can add the devices.

If you want to use an old installation, last action is to copy the old profiles.
Copy the folder "1" to C:\Chem32. "1" stands for your device 1.

When I closed the ChemStation program I got the windows, "program is not properbly closed". No idea how to get rid of the window.

Dienstag, 20. September 2016

Microsoft SQLServer 2012 - Remote Connection

Microsoft SQLServer 2012 - Remote Connection

See for detail manual


  1. Enable remote Connection. Tool SQL Management Studio
  2. Enable TCP in Tool SQL Server Configuration Manager
  3. IPall 1433 not 0!
  4. Turn on SQL Server Browser Service
  5. Firewall 

Firewall:
sqlservr.exe
sqlbrowser.exe
TCP port 1433
UDP port 1434

Montag, 29. Juni 2015

Wget - copy Website - Windows

How to get Wget?


Open the terminal.
In windows press "windows-key" + R
"cmd"

Download html pages:

This is the windows code.

wget -p --no-parent --convert-links -l3 -
Pdownload URL http://www.uni-tuebingen.de/

-p = This option causes Wget to download all the files that are necessary to properly display a given HTML page.
--no-parent = Do not ever ascend to the parent directory when retrieving recursively. This is a useful option, since it guarantees that only the files below a certain hierarchy will be downloaded.
Important for Typo3 Website
--convert-links = convert the links in the downloaded files to point to local files
-l3 = i.e. level 3; Specify recursion maximum depth level depth
-Pdownload = download to current directory, i. e. -Pc:\temp\test, download the files to c:\temp\test folder.
URL = Website ti copy, i.e.  http://www.uni-tuebingen.de/

Also try
--mirror’
Turn on options suitable for mirroring. This option turns on recursion and time-stamping, sets infinite recursion depth and keeps FTP directory listings. It is currently equivalent to ‘-r -N -l inf --no-remove-listing’. 

Download pictures

wget -A .jpg,.png,.gif -p --no-parent --c
onvert-links -l3 -Pdownload http://www.uni-tuebingen.de/

-A = Types of files (accept list)

Also useful
--ignore-case = .JPG or -jpg will be found




Donnerstag, 18. Juni 2015

Chemikaliendatenbank Open Eventory


Recherche der CAS Nummer


Die meisten Chemikalien in einer freien Datenbank
http://chem.sis.nlm.nih.gov/chemidplus/

Gut für deutsche Chem.Namen (1 Mio Chemikalien)
http://www.organische-chemie.ch/OC/chemikalien/suche.htm

http://www.chemicalbook.com/

Herstellerdatenbaken
http://www.merckmillipore.com/germany/chemicals

http://www.sigmaaldrich.com/germany.html

Freitag, 24. April 2015

Adobe Acrobat 10.0 does not open

Nothing happens when you launch Acrobat 10.0.

Windows 7 32 and 64 bit
Adobe Acrobat 10.0
Creative Suite 6 (CS 6)

From time to time the Acrobat does not open.

Instead of installing again use the Acrobat Fix Tool Acrofix.zip.

Informations:
https://helpx.adobe.com/creative-suite/kb/acrobat-failed-launch-30-days.html

Donnerstag, 16. April 2015

Default Gateway 0.0.0.0

mainly caused by Apple Bonjour Service
https://support.microsoft.com/en-us/kb/970313

This time the Windows 7 PC has no Bonjour installed.

Fix the problem:

Open terminal (cmd.exe) as admin.
Type in
route delete 0.0.0.0
ipconfig /release
ipconfig /renew


Freitag, 12. April 2013

Adobe Acrobat X (and Destiller) crashes when opening


Windows XP SP3
Adobe Creative Suite 6 Design Standard

Problem causes by Adobe glorious Licencing.

see
http://forums.adobe.com/message/4507227#4507227
55. Amrita:

For all the users who have faced a problem where Acrobat did not launch after 30 days of serializing with a suite serial number, please execute the following workaround:

  1. Make sure you are connected to the internet.
  2. Launch a regular  CS6 product other than Acrobat or Flash Builder (for example: Photoshop, After Effects, Premier Pro, InDesign, Flash Professional, Illustrator, Dreamweaver.)
  3. Click on Help->Deactivate .
  4. Deactivate the application. Quit application.
  5. Launch a regular  CS6 product other than Acrobat or Flash Builder (for example: Photoshop, After Effects, Premier Pro, InDesign, Flash Professional, Illustrator, Dreamweaver.)
  6. Accept Eula.
  7. Register trial by signing in. Let the app launch.
  8. Quit and relaunch the app. Wait for UI to come.
  9. Click on License This Software button on the UI.
  10. Click on Sign in .
  11. Serial number screen will come
  12. Enter the serial number in the serial number screen and click Next.
  13. Quit app and relaunch the app while connected on the internet .

After this if you launch Acrobat it will launch and run forever without trouble. In case you still face a problem , try relaunching the other CS6 app once more and then launch Acrobat.

Montag, 8. April 2013

Map network drive with logon vbs script


I am using Windows 7, 64 bit

The vbs script to map a network drive as logon script does not work.

Manually executing the script does work!

The script is started with Local Group Policy
-gpedit.msc
-User Configuration
-Windows Settings
-Logon
-Scripts

The script is
----------------------------------------------------------
' Map network drive script
Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "T:" , "\\server\drive"
-----------------------------------------------------------
More information see
http://www.computerperformance.co.uk/Logon/Logon_HomeDir.htm



Resolution:

Change or create a value in the registry.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
Here you want to create a DWORD entry named "EnableLinkedConnections" and set
the value to 1
Reboot for the changes to take effect.

Dienstag, 2. April 2013

HP Compaq Desktop PCs - Boot Time Becomes Excessively Long in Windows XP Environment

 http://h20565.www2.hp.com/portal/site/hpsc/template.PAGE/public/kb/docDisplay/?spf_p.tpst=kbDocDisplay&spf_p.prp_kbDocDisplay=wsrp-navigationalState%3DdocId%253Demr_na-c03719354-1%257CdocLocale%253D%257CcalledBy%253D&javax.portlet.begCacheTok=com.vignette.cachetoken&javax.portlet.endCacheTok=com.vignette.cachetoken


RESOLUTION

For systems not yet affected by the issue:
Update the AMT driver ( 1 ) to prevent the issue from occurring.
For systems already exhibiting the symptoms:
Update the AMT driver (1)
AND
Clear the registriry key (2)
1. Update the AMT driver
Download and install the appropriate SoftPaq, below, to update the AMT driver and prevent future occurrence of the issue:
For Models
SoftPaq Description
Release Notes
SoftPaq Download
6200 Pro
6280 Pro
8200 Elite
Intel(R) AMT LMS_SOL for AMT 7.xx
Version: 7.1.40.1161
Revision: M
For Models
SoftPaq Description
Release Notes
SoftPaq Download
8100 Elite
Z200 Workstation
Intel AMT LMS_SOL for AMT 6.xx
Version: 6.0.0.1179
Revision: B
2. Clear the bloated registry key
For computers already exhibiting long boot times, the registry key must be cleared as follows:
CAUTION!
The following procedure contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly.
HP strongly recommends that you back up the registry before you modify it. Then, you can restore the registry if an issue occurs. For more information about how to back up and restore the registry, click the following link to view the article in the Microsoft Knowledge Base:
  1. Open a new document in Notepad (or other text editor)
  2. Paste the following text into the file:

    [-HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Digest\Hosts]
    [HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Digest\Hosts]
  3. Save the file and change the extension from .txt to .reg
  4. Double-click the .reg file to import it into the registry (this deletes and recreates the key)
    NOTE
    Click this link to learn more about the issue:

Freitag, 22. März 2013

Quicktime Movie overlay text

or create a background to my video

Qucktime Pro V. 6.3

  1. Text as a png-file with transparent background.
    Do this by for example in Photoshop:
    Create a new file with transparent background and save this as a png-file.
  2. Open the png-file with Qicktime Pro
  3. Movie : Get Movie Properties (Ctrl + J)
  4. Video Track : Graphics Mode : straight alpha
  5. Edit : Select all (Ctrl + A) and Copy (Ctrl + C)
  6. Open your Movie with Quicktime Pro
  7. Set start and end points (begin and end of overlay of the text)
  8. Edit : Add Scaled
    This add a new track to your movie


What if my test layer is not visible?

Maybe the track with the text layer is behind the Video.
Fix this by changing the layer number.
-1 is in front, more positiv is behind.

Edit : Enabel tracks 
gives you an idea which number your track has by making visible or not.

Movie : Get Movie Properties
Choose the track of your text layer
Layer
change the number



Adjust the position and size of the Text layer.

Edit : Enabel tracks 
gives you an idea which number your track has by making visible or not.

Movie : Get Movie Properties
Choose the track of your text layer
Size
Adjust
With the mouse you can fix the position and the size of your text layer




A new Background for your Movie

Create a png-file with the new background.
(Photoshop, GIMP)

Open the png-file with your new background with Qucktime Pro.

Edit : Select all (Ctrl + A) and Copy (Ctrl + C)

Open your movie with Quicktime Pro

Set start and end points (begin and end of overlay of the text)

Edit : Add Scaled
This add a new track to your movie

If your background is in front of the movie see above
"What if my test layer is not visible?"








Dienstag, 19. Februar 2013

HP ScanJet 4670 on Mac OS 10.7 with VirtualBox


HP ScanJet 4670
Mac OS 10.7
VirtualBox 4.2.6, Host MacOs 10.7, Guest Windows 8

The HP Scanner use a PowerPC Plug-in and therefore does not work on Mac OS > 10.7.

The only solution I found is to use a virtual machine.
I choose the free VirtualBox 4.2.6.

 VirtualBox

-Install the VirtualBox on Mac OS 10.7.

-The guest system is Windows 8. (Windows XP will also work, probably)

Driver HP ScanJet 4670

-Install the general driver for Windows Vista 64 bit, setup_basic_4600.exe
Look on www.hp.com driver site. 

USB Error

Then I plug-in the USB cable from the scanner I got the error:

"...USB Device Status is busy..."

The Mac cannot  read the device, so the virtual machine does not recognize the scanner.

The solution I found on the site
https://forums.virtualbox.org/viewtopic.php?t=737
wstein 6.12.2008, thanks to wstein

"...
1. First and most important, if you are already running your virtual machine(s), USB capture is not going to work for most devices. So, shutdown ALL virtual machines for the moment (properly from within each machine).
2. Open the Device Manager. The easiest way to find it is in the control panel.
3. Locate the device you want to capture. If there is no driver installed then it might appear in the 'Other devices' section as 'Unknown device'. If so skip the next 2 steps.
4. click the menu View->Devices by Connection
5. click on all '+' to expand the tree until you find the device you want, keep an eye out for ones with USB in it. The exact hierarchy is dependant on your hardware.
6. If the name of the device is not clear, make sure its the right one by unplugging it. The one you unplug will disappear in the device manager window within 2 seconds. Plug it back in to make it reappear.
7. right click on the device you want to capture and select 'Properties' from the pop-up menu
8. a properties dialog will appear, click on the 'Details' tab
9. click on the 'Property' dropdown and select 'Hardware Ids'
10. there should be a line of text similar to 'USB\Vid_06CD&PID_011C&REV_0001' Write this down if you can't see it while the VirtualBox control window is up. These are the values needed. Note that they will change when a virtual machine captures them.
11. go to (or start) the VirtualBox control window.
12. select the Virtual machine you wish to associate with this USB device
13. click on the 'USB' in the 'Details' pane or click 'Settings' then 'USB' from the settings dialog
14. click on the empty filter (blue circle), this will add a new [blank] entry (I could not make this work by using the one with the '+' sign on it, don't know why)
15. double click on the new entry to bring up a 'USB Filter Details' dialog
16. enter the 3 four digit hexadecimal numbers from the hardware ID string from Device Manager as follows
four characters following 'Vid_' -> Vender ID:
four characters following 'PID' -> Product ID:
four characters following 'REV_' -> Revision:

..."
in case of ScanJet 4670
Vender ID: 03F0
Product ID: 3005
Revision: 0100



"...
17. You can optionally change the name but do not enter any other values. Click 'OK' to exit the 'USB Filter Details' dialog.
18. Click 'OK' to exit the Settings dialog
19. repeat steps above for other devices or virtual machines
20. If this is the second time trying these instructions, unplug and plug back in the USB device at this point.
21. Start your virtual machine(s).
22. Capture the USB device by selecting it from the USB icon menu in the lower right corner of the virtual machine window. This should cause the device listed in the (Host) Device Manager to change to 'Virtual Box USB'

..."



Now I can scan with the application 'paint' and send the file through a shared folder to the Mac.


Montag, 18. Februar 2013

E-Book erstellen mit SIGIL


Es wird Sigil 0.7 verwendet.
http://code.google.com/p/sigil/

Mit der freien Software SIGIL kann aus einer HTML-Datei leicht eine epub-Datei erstellt werden.

  1. Der Text mit Bildern sollte als HTML-Format vorliegen.
    Wenn nicht kann aus Word oder aus dem Writer (LibreOffice/OpenOffice) der Text als HTML gespeichert werden. Word produziert dabei gewöhlich viel HTML-Müll. Daher die Einstellung "Webseite, gefiltert" benützen. Nach dem Speichern in Word sind die Bilder in einem extra Ordner zu finden. Im Text sind die Bilder nur verknüpft.

    Mein Text lag schon als HTML vor, aber ich musste die Tabellenformatierung und einige unnütze Links in der Datei löschen. Dazu habe ich das alte Adobe Golive 6.0 verwendet. Ich habe den gewünschten Text in eine neue Datei kopiert und als HTML gespeichert.
    Dreamweaver oder ein anderer HTML-Editor wäre auch gegangen.
  2. SIGIL öffnen.
  3. Zuerst die Bilder importieren! Werden die Bilder erst nachträglich importiert, kann SIGIL den Link auf die Bilder nicht einrichten. Siehe Tipp am Ende der Post.
    Dazu in SIGIL Menü Insert : File... klicken.
    Images wählen und den Bilderordner aud der Festplatte suchen.
    Alle Bilder wählen und in SIGIL importieren.
  4. Die HTML-Datei importieren.
    In SIGIL unter dem Menü File : Add..
    Existing Files...
    wählen und die HTML-Datei auf der Festplatte suchen und einfügen.
  5. Die überflüssige Datei Section 0001.html, die zu Beginn automatisch erstellt wurde, eventuell löschen.
  6. Mit Menü Tools : Delete Unused Media Files.. können überflüssige Bilderdateien gelöscht werden. Aber Achtung siehe Tipp.
  7. Mit Menü Tools : Table of Contents wird automatisch ein Inhaltsverzeichnis erstellt.
  8. Mit Tools : Metadata Editor... können Informationen zu der epub-Datei beigefügt werden.
  9. Zum Schluss wird mit Menü File : Save die epub-Datei erstellt.
Die Epub-Datei habe ich mit dem Programm calibre auf dem PC oder Mac angeschaut.

Tipp:
Nicht immer war der Link zu der Bilderdatei richtig gesetzt.
Um das zu reparieren ist das Werkzeug Menü Tools : Saved Searches nützlich.
In dem Fenster Saved Searches kann mit der rechten Maus und Add Entry eine neue Suche und Ersetzen eingerichtet werden. Es wird unter der Find der falsche Link, z.B. File:///d:/daten...
und unter Replace ../Images/ eingetragen.
Dann mit der Schaltfäche Replace All die Suche-Ersetzen durchführen.