Two columns in leafpad or geany ??

Using applications, configuring, problems
Message
Author
User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#81 Post by greengeek »

Here is my latest ToDo gui to produce text output - with choice of Landscape (equal or non-equal column width) or Portrait (with equal or non-equal column widths).

Still some refining to do but I'm pretty happy how close this gets me to my original goal of using simple leafpad files to build my daily list.

EDIT : See next post for newer version
Attachments
gui_0.3.jpg
(36.16 KiB) Downloaded 138 times
ToDo_2colTEXT_gui_gg-0.3.gz
Deprecated - please consider using the newer gui in the next post instead

Remove fake .gz suffix
Make executable.
Click script
(4.71 KiB) Downloaded 77 times
Last edited by greengeek on Wed 15 May 2019, 16:10, edited 2 times in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#82 Post by greengeek »

Revision 0.4 of the text gui.

This adds the ability to direct print A4 Portrait or A4 Landscape to the default printer - and allowing the choice of equal columns or non equal columns.
(You must use the "create" button to build the file before you try to print it)

Issues i need to consider:

- How to configure for US Letter?

- How to choose smaller font to get more text on page (more columns across page)

- Check why "equal columns" (portrait and landscape) files seem to have a couple of extra spaces at left hand side. (Not a problem - just something I would like to understand)

Remove fake .gz suffix
Make executable
Attachments
gui_04.jpg
(55.38 KiB) Downloaded 107 times
ToDo_2colTEXT_gui_gg-0.4.gz
Remove fake .gz suffix
Make executable
(6.63 KiB) Downloaded 74 times
A4LandscapeEqual.jpg
(66.04 KiB) Downloaded 108 times
A4LandscapeNonEqual.jpg
(51.8 KiB) Downloaded 108 times
A4PortEqual.jpg
(47.58 KiB) Downloaded 108 times
A4PortNonEqual.jpg
(47.75 KiB) Downloaded 108 times

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#83 Post by MochiMoppel »

greengeek wrote:- Check why "equal columns" (portrait and landscape) files seem to have a couple of extra spaces at left hand side. (Not a problem - just something I would like to understand)
They have 2 spaces because you use the paste command for non-equal text and the pr command for equal text, and for the pr command you use the option -o2, which indents each line with 2 spaces. So you did this deliberately. Question remains: Why not stay with paste for all cases?

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#84 Post by greengeek »

MochiMoppel wrote:[They have 2 spaces because you use the paste command for non-equal text and the pr command for equal text, and for the pr command you use the option -o2, which indents each line with 2 spaces. So you did this deliberately.
Ahhh, you are ascribing me with greater understanding of my own actions than is actually the case :) . I may be responsible for the outcome but that is not quite the same thing as saying that I did it deliberately. I used someones proposed syntax without any accurate understanding, altered it, reshaped it, and magically came up with a result that was more or less tolerable. That is as close to coding as I get :D
Question remains: Why not stay with paste for all cases?
Now that I look at it again - I think i got scared by the sed portion of the 'paste' code. That syntax was offered as a way to make unequal columns work - so i guess i felt it was inappropriate to try to go back and re-use it to make equal columns work in a different way. (The 'pr' syntax was offered as the initial way to combine the two source files into two equal columns).

Suitably chastened - i will now sleep on my error and attack it with ferocity again tomorrow.

Cheers!
:)

ps: and thanks for pointing out the cause of the issue. I really appreciate the help!
edit : Seems that Burunduk already explained the -o2 to me here but it went over my head.

Post Reply