mb21 / panwriter

Markdown editor with pandoc integration and paginated preview.
https://PanWriter.com
GNU General Public License v3.0
1.04k stars 51 forks source link

Export problem with AppImage 0.8.4 on Linux Slackware #114

Closed fhouweli closed 2 months ago

fhouweli commented 2 years ago

Hi, when trying to export my document to html, the pandoc command has an empty --to argument (and therefore --standalone is interpreted as a format. Screenshot_2022-08-26_19-30-52

mb21 commented 2 years ago

I cannot reproduce... what's the exact input you were using?

fhouweli commented 2 years ago

Thanks for looking into it. My working file is called "sql.md". When I choose "Export..." a dialog opens with "sql" in the "Name" field (highlighted/selected) and "HTML" in the select box below. Changing the file format with the select box does not add an extension in the "Name" input field. Pressing "Export" causes the error. HOWEVER, if I manually add ".html" to the filename, the export succeeds!

It is just a problem of the (stupid?) user thinking the file extension would be added automatically.

I really enjoy using PanWriter.

Regards

frans

On 8/26/22 20:31, Mauro Bieg wrote:

I cannot reproduce... what's the exact input you were using?

— Reply to this email directly, view it on GitHub https://github.com/mb21/panwriter/issues/114#issuecomment-1228798458, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQABTAAQ7BR6MOHRBTHYJ33V3EEPFANCNFSM57XPQ73Q. You are receiving this because you authored the thread.Message ID: @.***>

mb21 commented 2 years ago

Changing the file format with the select box does not add an extension in the "Name" input field.

that's odd. because it does for me on macOS. are you on the latest PanWriter version?

can you reproduce on other linux distros?

mbozkurt commented 2 years ago

I am on latest Panwriter and I can confirm same problem exists on Mint Linux 19.3.

mb21 commented 2 years ago

hm.. we're just using electron's dialog.showSaveDialog filters option.

you're saying only the default name is missing the html extension (that we could probably fix in PanWriter)? And when you switch to an other format in the dropdown the extension is added?

fhouweli commented 2 years ago

No, switching to another format has no effect.

On 8/30/22 09:16, Mauro Bieg wrote:

hm.. we're just using https://github.com/mb21/panwriter/blob/master/electron/pandoc/export.ts#L38 electron's dialog.showSaveDialog https://www.electronjs.org/docs/latest/api/dialog#dialogshowsavedialogbrowserwindow-options |filters| option.

you're saying only the default name is missing the html extension (that we could probably fix in PanWriter)? And when you switch to an other format in the dropdown the extension is added?

— Reply to this email directly, view it on GitHub https://github.com/mb21/panwriter/issues/114#issuecomment-1231246848, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQABTAF27WBYXCMHMJJRHY3V3WYMPANCNFSM57XPQ73Q. You are receiving this because you authored the thread.Message ID: @.***>

mb21 commented 2 years ago

uh, that seems like an Electron bug then, because all we get back is the filePath, so if that doesn't change when you change the dropdown, there's nothing we can do in PanWriter to fix it...

I'll try to update to the newest Electron version soonish... maybe they have fixed it already...

hwpf commented 2 years ago

got exactly the same issue with panwriter 0.8.4 freshly installed at Manjaro Linux ... none of the formats can be exported. Will it be posted here, when a fix is available?

Merga189 commented 2 months ago

Same here.

Debian 12 bookworm with Appimage 0.8.6 and pandoc 2.17.1.1 (Debian source)

Screenshot_2024-07-11_19-25-29

mb21 commented 2 months ago

Okay, I found the relevant Electron issue. Apparently, that's just not something Electron supports on Linux, which is a bummer.

But from above in this thread:

Changing the file format with the select box does not add an extension in the "Name" input field. Pressing "Export" causes the error. HOWEVER, if I manually add ".html" to the filename, the export succeeds!

That's still a viable workaround, right? So perhaps we should just remove the selector dropdown on Linux to avoid confusion?

mb21 commented 2 months ago

I implemented this approach in a draft PR: https://github.com/mb21/panwriter/pull/166

Can anybody test this on Linux? Check out that branch and see https://github.com/mb21/panwriter/#develop

mb21 commented 2 months ago

I've merged this to the master branch. But apparently my friend's Apple Developer Certificate is expired so I cannot make a release. Perhaps the day has come I'll have to fork over 100.- to Apple 🙄

Anyway, for now, here's the Linux AppImage.

Merga189 commented 2 months ago

First of all thank you for reacting.

Now I have both appimages here on my Debian 12.

0.8.7 is working now and I can convert a .md to .odt

Screenshot_2024-07-14_13-05-25

But here a screenshot with 0.8.6 with a possibility to select the file extension

Screenshot_2024-07-14_12-58-18

and now 0.8.7, where that possibilty is missing.

Screenshot_2024-07-14_13-00-32

br Karl

mb21 commented 2 months ago

@Merga189 thanks, yes. On Linux that electron-provided dropdown apparently isn't working correctly (that's the linked issue), so the only thing I could think of was to remove it. Instead, you just have to write the filename including extension (e.g. .odt).