Re: making html pages for an easier updatable site

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: make_image_links.pl
Description: Perl program

Index: Makefile.GNU
===================================================================
--- Makefile.GNU	(Revision 2793)
+++ Makefile.GNU	(Arbeitskopie)
@@ -439,22 +439,10 @@
 	$(cmd) if test -L xml/$*; then rm -v xml/$*; fi
 	$(cmd) if test -d $@; then rm -rf $@/*; fi
 	$(cmd) test -d $@ || $(mkdir_p) $@
-	$(msg) "*** Copying images ($*) ..."
-	$(cmd) (cd images && $(find_l) common C $(dir_predicates)) | \
-	while read dir; do \
-		dest=$${dir#*/}; \
-		test "$${dir}" != "$${dest}" || continue; \
-		test -d $@/$${dest} || $(mkdir_p) $@/$${dest}; \
-	done
-	$(cmd) (cd images && $(find_l) common C $(file_predicates)) | \
-	while read image; do \
-		if [ "$*" != "en" ]; then \
-			localized=$*/$${image#C/}; \
-			test -e images/$${localized} && image=$${localized}; \
-		fi; \
-		dest=$${image#*/}; \
-		$(call copy,images/$${image},$@/$${dest}); \
-	done
+	$(cmd) printf "*** Copying images ($*) ..."
+	$(cmd) perl tools/make_image_links.pl -v \
+	           images/common images/C \
+		   xml/$*
 
 # Special case: en
 

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Gimp-docs mailing list
Gimp-docs@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-docs

[Index of Archives]     [Video For Linux]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [Scanners]     [GEGL]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]     [Webcams]

  Powered by Linux