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   <b>READ-ONLY-MODE: PLEASE DO NOT POST NEW STUFF</b>READ-ONLY-MODE: PLEASE DO NOT POST NEW STUFF 

The time now is Sat 08 Aug 2020, 23:14
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
2P~ YAD based Multi-Func-App
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
Eesmets

Joined: 18 Jun 2020
Posts: 13

PostPosted: Thu 18 Jun 2020, 07:14    Post subject:  2P~ YAD based Multi-Func-App  

I have gathered together a number of utilities together into one script, plus supporting scripts. It is meant to be useful and educational, especially in terms of learning and storing code and helpful advice. So code has been taken from several coders on this forum, notably, mochimoppel, misko, stemsee, fredx181, step, mavrothal and others ... I hope they don't mind.

This app is purely YAD based.

This app includes networking, translation, keyboard layouts, mmview functions, eSpeak, ascii web, googler ascii search, terminal emulation, yradio functions, eBook epub multi-window/book with font (step) and back/fore/color options. Indexed db sheets such as contacts, recipes, etc and much more!

|2P-Help|

14th March 2020

This is 2P Multi-Func-App in beta release!

This app should function well enough, even if several instances are open, as each creates a unique directory in /tmp.

The challenge was to re-use these two panes and the host gui as much as possible for a variety of tasks. To this end the left pane is a yad --list with limitations, such as the inability to select multiple items, or set an additional action (I am currently hacking yad source code to expand the right click menu). The left pane is now a yad --form, having started as another --list and then a --text-info box. The reason for it being a form is the ACTION:save/stop buton which is retasked depending on the function in use.

The gui opens at the hub start point. Here you select which utilities, commands or functions to use from the list. Functions so far include;
yradiofn youtubefn mediafn eBookfn bookgenfn custombookfn espeakfn colorfn kblayoutfn custombookfn backgroundfn hexdumpfn transfn othertextfn scanfn pconnectfn passwordfn scratchpadfn dndfn calendarfn profilesfn textbrowser etc add your own!

Utilities include; Volume control slider, Gamma RGB sliders, Brightness/Dimmer slider, Screenshot.

Also in the hub, the top right text field acts as a terminal. Type a command or string of commands separated with semicolons: rox ~; lxterminal; apulse firefox :- then click the ACTION button.
The commands will be evaluated. If a command needs backgrounding use '&amp;' in place of '&' .

On the 2P gui frame there is a button 'Float-Command' this is a detached floating-gui of the hub function, to allow multi-use of pains.

Profilesfn shows content. Content can be created automatically or manually. To create an AP-PROFILE or AP-DATA-FILE one should start by doing a scan for wifi networks. Just press the scan button. When the APs are listed click on one to open the profile creator in this pane. Fill in the details then click save. This will create two files in two different folders. One in AP-PROFILES and one in AP-DATA-FILES. The one in AP-DATA-FILES can be viewed and if save is pressed will recreate one in AP-PROFILES. Last profile viewed becomes default, which is used fo the actual connection.

Notes, Books, Radio and Command lists can be edited in profilesfn.

Use bookgenfn to generate a new index referenceable book with such datafields as required or desired. These books can then be viewed using the custombookfn, which opens the A0-Z9 index selector list.

COMMAND-LISTS are editable in profilesfn function. All edited or newly created notes or command lists are named according to the first word with enclosing | bars | ... it can be anywhere in the text body. The word string can have spaces and/or some special characters. Without double bars a file will be viewable but edits wont be saved. Saveable/unsaveable condition is selectable at the bottom of the profilesfn list view.

Translatefn works by selecting/copying a text and then selecting a language to translate into. Results can be saved. Google and Bing and Yandex are used.

colorfn is a reference of the entire hex colour gamut displayed in the right pane underneath the hub selection options. So far this is only a handy lookup. There are many colors which take a while to load.

keyboardfn lets you select any country keyboard layout to type with.

eSpeakfn speaks out loud and prints out the phonetic transliteration of any text selected and copied. Different accents can be selected.

yradio is self explanatory, but a live internet connection is necessary.

ftpfn is a simple noninteractive local unsecured standard linux ftp. sftp will be added at some point.

startappfn is for creating xdg app /Startup scripts.

youtubefn will download according the currentlly selected/highlighted or copied url. Copy a url from your browser or text file, select youtubefn, may be necessary to press ACTION button, a list of available formats will be presented select and watch it download. Select another as required. Use mediafn to play the downloaded items.

Any text displayed in this pane can be saved! This Help, was typed right here!

mediafn lets you select a directory with mixed files in. These files are listed along with images if any. Selecting an item from the list causes it to be viewed or opened in a viewer/player, ffmpeg. Text, archives, iso, ttf, pdf, html can also be viewed but there is a limit to how many lines can be processed. If the file is too big it may be necessary to restart mediafn. In mediafn mode the ACTION button has many different functions depending on file extension of item selected. e.g image may copy image to backgrounds and set it as background; mediafn adds/deletes playlist items, or starts stops music; text can be saved to notes;

ebookfn is for viewing epub books. Any pane can be used for viewing one or more books simultaneously. Using the list view on the left, one can open all sections of an ebook file in one huge long list. Just hovering the mouse pointer over a line will show all its text in a tooltip window with white text on black background. Those colours are non-user-changeable. For custom fonts and colours, use the float option. Set colours and font first then select book file to view. Text can be saved in a number of ways. But using scratchpadfn may be useful for that.

Scratchpadfn is exactly that and more. A place to hastily collate snippets of code and text. Any selected text from anywhere will be saved in notes. Scratchpad also has dictionary function and translation function. Selecting a single word and clicking Dictionary/LookUp will use acquire the dictionary entry using trans script. Selecting more than one word with the last word being language a code (en de es (english german spanish)) will get the translation. All of this in one gui without clearing contents. This text-info field is editable. Country codes are provided as a selectable heading.

command-lists are basically active cheatsheets. This mode I thought will be useful for administrators, specialists and learners who find it difficult to remember or manage thousands of excellent command strings and structures either developed or harvested from the net. This feature in itself would make a useful teaching suite. cheat sheets mode, mediafn, hub navigation up and down directories is possible.

The commands by line of a sheet are loaded by line in list view and on selection are evaluated and executed. Maybe not all code syntax or formats will work, but so far I didn't experience many restrictions. The list view is editable, so a mac address target could be added to a command string. Also a sheet can have a placeholder such as `xclip -o -p`, which allows previously selected string (mac address etc) to be used as a command argument e.g. bluetoothctl connect `xcilp -o -p` ... having already highlighted a mac address from the results of a scan and bluetoothctl devices ... results. Another example, rox `xsel -o -p`; firefox `xsel -o -p` (having already highlighted or copied a web address). This functionality is used extensively in this app, and may be available, even if not obvious!

In the case of mediafn encountering a file results in its contents being displayed or played. In the case of cheat sheets (cmndlistfn) or hub, a file list will be loaded in the selectables list, as these modes are looking for active cheat sheets (lists of clickable command strings).

desktopfiles loaded in desktopfilefn are default viewed editable. loaded in mediafn they are default launchable.

I have a few more ideas to implement, and I am looking for more. It may be that this pane becomes a yad --html display which will give rise to a much broader capability including graphics. Or I will port to a gtk3 gui. I also hope that other coders may bring their knowledge in the form of specialist/general active cheat sheets and self-contained plugin functions.

Any use of my code and ideas should be acknowledged referencing <cou645@gmail.com>

This app has dependencies and third party scripts which may be subject to their own terms of use. The user is responsible for researching what those terms are.

Of course this app has the power of the user commands executed by it, and could cause severe system damage, exactly as would be the case in a root terminal. To this end no WARRANTY or liability is accepted or implied nor merchantability. No guarantees of any kind are included .

Eesmets

Dependencies either/or (devx):
xsel xclip clipit espeak wget python unsquashfs youtube-dl dnsmasq iwlist ffmpeg xvkbd trans font2font wpa_supplicant convert wallpaper 7z dhcpcd udhcpc ip ifconfig curl googler xbacklight xgamma trans perl pdftotext ftp

https://www.youtube.com/watch?v=mZh8HArYV6c
https://www.youtube.com/watch?v=JfapILTdtA0
https://www.youtube.com/watch?v=20bhE3moZ-c
comp.png
 Description   
 Filesize   195.44 KB
 Viewed   12 Time(s)

comp.png

media.png
 Description   media
 Filesize   245.66 KB
 Viewed   12 Time(s)

media.png

all.png
 Description   sliders
 Filesize   118.23 KB
 Viewed   13 Time(s)

all.png

scan.png
 Description   wifi scan
 Filesize   87.81 KB
 Viewed   13 Time(s)

scan.png

col.png
 Description   colors
 Filesize   96.68 KB
 Viewed   13 Time(s)

col.png


Last edited by Eesmets on Thu 09 Jul 2020, 01:58; edited 7 times in total
Back to top
View user's profile Send private message 
Eesmets

Joined: 18 Jun 2020
Posts: 13

PostPosted: Thu 18 Jun 2020, 07:28    Post subject:  

Here is a download link for 2P.sfs and md5

edit: updating
Back to top
View user's profile Send private message 
Eesmets

Joined: 18 Jun 2020
Posts: 13

PostPosted: Mon 29 Jun 2020, 21:30    Post subject:  

Here is a significant update and bugfix.

-1) Radio recording is now fully functional.
-2) Preferences have more options including main gui timeout feature .. fall asleep listening to the radio, comfortable kowing it will turn itself off.
-3) No assumptions made about where to download media.
-4) Simple Savefile creation tool.
-5) Save function now has an fully configurable gui and location selection for saves.
-6) Info files now accompany master documents.
-7) desktopfile creator
-Cool bluetooth commands updated for bluez5
-9) file and directory navigation improved.
-10) reduced the number of tail -fn0 instances to only two.
-11) Scratchpad ... notes /dictionary lookup / translator ... and now also code executor.
-12) replaced several echo commands with printf.
xscreenshot-20200628T131900.png
Description 
png

 Download 
Filename  xscreenshot-20200628T131900.png 
Filesize  126.1 KB 
Downloaded  15 Time(s) 
xscreenshot-20200627T235307.png
 Description   
 Filesize   75.75 KB
 Viewed   203 Time(s)

xscreenshot-20200627T235307.png

xscreenshot-20200630T022109.png
 Description   radio recordder
 Filesize   16.38 KB
 Viewed   202 Time(s)

xscreenshot-20200630T022109.png

xscreenshot-20200630T022143.png
 Description   
 Filesize   46.39 KB
 Viewed   201 Time(s)

xscreenshot-20200630T022143.png

xscreenshot-20200630T022214.png
 Description   Save dialog
 Filesize   47.43 KB
 Viewed   202 Time(s)

xscreenshot-20200630T022214.png

xscreenshot-20200630T022252.png
 Description   
 Filesize   40.04 KB
 Viewed   202 Time(s)

xscreenshot-20200630T022252.png

xscreenshot-20200630T022305.png
 Description   
 Filesize   44.39 KB
 Viewed   200 Time(s)

xscreenshot-20200630T022305.png

xscreenshot-20200630T022318.png
 Description   
 Filesize   34.36 KB
 Viewed   202 Time(s)

xscreenshot-20200630T022318.png

xscreenshot-20200630T022349.png
 Description   
 Filesize   25.32 KB
 Viewed   200 Time(s)

xscreenshot-20200630T022349.png


Last edited by Eesmets on Thu 09 Jul 2020, 01:09; edited 1 time in total
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 2075
Location: not Bulgaria

PostPosted: Mon 29 Jun 2020, 23:09    Post subject: Re: ~2P~ Multi-Func-App  

Eesmets wrote:
No guarantees of any kind are included without a paid service contract, available upon request. Therefore this app may not be used in a commercial environment, or for commercial purposes without the author's consent. Only one machine per household is permitted to run this app until a donation is made. These requests are legally binding even if virtually unenforceable ... but you do have a conscience don't you!?


How interesting... But gpl code is allowed to be used in a commercial environment I think. I presume above is a joke... Wink Also, have you checked with the original authors it all gpl code??? But certainly interesting, though I guess it would have to be considered a fork of the original author's works, which you would have to maintain since all of these original apps are maintained by their authors.

I do know that not all code authors on this forum assign proper open-source redistributable license to their original code though, because without that the code is licensed to the author themselves and not gpl or MIT or anything else - no license does not mean in the public domain... so cannot be used and certainly not re-licensed without the original author saying so! Wink

So you need the license permission, and cannot make up your own gpl license with any of your own personal restrictions..., but otherwise could be nice to have many such wee apps working well together in a single wrapper - maybe? Will be interested to see what others say, especially some of these original authors who I know have not as yet specified any open-source license for their works (forcing that you must get special permission to use them, modify them, or distribute them in any way - a flipping nuisance of course, and sometimes apparently intended despite these same authors using code snippets from others, naturally... which does tend to make the end products open-source licensed inherently).

I'm assuming (despite you only having made 4 posts to the forum) this is not simply spam, but the post text doesn't look like it is just spam.

EDIT: I've downloaded for a quick look, and seems to be genuine enough, and looks like a lot of work - though I don't know how much of that is the originals. And does it need to be an sfs - seems small enough for a dotpet or deb. Just hope you get permission for your gpl 3 license. Good luck.

wiak

_________________
WeeDogLinux forum: https://weedoglinux.rockedge.org/viewforum.php?f=4
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Back to top
View user's profile Send private message 
Eesmets

Joined: 18 Jun 2020
Posts: 13

PostPosted: Tue 30 Jun 2020, 08:27    Post subject:  

Hello wiak

Thanks for taking time to review my post.

I hope you find this little app (wrapper) useful. I found getting into linux extremely difficult and if I had this app I believe it would have been a whole lot easier and less frustrating. That is one of its purposes. The other is to showcase my past-time efforts.

As regards licensing, I am not expert. I often agree to licenses in order to use software. I agree without reading the licenses, because clicking agree facilitates usage. If I read the license it does not mean I understand it, so agreeing then would be meaningless, but would facilitate use. In many years of doing this I encountered no legal issues. Because the law is a guide and if it cannot be enforced then its almost pointless. However if you think removing the gpl licensing is a better idea then I will do it. As regards to the use of code or coding ideas from others, I attribute credit as and when, but only to the source i got it from which may not be the original source. Let's face it the underlying routines in machine code or assembly have already dictated all possibilities anyway, and we are merely realizing them. I think that style is the most important feature of good code. But I am not a real coder: by that I mean I have never earned any nourishment for my efforts with code.

I have followed some of your work and enjoyed implementing it too. You are exactly the type of innovator and active producer that I hope could supply some of your expertise in code as cheat sheets and or functions.

Esmets

Edit: Most of the code is my original code, for example the calendar generator ... I did not find anyone who coded a calendar that codes 2632 years AD and BC. cal goes to year 1 only. It correctly implements historic events (Sept 1752). The linux system calendar is correct from Sept 1752 forward, but not backwards. It does go BC but .... the days may be different than expected. What I adapted from other coders are mostly lists or code which I hopefully improved. It was a massive undertaking ... but i didn't know that when I started....it just snowballed from a simple wifi-app with added features!
Back to top
View user's profile Send private message 
Eesmets

Joined: 18 Jun 2020
Posts: 13

PostPosted: Thu 02 Jul 2020, 02:55    Post subject:  

2P was developed on ubuntu on acer chromebook installed using mrchromebox scripts. Later development continued on fatdog64-810. Now some essential fixes have been applied after testing 2P on dpupbuster-8.0.0-x86_64 ... the differences are not too great, but big enough to cause inoperation of some functions.

The clipboard used on dpup is clipit, fatdog has xsel, and ubuntu had xsel and xclip. So a new entry has been added to preferences allowing selection of copy command.

There are in fact five new features in the preferences and two bug fixes... see image.
1) toggle geometry recorder
2) copy command selector
3) timelimit for radio recordings
4) List View Text wrap length ... this allows the 3rd meta tag column to stay in view. This column displays line numbers as svg images, and aso displays full sized images at native resolution.The wrap size is also a component of the --splitter calculation.
5) BT sound device selection of already paired devices, which also sets $HOME/.asoundrc

For radio lists, a new feature is the ability to create a favorites list using '--row-action' ... this feature is an extra entry 'exec' on the list right click menu. In this case the command sends the selected item either to a radio favorites or an m3u playlist depending on file type....at least with yad-6.0 gtk-3. Dpup also did not display svg icons at the same size as on fatdog or ubuntu, so i had to use inkscape to scale document and svg elements to 48 points.

In addition a number of improvements and attention to oversights, particularly with scratchpad's logic. The translation function has spoken audio for source and target language texts, using ffplay -- no-disp --autoexit. It functions unobtrusively, which is a good thing.

Eesmets

edit: updated desktopfilefn so that any .desktop file can be edited. And loading applications folder in mediafn, lists all .desktop files ready for select and launch.
launcher.png
 Description   applications launcher
 Filesize   112.23 KB
 Viewed   71 Time(s)

launcher.png

xscreenshot-20200702T073527.png
 Description   
 Filesize   32.49 KB
 Viewed   98 Time(s)

xscreenshot-20200702T073527.png

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

Joined: 18 Jun 2020
Posts: 13

PostPosted: Mon 06 Jul 2020, 16:43    Post subject:  

Basic ftp functionaloty is now supported in the form of noninteractive verbose mode. Thanks to misko_2083 ftp commands function as expected.

There is now a simple function for creating app startup script which by default gets saved to /etc/xdg/Startup. executive permissions are enabled, auto date stamp in comments..
startapp.png
 Description   
 Filesize   34.38 KB
 Viewed   58 Time(s)

startapp.png

ftp1.png
Description 
png

 Download 
Filename  ftp1.png 
Filesize  126.31 KB 
Downloaded  10 Time(s) 

Last edited by Eesmets on Thu 09 Jul 2020, 01:30; edited 1 time in total
Back to top
View user's profile Send private message 
Eesmets

Joined: 18 Jun 2020
Posts: 13

PostPosted: Wed 08 Jul 2020, 19:14    Post subject:  

Link to latest 2P.

ftpfn non interactive mode working well.

Yad 6 is required for all features to work as expected.
2plink.txt.gz
Description  fake .gz
gz

 Download 
Filename  2plink.txt.gz 
Filesize  66 Bytes 
Downloaded  6 Time(s) 
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
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.0677s ][ Queries: 13 (0.0072s) ][ GZIP on ]