Two columns in leafpad or geany ??

Using applications, configuring, problems
Message
Author
User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#21 Post by fredx181 »

Hi greengeek, not sure what's the problem exactly, if you separate the text from first and second column with a "|" it should be fine.

Code: Select all

| Personal     |  Work          |
| :---------------- |  :--------------- |
|first row, first column|first row, second column
|second row, first column|second row, second column
|third row, first column|third row, second column
Fred

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

#22 Post by greengeek »

B.K. Johnson wrote:@greengeek
Try Geany as Semme suggested. You'll find it is what you want.
Here are 3 screenshots
original text > 450 lines
Text in 2 panels after Tools > Split Window >Side by side
Text in 2 panels after scrolling only right panel
To revert: Tools >Split window > unsplit
Thanks B.K - what would the output look like once printed? Wouldn't it just be a single document in portrait mode? The ability to edit different parts of the document is good - but i also need to see the two different lists displayed visually next to each other once printed as landscape.

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

#23 Post by greengeek »

fredx181 wrote:Hi greengeek, not sure what's the problem exactly, if you separate the text from first and second column with a "|" it should be fine.

Code: Select all

| Personal     |  Work          |
| :---------------- |  :--------------- |
|first row, first column|first row, second column
|second row, first column|second row, second column
|third row, first column|third row, second column
Fred
Ok, i get what you mean. The problem occurred because I hit the enter key in order to create a line wrap when editing column one. Instead of doing that I would have to be strict about keeping the pipe characters where they are. i will have to test this more and see how the onscreen wrapping works with longer text entries.
Attachments
DillingerWrap.jpg
(37.89 KiB) Downloaded 145 times
DillingerList.jpg
(46.87 KiB) Downloaded 145 times

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

#24 Post by greengeek »

What would be great is if Dillinger had the ability to format the lists as a very basic two column display without the excessive whitespace.

The idea of using the pipe characters is enticing - all i need is a utility to recognise what i want done with the display.

I am aiming to use up as much of the A4 landscape real estate as possible, without wasted vertical space:
Attachments
leafpad_columned.jpg
(27.89 KiB) Downloaded 150 times

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#25 Post by fredx181 »

greengeek wrote: i will have to test this more and see how the onscreen wrapping works with longer text entries.
I didn't try such long text and wrapping, but how you did looks OK to me, maybe you can find more about markdown tables, e.g. see here:
https://www.tablesgenerator.com/markdown_tables

EDIT;
I am aiming to use up as much of the A4 landscape real estate as possible, without wasted vertical space:
Aha, yes, I see what you mean, don't know if possible with markdown.

Fred

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#26 Post by musher0 »

greengeek wrote:
musher0 wrote:I don't know how you use your TO-DO list for the day, and it's not my place to recommend anything about it. But If you wish, you can link this little script as the last item in /root/Startup, and your TO-DO list will be ready for you to fill out every morning when you boot up your Puppy..
You're spoiling me musher0!

I like the idea of the list popping up as soon as i boot my PC - that's a nice touch.

I didnt initially want to use anything other than leafpad, but the reality seems to be i need to broaden my horizons. Gnumeric may have potential if I can get past the problem with cells hiding the data in adjacent cells.

Is there an adjustable "word wrap" or "character wrap" for spreadsheet cells?
Hi.

Glad you like it!

To widen a column in gnumeric, just put your cursor on the column
separator between A and B, and move it to the right. (Pls see attached.)

Once you've saved your TODO in gnumeric format, the wider cell will be
remembered.

Yeah, I know! I do not know what name you'll give this spreadsheet. The
way around this is to create a directory in my-documents called
< my-TO-Dos > and then the script can load the one with today's date --
as the file date, not necessarily with today's date in the file name.-- in
gnumeric.

Which means you will be left with the exhausting, extenuating and
arduous :) task of thinking of saving your TO-DO in
/root/my-documents/my-TO-DOs.

Back in a minute with an updated script.

Code: Select all

#!/bin/ash
# /root/my-applications/bin/to-do-greengeek.sh
####
DiR=/root/my-documents/my-TO-DOs

mkdir -p $DiR # Non squishing creation of dir.

cd $DiR
if [ "`ls *.gnumeric`" != "" ];then
	gnumeric `ls -t *.gnumeric | head -1` 2>/dev/null

# We load the latest gnumeric file in the directory
# if there is one, OR
else
# we create one.

	l="-----------"
	line () { echo "$l,$l" >> $DiR/to-do.csv; }

	date '+%c' > $DiR/to-do.csv
	echo ".
	WORK,PERSONAL" >> $DiR/to-do.csv
	line

	for i in 1 2 3 4 5;do
		echo "$i),$i)" >> $DiR/to-do.csv
	done

	line
	echo NOTES >> $DiR/to-do.csv

	gnumeric to-do.csv 2>/dev/null

fi
Tah-dah!
TWYL.
Attachments
gnumeric-widen-column.jpg
(33.14 KiB) Downloaded 139 times
Last edited by musher0 on Mon 01 Apr 2019, 18:36, edited 1 time in total.

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

#27 Post by greengeek »

musher0 wrote:To widen a column in gnumeric, just put your cursor on the column separator between A and B, and move it to the right.
Thanks - i also found a tutorial that said to doubleclick the column separator on the top line of the spreadsheet. This worked to force gnumeric to display the full width contents of the cell.

Might be some potential here - although i guess what i want is to be able to set a maximum cell width (number of characters) as well as auto wrap - such that the "work" list can be set to whatever portion of the A4 landscape width i need.

ie: i might choose 50/50 work/personal or i might set 60/40 work/personal

Definitely looking as if leafpad alone will not cut the mustard.
Attachments
gnumeric_unhidden.jpg
(11.14 KiB) Downloaded 127 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#28 Post by musher0 »

A leafpad sandwich with mustard? Yaaaak.
What strange taste you have!!!! :lol:
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#29 Post by greengeek »

Yeah, i'm strange all round. :o

I always seem to do things the weird way.

Surprising that Osmo doesn't have this two column functionality in it's "task" feature - it has so much other stuff.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#30 Post by musher0 »

Bah.

Who needs Osmo when you have all sorts of time templates for gnumeric.
E.g. : https://www.ecosia.org/search?q=weekly+ ... opensearch

TWYL.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

#31 Post by B.K. Johnson »

greengeek wrote:
Thanks B.K - what would the output look like once printed? Wouldn't it just be a single document in portrait mode? The ability to edit different parts of the document is good - but i also need to see the two different lists displayed visually next to each other once printed as landscape.
You're right. Printing isn't possible. Scratch the suggestion.
[color=blue]B.K. Johnson
tahrpup-6.0.5 PAE (upgraded from 6.0 =>6.0.2=>6.0.3=>6.0.5 via quickpet/PPM=Not installed); slacko-5.7 occasionally. Frugal install, pupsave file, multi OS flashdrive, FAT32 , SYSLINUX boot, CPU-Dual E2140, 4GB RAM[/color]

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

Xournal possible solution

#32 Post by greengeek »

Just to clarify why a word processor seems unsuitable for this application -

I do not know how to place two entirely separate tables next to each other on a landscape page.

I can make a table with two columns, but the columns are "linked" - in the sense that if i add a 3 line item to a row in the left hand column, it automatically expands the corresponding row in column 2. This means that the list in column 1 cannot be maintained independently of the list in column 2.

If it were possible in a word processor to place two tables next to each other I could use this for my job sheet. (Probably this can be done by making a table as some sort of "object" insertion - with special alignment specified somehow. I just don't know how to do it).

However, I have found a way to achieve something similar to what I need:
Xournal is a surprisingly powerful pdf editor and basic drawing utility and it allows me to create a Landscape A4 page, draw a vertical line seperating my lists and then use the text tool to build (and edit) my two lists independently.

Here is a screenshot and an actual sample .xoj "xournal project" file along with an exported pdf

(Remove the fake .gz suffixes to view the files).
Attachments
pdf_out.png
(67.11 KiB) Downloaded 378 times
SampleJobsheet.pdf.gz
(37.31 KiB) Downloaded 94 times
SampleJobsheet.xoj.gz
(1.77 KiB) Downloaded 118 times

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#33 Post by musher0 »

How about trying with two rows instead of two columns?
That just has to be feasible in a word processor.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#34 Post by greengeek »

musher0 wrote:How about trying with two rows instead of two columns?
That just has to be feasible in a word processor.
Well, you've prompted me to have another crack with a WP and it seems that having ONE row may be the answer. That way the bigger column (either Work or Personal) grows as the items increase, and the other column can be as full or empty as required. The two columns don't try to keep step the way they did originally where I had one row for each new item.

If I limit the table to one row I can just copy from leafpad and paste my WORK list to column one and my PERSONAL list into column two and it seems to work well.

Except for the fact I can't seem to print Landscape from Apache Openoffice (unless I export it to pdf first...) - but that's a problem for another day.

Still wish I could have a dual pane leafpad :( Wouldn't that be great?? Much more in the Puppy spirit rather than using 100MB of WP !!

Thanks for the help!

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#35 Post by musher0 »

Hi, gg.

Is Geany good enough for you? :)

Code: Select all

#!/bin/bash
# /usr/local/bin/2cols-todo-gg.sh
# For greengeek (PuppyLinux forum)
# http://murga-linux.com/puppy/viewtopic.php?t=115747&start=30
# (c) musher0, April 20th 2019. GPL3.
####

DATE="`date '+%y-%m-%d'`"
TODO="/root/my-documents/2cols-todo-gg.$DATE"
# We specify the date as the file ending, to keep these
# files sorted in chronological order in ~/my-documents

if [ ! -f $TODO ];then # If file exists, we do not redo it.
	date '+%c' > $TODO # We include today's date.

# We create the frame.
	echo "
WORK                                | PERSONAL
____________________________________|________________________________" >> $TODO
	j="1"
	for i in `seq 9`;do
		SprtR=" $j -                                | $j -"
		echo "$SprtR" >> $TODO
		j="`expr $j + 1 `"
	done
	echo -e "\e[1A"
	echo "_____________________________________________________________________
NOTES
" >> $TODO
fi
# We open the file in a new instance of Geany to NOT interfere
# with other editing work that you may be working on.
geany -i $TODO 
zip -9 -q $TODO.zip $TODO # We make a quiet back-up.
# end #
The only thing is:
Remember to type your text in the WORK column with Insert OFF. Other-
wise, the separator won't stay put. I think that would be a minor incon-
venience, since the other solutions you tried seemed unsatisfactory.

Typing in the PERSONAL column, however, insert or squish text as you
like, it will not matter.

I took the liberty of adding a NOTES section, for those things that fall
neither in the WORK nor in the PERSONAL categories.

-- I did some tests in nano, but it uses the Insert key for something else.

-- I tried it in joe, but joe does not squish characters as you type. Period.

-- Leafpad does not have very good rendition for underscores.

So I was left with Geany. It looks good, it can squish or insert characters,
plus, answering a previous question of yours, Geany does print to pdf
sideways (wide-style).

Just make sure to tick off all the settings in the right-most tab in the
printing panel. Please see the attached "Sortie.pdf" for an example.

So what you do is: whenever you need to, you fire up this script.
Very simple.

Finally, the script has two safeguards:
1) it will not redo a blank frame if today's TODO file exists: it will load the
existing one in Geany. So your previous entries for the day are safe.

2) it quietly makes or updates a zipped back-up every time you QUIT
your Geany TODO instance. Note: that's "quit the app", not just "close
the text".

That's in addition to the automatic time-save function you may already
have activated and configured in Geany.

I have commented the script. If you have other questions, please ask.

Enjoy!
Attachments
Is-Geany-good-enough.jpg
Sorry for the date in French. That line is created by the &lt; date '+%c' &gt;
command, so it will print in the locale you have defined for your computer.
(158.84 KiB) Downloaded 332 times
2cols-todo-gg.sh.zip
Same script as above, zipped.
(768 Bytes) Downloaded 92 times
sortie.pdf.zip
(8.66 KiB) Downloaded 95 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#36 Post by greengeek »

musher0 wrote:Remember to type your text in the WORK column with Insert OFF. Other-wise, the separator won't stay put. I think that would be a minor incon-venience, since the other solutions you tried seemed unsatisfactory.

Typing in the PERSONAL column, however, insert or squish text as you like, it will not matter.
!
Merci bien musher0! Mais je ne comprend pas " type your text in the WORK column with Insert OFF." Explique si'l vous plait?

I don't know how to turn off insert. is that a function within geany? Or a keyboard setting?

If I type data iin the work column the separator moves right also - so I am assuming i am breaking the cardinal rule.

Otherwise - looks very promising.

cheers!

EDIT: Ahhh, i see - my keyboard has an "INS" key that switches between "overtype" and "insert". Who even knew that existed or what the heck it was for? Not me!

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#37 Post by musher0 »

Glad you like it! :)

TWYL

~~~~~~~~~~~
PS, a couple of hours later.
I discovered that overtype CAN be used in the joe editor.
The switch is < Ctrl-T T >.
This opens up a choice of editors, doesn't it.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
fredx181
Posts: 4448
Joined: Wed 11 Dec 2013, 12:37
Location: holland

#38 Post by fredx181 »

Hi greengeek, just in case you are interested in markdown > html, see here for doing a similar thing as you're looking for (with style block added to html makes the columns full width) And not depending on online service.
http://murga-linux.com/puppy/viewtopic. ... 71#1025971
What would be great is if Dillinger had the ability to format the lists as a very basic two column display without the excessive whitespace.
Dillinger doesn't, but I think an improvement would be to add 2 lines to the exported styled html after <table class=... so becomes:

Code: Select all

<table class="table table-striped table-bordered">
  <col width="50%">
  <col width="50%">
Then column width is 50/50

Fred

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#39 Post by musher0 »

Hello greengeek and all.

I made a pet of it and stored it here.

It's a version 2, bilingual (EN-FR), to which I have added:

-- a companion script to change from the geany editor to the joe editor
and vice versa. Requires replaceit, but all recent Puppies have it now;

-- loading of yesterday's TO-DO in addition to the one for the current day.
If you have not finished a task yesterday, with such a lay-out you can
easily copy and paste that task from yesterday to today.

-- geany presents the two TO-DOS as tabs, like it always does for multiple
texts, whereas joe presents them top-bottom. Some people might prefer
the latter lay-out (I know I do). The other thread has captures of the use
with the joe editor.

-- the pet comes with a desktop file and its icon, so it will show in the
menu under "Personal". As well, you may wish to drag that desktop file
on the desktop for faster access.

-- a wrapper to launch the joe editor as a quasi-GUI window is included. In
this context, I do not recommend launching it as a traditional terminal app.

-- I kept all the other features, back-up, etc., from the initial version.

That's about it. Any questions, please ask.

BFN.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#40 Post by greengeek »

fredx181 wrote:but I think an improvement would be to add 2 lines to the exported styled html after <table class=... so becomes:

Code: Select all

<table class="table table-striped table-bordered">
  <col width="50%">
  <col width="50%">
Then column width is 50/50
Where would i be putting this code please? I can't see an existing "<table class" definition anywhere.
cheers!

Post Reply