lundi 21 mai 2007

Truander les citations...

Truander les citations

c'est a dire faire apparaître toutes les citations presentes dans votre bib file, qu'elles soient utilisées ou non.

grep -e @[A-Za-z]*{ biblio.bib | awk -F '{' '{print $2}' \
| awk -F ',' '{print "\\nocite{" $1"}" }'
Il est possible qu'il faille enlever la première référence. Un conseil : ne pas utiliser l'option "backpageref" du package hyperref si l'on ne souhaite pas indiquer que certains papiers référencés ne sont en fait pas cités.

dimanche 20 mai 2007

gThumb web album theme

Since I couldn't find it anywhere on the web, I had a look at the source package of gThumb, and I found some documentation about how to customize a "web album theme", a very useful feature within gThumb.


So, this is from /gthumb-2.10.1/doc/ :


EXPR:
EXPR + EXPR
EXPR - EXPR
EXPR * EXPR
EXPR / EXPR
EXPR && EXPR
EXPR || EXPR
- EXPR
+ EXPR
! EXPR
( EXPR )
EXPR == EXPR
EXPR != EXPR
EXPR <= EXPR
EXPR >= EXPR
EXPR < EXPR
EXPR > EXPR
NUMBER
RVAR

NUMBER:
unsigned integer number

RVAR (Readable Variables):
images (integer) Total number of images being exported
image_idx (integer) Index of current image
pages (integer) Total number of index pages being generated
page_idx (integer) Index number of current index page
display_file_name_thumbnail
display_file_name_image
image_width
image_height
preview_width
preview_height
thumb_width
thumb_height
copy_originals (boolean) Original images are being copied to the web
album output directory
comment_visibility_image (bool) Show comments on preview pages
comment_visibility_index (bool) Show comments on index pages
place_visibility_image (bool) Show place on preview pages
place_visibility_index (bool) Show place on index pages
date_time_visibility_image (bool) Show date and time on preview pages
date_time_visibility_index (bool) Show date and time on index pages
file_name_visibility_image (bool) Show file name on image pages
file_name_visibility_index (bool) Show file name on index pages
image_dim_visibility_image (bool) Show image dimensions on image pages
image_dim_visibility_index (bool) Show image dimensions on index pages
file_size_visibility_image (bool) Show file size on image pages
file_size_visibility_index (bool) Show file size on index pages
exif_date_time_visibility_image (bool) Show date and time (from exif
data) on image pages
exif_date_time_visibility_index (bool) Show date and time (from exif
data) on index pages
exif_exposure_time_visibility_image (bool) Show exposure time on image pages
exif_exposure_time_visibility_index (bool) Show exposure time on index pages
exif_exposure_mode_visibility_image (bool) Show exposure mode on image pages
exif_exposure_mode_visibility_index (bool) Show exposure mode on index pages
exif_flash_visibility_image (bool) Show flash mode on image pages
exif_flash_visibility_index (bool) Show flash mode on index pages
exif_shutter_speed_visibility_image (bool) Show shutter speed on image pages
exif_shutter_speed_visibility_index (bool) Show shutter speed on index pages
exif_aperture_value_visibility_image (bool) Show aperture value on image pages
exif_aperture_value_visibility_index (bool) Show aperture value on index pages
exif_focal_length_visibility_image (bool) Show focal length on image pages
exif_focal_length_visibility_index (bool) Show focal length on index pages
exif_camera_model_visibility_image (bool) Show camera model on image pages
exif_camera_model_visibility_index (bool) Show camera model on index pages

WVAR (Writable Variables):
thumbnail_width (integer) Output thumbnails of this width
thumbnail_height (integer) Output thumbnails of this height
preview_width (integer) Output preview images of this width
preview_height (integer) Output preview images of this height

---

<gthumb:title/> Display the album title.

<gthumb:image/> Display the image.
idx="EXPR"
idx_relative="EXPR"
thumbnail="0/1" Display the image thumbnail (the
image used in the index.html file).
preview="0/1" Display the image preview (the
image in the image.html file).
max_size="EXPR"
class="NAME" Assign CSS class NAME to image element
id="NAME" Assign CSS id NAME to image element
alt="TEXT" Assign alt text TEXT to image element

<gthumb:image_link/> Display the image link
idx="EXPR"
idx_relative="EXPR"
thumbnail="0/1" Display the image thumbnail link
preview="0/1" Display the image preview link

<gthumb:image_idx/>
idx_relative="EXPR"

<gthumb:image_dim/>
idx="EXPR"
idx_relative="EXPR"

<gthumb:images/> This tag gets substituted by the total
number of images.

<gthumb:file_name/>
idx="EXPR" Display the filename of the image with
index 'idx'.

idx_relative="EXPR" Display the filename of the image with
index 'current_index + idx_relative'.
For example if idx_relative is -1 the
filename of the previous image will be
displayed.

with_path="0/1" Display the full image path instead of the
filename only.
For example '/home/joe/images/foo.jpg'
instead of 'foo.jpg'

with_relative_path="0/1" If with_path == 0 display the path relative
to the destination path.
For example if the image path is
'/home/joe/images/foo.jpg' and the index is
saved as '/home/joe/public_html/index.html'
then this tag will be substituted by
'../images/foo.jpg'

visibility="index/image/always" Choose when to display this information:
index: Display this tag if the user
chosen to display the filename
in the index caption.
image: Display this tag if the user
chosen to display the filename
in the image caption.
always: Always display this tag
regardless of what the user
chosen to display.

utf8="0/1" Write in utf-8 format

<gthumb:file_path/>
idx="EXPR"
idx_relative="EXPR"
relative_path="0/1"
visibility="index/image/always"
utf8="0/1"

<gthumb:file_size/>
idx="EXPR"
idx_relative="EXPR"
visibility="index/image/always"

<gthumb:comment/> Display the comment for an image
idx="EXPR"
idx_relative="EXPR"
max_size="EXPR"
visibility="index/image/always"

<gthumb:place/> Display the place where an image was taken
idx="EXPR"
idx_relative="EXPR"
max_size="EXPR"
visibility="index/image/always"

<gthumb:date_time/> Display the time when an image was taken
idx="EXPR"
idx_relative="EXPR"
max_size="EXPR"
visibility="index/image/always"

<gthumb:exif:exposure_time/>
idx="EXPR"
idx_relative="EXPR"
visibility="index/image/always"

<gthumb:exif:exposure_mode/>
idx="EXPR"
idx_relative="EXPR"
visibility="index/image/always"

<gthumb:exif:flash/>
idx="EXPR"
idx_relative="EXPR"
visibility="index/image/always"

<gthumb:exif:shutter_speed/>
idx="EXPR"
idx_relative="EXPR"
visibility="index/image/always"

<gthumb:exif:aperture_value/>
idx="EXPR"
idx_relative="EXPR"
visibility="index/image/always"

<gthumb:exif:focal_length/>
idx="EXPR"
idx_relative="EXPR"
visibility="index/image/always"

<gthumb:exif:date_time/>
idx="EXPR"
idx_relative="EXPR"
visibility="index/image/always"

<gthumb:exif:camera_model/>
idx="EXPR"
idx_relative="EXPR"
visibility="index/image/always"

<gthumb:page_link/>
idx="EXPR"
idx_relative="EXPR"
image_idx="0/1"

<gthumb:page_idx/>
idx_relative="EXPR"

<gthumb:pages/>

<gthumb:table/> Output thumbnail blocks (thumbnail.gthtml)
inside an HTML table

<gthumb:thumbs/> Output thumbnail blocks (thumbnail.gthtml)
without a surrounding table structure

<gthumb:date/>

<gthumb:set_var WVAR="EXPR" WVAR="EXPR" [..] />


---

<gthumb:text> Localized text. You need to add the same
[TEXT] text in the data/albumthemes/text.h file.
</gthumb:text>

---

<gthumb:if EXPR/>
[HTML]
<gthumb:else_if EXPR/>
[HTML]
<gthumb:else_if EXPR/>
[HTML]
.
.
.
<gthumb:else_if EXPR/>
[HTML]
<gthumb:else/>
[HTML]
<gthumb:end/>

---

<gthumb:eval/>
idx=EXPR
idx_relative=EXPR
expr=EXPR Insert result of expression, maybe applied
against given image info

vendredi 18 mai 2007

man 2

Sous feisty fawn (ubuntu) les man pages de la section 2 ("system calls") sont dans le paquet
manpages-dev
ca peux servir... ;-)

Find file encoding

Trouver l'encodage d'un fichier :

file --mime filename
Par exemple :
$ file filename.tex
filename.tex: LaTeX 2e document text
cm$ file --mime filename.tex
filename.tex: text/plain; charset=iso-8859-1

lundi 14 mai 2007

flv to avi

Convert .flv to .avi
mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -o output.avi input.flv

jeudi 10 mai 2007

Phone issue wammu bluetooth synchro

Bon... je vais maintenant passer à une phase de test "autre", mais j'ai enfin réussi a faire communiquer wammu et mon téléphone mobile en bluetooth. 
 Je pense qu'il est nécessaire de lancer un service que je n'ai pas identifié encore, mais qui est lancé au démérrage, automatiquement. 

 Une hypothèse envisagée sur ce problème de "pairing" est la synchro de plusieurs services, dont le bluetooth. 
Et peut-être dbus (?). 

En tout cas, le problème se situait du côté de l'échange de clef, et du lancement du passkey-agent et de l'applet bluetooth-applet permettant d'indiquer la clef qui doit être échangée entre les deux devices connectés en bluetooth (le laptop et le mobile en l'occurence).

dimanche 6 mai 2007

Wammu + K610i + bluetooth

Donc... le bluetooth ne semble pas marcher "out of the box".

J'indique pourtant bien a mon telephone que j'autorise l'ordi a se connecter, mais rien n'y fait, l'ordi se fait basher.

Serait-ce un problème au niveau du code d'accès ? n'est-ce pas dans le fichier /etc/bluetooth/pin que ce code est décrit ?
C'est en tout cas celui-ci que j'indique et je n'en ai pas trouvé d'autre pour l'instant.


Voici pour conclure les traces que j'obtiens dans wammu lorsque je tente de lui faire détecter mon telephone en bluetooth (je rappelle que tout ceci fonctionne correctement lorsque je fais cela via un branchement usb, mais c'est pas marrant).

Dans la fenetre "normale" :

Starting /dev/ttyS0 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303']
Starting /dev/ttyS1 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303']
Starting /dev/ttyS2 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303']
Scanning for bluetooth devices using PyBluez
Checking 00:xx:xx:xx:xx:xx:xx (K610i) - ['bluephonet', 'bluefbus', 'bluerfgnapbus', 'blueat', 'bluerfphonet', 'bluerffbus', 'bluerfat']
Bluetooth device scan completed
Finished /dev/ttyS1 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303']
Finished /dev/ttyS2 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303']
Finished /dev/ttyS0 - ['at19200', 'at115200', 'fbusdlr3', 'fbus', 'mbus', 'fbuspl2303']
Finished 00:xx:xx:xx:xx:xx:xx (K610i) - ['bluephonet', 'bluefbus', 'bluerfgnapbus', 'blueat', 'bluerfphonet', 'bluerffbus', 'bluerfat']
All finished, found 0 phones




Dans la fenetre de debug :

Here will appear debug messages from Gammu...
Setting speed to 19200
[Module - "auto"]
Escaping SMS mode
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
[ERROR 12: Error during reading device.]
Sending simple AT command to wake up some devices
Enabling echo
Device 00:xx:xx:xx:xx:xx:xx ("K610i")
Channel 1 - "OBEX SyncML Client"
Channel 2 - "Dial-up Networking"
Channel 3 - "Serial Port"
Channel 4 - "Hands-Free Gateway"
Channel 5 - "Headset Gateway"
Channel 6 - "OBEX Object Push"
Channel 7 - "OBEX File Transfer"
Channel 8 - "OBEX IrMC Sync Server"
Channel 9 - "OBEX Phonebook Server"
[ERROR 21: Function not supported by phone.]
[ERROR 18: Unknown connection type string. Check config file.]
Connecting to RF channel 14
[ERROR 2: Error opening device. Unknown/busy or no permissions.]
Device 00:xx:xx:xx:xx:xx:xx ("K610i")
Channel 1 - "OBEX SyncML Client"
Channel 2 - "Dial-up Networking"
Channel 3 - "Serial Port"
Channel 4 - "Hands-Free Gateway"
Channel 5 - "Headset Gateway"
Channel 6 - "OBEX Object Push"
Channel 7 - "OBEX File Transfer"
Channel 8 - "OBEX IrMC Sync Server"
Channel 9 - "OBEX Phonebook Server"
Connecting to RF channel 3
[ERROR 14: No response in specified timeout. Probably phone not connected.]
[ERROR 2: Error opening device. Unknown/busy or no permissions.]
[ERROR 2: Error opening device. Unknown/busy or no permissions.]
[ERROR 2: Error opening device. Unknown/busy or no permissions.]
[ERROR 2: Error opening device. Unknown/busy or no permissions.]
[ERROR 2: Error opening device. Unknown/busy or no permissions.]
[ERROR 2: Error opening device. Unknown/busy or no permissions.]
Connecting to RF channel 14
Connecting to RF channel 15
[ERROR 2: Error opening device. Unknown/busy or no permissions.]
Connecting to RF channel 14
Connecting to RF channel 15
[ERROR 2: Error opening device. Unknown/busy or no permissions.]
Connecting to RF channel 1

bluetooth in range

Pour lister les périphériques bluetooth détectés dans le voisinage, plusieurs solutions :
  • hcitool scan
    # hcitool scan Scanning ... 00:xx:xx:xx:xx:xx Phone
  • hcitool inq
    # hcitool inq Inquiring ... 00:xx:xx:xx:xx:XX clock offset: 0x1yyy class: 0x5zzzzz
http://wiki.ubuntu-fr.org/tutoriel/bluetooth-edgy http://doc.ubuntu-fr.org/materiel/bluetooth http://multisync.sourceforge.net/

samedi 5 mai 2007

Liens ed2k clickables dans firefox

(vu passer sur irc)

Pour ajouter des liens clickables depuis firefox vers amule :

  1. Ouvrir la page about:config
  2. Ajouter la chaine network.protocol-handler.app.ed2k
  3. Avec la valeur /usr/bin/ed2k
Evidement, pour cela il faut avoir installé le package amule-utils, et vous pourrez ainsi télécharger les images .iso de vos distrib Linux préférées en un seul click !

vendredi 4 mai 2007

bluetooth commande

J'ai vu qu'il y avait sous gnome
  • Gammu
  • Wammu

Et que peut-etre sous KDE un paquet d'outils permettaient de faire de la synchro aisée entre la suite Kontact et des telephones portables.
Mais est-ce que ca marche ?

jeudi 3 mai 2007

Tentative d'install du bluetooth

  • bluez-gnome
  • bluez-hcidump
  • gnome-bluetooth


http://ubuntuforums.org/showthread.php?t=94713

http://bluetooth.kmobiletools.org/


# hcidump
HCI sniffer - Bluetooth packet analyzer ver 1.33
device: hci0 snap_len: 1028 filter: 0xffffffff
> HCI Event: Connect Request (0x04) plen 10
<>
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Connect Complete (0x03) plen 11
<>
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: PIN Code Request (0x16) plen 6
> HCI Event: Max Slots Change (0x1b) plen 3
> HCI Event: Command Status (0x0f) plen 4
<>
> HCI Event: Command Complete (0x0e) plen 6
<>
> HCI Event: Read Remote Supported Features (0x0b) plen 11
> HCI Event: Command Status (0x0f) plen 4
<>
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
> HCI Event: Command Status (0x0f) plen 4
<>
> HCI Event: Command Complete (0x0e) plen 10
> HCI Event: Remote Name Req Complete (0x07) plen 255
<>
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Read Remote Ver Info Complete (0x0c) plen 8
> HCI Event: Disconn Complete (0x05) plen 4
> HCI Event: Connect Request (0x04) plen 10
<>
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Connect Complete (0x03) plen 11
<>
> HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: PIN Code Request (0x16) plen 6
> HCI Event: Max Slots Change (0x1b) plen 3
> HCI Event: Command Status (0x0f) plen 4
<>
> HCI Event: Command Complete (0x0e) plen 6
<>
> HCI Event: Command Status (0x0f) plen 4
<>
> HCI Event: Connection Packet Type Changed (0x1d) plen 5
> HCI Event: Command Status (0x0f) plen 4
<>
> HCI Event: Command Complete (0x0e) plen 10
> HCI Event: Read Remote Supported Features (0x0b) plen 11
> HCI Event: Remote Name Req Complete (0x07) plen 255
<>
> HCI Event: Command Status (0x0f) plen 4
> HCI Event: Read Remote Ver Info Complete (0x0c) plen 8
> HCI Event: Disconn Complete (0x05) plen 4