support different issues on the same day
This commit is contained in:
parent
7eea06d59b
commit
1e594d53ea
9 changed files with 443 additions and 343 deletions
|
@ -48,8 +48,8 @@ pub fn merge(input: Vec<PathBuf>, out: &Path, title: &str) -> Result<()> {
|
|||
for (object_id, object) in documents_objects.iter() {
|
||||
// We have to ignore "Page" (as are processed later), "Outlines" and "Outline" objects
|
||||
// All other objects should be collected and inserted into the main Document
|
||||
match object.type_name().unwrap_or("") {
|
||||
"Catalog" => {
|
||||
match object.type_name().unwrap_or(b"") {
|
||||
b"Catalog" => {
|
||||
// Collect a first "Catalog" object and use it for the future "Pages"
|
||||
catalog_object = Some((
|
||||
if let Some((id, _)) = catalog_object {
|
||||
|
@ -60,7 +60,7 @@ pub fn merge(input: Vec<PathBuf>, out: &Path, title: &str) -> Result<()> {
|
|||
object.clone(),
|
||||
));
|
||||
}
|
||||
"Pages" => {
|
||||
b"Pages" => {
|
||||
// Collect and update a first "Pages" object and use it for the future "Catalog"
|
||||
// We have also to merge all dictionaries of the old and the new "Pages" object
|
||||
if let Ok(dictionary) = object.as_dict() {
|
||||
|
@ -81,9 +81,9 @@ pub fn merge(input: Vec<PathBuf>, out: &Path, title: &str) -> Result<()> {
|
|||
));
|
||||
}
|
||||
}
|
||||
"Page" => {} // Ignored, processed later and separately
|
||||
"Outlines" => {} // Ignored, not supported yet
|
||||
"Outline" => {} // Ignored, not supported yet
|
||||
b"Page" => {} // Ignored, processed later and separately
|
||||
b"Outlines" => {} // Ignored, not supported yet
|
||||
b"Outline" => {} // Ignored, not supported yet
|
||||
_ => {
|
||||
merged_doc.max_id += 1;
|
||||
merged_doc.objects.insert(*object_id, object.clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue