reserved for future content..
reserved for future content...
Analyzing different file formats and extracting patterns for conversion into Markdown on Desktop Client of Jopline
I feel this could take time, maybe it will take only 2 weeks, or it could be 3 or more, and that would delay the rest of the project. However, while this part is important, it's not crucial for the project. You could for example start by supporting CSV import only, and write the plugin for this only. That will allow you to get a working prototype ready earlier, which you can then refine over time.
Once that prototype is working, you can indeed start spending more time analysing formats and to see how you can support more, and how many. Basically the idea is to avoid big items that can block the development process and to keep in mind that you don't have to do each step 100% before moving to the next one.
Yes, i agree. I have the same notion in my mind. Making the plugin available for CSV file formats is a priority indeed. Then a research would be more feasible for other useful file formats used by user. I'll do that changes incase.
Indeed, and if you get the plugin architecture right, you'll be able to support more formats easily, as you mentioned in your proposal:
This plugin would be created in the most modular way possible, so as to increase its future scope such as paste PDF
Yes, that's exactly what i'm aiming for.
@coderrsid, once that initial version with CSV support is done, what format do you plan to look at? Perhaps you could already check this and make a list of formats that could potentially be supported? That might depend on what JS library is available, etc. so you might want to check this too.
Sure laurent, i will try to find different possible formats. But although i was thinking of pdf as my next target.
Another thing to consider is that when you copy some data from an application, the clipboard might contain multiple formats. For example if you copy from Word, you'll have HTML, plain text and Word native format in the clipboard. In Joplin, when pasting text from Word into the Rich Text editor, we actually use the HTML part of the clipboard.
I think many application populates the HTML clipboard - maybe even Excel and various PDF viewers. So what I'm getting at is that you could perhaps look at how to convert HTML to Markdown when pasting. And that way you'll automatically support many applications without having to add special cases for each of them.
Oh, i'll just read more about it that how the clipboard works for different file formats and try to implement it in most unified and modular way possible
Interesting idea to add HTML:
It could be great if that include resources, at least images directly from browser (Ctrl+C) to avoid upload from Joplin.
If the Html file is absolutely needed to do this, a special folder like in Hotfolder pluglin will be a great option to add new Html text with images in new notes.
If you have time to answer, could you say what you mean by pasting PDF? I don't really think of a PDF as something to be pasted. Wouldn't that either mean OCR'ing an image PDF, or just pasting the text content of a PFD? Or are you saying you could take the content of the clipboard and create a PDF from it and attach it? (I'm doubting that's what you are talking about.)
Sure @whitewall. Actually, upto this moment i and mentors have come to the conclusion that in this plugin, it'd be mostly about pasting different file content instead of importing. But i just took a poll for the same. Let's see if it changes any view. Although, the first task is for CSV. Thanks.
Please note that I said that the action
Paste Special > CSV as table should be about pasting.
I did not exclude another action. You can still create a context menu or a menu item or both.
But IMO it makes no sense to pop up a window that asks you every single time if you want to paste or import.
But then giving these much of menus sub options wouldn't be a great UX, IMO.
I rather have menus than being presented with a popup every time I paste.
As I said, there's a difference between pasting and importing. In that case you should have called the project differently. This is about pasting data that is special (like csv). If you want to import a file, it belongs into a menu called import, not paste. There's no harm in creating a menu item
Import special >.
Forgive me if I'm misunderstanding what your are trying to do...
For me, ctrl-v can only mean paste. And I consider that, into a text document, there can only be paste with formatting and paste without formatting. And that is controlled by the user through the OS. If I copy cells from a spreadsheet and I do a ctrl-v, I would expect them to be pasted as a table. If I want the text only, then I would do ctrl-shift-v and get just the text. (I wouldn't have great expectations of what that would look like.)
If I was copying text that had italics or bold, same thing. Ctrl-v I would expect to have the markdown markup to get that. If I did ctrl-shift-v then I would expect text only, no markup.
I can imagine that the application (i.e. Joplyn) could have a "paste without formatting" in the menu and right click options.
Personally, I would absolutely hate to have a popup menu every time I pasted. I can't think of any other application that hijacks a simple paste every time. I don't even like that LibreOffice has taken over ctrl-shift-v and turned it into paste special forcing a choice every time.
It seems like there is no need to reinvent the wheel here. Assuming I am understanding what you are trying to do, which I may not be!
I appreciate everyone's work on this.
I may have missed part of the discussion but I'm wondering why we are taking about importing data? For importing, we already have File > Import, which can be customised with the Interop API, or are you talking about something else?
Sure tessus. I was not saying this project is not about pasting. But now i get, it's scope is set just till pasting by all mentors.
Sid thought about popping up a dialog to ask if one wanted to paste or import, because the CSV could also be in a file. But I mentioned that I certainly do not want a dialog on a paste operation. Importing a CSV as table makes perfect sense though. If the code is modular, it's very easy to do, so I am ok with doing this as well, but not ok with a popup.