Skip to content
Snippets Groups Projects
Commit 984c9291 authored by Quentin Bramas's avatar Quentin Bramas
Browse files

fix new year bug

parent 1642dac3
Branches
No related merge requests found
......@@ -116,6 +116,7 @@ fn add_article(dblp_raw: &mut DblpRaw, ctx: &mut ParseContext) {
let venue_txt = std::mem::replace(&mut ctx.current_venue, String::from(""));
let venue_key = std::mem::replace(&mut ctx.current_url, String::from(""));
let current_venue_id:usize = match dblp_raw.venues.get(&venue_key) {
Some(venue_id) => *venue_id,
None => {
......@@ -126,6 +127,7 @@ fn add_article(dblp_raw: &mut DblpRaw, ctx: &mut ParseContext) {
};
dblp_raw.articles.push(Article {
title: std::mem::replace(&mut ctx.current_title, String::from("")),
author_ids: std::mem::replace(&mut ctx.current_authors, Vec::<usize>::new()),
......@@ -207,6 +209,9 @@ pub fn parse_dblp_xml(path: &Path) -> DblpRaw {
b"booktitle" => {
in_venue = true;
},
b"journal" => {
in_venue = true;
},
b"url" => {
in_url = true;
},
......@@ -232,6 +237,9 @@ pub fn parse_dblp_xml(path: &Path) -> DblpRaw {
b"booktitle" => {
in_venue = false;
},
b"journal" => {
in_venue = false;
},
b"url" => {
in_url = false;
},
......@@ -239,7 +247,7 @@ pub fn parse_dblp_xml(path: &Path) -> DblpRaw {
}
}
Ok(Event::Text(e)) => {
if (in_article || in_proceedings) && (in_author || in_title || in_venue) {
if (in_article || in_proceedings) && (in_author || in_title || in_venue || in_url) {
match e.unescape_and_decode_with_custom_entities(&reader, &custom_entities) {
Ok(txt) => {
if in_author {
......
......@@ -36,7 +36,7 @@ export type PredefinedCommunityRanksType = Record<string, Record<number, {
allJournals: Record<number,VenueInfo>,
};
export const current_year = new Date().getFullYear() - 1;
export const current_year = 2021;//new Date().getFullYear() - 1;
export const first_interesting_year = 1990;
export const year_window = 6;
......@@ -169,8 +169,7 @@ export default function RankCategory() {
{conf.fullname}
</td>
<td class="min-w-[100px] text-gray-400 p-3">
{rankToABC(conf.rank, isConference() ? ranks().conferences.length : ranks().journals.length)}<br/>
#{(conf.rank)} ({Math.ceil(conf.score)})
#{(conf.rank)} ({Math.ceil(conf.score)})
</td>
<td class="p-3 text-right">
<A href={"/rank/venue/"+category+'/'+conf.key} class="font-medium text-blue-600 dark:text-blue-500 hover:underline">Details</A>
......
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