2P~ YAD based Multi-Func-App
Posted: Thu 18 Jun 2020, 11:14
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 '&' 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
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 '&' 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