Skip to content

Commit

Permalink
initialize title to the original file name
Browse files Browse the repository at this point in the history
  • Loading branch information
matthuszagh committed Aug 14, 2021
1 parent 61c5806 commit f4b81a2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ fn librarian_instantiate(catalog: &Catalog) {
// assert!(false);
}

/// Print the path of resources matching a query.
/// TODO
fn librarian_search(catalog: &Catalog, resources_path: &PathBuf, query: &String) {
// TODO I'd like to support a full-featured query
// syntax. Something similar to recoll's query syntax but with
Expand Down Expand Up @@ -394,8 +396,14 @@ fn update_resources(
std::fs::rename(resource_path, new_file_path.clone()).unwrap();

let new_resource = Resource {
title: String::from(""),
authors: std::vec!(),
title: file_name,
authors: std::vec!(
Name {
first: None,
middle: None,
last: None,
}
),
date: {
Date {
year: None,
Expand Down

0 comments on commit f4b81a2

Please sign in to comment.