• libexif exifviewer

    To better understand what exif tag is in which ifd I wrote a little exifviewer. A simple little programs which list all exif-tags from one picture and the ifd’s the tag belongs to.

    #include <stdio.h>
    #include <libexif/exif-data.h>
    
    void display_entry(ExifEntry *entry, void *null) {
    	char b[1024];
    	exif_entry_get_value (entry, b, sizeof(b));
    	printf("%s: %s\n",  exif_tag_get_name (entry->tag), b);
    }
    
    void display_content(ExifContent *content, void *null) {
    	printf("\nEXIFIFD: %s:\n---------\n\n", exif_ifd_get_name(exif_content_get_ifd(content)));
    	exif_content_foreach_entry (content, display_entry, NULL);
    }
    
    int main(int argc, char **argv) {
    	ExifData *data;
    	data = exif_data_new_from_file(argv[1]);
    	if(data == NULL || argc != 2) {
    		printf("Argument must be one valid jpg-file!\n");
    		return(1);
    	}
    	exif_data_foreach_content (data, display_content, NULL);
    	return 0;
    }
    

    Build it with(Install libexif-dev):

    cc -lexif -lm -o exifviewer src/exifviewer.c


  • nmrename got EXIF-support

    I just added preliminary support for EXIF ranming. EXIF data is created by digital cameras and contains information like shot-date. The new nmrename feature renames files based on a pattern. here’s an excerpt from the help text:

    -exif [PATTERN] : New Pathnames will be replaced by PATTERN.

    PATTERN can have the following keywords:
    Date:
    %Y: year
    %M: month
    %D: day
    %h: hour
    %m: minute
    %s: second

    Other:
    %o: original filename

    Here’s an example output:

    mrename 100_0505.jpg -exif “%Y%M%D_%h%m%s__%o.jpg”
    >> Adding ’100_0505.jpg’ to filelist.
    >>
    >> Replacing pathnames with exif data from pattern ‘%Y%M%D_%h%m%s__%o.jpg’:
    >>
    >> ’100_0505.jpg’ –> ’20080125_185311__100_0505.jpg’
    >>
    >> Start renaming?
    << [y/n]:n

    You can download it from Subversion. Take a look at the nmrename-Download-Page.


  • First Android Development Results

    So I bought the Android for a reason. Developing. And that’s what I did. Since there is no really great Podcastfetcher for the Android Platform I decided to write my own. It’s called APodder. (Guess what the A stands for. :) ) After a few days of work. I got some base functionality going:

    • Downloading and parsing RSS2.0 feeds
    • Storing podcasts and their shows in a SQLite databse
    • An Interface that has a podcast-view and a show-view (see the pictures below).
    • Possibility to download shows with showing a progressbar (see the pictures below).

    Not everything works 100% as I have it in my mind. But I’m getting there. This is my first bigger project in Java. Until now I only developed in C++, C and Python.But thanks to Eclipse and its awesome AutoCompletition I’m doing quite fine. Expect to see more APodder news in February. I have exams in university in the end of january. So I will minimize developing hours.


  • NIsoTools – NISOMounter

    I decided to write my own isomounter. Of course there are enough isomounters. I’m currently doing an internship with a lot of python programming. So I decided to write the whole thing in python with gtk is the toolkit. After 3 hours I have the base functionality working:

    It can mount and unmount isos. It’s currently done with sudo mount -o loop,user -t iso9660 <iso> <mountpoint>. But you need the NOPASSWD option in sudo for that. Either I only make the mounter available as root or I integrated the gksu stuff. It doesn’t require any settings atm, because the mountlist is read with mount | grep ‘type iso9660′ | grep ‘/dev/loop’.

    NISOMounter will be part of a whole set of iso managing utilities. I plan to make a converter and creator. Both this apps will be a frontend for poweriso. But first I want to clean up the mounter make some pretty icons and read more about uidesign.

    UPDATE: Source in: http://trac.noneus.de/nisotools/browser/trunk


  • First nmrename release.

    I just released the first version of Noneus’ mass renaming tool. You can find all information on http://nmrename.sourceforge.net/. I know its months late. But I had so much to do in university :)

    The help text has all features:

    nmrename 0.1 – A mass renaming tool.
    Copyright 2007 by Stefan Lohmaier <noneuss at gmail dot com>

    Usage:
    nmrename [PATHLIST] [COMMANDS]

    [PATHLIST] is a list of the paths (dirs and files) you want to rename.
    [COMMANDS] is a list of commands that will be executed one by one.

    COMMANDS:
    -h : Print this text.
    -f : Renames without asking. Use with CAUTION!
    -c : Clear the pathlist.

    -cc : Camelcase (e.g. hallo -> Hallo)
    -cu : Uppercase (e.g. hallo -> HALLO)
    -cl : Lowercase (e.g. HALLO -> hallo)

    -d [POS1] [POS2] : Remove from POS1 to POS2.

    -sr [S1] [S2] : Replace all occurences of S1 with S2.
    -sd [S] : Delete all occurences of S.
    -si [S] [POS] : Insert S at POS.

    -fd [POS] [S] : Deletes field POS. Fielddelimiters are in S.
    -fs [POS1] [POS2] [S] : Switches field POS1 with field POS2.
    Fielddelimiters are in S.

    -l [FILENAME] : Loads new pathnames from [FILENAME] (List MUST have
    EXACTLY as many paths as paths in the pathlist!)

    [POS*] can be 0,1,2,… or -0,-1,-2,… (‘-’ starts counting from the right).
    [S*] is a string of your choice.

    If you discover any bugs please use Sourceforge’s BugTracker.


  • nmrename release soon.

    I plan to release my first version of nmrename this month. EXIF and id3 support needs at least an additional month. Before I’ll put out a release I need to do a few things:

    • Write a test script. This script should create thousands of files and test all possible edges of nmrename.
    • A better way to call the commands from main(). All commands have the same structure and there is a lot of duplicate code in cmd.c.
    • Website on Sourceforge with a documentation with examples.

    All rename features for the release are implemented. Here’s the help text:

    nmrename 0.1 – A mass renaming tool.
    Copyright 2007 by Stefan Lohmaier <noneuss AT gmail DOT com
    Usage:
    nmrename [PATHLIST] [COMMANDS]

    [PATHLIST] is a list of the paths (dirs and files) you want to rename.
    [COMMANDS] is a list of commands that will be executed one by one.

    COMMANDS:
    -h : Print this text.
    -f : Renames without asking. Use with CAUTION!
    -c : Clear the pathlist.

    -cc : Camelcase (e.g. hallo -> Hallo)
    -cu : Uppercase (e.g. hallo -> HALLO)
    -cl : Lowercase (e.g. HALLO -> hallo)

    -d [POS1] [POS2] : Remove from POS1 to POS2.

    -sr [S1] [S2] : Replace all occurences of S1 with S2.
    -sd [S] : Delete all occurences of S.
    -si [S] [POS] : Insert S at POS.

    -fd [POS] [S] : Deletes field POS. Fielddelimiters are in S.
    -fs [POS1] [POS2] [S] : Switches field POS1 with field POS2.
    Fielddelimiters are in S.

    [POS*] can be 0,1,2,… or -0,-1,-2,… (‘-’ starts counting from the right).
    [S*] is a string of your choice.


  • nmrename lives!

    Yes. Noneus’ mass renaming tool is still alive. I added some functionality and created a Sourceforge Project. All the sources are in the subversion repository.
    So the current features are:

    -Delete from position to position
    -Insert string at position
    -Remove/Replace strings
    -Lower-/Upper-/Camelcase
    -Delete field with specified field delimiters

    This last one took some serious thinking. A major problem at the moment is that multiple operations in one cmdline are not supported. I will fix this very soon.

    [Update:] Fixed the issue. Revision 2 now does multiple operations.


Switch to our mobile site