Eeschema: Dialog BOM: minor fix in help doc, and a minor enhancement (the plugin name with %P in name is correctly found to display its help and to edit it)
This commit is contained in:
parent
15cc245a83
commit
272f1b35b6
|
@ -558,6 +558,14 @@ wxString DIALOG_BOM::getPluginFileName( const wxString& aCommand )
|
|||
}
|
||||
}
|
||||
|
||||
// Using a format like %P is possible in plugin name, so expand it
|
||||
wxString prj_dir = Prj().GetProjectPath();
|
||||
|
||||
if( prj_dir.EndsWith( '/' ) || prj_dir.EndsWith( '\\' ) )
|
||||
prj_dir.RemoveLast();
|
||||
|
||||
pluginName.Replace( wxT( "%P" ), prj_dir.GetData(), true );
|
||||
|
||||
return pluginName;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ a Python script is used, the command line is something like
|
|||
(depending on the Python script):</font></font></p>
|
||||
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><i>python</i>
|
||||
<i>f:/kicad\bin/plugins/bom-in-python/myconverter.py</i>
|
||||
<i>f:/kicad/bin/plugins/bom-in-python/myconverter.py</i>
|
||||
“<i>%I”“%O”<br>or<br>python</i>
|
||||
<i>/usr/local/kicad/bin/plugins/bom-in-python/myconverter .xsl “%I”
|
||||
“%O” </i></font></font>
|
||||
|
@ -173,8 +173,7 @@ supported formatting parameters are.</font></font></p>
|
|||
<li/>
|
||||
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0; page-break-before: auto; page-break-after: auto">
|
||||
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>%B</b>
|
||||
=> base filename and path of selected output file, minus path and
|
||||
extension.</font></font></p>
|
||||
=> base filename of selected output file, minus path and extension.</font></font></p>
|
||||
<li/>
|
||||
<p lang="en-US" class="western" style="margin-bottom: 0cm; widows: 0; orphans: 0">
|
||||
<font face="Times New Roman, serif"><font size="3" style="font-size: 12pt"><b>%P</b>
|
||||
|
@ -280,4 +279,4 @@ python is installed on your PC, and python scripts are located in
|
|||
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -50,6 +50,12 @@
|
|||
wxString NETLIST_EXPORTER::MakeCommandLine( const wxString& aFormatString,
|
||||
const wxString& aTempfile, const wxString& aFinalFile, const wxString& aProjectPath )
|
||||
{
|
||||
// Expand format symbols in the command line:
|
||||
// %B => base filename of selected output file, minus path and extension.
|
||||
// %P => project directory name, without trailing '/' or '\'.
|
||||
// %I => full filename of the input file (the intermediate net file).
|
||||
// %O => complete filename and path (but without extension) of the user chosen output file.
|
||||
|
||||
wxString ret = aFormatString;
|
||||
wxFileName in = aTempfile;
|
||||
wxFileName out = aFinalFile;
|
||||
|
|
Loading…
Reference in New Issue