1/14/2024 0 Comments Command line typoraThis at least got me a little closer as the tkinter demo box shows up, if I now run $ python3 joplin_edit_choice.py testdoc.txt usr/bin/python3: No module named tkinter Had to do some google-fu having never really used python before and found the following to run $ python3 -m tkinter ModuleNotFoundError: No module named 'tkinter' When I attempted to run the script by opening a terminal in ~/Documents (where the script is located) and running $ python3 joplin_edit_choice.pyįile "joplin_edit_choice.py", line 3, in Marktext='/home/uname/appimages/marktext-x86_64.AppImage ' #marktext='/home/uname/.local/share/applications/sktop ' ![]() I edited the file a bit to pick up stuff from my own computer, namely: atom='/usr/bin/atom ' I created a file called "joplin_edit_choice.py" in `~/Documents Thanks for this however you might want to consider a slightly more idiot-proof guide as this idiot has had/is having a few problems in getting this to work mostly due to not really having played with python before (hardly your fault). # set up as external editors, so I avoid them. # for flatpak and snap applications, but they are a pain in the xxxx to # apt installations of typora, code, sublime-editor, and kate, so the # operating system application locations. # suit your editors of choice, and also change the paths to suit your # Change the names of the editors throughout the program to In my Linux system program is located at ~/bin/joplin_edit_choice.py on my computer, and is set in the Joplin application options as the external Text Editor Command. For that reason, there is no point of executing full command-line argument processing. Joplin only passes a single argument to the external editor. Otherwise, enjoy and write your little hearts out. Let me know if you have any suggestions or changes that I might like. This program when launched looks like this: Not really, it is just to back out of the menu if you made a mistake. Of course, the little menu has an Exit option, so you can hit, Exit, and, over and over to have hours of procrastinatory fun. Do not forget to again hit to exit External Editing Mode in Joplin. When you have finished with your external editor and close it, this little helper app closes, and as per normal, you are back in Joplin. ![]() You can edit with your editor of choice, hitting save as you edit exactly like you normally would with the external editor launched directly from Joplin. When you click a button, that editor is launched and the name and path to the Joplin markdown file is passed as the only parameter. The program displays a vertical row of buttons, each corresponding to an editor choice. It is set as Joplin's external Text Editor, and when + is pressed, instead of launching an editor, it launches this program in a small window. This is not a 'plug -in' but an external program. The Joplin Edit Choice program provides a simple graphical menu in tkinter that displays a list of buttons that when clicked, execute an editor program, accepting the filename to edit as the only command-line parameter. For code intensive stuff, I sometimes like to use Sublime Editor as it has macro recording and playback. The Joplin editor is good, but sometimes, if my page/file has lots of links, images, or other 'markdown stuff', it can get a bit messy to see the text clearly. It come out of necessity for me, sometimes working on a markdown file in Sublime Edit 3 if code intensive, or alternatively in Typora if predominantly textual. This is a little python3 helper program that provides a graphical menu to select optional editors. ![]() Note: Hi There, I am a newbee on the forum, so if I have put this posting in the wrong section, let me know. Editor Choice Program: joplin_edit_choice.py
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |