Commit fc201e20 authored by Nathalie Furmento's avatar Nathalie Furmento
Browse files

website: update bibtex2html source code to sort by year inside a keyword

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/starpu/website@17180 176f6dd6-97d6-42f4-bd05-d3db9ad07c7a
parent 9817c5ad
......@@ -34,8 +34,12 @@ clean:
publish: $(OUTDIR)/index.html
$(RSYNC) $(RSYNCOPTIONS) $(OUTDIR)/ $(PUBLISHDIR)
website: $(OUTDIR)/index.html
website: $(OUTDIR)/starpu.html
$(OUTDIR)/starpu.html: $(OUTDIR)/index.html
./read.py
iconv --from-code=ISO-8859-1 --to-code=UTF-8 $(OUTDIR)/starpu.html > /tmp/make_starpu
mv /tmp/make_starpu $(OUTDIR)/starpu.html
website_diff: $(OUTDIR)/starpu.html
-diff $(OUTDIR)/starpu.html $(PUBLISHDIR)/../index.html
......@@ -680,8 +680,10 @@ int write_all_keywords( FILE *index, typeListOfItems *li,
int nb_keywords = 0;
int anchor_has_to_be_set[26];
enumTypeCategory category = CAT_UNKNOWN;
enumTypeCategory current_category = CAT_UNKNOWN;
//enumTypeCategory category = CAT_UNKNOWN;
//enumTypeCategory current_category = CAT_UNKNOWN;
int year = 0;
int current_year = 0;
if ( !sfiledesc->create_pages ) return( 0 );
if ( li->n == 0 || ln->n == 0 ) return( 0 );
......@@ -690,8 +692,9 @@ int write_all_keywords( FILE *index, typeListOfItems *li,
/* sort the items
*/
if ( li->sort[0] != _CATEGORY_ )
sort_list_of_items( li, _CATEGORY_ );
// if ( li->sort[0] != _CATEGORY_ )
// sort_list_of_items( li, _CATEGORY_ );
sort_list_of_items( li, _YEAR_ );
......@@ -821,7 +824,7 @@ int write_all_keywords( FILE *index, typeListOfItems *li,
current_category = CAT_UNKNOWN;
current_year = 0;
for (i=0; i<li->n; i++ ) {
/* test if keyword is present in list of keywords
......@@ -856,21 +859,21 @@ int write_all_keywords( FILE *index, typeListOfItems *li,
see if we've got a new category
if yes, we may have to end the previous list
*/
category = li->item[i]->type_cat;
year = li->item[i]->year;
if ( category != current_category ) {
if ( year != current_year ) {
if ( !write_bibtex_entry ) {
if ( current_category != CAT_UNKNOWN )
if ( current_year != 0 )
write_string_or_file( fd, gfiledesc->list_tag.end );
write_string_or_file( fd, gfiledesc->page_subtitle_tag.start );
if ( envdesc->use_html_links_between_pages
&& envdesc->use_html_links_towards_categories_pages )
fprintf( fd, "<a href=\"../%s/%s.%s\">",
envdesc->directory_categories, filename_category[category],
envdesc->filename_extension );
fprintf( fd, desc_category[category] );
// if ( envdesc->use_html_links_between_pages
// && envdesc->use_html_links_towards_categories_pages )
// fprintf( fd, "<a href=\"../%s/%s.%s\">",
// envdesc->directory_categories, filename_category[category],
// envdesc->filename_extension );
fprintf( fd, "Year %d", year );
if ( envdesc->use_html_links_between_pages
&& envdesc->use_html_links_towards_categories_pages )
fprintf( fd, "</a>" );
......@@ -879,7 +882,7 @@ int write_all_keywords( FILE *index, typeListOfItems *li,
write_string_or_file( fd, gfiledesc->list_tag.start );
}
current_category = category;
current_year = year;
}
write_item( fd, li->item[i],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment