Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 18 Aug 2019, 02:57
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Two columns in leafpad or geany ??
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 6 [84 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Author Message
musher0

Joined: 04 Jan 2009
Posts: 14264
Location: Gatineau (Qc), Canada

PostPosted: Mon 01 Apr 2019, 02:13    Post subject:  

Hi, g/g.

Same grey-out here...

~~~~~~~~~
But here is something, concerning the 2-columns layout
Quote:
split -l 50 NZ-history.txt # Section from wikipedia article
# Fifty lines, or length of article in lines divided by 2.

fmt -w 50 -u -g 50 xaa > xaa-proportional
# For this command, the "50" means "50 characters per line".
fmt -w 50 -u -g 50 xab > xab-proportional

tabs -8;paste xaa-proportional xab-proportional > result
# You can pipe the result to less.

It's not entirely satisfactory, human editing will be required.
But it's "something" to work with. A good chunk of the job is done.

(Source texts and formula are attached.)

IHTH.

BFN.
2-columns-test.zip
Description 
zip

 Download 
Filename  2-columns-test.zip 
Filesize  15.01 KB 
Downloaded  38 Time(s) 

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4017
Location: holland

PostPosted: Mon 01 Apr 2019, 04:38    Post subject:  

Hi greengeek, another option may be to use markdown and convert to html

For example this markdown code (written in leafpad):

Code:
| Applications     |  Others           |
| :----------------|  :--------------- |
|alsamixer-tray|apulse
|azpainter|broadcom-wl-driver-k4.9.0-3-686-pae
|ceni|conky-cli
|conkyclock|conky
|conkyclock2|libpng12-0
|cputemp|libx264-132
|create-portable|emelfm2
|epdfview|gtkdesklet
|deadbeef-static|gtkdialog
|firefox-esr|guessfstype
|dropboxgui|libmusicbrainz3-6


Here you can paste it, preview and export to (styled or not) html:
https://dillinger.io/
(see pic)
Or some other way to convert markdown to html (I think there are programs for that)

Fred
markdown-2-columns.png
 Description   
 Filesize   66 KB
 Viewed   199 Time(s)

markdown-2-columns.png


_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14264
Location: Gatineau (Qc), Canada

PostPosted: Mon 01 Apr 2019, 11:38    Post subject:  

Who is it, again, who wanted a TO-DO list on 2 columns?
Voici, mon ami ! Smile
Code:
#!/bin/ash
# /root/my-applications/bin/to-do-greengeek.sh
####
l="-----------"
line () { echo "$l,$l" >> to-do.csv; }

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

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

line

gnumeric to-do.csv 2>/dev/null
# Suggestion : save the gnumeric sheet under the day's date.

Don't worry about the locale for the date. It shows in French in the
picture because it doesn't know any better! Wink

The < date '+%c' > in the script means: "show full date in user's
language." So the date will show in maori style, even, should maori be
set as the default language for that Puppy.

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.

TWYL.
GreenGeek-TODO.jpg
 Description   
 Filesize   167.04 KB
 Viewed   165 Time(s)

GreenGeek-TODO.jpg


_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5617
Location: Republic of Novo Zelande

PostPosted: Mon 01 Apr 2019, 12:53    Post subject:  

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?
musherTODOgnumeric.jpg
 Description   
 Filesize   7.01 KB
 Viewed   150 Time(s)

musherTODOgnumeric.jpg

Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5617
Location: Republic of Novo Zelande

PostPosted: Mon 01 Apr 2019, 13:03    Post subject:  

fredx181 wrote:
another option may be to use markdown and convert to html

For example this markdown code (written in leafpad):
...
Here you can paste it, preview and export to (styled or not) html:
https://dillinger.io/
Thanks Fred. I tried your suggestion but there seems to be a "tight" linkage between the left and right columns. If i edit the left column it displaces the right column.

I need to be able to edit them both separately (eg end up with 50 items in work column and maybe only 5 in personal - something like that).

It doesn't seem that leafpad will be able to do this unless i operate on two input files and at the end use a method to combine the two separate files into one leafpad file for printing.

Markup (or markdown? - are they the same thing?) may be a way to set a template.
(EDIT : ok, i see that the dillinger site has a great tutorial about what markup and markdown are. This could be useful for me to know)
DillingerMarkDown.jpg
 Description   
 Filesize   46.48 KB
 Viewed   145 Time(s)

DillingerMarkDown.jpg

Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4017
Location: holland

PostPosted: Mon 01 Apr 2019, 13:23    Post subject:  

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:
| 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

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5617
Location: Republic of Novo Zelande

PostPosted: Mon 01 Apr 2019, 13:24    Post subject:  

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.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5617
Location: Republic of Novo Zelande

PostPosted: Mon 01 Apr 2019, 13:28    Post subject:  

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:
| 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.
DillingerWrap.jpg
 Description   
 Filesize   37.89 KB
 Viewed   131 Time(s)

DillingerWrap.jpg

DillingerList.jpg
 Description   
 Filesize   46.87 KB
 Viewed   131 Time(s)

DillingerList.jpg

Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5617
Location: Republic of Novo Zelande

PostPosted: Mon 01 Apr 2019, 13:42    Post subject:  

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:
leafpad_columned.jpg
 Description   
 Filesize   27.89 KB
 Viewed   135 Time(s)

leafpad_columned.jpg

Back to top
View user's profile Send private message 
fredx181


Joined: 11 Dec 2013
Posts: 4017
Location: holland

PostPosted: Mon 01 Apr 2019, 13:51    Post subject:  

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;
Quote:
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

_________________
Dog Linux website
Tinylinux blog by wiak
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14264
Location: Gatineau (Qc), Canada

PostPosted: Mon 01 Apr 2019, 14:19    Post subject:  

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 Smile task of thinking of saving your TO-DO in
/root/my-documents/my-TO-DOs.

Back in a minute with an updated script.

Code:
#!/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.
gnumeric-widen-column.jpg
 Description   
 Filesize   33.14 KB
 Viewed   124 Time(s)

gnumeric-widen-column.jpg


Last edited by musher0 on Mon 01 Apr 2019, 14:36; edited 1 time in total
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5617
Location: Republic of Novo Zelande

PostPosted: Mon 01 Apr 2019, 14:24    Post subject:  

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.
gnumeric_unhidden.jpg
 Description   
 Filesize   11.14 KB
 Viewed   114 Time(s)

gnumeric_unhidden.jpg

Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14264
Location: Gatineau (Qc), Canada

PostPosted: Mon 01 Apr 2019, 14:39    Post subject:  

A leafpad sandwich with mustard? Yaaaak.
What strange taste you have!!!! Laughing

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5617
Location: Republic of Novo Zelande

PostPosted: Mon 01 Apr 2019, 14:52    Post subject:  

Yeah, i'm strange all round. Surprised

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.
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 14264
Location: Gatineau (Qc), Canada

PostPosted: Mon 01 Apr 2019, 15:10    Post subject:  

Bah.

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

TWYL.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 6 [84 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0715s ][ Queries: 13 (0.0118s) ][ GZIP on ]