making html pages for an easier updatable site
This discussion is connected to the gimp-docs-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
making html pages for an easier updatable site | Marco Ciampa | 23 Mar 15:05 |
making html pages for an easier updatable site | Ulf-D. Ehlert | 24 Mar 21:34 |
making html pages for an easier updatable site | Marco Ciampa | 25 Mar 10:55 |
making html pages for an easier updatable site | Ulf-D. Ehlert | 25 Mar 14:02 |
making html pages for an easier updatable site | Marco Ciampa | 25 Mar 20:54 |
making html pages for an easier updatable site | Ulf-D. Ehlert | 26 Mar 13:11 |
making html pages for an easier updatable site
Since more eyeballs make bugs popup easier than only two, I am trying to use user generated html pages for a local, more quickly updated, site.
Doing
make
creates a html pages & update images links but...in a way that (IMHO) is
not really smart.
One example is better than a thouthands words...
Essentially, for italian and english, the output of the command is:
html/en html/it
these two dirs contains all the html code with one image simlink that points to ../../xml/en/images and ../../xml/it/images respectively.
so we have:
html/en
html/it
xml/en/images
xml/it/images
This is all ok but...in xml/en/images (and similarly in xml/it/images) there are _not_ images but _absolute_ simbolic links to
for example:
xml/it/images/dialogs/scale-image.png
points to
-> /home/marco/svn-gnome/gimp-help-2/trunk/images/it/dialogs/scale-image.png
this makes copying this stuff to a site not so fast...
Q: is it possible to substitute all absolute links with relative one or (alternatively) making only one absolute reference (that is easier to modify) and all other references relative to this one?
TIA
making html pages for an easier updatable site
Marco Ciampa (Montag, 23. März 2009, 15:05):
This is all ok but...in xml/en/images (and similarly in xml/it/images) there are _not_ images but _absolute_ simbolic links to
for example:
xml/it/images/dialogs/scale-image.png
points to
-> /home/marco/svn-gnome/gimp-help-2/trunk/images/it/dialogs/scale-image.png
this makes copying this stuff to a site not so fast...
Yes, this was just the easiest way to create these links - because I didn't know the command to convert absolute links to relative links. (It seems there is no such command.)
Q: is it possible to substitute all absolute links with relative one
Yes, of course. For instance, we can write a little shell/Perl/Python script to make relative links or (better) to do all the find-image-and-make-link stuff (try 'make -n xml/it/images' to see these commands).
or (alternatively) making only one absolute reference (that is easier to modify) and all other references relative to this one?
No, we "copy" the image files in xml/it/images from two different sources: the English (language-independent) images or the localized images. So IMO we had to use three absolute references (to images/C, images/common, images/LANG)...
Ulf
making html pages for an easier updatable site
On Tue, Mar 24, 2009 at 09:34:40PM +0100, Ulf-D. Ehlert wrote:
Marco Ciampa (Montag, 23. März 2009, 15:05):
This is all ok but...in xml/en/images (and similarly in xml/it/images) there are _not_ images but _absolute_ simbolic links to
for example:
xml/it/images/dialogs/scale-image.png
points to
-> /home/marco/svn-gnome/gimp-help-2/trunk/images/it/dialogs/scale-image.png
this makes copying this stuff to a site not so fast...
Yes, this was just the easiest way to create these links - because I didn't know the command to convert absolute links to relative links. (It seems there is no such command.)
apt-get install symlinks
man symlinks
Q: is it possible to substitute all absolute links with relative one
Yes, of course. For instance, we can write a little shell/Perl/Python script to make relative links or (better) to do all the find-image-and-make-link stuff (try 'make -n xml/it/images' to see these commands).
ok I'm working on it, please wait...
or (alternatively) making only one absolute reference (that is easier to modify) and all other references relative to this one?
No, we "copy" the image files in xml/it/images from two different sources: the English (language-independent) images or the localized images. So IMO we had to use three absolute references (to images/C, images/common, images/LANG)...
ok right I agree...
bye
making html pages for an easier updatable site
Marco Ciampa (Mittwoch, 25. März 2009, 10:55):
apt-get install symlinks
man symlinks
That's it!
But is seems to be Debian-specific... :-(
Q: is it possible to substitute all absolute links with relative one
Yes, of course. For instance, we can write a little shell/Perl/Python script to make relative links or (better) to do all the
find-image-and-make-link stuff (try 'make -n xml/it/images' to see these commands).ok I'm working on it, please wait...
Don't write a script based on "symlinks"!
I've written a little Perl script, which uses the File:.Spec module and should be portable.
Check it, it should be what you need.
Ulf
making html pages for an easier updatable site
On Wed, Mar 25, 2009 at 02:02:23PM +0100, Ulf-D. Ehlert wrote:
Yes, of course. For instance, we can write a little shell/Perl/Python script to make relative links or (better) to do all the
find-image-and-make-link stuff (try 'make -n xml/it/images' to see these commands).ok I'm working on it, please wait...
Don't write a script based on "symlinks"!
I've written a little Perl script, which uses the File:.Spec module and should be portable.
Check it, it should be what you need.
Done, it works.
I've done this little silly script to automate the html creation process:
(if it isn't too simple we could add it to the tools dir or insert it in the makefile)
make-gimp-manual-html
**************************************
#!/bin/bash
###################################
#
# Creates the html pages archive
#
# to be run after a 'make html'
#
###################################
#change your path accordingly SRCBASE=~/svn-gnome/gimp-help-2/trunk
cd /tmp
mkdir gimp-manual
mkdir gimp-manual/images
cd gimp-manual
cp -R ${SRCBASE}/html html
for i in `ls ${SRCBASE}/html` ; do
rm html/${i}/images
echo "copying ${i} html files..."
cp -R ${SRCBASE}/xml/${i}/images html/${i}/images
if [ "$i" = "en" ]; then
j="C"
else
j=$i
fi
echo "copying ${j} image files..."
cp -R ${SRCBASE}/images/${j} images/${j}
find images/${j} -name '.svn' | xargs rm -Rf
done
echo "copying common image files..."
cp -R ${SRCBASE}/images/common images/common
rm -Rf images/common/.svn
echo "copying callouts image files..."
cp -R ${SRCBASE}/images/callouts images/callouts
rm -Rf images/callouts/.svn
echo "creating archive..."
tar cf gimp-manual.tar *
echo "compressing..."
gzip gimp-manual.tar
mv gimp-manual.tar.gz ~
cd ..
echo "removing data dirs..."
rm -Rf gimp-manual
echo "done."
*****************************
With your patch and this script, updating the site pages should be
strightforward.
I'll use these for creating and updating a local mirror of docs.gimp.org/en &
docs.gimp.org/it.
I've tested your script and it works. I think that you shoould commit it and update the automake.am too.
bye
making html pages for an easier updatable site
Marco Ciampa (Mittwoch, 25. März 2009, 20:54):
I've done this little silly script to automate the html creation process:
(if it isn't too simple we could add it to the tools dir or insert it in the makefile)
The (autotools generated) Makefile contains some dist* targets, and there is also the old (disabled) install target ("install-data-local") in Makefile.am. I didn't check them, but it may be that they are meant to build the html packages...
If that's true, you should consider making these install routines work with the new build system rather than (or in addition to) adding this script.
Bye,
Ulf