Running Notepad++ with NppExport from command line - command-line

I've been using the NppExport plugin of notepad++ to load a source code file and then manually export this to html using the menu Plugins->NppExport->"Export to HTML"
However I'd like to know if it is possible to automate this? Ultimately I'd like to be able to call notepad++ from the command line to silently output the result as a html file:
notepad++ source_file.cpp highlighted.html
I've tried recording the steps as a macro but that did not do anything.
I've also googled many variations of this question have found nothing about how to call a plugins commands.

Related

Command-Line Question.. I recently used start atom filename.txt to open a file in atom from my command-line

However I want to open other programs in the command-line, for example I tried sublime 3 and I got an error.
My question is where do you find what is the correct spelling for the programs we desire to work within the command-line?
The correct spelling for Sublime text is subl. I just googled "sublime text open from command-line".
Not all programs have command-line equivalents. For example I know Visual Studio Code installs the code command. But for a simpler editor like TextEdit you would need to use open.

Run command line when a document is saved in Visual Studio 2013?

I'm currently evaluating using VS2013 for a HTML5 project.
In this project I would like to be able to run a command line tool every time a file is saved (and have the file path passed as argument to the command line tool), and then have the output displayed in the console in VS. It's also important that this setup can be part of the project file, so that when a developer opens the project it's already setup correctly and ready to go without any additional configuring in VS.
In both Sublime Text and Webstorm projects all this is easy to achieve, but I haven't been able to find anything similar in Visual Studio. Any tips would be much appreciated!
You can set a DocumentSaved handler with Visual Commander and run a tool. See the "2. Run Cppcheck on the saved file and show results in the Output window" extension sample.

External editor for IPython notebook

I am using IPython notebook and I want to edit programs in an external editor.
How do I get the %edit file_name.py to open an editor such as Notepad++.
Running %edit? will give you the help for the %edit magic function.
You need to set c.TerminalInteractiveShell.editor, which is in your ipython_config.py. I'm not quite sure where this is located in Windows; on OS X and Linux, it is in ~/.ipython. You'll want to set the variable to be the full path of the editor you want.
Alternatively, you can create an environment variable EDITOR in Windows itself, and set that equal to the full path of the editor you want. iPython should use that.
I'm using Windows 7 and 8 (and 10TP) and Python 3.4.2.
I started with ipython locate to tell me where ipython thought config files suggested elsewhere should be. When I saw it was different I read around and came up with the following:
On my system, the ipython locate gave me c:\users\osmith\.ipython, not the _ipython you'll see mentioned in the YouTube videos done with Windows XP,
Look in the directory ipython locate specifies for a profile directory; if you aren't actively doing anything with ipython profiles, it should be .ipython\profile_default, if you are using profiles, then I leave it to you to s/profile_default/${YOUR_PROFILE_NAME}/g
Check the profile_default directory for a ipython_config.py file, if it's not there, tell IPython to initialize itself: ipython profile create
Open the config file in a text editor,
If you are the kind of person who hasn't messed around with their console overly much and installs things in standard places, you can skip straight to this step by typing: ipython profile create followed by start notepad .ipython\profile_default\ipython_config.py.
Search for the string c.TerminalInteractiveShell.editor,
The comment above this indicates you can also use the EDITOR environment variable, but hard coding file paths never hurt anyone so lets do eet:
Copy the line and remove the leading hash and spaces from the copy.
Replace the text between the apostrophes ('notepad') with the path of our desired editor, e.g.
c.TerminalInteractiveShell.editor = 'c:/program files (x86)/noddyeditor/noddy.exe'
There is a catch here, though; some modern editors get a bit fancy and automatically and, when invoked like this, detach from the console. Notepad++ and Sublime Text, for example. Sublime accepts a "--wait" option, which works some of the time; this tells the command invocation to hang around until you close the file, for some definition of until and some other definition of close.
However, the following setting will work most of the time for sublime text:
c.TerminalInteractiveShell.editor = '"c:/program files/sublime text 3/subl.exe" --wait'
(assuming c:\program files\ is where your sublime text 3 directory is)
Try the 'Pycharm' editor
This works for me.

Notepad++ using "Run" command in a macro

Is it possible to create a macro in Notepad++ that is able to utilize the "Run" command so that I may call an external .exe to operate on the file specified? I am able to do it manually, but when I create a macro that includes the run (F5) and give it a specified command it fails to execute. Is this because the run command isn't supported when creating macros? If so, is there a work-around method?
Thanks
edit: to add context -- I've written a couple ruby scripts to facilitate data-entry that's done using notepad++, and would like to integrate them to the editor. Having them run by a shortcut method created by recording a macro seems to be the best way to do this, unless it's not possible to utilize the run command.
FWIW The Zeus and Zeus Lite editors can do this.
You can do it with the NppExec plugin (available in the Notepad++ wiki ). It allows you to create mini-scripts with keywords that perform commands.
You will also be able to add your script in the contextual (right-click) menu, or assign a shortcut to it.
I personaly uses it to saves a sql file, place myself in the current directory, and then executes isql.exe (external executable) on that file. That simple script transforms my Notepad++ into a rather handy SQL IDE.
I don't think you do it using only Notepad++.
Please see this thread:
http://sourceforge.net/projects/notepad-plus/forums/forum/331754/topic/4805532
If I understood you correctly, you have it all set up but are having issues with running it through Notepad++'s run command?
If so, try what I mentioned here.
I had similar issues with running php compiler and resolved it with the "cmd /c" added like in that mentioned example. And a "& pause" at the end, just so I see what goes on.

Libreoffice Impress Export as Images extension does not work

Libreoffice Impress Export as Images extension does not work. "Export as Images" Menu is not being added to File Menu.
Link- http://extensions-test.libreoffice.org/extension-center/export-as-images
I am using Libreoffice 3.4. Any suggestions would be helpful.
Quick workaround: start the Export as Images macro manually. It's located under My Macros -> ExportImages -> ExportImages. Look for a macro named ExportAsImages and run it. Once found and started, it works fine :) (i don't know why it doesn't show up in the File menu).
EDIT:
Editing the macro is possible using the built-in IDE: once it's installed, you can access its LibreOffice Basic source using Tools-> Macros -> Organize Macros... -> LibreOffice Basic.
It's also possible to run it from the command line, but in its current form, it requires user interaction to specify the output file name and graphics format. So i assume it isn't possible to run it completely in "headless" mode without modifying the source. To run it from the command line on Linux, converting the file /tmp/mypresentation.odp, use:
$ simpress /tmp/mypresentation.odp "vnd.sun.star.script:ExportImages.ExportImages.ExportAsImages?language=Basic&location=application"