Sidebar Object on Sublime Plugin - python

I want to build a plugin in order to affect the sidebar. Mainly visual stuff at first.
But I can't find any documentation about it.
Is it possible, as we can obtain view() and window() in the plugin, to have something like sidebar(), and be able to treat all the nodes on the Folders sections (for individual files) and interact with them?
Thanks!

There is no sidebar API in Sublime currently, so unfortunately what you are trying to do isn't possible at present.

Related

Is there a PyQt5 widget for drop-down "file explorer" menu?

I am working on a small project using PyQt5 (Python 3) and I want a widget where a user can select/modify a file, somewhat akin to the left-hand side of file explorer on Windows:
This cannot be done with QFileDialog as I want to display files that are not on the user's drive.
I have tried writing my own, however I am a beginner and I lack the skills to do it correctly (hence the reason why I'm trying to learn). I can provide the code if that would be useful.
Is there such a thing built in to pyqt? Has anyone created one before, with source code available?
Thanks in advance.
EDIT: More specifically I don't want a way to access remote files, just a widget that displays entries (along with icons, preferably) and subentries in a sort of drop-down menu, like the section of file explorer mentioned above. It doesn't necessarily have to be to do with files, consider it a drop-down menu if that helps.
I know this is old but for anyone looking for an answer it's the QTreeView widget.

Loading and modifying svg within Inkscape plugin

I am currently writing an Inkscape plugin using Python. Within this plugin, I would like to load a template (an existing svg) from the plugin folder and access some objects within this template by name or key. Then I would like to change the border and/or fill color of the object and add some text to it. How would I do this using the python scripting interface of inkscape? I found just a few examples (see below) on how to write a plugin for inkscape, but they all work on existing, already opened documents.
http://www.hoboes.com/Mimsy/hacks/write-inkscape-extension-create-multiple-duplicates/
http://wiki.inkscape.org/wiki/index.php/Script_extensions
http://ospublish.constantvzw.org/blog/tools/inkscape-plugins-in-python
http://wiki.inkscape.org/wiki/index.php/Generating_objects_from_extensions
http://wiki.inkscape.org/wiki/index.php/PythonEffectTutorial
Can you use lxml?
t = etree.parse("path/test.xml")
You could then either
manipulate the properties of t directly -- this can be done from python without actually opening inkscape. Your tree could be saved with t.write("filename")
add t to the currently open document using self.document.getroot().append(t)
Also, this is not what you asked for, but may come in useful: an inkscape plugin that allows you to write short python snippets from within Inkscape: http://www.smanohar.com/inkscape.php

How to display word/excel documents in my Qt window using Linux and python?

I am looking for the way to display word/excel documents in my Qt window using Linux and python but I couldn't find any.
Any suggestions are highly appreciable, thanks
My apporach would be to exploit Google Docs's gdata-python APIs to read the arbitrary versions of Office documents and get documents as RTF for QTextBrowser and as CSV for QTable Or perhaps even as HTML for both, depending on what functionality I would need.

Best starting point for multiple selection in file/folder tree structure wxPython

I'm looking to create a window with two panels, with a collapsible folder browser in the left panel and a list of files in the right panel that are contained in the selected folder on the left (similar to nautilus or an older windows explorer). Both the folders on the left and files on the right need a check box beside them so users can make a selection of a mix of folders and files across their whole file system.
I've had a look around and found similar-ish built-in bits in wx like GenericDirCtrl but before I get started I wanted to ask if anyone had come across something like this before that's available or if there was a better starting point that GenericDirCtrl?
I've got it all working now. I used CustomTreeCtrl for the tree and a list control that has multi inheritance from ListCtrl and CheckListCtrlMixin for the report like list with check boxes.
I can share the code if anyone's interested
There isn't a built-in file explorer. The GenericDirCtrl or one of the other tree controls is a good place to start for the tree. Then use a ListCtrl (or ObjectListView) for the other panel. Something like that should give you the functionality you need.

Using Sphinx to create context-sensitive help files in HTML

I am currently using AsciiDoc for documenting my software projects because it supports PDF and HTML help generation. I am currently running it through Cygwin so that the a2x toolchain functions properly. This works well for me but is a pain to setup on other Windows computers. I have been looking for alternative methods and recently revisited Sphinx. Noticing that it now produces HTML help files I gave it a try and it seems to work well in the small tests I performed.
My question is, is there a way to specify map id's for context sensitive help in the text so that my Windows programs can call the proper help API and the file is launched and opened to the desired location?
In AsciiDoc I am using pass::[<?dbhh topicname="_about" topicid="801"?>]. By using these constructs a context.h and alias.h are generated along with the other HTML help files (context sensitive help information).
I do not know about AcsiiDoc much, but in Sphinx you can reference arbitrary locations by placing anchors where you need them. See :ref: role.

Categories

Resources