mirror of
https://github.com/laurent22/joplin.git
synced 2026-05-25 09:59:52 -05:00
This commit is contained in:
+2
-2
@@ -142,7 +142,7 @@ jeudi 23 octobre 2025
|
||||
|
||||
- [x] Rédiger carnet MS-OneNote jeu d'essai (case cochée)
|
||||
- [ ] Transmettre aux dev Joplin (case non cochée)
|
||||
- [x] Exporter le carnet en \\*.packageone (case cochée)
|
||||
- [x] Exporter le carnet en \\*.onepkg (case cochée)
|
||||
- [ ] Exporter des page en \\*.one (case non cochée)
|
||||
|
||||
|
||||
@@ -1381,7 +1381,7 @@ exports[`InteropService_Importer_OneNote should support importing .one files tha
|
||||
</span>Rédiger carnet MS-OneNote jeu d'essai (case cochée)</span></li>
|
||||
<li class="outline-element" style="margin-left: 0px;"><span style="font-family: Calibri; font-size: 11pt; line-height: 17px;"><span aria-checked="false" aria-disabled="true" class="note-tag-icon icon-1 -checkbox -large" role="checkbox"><img class="checkbox-icon" alt="Unchecked" src=":/id-here">
|
||||
</span>Transmettre aux dev Joplin (case non cochée)</span><ul class="tagged-list"><li class="outline-element" style="margin-left: 36px;"><span style="font-family: Calibri; font-size: 11pt; line-height: 17px;"><span aria-checked="true" aria-disabled="true" class="note-tag-icon icon-2 -checkbox -large" role="checkbox"><img alt="Checked" src=":/id-here">
|
||||
</span>Exporter le carnet en *.packageone (case cochée)</span></li>
|
||||
</span>Exporter le carnet en *.onepkg (case cochée)</span></li>
|
||||
<li class="outline-element" style="margin-left: 36px;"><span style="font-family: Calibri; font-size: 11pt; line-height: 17px;"><span aria-checked="false" aria-disabled="true" class="note-tag-icon icon-3 -checkbox -large" role="checkbox"><img class="checkbox-icon" alt="Unchecked" src=":/id-here">
|
||||
</span>Exporter des page en *.one (case non cochée)</span></li>
|
||||
</ul></li>
|
||||
|
||||
@@ -94,7 +94,12 @@ impl crate::onestore::object_space::ObjectSpace for ObjectSpace {
|
||||
self.revision_list
|
||||
.revisions
|
||||
.iter()
|
||||
.rev()
|
||||
// TODO: It would make more sense to use the **last** revision, rather than
|
||||
// the first to get the content root. However, doing so seems to return
|
||||
// version history information, rather than the true content root.
|
||||
// In the future, if there are issues related to importing the wrong versions
|
||||
// of pages, look into this.
|
||||
// .rev()
|
||||
.find_map(|revision| revision.content_root())
|
||||
}
|
||||
|
||||
@@ -102,7 +107,7 @@ impl crate::onestore::object_space::ObjectSpace for ObjectSpace {
|
||||
self.revision_list
|
||||
.revisions
|
||||
.iter()
|
||||
.rev()
|
||||
// .rev() // TODO: Why does calling .rev() result in the wrong metadata being returned?
|
||||
.find_map(|revision| revision.metadata_root())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ pub struct Revision {
|
||||
root_objects: HashMap<RootRole, ExGuid>,
|
||||
}
|
||||
|
||||
// See [MS-ONE 2.1.8](https://learn.microsoft.com/en-us/openspecs/office_file_formats/ms-one/037e31c0-4484-4a14-819a-0ddece2cacbc)
|
||||
#[derive(Eq, PartialEq, Hash, Debug)]
|
||||
pub enum RootRole {
|
||||
DefaultContent,
|
||||
@@ -95,6 +96,7 @@ impl Revision {
|
||||
let mut last_index = iterator.get_index();
|
||||
while let Some(current) = iterator.peek() {
|
||||
if let FileNodeData::RevisionManifestEndFND = current {
|
||||
iterator.next();
|
||||
break;
|
||||
} else if let Some(object_group_list) = ObjectGroupList::try_parse(iterator, context)? {
|
||||
// Skip: Used for reference counting (which we can ignore here)
|
||||
|
||||
@@ -75,3 +75,28 @@ fn convert_desktop_export() {
|
||||
.exists()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn convert_page_versions() {
|
||||
let TestResources {
|
||||
output_dir,
|
||||
test_data_dir,
|
||||
} = setup("page_versions");
|
||||
|
||||
convert(
|
||||
&test_data_dir.join("Page versions.one").to_string_lossy(),
|
||||
&output_dir.to_string_lossy(),
|
||||
&test_data_dir.to_string_lossy(),
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
// Should create a table of contents file
|
||||
assert!(output_dir.join("Page versions.html").exists());
|
||||
// Should convert the input page to an HTML file
|
||||
assert!(
|
||||
output_dir
|
||||
.join("Page versions")
|
||||
.join("Test!.html")
|
||||
.exists()
|
||||
);
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user