jya-dev / supernote-tool

Unofficial python tool for Supernote
Apache License 2.0
254 stars 27 forks source link

Convert to PDF no longer supported? #34

Closed jaba-git closed 10 months ago

jaba-git commented 10 months ago

Hello,

I have used this tool in the past to convert my .note files to PDF, which has been great. However, just recently I attempted to run the same script I used in the past:

`import os import subprocess

def convert_note_to_pdf(directory):

Iterate over all items in the given directory

for root, dirs, files in os.walk(directory):
    for filename in files:
        # Check if the file has the .note extension
        if filename.endswith(".note"):
            # Derive the output filename
            output_pdf = os.path.join(root, filename.replace(".note", ".pdf"))
            # Create the command
            command = ["supernote-tool", "convert", "-t", "pdf", "-a", os.path.join(root, filename), output_pdf]
            # Run the command
            subprocess.run(command)

if name == "main":

Converts all .note files in the current directory and its subdirectories

convert_note_to_pdf(os.getcwd())
print("Conversion completed!")`

But I am getting errors about unsupported file format? I am using Chauvet 2.11.26, and simply exporting my .note files to my Google Drive, where I download the files and upload them to the directory where I am running this script. I am not sure what has changed or why this is not working, and any insight would be really great!

Thanks.

jya-dev commented 10 months ago

Hello,

The feature to convert to PDF is still supported. The latest version of supernote-tool is v0.5.0. Please see the Release page: https://github.com/jya-dev/supernote-tool/releases

The file format of *.note file is frequently changed by Ratta each time Chauvet software is updated. If supernote-tool you have installed are outdated, it will not be able to convert new file formats correctly. So I recommend updating the tool to the latest version.

lboller commented 10 months ago

I am also getting a file unsupported error, using version 0.5.0 with a Supernote A6X2 and Chauvet 3.14.27 - I get the error for any conversion type (pdf, png, analyze)

jya-dev commented 10 months ago

Thank you for feedback. I'll check it out soon.

jya-dev commented 10 months ago

Hi @lboller I didn't able to reproduce the unsupported error with my test note files (Chauvet3.14.27). If you don't mind, could you share the file causing the error?

lboller commented 10 months ago

I figured it out. I was using Dropbox and the files weren't stored offline so it was failing to read the metadata. Thanks for your work on this tool - it works great and is fantastic!

jya-dev commented 10 months ago

I got it. I close this issue.