Geany as Launcher, Bookmarks Manager, and Word Processor

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

Re: wasn't previously a problem, but now unlabled html files are

#61 Post by Puppus Dogfellow »

edited/improved 5/13:
script and vtg sheet above apparently need the files made marked as html for some of the browsers at least some of the time, so i'll reup the two files from above with the fixes. to do it manually (if you've noticed the content is suddenly not editable), it's a bunch of swap and replaces...end lines (\n) for .html\n
...and [fontname][space]...---be back in a bit. sorry for the inconvenience.

---
here's the first bit:

Code: Select all

[...]
[...]

to do it manually (if you've noticed the content is suddenly not editable), it's a bunch of swap and replaces...end lines (\n) for .html\n
...and [fontname][space]...

for the first chunk, that was accurate except for an extend select and typing of .html to get at some text that was nicely aligned to begin with. in the second chunk i had to do the same thing but there was more of it and the pieces not nicely aligned, so i had to substitute space for line break, line break for .html plus line break, and then swap back out the line breaks for spaces.

...which reminds me--if you don't make the "\n" in the vtg sheet "\\n" (i.e. "escape it")it will break the line and remove itself from the text displayed.

___
(oops. double post. sorry again)

but here's some knowledge/insight gained:
(and if i slowed down my efforts to edit the vtg file as fast as possible, i probably would've seen i could've just substituted " " for ".html ", but what can ya do)).
from http://murga-linux.com/puppy/viewtopic. ... 587#991587
not only a double post, but the now removed (from this post at least) script and vtg sheet were a little more messed up than i was expecting (and the fix made it worse and i ended up stepping off for a bit).

i like terminal dump updates better than pets generally, at least for my own stuff (just grabbed the icon for the pet i'm about to post by running "bwp-mc" through some code on the mcc page (thanks again to technosaurus), but this one passed the point of convenience after the fourth run through and fail, so i made it a pet.


anyway, this pet does what the original (and previous) post failed to do:

bwpt-mc.pet 5.4k

ignore the bit on the previous page--i'll post the bwpt mcbwpter was supposed to have made (and which you can mod to replace the new/working bwpt). some of the original file (still messed up and still available a post back) got moved to the pinstall script, which i'll post (copying out of the templates folder doesn't seem to work for some reason, but copying into it from the bwp1 directory that got made into it is just a few steps and you can better choose which templates become most easily accessible yourself that way).

bwpt in terminal make a bwpt1 folder in that directory (`/~ key opens the terminal in a given directory). if you're doing it from the general/main terminal, cd to the directory, then "bwpt."

sorry for the inconvenience/pet overwrites the previous errors.

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

bwp-mc, bwpt, the newer vtg for bwp sheet, and the previous

#62 Post by Puppus Dogfellow »

Code: Select all

 #tree -h on the pet:
├── [  91]  pet.specs
├── [ 274]  pinstall.sh
├── [  80]  root
│   ├── [  80]  my-applications
│   │   ├── [  60]  bin
│   │   │   └── [8.4K]  bwpt
│   │   └── [  60]  mc
│   │       └── [6.5K]  vtg-bwp-mc
│   └── [  60]  puppy-reference
│       └── [  80]  mini-icons
│           ├── [ 620]  defbwpmc.xpm
│           └── [ 620]  deflbwpmc.xpm
└── [  60]  usr
    └── [  60]  share
        └── [  60]  applications
            └── [ 304]  bwp1-mc.desktop

9 directories, 7 files
______-

bwpt:

Code: Select all

#!/bin/sh
mkdir -p ./bwp1
echo $'

<!-- 
   thiswordprocessor.html
  (/micro anuupuus/mini-bwp/Untitled0)
  
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
<head>
<title>bwp2</title>
<meta http-equiv="content-type" content="text/;charset=utf-8" />
<meta name="generator" content="Geany 1.25" />
</head>

<title>top one is tab tag</title>

<body style="font-size:2rem;font-family:serif;line-height:1.5;max-width:90rem;margin:0 auto;padding:2rem;" spellcheck="true" contenteditable="">


<p style="margin-bottom: 0in; line-height: 150%" align="justify"><font face="serif">regular text<br><br>
<i>italics</i><br>
<b>bold</b><br>   
<u>underline</u><br> 
<br>    
</font></p>

<p style="margin-bottom: 0in; line-height: 150%" align="justify">justified area<br><br></p>
<p style="margin-bottom: 0in; line-height: 150%" align="center">centered<br><br></p>
<p style="margin-bottom: 0in; line-height: 150%" align="left">left aligned<br><br></p>

<p style="margin-bottom: 0in; line-height: 150%" align="right">right aligned<br><br></p>
<p style="margin-bottom: 0in; line-height: 150%" align="justify"><br><br>document as a whole is justified--delete the areas you don\'t need, copy and paste those you do where you need them. to use this document as a word processor (mini-bwp), open and bookmark it in a browser, download a copy to reopen as your working document, keeping the original to grab formatting from and mess around in. download/save as pdf (print menu) or html (file menu--html will let you use the browser (or a text editor--faster saves and you can change the names in the tabs, but it \'s less intuitive overall) for further edits). <br><br>
<br>(Untitled 1 and 2 from the bwp have been upgraded and/or spun off from the bwp as the bwp2 and/or the mini-bwp/bwp-mini. as with the original (and bbwp before it), paste in formatting, links and other content. download to save. ctrl a,c,v,x,y,z and a few other keyboard shortcuts work in most browsers. link below can be deleted like any other text; use text editor view to paste in links to your files (tables of contents, etc)).<br><br>
p. dogfellow, 5/4/18<br>
<br>
<br>
<br>for more, see bbwp updated as bwp:<br>
<a href="http:///murga-linux.com/puppy/viewtopic.php?p=990597#990597" target="_blank">http://http://murga-linux.com/puppy/viewtopic.php?p=990597#990597</a><br>
<!--use file:/// for your files (for tables of contents, long term convenience, etc) and http:// for websites  (second occurence of path above is text that shows--could be anything, but use &gt: < to >< in plain text mode outside the comments (you can paste them into the browser view as you\'d expect with a regular word processor, but it won\'t work in straight up html mode.)-->

<br>insert<p style="margin-bottom: 0in; line-height: 150%" align="left"><font color="#159A5E"><par style="font-size: 8pt; color:white; page-break-after: always"></par></font> <br><br>
in text editor view wherever you want to force a page break.
<br><br>
</p>
<br>
<h1>heading 1</h1>
<h2>heading 2</h2>
<h3>heading 3</h3>
<h4>heading 4</h4>
<h5>heading 5</h5>

<p style="margin-bottom: 0in; line-height: 150%" align="justify"><br><br>
<br>
<!--this is a comment. anything between arrows like these is hidden in browser and pdf download/print preview mode. -->
<!--  

this is another comment. you can have as many as you like and they can go on indefinitely.
(you can type here and paste into browser view for the faster saves and more natural typing environment, but remember to keep track of your reloads and refreshes as well as your saves so you don\'t end up undoing what you\'ve done)
-->

<!--  get rid of the html in the title if the text editor has color coding for code and you find it annoying


Puppus Dogfellow, 5/5/18.
-->
<!--teach yourself html and more:
 https://www.w3schools.com/html/html_paragraphs.asp

alter this document as a new base template and/or make copies for backup. search and swap/find and replace 150 for 200 or 100 to change spacing from 1.5 to 2 or 1. do the same with serif to change font (mono and sans are two that work in testing). 
  -->

</p>
<p style="margin-bottom: 0in; line-height: 150%" align="justify">to stick to working with (mostly) regular text files, paste your text into the word processor file for print preview, setting the formatting, and downloading either the html or pdf version of that stage. browser window text is scalable, but for reference, here\'s some nonscalable text: <br>
</p><br>
<br>
 <p style="font-size: 12pt; color:black; font-weight:normal; font-family: serif">your serif 12 text here</p><br>
 <p style="font-size: 12pt; color:#5126D2; font-weight:normal; font-family: mono">your mono 12 text here</p><br>
 <p style="font-size: 12pt; color:black; font-weight:normal; font-family: sans">your sans 12 text here</p><br>



<!-- <br><br>

see the commented out bits (they\'ll be between arrows like these) in text editor mode for more tips (they\'re not visible in browser mode. change the name that appears in the tab and the internal document name while you\'re there).
<br>

to focus more on browser use than text editor mode, make a copy of the appropriate template and rename it as your working document. open both with a browser and bookmark. reload the template if you\'ve made a mess of the formatting or preferred the way it was before you started to get the hang of things.
<br>-->
<span style="font-size: 12pt; color:black; font-weight:normal; font-family: serif">
12 point serif

</span>
<span style="font-size: 12pt; color:black; font-weight:regular condensed; font-family: sans">

12point sans

</span>
<span style="font-size: 12pt; color:black; font-weight:regular condensed; font-family: mono">

12 pt mono (no illustration of custom color code this time--use gcolor2 or your text editor\'s color picker to customize via the six digit code that follows the <i>color:</i> bit(s) you find in the html version(s)).

<br>

your <a href="file:///root/my-applications/mc/bwp1/" target="_blank">templates are here</a> and  <a href="file:///root/.config/rox.sourceforge.net/Templates/bwp1/" target="_blank">here if you\'ve </a>installed (a/some version/s of) thiswordprocessor.html through mccwp-bwp (or its terminal dump-in post/s). 


</body>

</html>
' > ./bwp1/ser.html

#prep ser as as mon and san:
cp -f ./bwp1/ser.html ./bwp1/mon.html
cp -f ./bwp1/ser.html ./bwp1/san.html 
sed -i 's/serif/sans/1' ./bwp1/san.html
sed -i 's/serif/sans/1' ./bwp1/san.html
sed -i 's/serif/mono/1' ./bwp1/mon.html
sed -i 's/serif/mono/1' ./bwp1/mon.html 



#make three copies (x3) of base template: working, line spacing at 1 and 2:
cp -f ./bwp1/san.html ./bwp1/san1.5.html
cp -f ./bwp1/san.html ./bwp1/san1.html
cp -f ./bwp1/san.html ./bwp1/san2.html
cp -f ./bwp1/mon.html ./bwp1/mon1.5.html
cp -f ./bwp1/mon.html ./bwp1/mon1.html
cp -f ./bwp1/mon.html ./bwp1/mon2.html
cp -f ./bwp1/ser.html ./bwp1/ser1.5.html
cp -f ./bwp1/ser.html ./bwp1/ser1.html
cp -f ./bwp1/ser.html ./bwp1/ser2.html

#have the line spacing of ser1 and ser2 (etc) reflect their names:
sed -i '/150/ s//100/g' ./bwp1/ser1.html
sed -i '/150/ s//200/g' ./bwp1/ser2.html
sed -i '/150/ s//100/g' ./bwp1/san1.html
sed -i '/150/ s//200/g' ./bwp1/san2.html
sed -i '/150/ s//100/g' ./bwp1/mon1.html
sed -i '/150/ s//200/g' ./bwp1/mon2.html
#swap out the title tags:

sed -i '/bwp2/ s//m00/1' ./bwp1/mon1.5.html
sed -i '/bwp2/ s//m0/1' ./bwp1/mon.html
sed -i '/bwp2/ s//mSing/1' ./bwp1/mon1.html
sed -i '/bwp2/ s//mDub/1' ./bwp1/mon2.html
sed -i '/bwp2/ s//Untitled00/1' ./bwp1/ser1.5.html
sed -i '/bwp2/ s//Untitled0/1' ./bwp1/ser.html
sed -i '/bwp2/ s//Sing/1' ./bwp1/ser1.html
sed -i '/bwp2/ s//Dub/1' ./bwp1/ser2.html
sed -i '/bwp2/ s//s00/1' ./bwp1/san1.5.html
sed -i '/bwp2/ s//s0/1' ./bwp1/san.html
sed -i '/bwp2/ s//sSing/1' ./bwp1/san1.html
sed -i '/bwp2/ s//sDub/1' ./bwp1/san2.html 

#swap out the internal name
#adjust for file and name (and remove the #): 
#sed -i '/top one is tab tag/ s//newinternal/g' ./bwp1/ser.html
#sed -i '/top one is tab tag/ s//newinternal/g' ./bwp1/ser1.5.html
#sed -i '/top one is tab tag/ s//newinternal/g' ./bwp1/ser1.html
#sed -i '/top one is tab tag/ s//newinternal/g' ./bwp1/ser2.html


#dual launchers (copy and adjust):
echo $'#!/bin/sh 
exec defaulttexteditor "$@"| exec defaultbrowser "$@"
' > ./bwp1/def
chmod 755 ./bwp1/def
echo $'#!/bin/sh 
exec geany -i "$@"| exec palemoon "$@"
' > ./bwp1/gip
chmod 755 ./bwp1/gip

Code: Select all

pinstall
#!/bin/sh
#as a stand alone:
mkdir -p /root/my-applications/mc
cd /root/.config/rox.sourceforge.net/Templates/
bwpt
cd /root/my-applications/mc
bwpt
cp -f /root/.config/rox.sourceforge.net/Templates/bwp1/ser1.5.html /root/.config/rox.sourceforge.net/Templates/1.5ser.html 

vtg-bwp-mc:

Code: Select all

(file is based around a convenience made for geany as it's set up in puppy linux. if you haven't got the vtg or know the deal about the cauliflowers machue, you can make desktop files or terminal dumps from the stuff. substitute anything that can open plain text files for the geany and leafpad bit. at present (5/12/18), the browser based word processor still needs a text editor (or text editor function--the bwp series uses a text box for it, but text editors are quicker and have advantages in addition to the those highlighted below) to manually force page breaks, change the tab tag, and enter a tab space with the tab key.)

right click or ctrl+shift+o in geany to use this document as a set of links/table of contents.

/root/my-applications/mc/bwp1/def 
/root/my-applications/mc/bwp1/gip 
/root/my-applications/mc/bwp1/mon.html
/root/my-applications/mc/bwp1/mon1.html
/root/my-applications/mc/bwp1/mon1.5.html
/root/my-applications/mc/bwp1/mon2.html
/root/my-applications/mc/bwp1/san.html
/root/my-applications/mc/bwp1/san1.html
/root/my-applications/mc/bwp1/san1.5.html
/root/my-applications/mc/bwp1/san2.html
/root/my-applications/mc/bwp1/ser.html
/root/my-applications/mc/bwp1/ser1.html
/root/my-applications/mc/bwp1/ser1.5.html
/root/my-applications/mc/bwp1/ser2.html
/root/my-applications/mc/vtg-bwp-mc

if you've got the nwp or vtg installed, click the cauliflower or alt+z (or v in launcher) with cursor
on a line below will launch that command

open all in geany:
geany /root/my-applications/mc/bwp1/def /root/my-applications/mc/bwp1/gip /root/my-applications/mc/bwp1/mon.html /root/my-applications/mc/bwp1/mon1.html /root/my-applications/mc/bwp1/mon1.5.html /root/my-applications/mc/bwp1/mon2.html /root/my-applications/mc/bwp1/san.html /root/my-applications/mc/bwp1/san1.html /root/my-applications/mc/bwp1/san1.5.html /root/my-applications/mc/bwp1/san2.html /root/my-applications/mc/bwp1/ser.html /root/my-applications/mc/bwp1/ser1.html /root/my-applications/mc/bwp1/ser1.5.html /root/my-applications/mc/bwp1/ser2.html /root/my-applications/mc/vtg-bwp-mc


open all in a new instance of geany:
geany -i /root/my-applications/mc/bwp1/def /root/my-applications/mc/bwp1/gip /root/my-applications/mc/bwp1/mon.html /root/my-applications/mc/bwp1/mon1.html /root/my-applications/mc/bwp1/mon1.5.html /root/my-applications/mc/bwp1/mon2.html /root/my-applications/mc/bwp1/san.html /root/my-applications/mc/bwp1/san1.html /root/my-applications/mc/bwp1/san1.5.html /root/my-applications/mc/bwp1/san2.html /root/my-applications/mc/bwp1/ser.html /root/my-applications/mc/bwp1/ser1.html /root/my-applications/mc/bwp1/ser1.5.html /root/my-applications/mc/bwp1/ser2.html /root/my-applications/mc/vtg-bwp-mc

open all in default browser:

open the rox folder:
rox /root/my-applications/mc/bwp1/def /root/my-applications/mc/bwp1/gip /root/my-applications/mc/bwp1/mon.html /root/my-applications/mc/bwp1/mon1.html /root/my-applications/mc/bwp1/mon1.5.html /root/my-applications/mc/bwp1/mon2.html /root/my-applications/mc/bwp1/san.html /root/my-applications/mc/bwp1/san1.html /root/my-applications/mc/bwp1/san1.5.html /root/my-applications/mc/bwp1/san2.html /root/my-applications/mc/bwp1/ser.html /root/my-applications/mc/bwp1/ser1.html /root/my-applications/mc/bwp1/ser1.5.html /root/my-applications/mc/bwp1/ser2.html /root/my-applications/mc/vtg-bwp-mc

open a given file from /root/my-applications/mc/bwp1/ in leafpad:
leafpad /root/my-applications/mc/vtg-bwp-mc
leafpad /root/my-applications/mc/bwp1/def
leafpad /root/my-applications/mc/bwp1/gip
leafpad /root/my-applications/mc/bwp1/mon.html
leafpad /root/my-applications/mc/bwp1/mon1.html
leafpad /root/my-applications/mc/bwp1/mon1.5.html
leafpad /root/my-applications/mc/bwp1/mon2.html
leafpad /root/my-applications/mc/bwp1/san.html
leafpad /root/my-applications/mc/bwp1/san1.html
leafpad /root/my-applications/mc/bwp1/san1.5.html
leafpad /root/my-applications/mc/bwp1/san2.html
leafpad /root/my-applications/mc/bwp1/ser.html
leafpad /root/my-applications/mc/bwp1/ser1.html
leafpad /root/my-applications/mc/bwp1/ser1.5.html
leafpad /root/my-applications/mc/bwp1/ser2.html

open all in palemoon:
#/root/my-applications/mc/bwp1/def /root/my-applications/mc/bwp1/gip /root/my-applications/mc/vtg-bwp-mc
palemoon /root/my-applications/mc/bwp1/mon.html /root/my-applications/mc/bwp1/mon1.html /root/my-applications/mc/bwp1/mon1.5.html /root/my-applications/mc/bwp1/mon2.html /root/my-applications/mc/bwp1/san.html /root/my-applications/mc/bwp1/san1.html /root/my-applications/mc/bwp1/san1.5.html /root/my-applications/mc/bwp1/san2.html /root/my-applications/mc/bwp1/ser.html /root/my-applications/mc/bwp1/ser1.html /root/my-applications/mc/bwp1/ser1.5.html /root/my-applications/mc/bwp1/ser2.html

___
to get a table of contents/clickable index of these files for a browser launch, use their base directory:

defaultbrowser /root/my-applications/mc/bwp1/
palemoon /root/my-applications/mc/bwp1/
defaultbrowser /root/.config/rox.sourceforge.net/Templates/bwp1/ /root/my-applications/mc/bwp1/
palemoon /root/.config/rox.sourceforge.net/Templates/bwp1/ /root/my-applications/mc/bwp1/
firefox /root/.config/rox.sourceforge.net/Templates/bwp1/
palemoon /root/.config/rox.sourceforge.net/Templates/bwp1/
seamonkey /root/.config/rox.sourceforge.net/Templates/bwp1/ /root/my-applications/mc/bwp1/

(highlight groups of files and paste in their paths, use space (literally type a space--i don't know off hand the regex for space...\s?...and substitute it with a 
in the find and replace boxes to swap what you get so it looks like the leafpad arrangement above (i used extend select and typed leafpad after that). most programs will respond to vtging the way the selection deposits it in a file (space rather than line delimited. i.e. usually selecting, middle clicking, and then adding the program followed by a space at the beginning of the line is enough "programming"/arranging of text.


---vtg---

to vtg bwp1s about, substitute path in line below:

cd /path/to/dir; bwpt

more: http://murga-linux.com/puppy/viewtopic.php?p=991583#991583

---mcc---
http://murga-linux.com/puppy/viewtopic.php?p=884162#884162

mkdir -p /file/bwp1/

cp -au /root/my-applications/mc/bwp1/ /file/bwp1/

^upcoming nwp shortcuts or overwrites. arc and ark are duplicates, so the above will likely end up as ark next pet or update (leaving arc as backup/archive default for bbwp)(this is the bwp)(or one of 12 versions of thiswordprocessor.html/wordprocessor.html)

nwp thread: http://murga-linux.com/puppy/viewtopic.php?p=850270#850270
A NWP/A NWPUS--A Noob's Word Processor and Utilities Suite   

here it is as an attachment:
Attachments
bwpt-mc.pet
(5.32 KiB) Downloaded 270 times

User avatar
Puppus Dogfellow
Posts: 1667
Joined: Tue 08 Jan 2013, 01:39
Location: nyc

themes and a tip

#63 Post by Puppus Dogfellow »

i like geany's right click /open/file/given/full/path/ feature, but often found myself using the vtg and geany -i [path] to open file in a new window. turns out there's a faster way. go to Edit>Preferences>Tools and enter

Code: Select all

geany -i %s
in the box labeled Command, and you can do it throught right click>Context Action (you could obviously program it to do something else with the file or text, but this is a use for that menu item).

------
geanythemes.pet

with the above pet (compatible with 1.22 and above) you can change geany's color scheme through view>change color scheme (or alt+v, c).

enjoy.
:D



screenshots:
https://www.geany.org/download/themes/

Post Reply