Showing posts with label Scripts. Show all posts
Showing posts with label Scripts. Show all posts

Thursday, September 2, 2010

Installing GIMP Scripts

First you have to decide if you are going to make this script available for all users as a Global script or just a single user as a local script. If you don't have access to create files in the Global location then you can only install them as a local script.

Microsoft Windows and Linux use different file system structures so they require you to save the files in completely different locations. The default file locations are as follows:

Windows


  • User: Download the file to C:\Documents and settings\\.gimp-2.2\scripts
  • Global: Download the file to C:\Program Files\GIMP-2.0\share\gimp\2.0\scripts
Linux

  • User:Download the file to ~/.gimp-2.2/scripts
  • Global:Download the file to /usr/share/gimp/2.0/scripts

Where did the script go?

Often you have just installed the script and now you can't find it. There are several reasons for this and I will explain how to find the new script.

First, when GIMP starts it reads both the Global and user script locations. So if you have added the script while The GIMP was running you will not see it, yet. One solution is to close GIMP and re-open it allowing it to read and add the new script. Another is to manually tell GIMP to read the script locations while it is still running. To do this just go / Xtns / Script-Fu / Refresh scripts

Ok, GIMP has read the script where do I find it?

GIMP scripts can be placed by the author anywhere they want. The two main locations are in the main GIMP window or in the menus in the Image window.

As a general rule scripts that alter the image are placed on the image menus and ones that create a new image from scratch are placed in the menus on the main GIMP window.

Thursday, July 29, 2010

Designing Graphics in LaTeX through Web

Today I started another topic of my project. Although the training is over now but the task regarding project is still pending. To design Graphics in LaTeX i need a script that run latex compiling commands from web browser and a php code that calls the script and last a .tex file to be compiled containing graphics code.

For the script that run latex commands do following:
Got to terminal
$cd /var/www/
$sudo mkdir demo
$cat > script.bat
cd /var/www/demo
latex slide.tex
dvips slide -o
ps2pdf slide.ps
^z
Now to design the php code that runs the script:
Go to terminal again
$cd /var/www/demo
$sudo -s
#vi index.php
$command = "sh script.bat";
exec($command, $output=array());
?>
:wq!
#exit
Now give the permissions to whole demo folder so that script can create some other files during latex file compilation without any difficulty.