Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Files Attachment Revisions #25

Open
metal450 opened this issue Jan 25, 2025 · 8 comments
Open

Multiple Files Attachment Revisions #25

metal450 opened this issue Jan 25, 2025 · 8 comments
Assignees

Comments

@metal450
Copy link

Hi,

Giuseppe has finally finished up the "multiple files in hierarchical storage" feature, including direct external editing of attachments. You can find builds here, he said the release will be published in a couple weeks.

Attachments look pretty much the same in the xml, the only change is that the attachment elements don't have a checksum & uses the filename directly, i.e. before:

<encoded_png char_offset="0" justification="left" filename="some filename.pdf" time="1692204166" sha256sum="b10fb495652eddfd66cc7ab5755ced8ff633eb5af85a5e54e2e108a267f489b9"/>

...where the file on disk was like b10fb495652eddfd66cc7ab5755ced8ff633eb5af85a5e54e2e108a267f489b9.pdf. Now, if there's no checksum, it just uses the filename directly, like:

<encoded_png char_offset="0" justification="left" filename="some filename.pdf" time="1692204166" />

Currently SourCherry just displays "hello" in the content for any node with these types of attachments. Any chance of an easy fix? :)

@FFDA
Copy link
Owner

FFDA commented Jan 25, 2025

Of course, I’ll try to make SourCherry support it. I just can’t promise it will happen quickly, as I don’t have much free time these days.

I still need to finish adding support for creating and editing lists. It’s almost finished, but I encountered an ugly bug that I have no idea how to solve at the moment. Those changes are in the master branch, and I don’t want to release a buggy app. I really should stop pushing changes to that branch until I’ve properly tested the new features.

@FFDA FFDA self-assigned this Jan 25, 2025
@metal450
Copy link
Author

Those changes are in the master branch, and I don’t want to release a buggy app.

Personally I'd be perfectly happy with an apk build that just supports reading these databases, as I only use SourCherry as a viewer (read-only). So even if "editing" is still a work in progress until the next official release, it has no impact :)

@metal450
Copy link
Author

metal450 commented Feb 3, 2025

Alright he's got builds available now here: https://www.giuspen.net/cherrytree/#testing

Is there by chance an easy way to make it just show the content of those nodes, even if it doesn't yet support launching the attachments? I tried to pull the code & global search for the string "hello" (just to see why it's showing that rather than the node content), but curiously, no hits at all 🤔

@FFDA
Copy link
Owner

FFDA commented Feb 4, 2025

I tried to pull the code & global search for the string "hello" (just to see why it's showing that rather than the node content), but curiously, no hits at all 🤔

Because there isn't any hellos in the source. I never did something like that. App should crash or display a toast message if something goes wrong.

Alright he's got builds available now here: https://www.giuspen.net/cherrytree/#testing

I downloaded appimage of the testing version and it still saves files with sha256sum as a filenames in the node dir. Am I missing something? Maybe there is a setting?

Image

@metal450
Copy link
Author

metal450 commented Feb 4, 2025

Maybe there is a setting?

Oh yeah sorry. Preferences -> Misc -> Multiple files storage, use embedded file name on disk

Because there isn't any hellos in the source. I never did something like that. App should crash or display a toast message if something goes wrong.

Strange. Here's what I see for any/every node with those attachments:

Image

The actual content of that node is file attachments:

Image

In CT itself:

Image

In any case, doesn't really matter if actual support for the attachments is being added :) Was just trying to bandaid it myself real quick so I wouldn't lose access to node content

@FFDA
Copy link
Owner

FFDA commented Feb 4, 2025

My guess would be that you have a node with hello as a content. App fails during the loading of the content and leaves the content of the old node.

I did a quick fix. It should load the content and I tried to fix opening of the file. Most likely saving the file to the device from the node will not work.

I would not even consider this an alfa version. It most likely will have a lot of bugs (especially during editing). So use at your own risk.

You can download it from here.

@metal450
Copy link
Author

metal450 commented Feb 4, 2025

My guess would be that you have a node with hello as a content

Checked that - I global searched for "hello" (with "override exclusions" enabled), and there were none with just that.

It should load the content

Confirmed - content is shown!

and I tried to fix opening of the file

Unfortunately no go there - tapping the file shows a toast with "Failed to open the file"

saving the file to the device from the node will not work [...] It most likely will have a lot of bugs (especially during editing)

No worries there - even just read-only is still super helpful. Thanks for looking into this so quick :)

@metal450
Copy link
Author

metal450 commented Feb 7, 2025

OK CT 1.3 is officially out now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants