SNApP (System Nonsuch ApP)

Moderator: Forum moderators

User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

Setting up the pages for printing is a bit hit and miss. One must use print preview to see if further adjustments are needed. Choosing font type and size, along with line length (columns or character page width) and page length (number of lines) ultimately decides how things will appear on the page. So controlling width and length of the printout is the more useful thing, After some experiments I can now control page width, page length and font.... these settings will be saved in /root/.config/snapp/settings/print-${width}x${length}-$(date +%d%h%s).conf for easy reuse. But the basic settings will be for 80 chars wide, 4 spaces left margin, and four lines top and bottom margins. The bottom footer was acheived by using split command, sed line insertion of 'page break line-feeds' at line 68 (12 size font, 80 columns), and cat to rebuild split files for the print preview. None of this processing affects file or viewer contents. All of these settings can be user set using gui fields. However I do realize that the multi-usage of various fields is getting complicated and complex. I have thought about this and in the back of my mind I have the idea of a quick settings control panel to use alongside the main gui, which with one click sets up the various form fields for the different tasks provided by functions and or keywords.

Yad print preview is pinch to zoom enabled. but only one page viewed at a time!!

Attachments
xscreenshot-20240824T161935.png
xscreenshot-20240824T161935.png (14.81 KiB) Viewed 1640 times
xscreenshot-20240824T161324.png
xscreenshot-20240824T161324.png (94.51 KiB) Viewed 1640 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

Print now works by selecting one of three keywords
1. PRINT_VIEWER - wysiwyp (what you see is what you print).
2. PRINT_DOCS - file with path in Docs. field.
3. PRINT_SELECTED - any cursor selected text from anywhere.
After pressing action a list of print.conf files opens for selection. Selecting an item opens a preview of the three variables stored
1. SCALE=80 - line width in chars
2. SPL=68 - page length in lines
3. FONTNAME="Manthesy 20" - font
This preview is editable and saves in place. The list gui also has a button to select a different font, this will override the font in the preview config, no need to edit that. Press ok to continue to the printer dialogue. Here you print or preview. In fact selecting print opens the preview first anyway, Then select print again to complete printing.

Attachments
xscreenshot-20240826T200309.png
xscreenshot-20240826T200309.png (186.82 KiB) Viewed 1578 times
xscreenshot-20240826T194908.png
xscreenshot-20240826T194908.png (49.85 KiB) Viewed 1578 times
xscreenshot-20240826T194808.png
xscreenshot-20240826T194808.png (289.85 KiB) Viewed 1578 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

Another formatting option. When there are very long lines that you tab, they then wrap to the beginning of the next line, but you want them to continue beneath the already tabbed text. The steps needed are first to fold text at desired character length, then tab all lines. This is now a sub-keyword 'ftabs' in the TEXT_FORMAT keyword group. However I was not able to replace the original lines in place, the best I could come up with, is to copy the results to the clipboard, then one must paste them in place.

Added an online ruler. It measures characters on screen according to dpi and font.

Attachments
xscreenshot-20240827T200449.png
xscreenshot-20240827T200449.png (113.38 KiB) Viewed 1539 times
xscreenshot-20240827T193441.png
xscreenshot-20240827T193441.png (320.14 KiB) Viewed 1539 times
xscreenshot-20240827T164738.png
xscreenshot-20240827T164738.png (272.93 KiB) Viewed 1555 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

Here is the code for the onscreen re-scalable yad character ruler! Simply move to the app you are typing in and to calibrate the ruler type in 30 characters and resize the ruler to match 30 on its scale with the 30 on the screen. Then the ruler will be calibrated for the resolution, dpi, scaling, and font size, regardless of the font used in the yad --scale gui.

If you want it to measure pixels you can get the screen resolution from xrandr, for min and max values and set the gui geometry accordingly .... then using two such yad --scale guis one vertical one horizontal you can accurately output any line length / positions in pixels just by moving the scale sliders into position as --scale has --print-partial which continuously outputs to stdout.

Code: Select all

yad --scale --mark="1:1" --mark="10:10" --mark="20:20" --mark="30:30" --mark="40:40" --mark="50:50" --mark="60:60" --mark="70:70" --mark="80:80" --mark="90:90" --mark="100:100"  --step=1 --enforce-step --min-value=0 --print-partial --value=80 --max-value=100 --undecorated --geometry=1541x14+512+1163 --no-buttons --fontname="Serif 12" --hide-value --back="#E8E8E700" --title="character ruler" &
Attachments
xscreenshot-20240829T203413.png
xscreenshot-20240829T203413.png (9.26 KiB) Viewed 1494 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

Having renamed transtext to hashtext along with document suffixes, I made the function backwards compatible and also forwards compatible. The first location for transtext files was /root/.config/snap/transtext, in the case where this directory was updated to hashtext but no transtext files were copied or renamed, and then /usr/share/locale/transtext was used for system-wide convenience, and finally to /usr/share/locale/hashtext ... so the function now searches all locations and if found copies to the final location, and saves new translations in the final location. Or the user can move directories manually to the final location.

cmndlst - and securefn : the password security system now has been implemented for keywords and some possibly destructive functions, SAVE DELETE install_mbr SAVEFILE REMASTER SWAPFILE SAVE_BOOK etc have entries in cmndlst. Each can have a unique password or group passwords or be removed from cmndlst.

Attachments
xscreenshot-20240830T152805.png
xscreenshot-20240830T152805.png (306.15 KiB) Viewed 1437 times
xscreenshot-20240830T104234.png
xscreenshot-20240830T104234.png (25.8 KiB) Viewed 1458 times
xscreenshot-20240830T105908.png
xscreenshot-20240830T105908.png (29.57 KiB) Viewed 1458 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

FORMAT_TEXT:
RICH
PIPE
Added. RICH let's user specify rich-cli command in Docs. field e.g. "rich --panel ascii -R"
PIPE let's user specify pipe command string.

rich-cli can be installed using python

Code: Select all

pip install rich

OCRmyPDF is also availbale using pip. Also does what Tesseract OCR does.

I am now trying to implement some xdotool commands to keep scrollbar in place during Viewer update.

Attachments
xscreenshot-20240901T104553.png
xscreenshot-20240901T104553.png (250.45 KiB) Viewed 1370 times
xscreenshot-20240901T104639.png
xscreenshot-20240901T104639.png (359.85 KiB) Viewed 1370 times
xscreenshot-20240901T104710.png
xscreenshot-20240901T104710.png (358.21 KiB) Viewed 1370 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

More text formatting in the form of columns. While I was copying tetragrams from a pdf the right hand entries pasted to the first column followed by the second column ... no longer side by side. So to enable formatting such text easily I copied the latter text and pasted to a.txt then selected the former text and pased to b.txt, this then displayed the text in tab separated columns. Then I used another function to replace tabs with a space. So to do the same just select some text in viewer, and under TEXT_FORMAT, in BSSID field select cola, click Action, repeat for colb, and 'FORMAT_TEXT' in SSID field, ten click Action button. Side by Side collated text appears in Viewer. To add more columns, select Viewer text and repeat cola, and new text for colb (this will be the third column).... and so on and so forth.

Attachments
xscreenshot-20240907T161916.png
xscreenshot-20240907T161916.png (93.18 KiB) Viewed 640 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

huh.... touch-screen and trackpad rotations were still using fixed values, which should have been variables.....sorted out now.

User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

snapp-5.2 is finally ready ... enough!

Many improvements and additions!

RULERS v ruler ... keyword RULERS puts cross hairs scales on screen for measuring characters, from -30 - 0 + 106. (TEXT_FORMAT) ruler lets you paste a ruler into a document. pixel_ruler (function) is a function similar to RULERS but gets screen dimensions in pixels.

TEXT_FORMAT
cola, colb, colc, cold -> tcolumns (tabs) or scolumns (spaces).

rip ... (replace in pattern) Like SEARCH_N_REPLACE but only for selected text. select text with cursor and then in Identity field put string to be replaced or regex expression .... in DOCS put replacement term or nothing ... press ACTION.

pipe ... like rip but for all text in viewer.

cli ... executable string for in place editing ... '$DOCS /tmp/MO > /tmp/MOD' ... DOCS='rich 'options' /tmp/MO > /tmp/MOD" ' etc

cmndlst (command password list) ... the first group are just cli tray 'run' commands and can be added to .... the others are for functions and keywords .... just change or remove the passwords as desired.
'rm:nogo
mv:nogo
delete:nogo
sh:nogo
shred:nogo
touch:nogo
chmod:nogo
chown:nogo
cp:nogo
eval:nobody
exec:nobody

savetext:tsv
booksave:bsv

remaster:create
swapfile:create
bookgen:create
hashed:create

connect:anybody
disconnect:nobody
execute:nobody
evaluate:nobody
kblayout:nobody
set_cpu:nobody
install:nobody
system:nobody
scene:nobody
player:nobody
network:nobody
bindings:nobody'

Attachments
xscreenshot-20240922T150752.png
xscreenshot-20240922T150752.png (296.54 KiB) Viewed 519 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

I can only share the updated script as cloud storage link isn't working otherwise would include updated hashtexts, and cmndlst, and yad.Mbook64. 8 window placement icons need renaming if you have a previous sfs module. Place in /usr/sbin/snapp and make executable.

Attachments
snapp.fake.gz
(205.7 KiB) Downloaded 11 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

tailscale vpn cli commands added to snapp. API is json based, i will need to learn how to use it first before attempting to add it to snapp.

xscreenshot-20241005T103944.png
xscreenshot-20241005T103944.png (337.15 KiB) Viewed 339 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

bing does not do dictionary lookups, so i added a dictionary lookup that is independent of both google and bing (only bing is available in some countries), that uses curl to post a word and return the data from 'dict'. Dictionary lookup operates on cursor selected word, keyword 'DICTIONARY', and language selection in BSSID field.

xscreenshot-20241017T122749.png
xscreenshot-20241017T122749.png (220.22 KiB) Viewed 269 times

Added LanguageTool.jar for cli grammar checking of text file. This requires downloading the Language-Tool-CommandLine.jar to /root/LanguageTool ....and load your openjdk-java.sfs .

xscreenshot-20241017T115657.png
xscreenshot-20241017T115657.png (347.29 KiB) Viewed 269 times
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

I am using tailscale vpn to serve snapp-5.3.sfs. https://tablet-888.taild4ecf9.ts.net/

Code: Select all

tailscale funnel /tmp/snapp-5.3
xscreenshot-20241017T192134.png
xscreenshot-20241017T192134.png (32.2 KiB) Viewed 229 times

tailscale is so easy to use: it is fantastic. I will probably start a web-page now I know how efficiently it can be achieved. Tailscale basically gives a static address.

Last edited by stemsee on Sat Nov 02, 2024 11:23 am, edited 1 time in total.
User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

securefn has encode method, decode method, onset, offset, and next I am going to add els - equidistant letter sequencing. Which means every nth character from a string is to be part of the password. I thought of making it so that the first ten characters, or some of them, are numbers 1-0, and the els key would be the only number whose value also equals its position. This would be a plain password hiding in full view. But will it be applied before encoding, or decoding, or after onset/offset/, or for each stage?

EDIT: and it occurs to me that whether using alphabet or numerals, we could build switch statements based upon the difference between position and value. For example the greatest numerical difference would occur with 0 (the tenth number) in the first position, with a difference of 9. A 'z' in the first position would be a difference of 25 .... and so on. And of course we can also els the key! :lol:

If you think about it clearly and understand that quantum calculations work on probabilities, which are bell curves! But, The Truth, is an outlier: against all the odds. 8-)

Later it might be nice to consider applying the physics of music. :twisted:

User avatar
stemsee
Posts: 778
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 184 times
Been thanked: 131 times

Re: SNApP (System Nonsuch ApP)

Post by stemsee »

Recently I have been using appman which is a cli appimage manager. I will add functions to snapp to show appman lists of available appimages, basic info, and the ability to install or remove selected item.

Post Reply

Return to “Network”