[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-23 Thread Lex Trotman via Users
On Sat, 24 Dec 2022 at 02:17, Virgil Arrington Jr. via Users
 wrote:
>
> On 12/23/2022 3:53 AM, Lucas Vieites via Users wrote:
>
>   Thank you, Lex.
>   I have signed up and written a small howto with the successful 
> instructions: https://wiki.geany.org/howtos/win32/build-command
>
>   Kind regards,
> --
> Lucas Vieites
> Blog @ codexion.com
> LinkedIn
>
> I hate to complicate things, but it's a little more complex than that. So 
> far, in my experience, the *only* time I have needed to wrap a build command 
> into the cmd.exe shell was with this one command in which I attempted to run 
> the "python -m markdown %f > %e.html" command. All other build commands have 
> worked just fine without being wrapped in a shell. For example, if I compile 
> a markdown file using Pandoc or Darkslide, I can run the command directly 
> from inside Geany without a shell. Only this unique command required the 
> shell.
>
> I suspect the problem is with the ">" character.

Yes, because that character is interpreted and the redirection set up
by cmd.exe, so if the command is run without cmd.exe it won't happen.

Cheers
Lex

> With that character in the build command, Geany seems to stop executing the 
> command once it comes across that character. It appears that the ">" needs a 
> cmd.exe shell in order to be processed. The Python build command uses the ">" 
> to output to a file. Neither Pandoc nor Darkslide use the ">" character for 
> file output; therefore, they don't require a shell.
>
> All that is to say that it is perhaps a little overly-simplistic to imply 
> that all build commands in Geany running in Windows require the cmd.exe shell 
> as they don't. But, it's useful to have the information available so users 
> like me can have something more to experiment with.
>
> Virgil
>
>
> ___
> Users mailing list -- users@lists.geany.org
> To unsubscribe send an email to users-le...@lists.geany.org
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-23 Thread Virgil Arrington Jr. via Users

On 12/23/2022 3:53 AM, Lucas Vieites via Users wrote:

  Thank you, Lex.
  I have signed up and written a small howto with the successful 
instructions: https://wiki.geany.org/howtos/win32/build-command


  Kind regards,
--
*Lucas Vieites *
Blog @ codexion.com 
LinkedIn 

I hate to complicate things, but it's a little more complex than that. 
So far, in my experience, the *only* time I have needed to wrap a build 
command into the cmd.exe shell was with this one command in which I 
attempted to run the "python -m markdown %f > %e.html" command. All 
other build commands have worked just fine without being wrapped in a 
shell. For example, if I compile a markdown file using Pandoc or 
Darkslide, I can run the command directly from inside Geany without a 
shell. Only this unique command required the shell.


I suspect the problem is with the ">" character. With that character in 
the build command, Geany seems to stop executing the command once it 
comes across that character. It appears that the ">" needs a cmd.exe 
shell in order to be processed. The Python build command uses the ">" to 
output to a file. Neither Pandoc nor Darkslide use the ">" character for 
file output; therefore, they don't require a shell.


All that is to say that it is perhaps a little overly-simplistic to 
imply that all build commands in Geany running in Windows require the 
cmd.exe shell as they don't. But, it's useful to have the information 
available so users like me can have something more to experiment with.


Virgil

___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-23 Thread Lex Trotman via Users
On Fri, 23 Dec 2022 at 18:54, Lucas Vieites via Users
 wrote:
>
>   Thank you, Lex.
>   I have signed up and written a small howto with the successful 
> instructions: https://wiki.geany.org/howtos/win32/build-command

Thank you for contributing.

Cheers
Lex

>
>   Kind regards,
> --
> Lucas Vieites
> Blog @ codexion.com
> LinkedIn
>
>
> On Thu, Dec 22, 2022 at 9:55 PM Lex Trotman via Users  
> wrote:
>>
>> On Thu, 22 Dec 2022 at 23:32, Lucas Vieites via Users
>>  wrote:
>> >
>> >   Hi there,
>> >   Is there a knowledge base, or wiki, or similar where we can centralize 
>> > this kind of question/answer?
>>
>> https://wiki.geany.org/start
>>
>> >
>> >   Thank you,
>> > --
>> > Lucas Vieites
>> > lucasviei...@gmail.com
>> >
>> > On Thu, Dec 22, 2022, 14:12 Virgil Arrington via Users 
>> >  wrote:
>> >>
>> >> > 2) If that doesn't exist, try wrapping in a shell:
>> >>
>> >> >cmd.exe /c "my command"
>> >>
>> >> That works perfectly.
>> >>
>> >>
>> >>
>> >> Thanks for the suggestion. Thanks to others who responded with other 
>> >> suggestions. This one was the easiest to implement and it worked.
>> >>
>> >>
>> >>
>> >> Virgil
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> ___
>> >> Users mailing list -- users@lists.geany.org
>> >> To unsubscribe send an email to users-le...@lists.geany.org
>> >
>> > ___
>> > Users mailing list -- users@lists.geany.org
>> > To unsubscribe send an email to users-le...@lists.geany.org
>> ___
>> Users mailing list -- users@lists.geany.org
>> To unsubscribe send an email to users-le...@lists.geany.org
>
> ___
> Users mailing list -- users@lists.geany.org
> To unsubscribe send an email to users-le...@lists.geany.org
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-23 Thread Lucas Vieites via Users
  Thank you, Lex.
  I have signed up and written a small howto with the successful
instructions: https://wiki.geany.org/howtos/win32/build-command

  Kind regards,
--
*Lucas Vieites *
Blog @ codexion.com 
LinkedIn 


On Thu, Dec 22, 2022 at 9:55 PM Lex Trotman via Users 
wrote:

> On Thu, 22 Dec 2022 at 23:32, Lucas Vieites via Users
>  wrote:
> >
> >   Hi there,
> >   Is there a knowledge base, or wiki, or similar where we can centralize
> this kind of question/answer?
>
> https://wiki.geany.org/start
>
> >
> >   Thank you,
> > --
> > Lucas Vieites
> > lucasviei...@gmail.com
> >
> > On Thu, Dec 22, 2022, 14:12 Virgil Arrington via Users <
> users@lists.geany.org> wrote:
> >>
> >> > 2) If that doesn't exist, try wrapping in a shell:
> >>
> >> >cmd.exe /c "my command"
> >>
> >> That works perfectly.
> >>
> >>
> >>
> >> Thanks for the suggestion. Thanks to others who responded with other
> suggestions. This one was the easiest to implement and it worked.
> >>
> >>
> >>
> >> Virgil
> >>
> >>
> >>
> >>
> >>
> >> ___
> >> Users mailing list -- users@lists.geany.org
> >> To unsubscribe send an email to users-le...@lists.geany.org
> >
> > ___
> > Users mailing list -- users@lists.geany.org
> > To unsubscribe send an email to users-le...@lists.geany.org
> ___
> Users mailing list -- users@lists.geany.org
> To unsubscribe send an email to users-le...@lists.geany.org
>
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-22 Thread Lex Trotman via Users
On Thu, 22 Dec 2022 at 23:32, Lucas Vieites via Users
 wrote:
>
>   Hi there,
>   Is there a knowledge base, or wiki, or similar where we can centralize this 
> kind of question/answer?

https://wiki.geany.org/start

>
>   Thank you,
> --
> Lucas Vieites
> lucasviei...@gmail.com
>
> On Thu, Dec 22, 2022, 14:12 Virgil Arrington via Users 
>  wrote:
>>
>> > 2) If that doesn't exist, try wrapping in a shell:
>>
>> >cmd.exe /c "my command"
>>
>> That works perfectly.
>>
>>
>>
>> Thanks for the suggestion. Thanks to others who responded with other 
>> suggestions. This one was the easiest to implement and it worked.
>>
>>
>>
>> Virgil
>>
>>
>>
>>
>>
>> ___
>> Users mailing list -- users@lists.geany.org
>> To unsubscribe send an email to users-le...@lists.geany.org
>
> ___
> Users mailing list -- users@lists.geany.org
> To unsubscribe send an email to users-le...@lists.geany.org
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-22 Thread o1bigtenor via Users
On Thu, Dec 22, 2022 at 7:32 AM Lucas Vieites via Users
 wrote:
>
>   Hi there,
>   Is there a knowledge base, or wiki, or similar where we can centralize this 
> kind of question/answer?
>
Hmm - - - - and here I thought that's what this list is for - - - yes? (grin)

(That's one reason I subscribed!)
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-22 Thread Lucas Vieites via Users
  Hi there,
  Is there a knowledge base, or wiki, or similar where we can centralize
this kind of question/answer?

  Thank you,
-- 
Lucas Vieites
lucasviei...@gmail.com

On Thu, Dec 22, 2022, 14:12 Virgil Arrington via Users <
users@lists.geany.org> wrote:

> > 2) If that doesn't exist, try wrapping in a shell:
>
> >cmd.exe /c "my command"
>
> That works perfectly.
>
>
>
> Thanks for the suggestion. Thanks to others who responded with other
> suggestions. This one was the easiest to implement and it worked.
>
>
>
> Virgil
>
>
>
>
> ___
> Users mailing list -- users@lists.geany.org
> To unsubscribe send an email to users-le...@lists.geany.org
>
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-22 Thread Virgil Arrington via Users
> 2) If that doesn't exist, try wrapping in a shell:

>cmd.exe /c "my command"

That works perfectly.

Thanks for the suggestion. Thanks to others who responded with other 
suggestions. This one was the easiest to implement and it worked.

Virgil


___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-21 Thread Lex Trotman via Users
Yes, as Doug says, if the purpose is to convert markdown to html
rather than work on the Python module its best to use one of the many
programs that convert markdown rather than trying to run a Python
module, there are lots, many with extensions that are generally
considered essential these days to at least match Github Markdown, eg
Pandoc (which has windows installer IIUC) etc

Lex

On Thu, 22 Dec 2022 at 14:49, Doug Henderson via Users
 wrote:
>
> Vigil,
>
> Try
>
> > py -m pip install -U Markdown
> > Markdown -version
> Markdown: discount (master)2.2.7
>
> Then in geany, use
>
> Markdown -o %e.html %f
>
> If this doesn't work, then create a command file e.g. "mkdn.cmd" with:
>
> @echo off
> markdown %1 %2
>
> and put it in a folder in your path. Add any Markdown options in this
> file. And put
>
> mkdn %e %f.html
>
> in geany.
>
> This assumes that the python scripts folder, where Markdown got
> installed is in your path. If not, use the full path, with double
> quotes, if necessary, into the command or into geany.
>
> BTW, you can also try markdown2, in a similar way with the second line
> of the command file being:
>
> markdown2 %1 > %2
>
> and
>
> mkdn %e %.html
>
> in geany.
>
> Note: I have not tested this myself. Instead, I use a markdown plugin
> in Notepad++, despite using Geany for almost all other editing.
>
> HTH
> Doug
>
>
> On Wed, Dec 21, 2022 at 12:25 PM Virgil Arrington via Users
>  wrote:
> >
> >
> >
> > Hi all,
> >
> >
> >
> > I am using Geany 1.37 with Windows 11. I wish to build an html file from a 
> > markdown source file. In the Build > Set Build Commands dialog, I typed in 
> > the following command:
> >
> >
> >
> > python -m markdown %f > %e.html
> >
> >
> >
> > When I click on the build command in the Build drop down menu, the markdown 
> > file compiles, but the output is displayed in the Compile window at the 
> > bottom of the screen. I can see all of the html code just fine, but the 
> > output is NOT put into the desired html file. It’s as if Geany stops 
> > reading the build command after it gets to the “%f”.
> >
> >
> >
> > I have replaced the %f and %e with actual file names, but it still doesn’t 
> > output to a file. If I run the same command from a DOS command window 
> > separately from Geany, everything works just fine and I get the desired 
> > html file. But it doesn’t work from within Geany. It appears as if Geany is 
> > not recognizing the “>” character which I believe should output the html 
> > code into the %e.html file.
> >
> >
> >
> > Is there other syntax I should use to tell Geany to build the source file 
> > into an output file? If I recall correctly, I had successfully done this in 
> > the past with Geany on a Linux computer, but since I switched to Windows 
> > 11, I haven’t been able to get Geany to output to a file.
> >
> >
> >
> > Thanks for any help y’all can provide.
> >
> >
> >
> > Virgil
> >
> >
> >
> > ___
> > Users mailing list -- users@lists.geany.org
> > To unsubscribe send an email to users-le...@lists.geany.org
>
>
>
> --
> Doug Henderson, Calgary, Alberta, Canada - from gmail.com
> ___
> Users mailing list -- users@lists.geany.org
> To unsubscribe send an email to users-le...@lists.geany.org
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-21 Thread Doug Henderson via Users
Vigil,

Try

> py -m pip install -U Markdown
> Markdown -version
Markdown: discount (master)2.2.7

Then in geany, use

Markdown -o %e.html %f

If this doesn't work, then create a command file e.g. "mkdn.cmd" with:

@echo off
markdown %1 %2

and put it in a folder in your path. Add any Markdown options in this
file. And put

mkdn %e %f.html

in geany.

This assumes that the python scripts folder, where Markdown got
installed is in your path. If not, use the full path, with double
quotes, if necessary, into the command or into geany.

BTW, you can also try markdown2, in a similar way with the second line
of the command file being:

markdown2 %1 > %2

and

mkdn %e %.html

in geany.

Note: I have not tested this myself. Instead, I use a markdown plugin
in Notepad++, despite using Geany for almost all other editing.

HTH
Doug


On Wed, Dec 21, 2022 at 12:25 PM Virgil Arrington via Users
 wrote:
>
>
>
> Hi all,
>
>
>
> I am using Geany 1.37 with Windows 11. I wish to build an html file from a 
> markdown source file. In the Build > Set Build Commands dialog, I typed in 
> the following command:
>
>
>
> python -m markdown %f > %e.html
>
>
>
> When I click on the build command in the Build drop down menu, the markdown 
> file compiles, but the output is displayed in the Compile window at the 
> bottom of the screen. I can see all of the html code just fine, but the 
> output is NOT put into the desired html file. It’s as if Geany stops reading 
> the build command after it gets to the “%f”.
>
>
>
> I have replaced the %f and %e with actual file names, but it still doesn’t 
> output to a file. If I run the same command from a DOS command window 
> separately from Geany, everything works just fine and I get the desired html 
> file. But it doesn’t work from within Geany. It appears as if Geany is not 
> recognizing the “>” character which I believe should output the html code 
> into the %e.html file.
>
>
>
> Is there other syntax I should use to tell Geany to build the source file 
> into an output file? If I recall correctly, I had successfully done this in 
> the past with Geany on a Linux computer, but since I switched to Windows 11, 
> I haven’t been able to get Geany to output to a file.
>
>
>
> Thanks for any help y’all can provide.
>
>
>
> Virgil
>
>
>
> ___
> Users mailing list -- users@lists.geany.org
> To unsubscribe send an email to users-le...@lists.geany.org



-- 
Doug Henderson, Calgary, Alberta, Canada - from gmail.com
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-21 Thread Lex Trotman via Users
On Thu, 22 Dec 2022 at 08:06, Geany User via Users
 wrote:
>
>
> On 2022-12-21 11:25, Virgil Arrington via Users wrote:
> > Hi all,
> >
> > I am using Geany 1.37 with Windows 11. I wish to build an html file from a
> > markdown source file. In the Build > Set Build Commands dialog, I typed in 
> > the
> > following command:
> >
> > python -m markdown %f > %e.html
>
>
> I'd guess that the command isn't run under a shell but rather directly.

Correct, its run with `CreateProcess()` because the various shell
executes don't allow the re-direction of stdin and stdout AFAICT.

> In that case I'd...
>
> 1) Look for an output argument, such as -o
>
>  python -m markdown -o %e.html %f
>
>
> 2) If that doesn't exist, try wrapping in a shell:
>
> cmd.exe /c "my command"
>
> May have to use /k or other trickery.  Check with cmd /h.

Also may need extra quoting of the command, buyer beware.

>
>
> ___
> Users mailing list -- users@lists.geany.org
> To unsubscribe send an email to users-le...@lists.geany.org
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-21 Thread Geany User via Users



On 2022-12-21 11:25, Virgil Arrington via Users wrote:

Hi all,

I am using Geany 1.37 with Windows 11. I wish to build an html file from a 
markdown source file. In the Build > Set Build Commands dialog, I typed in the 
following command:


python -m markdown %f > %e.html



I'd guess that the command isn't run under a shell but rather directly.  In that 
case I'd...


1) Look for an output argument, such as -o

python -m markdown -o %e.html %f


2) If that doesn't exist, try wrapping in a shell:

   cmd.exe /c "my command"

   May have to use /k or other trickery.  Check with cmd /h.


___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org


[Geany-Users] Re: Geany build command doesn't output to a file

2022-12-21 Thread Frank Lanitz via Users

On 21.12.22 20:25, Virgil Arrington via Users wrote:

Hi all,

I am using Geany 1.37 with Windows 11. I wish to build an html file from 
a markdown source file. In the Build > Set Build Commands dialog, I 
typed in the following command:


python -m markdown %f > %e.html


As a non-Windows-user for >10 years now: IIRC does Windows not support 
the > operator. Am I wrong?


.f


OpenPGP_signature
Description: OpenPGP digital signature
___
Users mailing list -- users@lists.geany.org
To unsubscribe send an email to users-le...@lists.geany.org