frontend (gtk3) for buku cli

Get involved, create or participate in a project.
Post Reply
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

frontend (gtk3) for buku cli

Post by secureIT »

frontend (gtk3) for buku bookmark-manager cli

For a better overview and in order not to strain the reader, I will split the thread into several parts :

1. Introducion
2. What runs
3. Test it
4. Some Screenshots of the buku-frontend in action

Part 1. Introduction :

It's easy to put your bookmarks in the cloud these days, and there are several providers out there for doing that thing.

For security reasons, however, not every user wants to store his bookmarks in the cloud.

I have been looking for a bookmark manager for a long time that only runs locally on my system, but is still available into my network, and also offers the option of saving and exchanging bookmarks from other browsers that are used on different systems.
Also the database of it should be portable.

After a lot of searching, (and i did not find any graphical application) that runs locally on my system, i found a cli that runs in the terminal and meets all the requirements.

This cli is called "buku" and is in the mint repositories.

For more informations see the buku-project here:

https://github.com/jarun/buku

Buku has very extensive functions, and it is not easy to remember all of these functions, or to assign all of them to key combinations, that you can also remember.

Or you would have to call the cli's help function, which is cumbersome.(Call up each function and do the corresponding keyboard entries within the terminal.)

There are some connected projects for a frontend (one is called "oil") - but this is only supposed to provide a database search function within "buku" that reacts to keystrokes and many other basic functions are not integrated.

I tested it ... but running under Linux Mint 20 Xfce "oil" only generates error messages.

The other connected projects are for other environments - and therefore unfortunately cannot be used in linux mint.

So its time to build a graphical frontend for "buku" which could run within linux mint 20.

I tried to develop this for myself, and i know (and searched for it) that it is in common interest, because searched by much Linux users.

But note : i am not a developer and have only basic skills in gtk3 and c or python (more skills in programming with yad)

My project is in early state, but running and useable for me now (under LM 20 Xfce - but may be runs also in cinnamon or mate ?).

I think, it could be better for sure.

I want to share, what i have for now.

I hope for your help to go further with this project .... and make it better.


If you are interested - see next :


Part 2.

What i have tried and what runs for now .....

I build it with newest version of glade (gtk3) and src in c#

But then i noticed, that by the use of c# it fails by missing capabilities to simply create a variable from input of a text-field and append it elsewhere in code. (means: append it to buku cli)

So i decided to bound the input queries to single yad scripts (with a wrapper $1 ... as described for extern apps into the buku wiki)

That works so far ......

I dare to convert the c-code to python.

Until I deal with it, however, I think it will be good to first test the query functions for buku cli with the existing code and the yad-scripts.

So i ask if anyone would test the functions of the frontend as it is now.

And also i ask for some suggestions on doing it with only gtk3 and python

This would be much appreciated.

Or should i create it without gtk3 ... completely with yad ?

What do you think ?


If you are interested - see next :


Part 3. Test it :


Testing the frontend as it is :

Download the buku-frontend.tar.gz from here :

http://www.filedropper.com/buku-frontendtar

Unzip the buku-frontend.tar.gz to :

Code: Select all

/home/YOURNAME/bin/
If the bin folder doesnt exist in your home directory .... simply create it.

For testing you will also need the buku cli :

install it from the repositories :

Code: Select all

apt install buku
or install the newest from the developer of buku :

Code: Select all

https://github.com/jarun/buku/releases/download/v4.4/buku-cli_4.4-1_ubuntu20.04.amd64.deb
and after that install these needed dependencies :

Code: Select all

apt install yad xsel
And important : for start- and handling instructions read the :

01-readme-first.txt

which stays now in :

Code: Select all

/home/YOURNAME/bin/buku-frontend/
Part 4.

Some Screenshots of the buku-frontend in action

Added e..g. support for for dragndrop to database

Image

Image

Image

Image

Image

Image

Image
Last edited by secureIT on Wed Sep 23, 2020 10:56 am, edited 1 time in total.
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend for buku cli

Post by secureIT »

Now i transfered the c# source to a python script.

This is only the main-structure like it was before (but coded in python)

For now also the python-script leads to extern yad-scripts, which handles the user input.

Thats because i have not found out until yet, how to generate (by use of python) variables from input of gtk-file-chooser choices.
That would be essential, while buku cli awaits the input (e.g. for import file) like this : buku -i VARIABLE

Should work with python and gtk-file-chooser but I haven't found a solution to this yet.

Any suggestions ?

Same thing is with dnd-window coded in python.

I get the dnd results of urls, but havent found a way until yet, how to save them in variables.

So lets resume :

I am working on it, but as i am no "python-hero" it might need some time.


See the code of window_main.xml:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.2 -->
<interface>
  <requires lib="gtk+" version="3.20"/>
  <object class="GtkImage" id="image1">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-add</property>
  </object>
  <object class="GtkImage" id="image10">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-save</property>
  </object>
  <object class="GtkImage" id="image11">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-dnd-multiple</property>
  </object>
  <object class="GtkImage" id="image12">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-convert</property>
  </object>
  <object class="GtkImage" id="image13">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-revert-to-saved</property>
  </object>
  <object class="GtkImage" id="image2">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-sort-descending</property>
  </object>
  <object class="GtkImage" id="image3">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-find</property>
  </object>
  <object class="GtkImage" id="image4">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-goto-top</property>
  </object>
  <object class="GtkImage" id="image5">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-remove</property>
  </object>
  <object class="GtkImage" id="image6">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-open</property>
  </object>
  <object class="GtkImage" id="image7">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-dialog-question</property>
  </object>
  <object class="GtkImage" id="image8">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-sort-descending</property>
  </object>
  <object class="GtkImage" id="image9">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <property name="stock">gtk-quit</property>
  </object>
  <object class="GtkWindow" id="window_main">
    <property name="can_focus">False</property>
    <property name="title" translatable="yes">buku-frontend-p</property>
    <property name="default_width">200</property>
    <property name="default_height">210</property>
    <property name="icon">../src/icons/Letter-B-lg-icon-64.png</property>
    <property name="has_resize_grip">True</property>
    <signal name="destroy" handler="on_window_main_destroy" swapped="no"/>
    <child type="titlebar">
      <placeholder/>
    </child>
    <child>
      <object class="GtkFixed">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <child>
          <object class="GtkButton" id="bukuadd">
            <property name="label" translatable="yes">add url from clipboard  </property>
            <property name="name">bukoadd</property>
            <property name="width_request">75</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_markup" translatable="yes">add marked url from clipboard</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image1</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukuadd_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">199</property>
            <property name="y">6</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukushowall">
            <property name="label" translatable="yes">list all entries by #           </property>
            <property name="name">bukushowall</property>
            <property name="width_request">75</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">show all entries by number of database</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image2</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukushowall_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">6</property>
            <property name="y">6</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukusearchclip">
            <property name="label" translatable="yes">search  from clipboard   </property>
            <property name="name">bukusearchclip</property>
            <property name="width_request">75</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">Search e.g. whether a url exists in the database for a word (or a url) that you have marked in other applications</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image3</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukusearchclip_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">6</property>
            <property name="y">47</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukusearch">
            <property name="label" translatable="yes">search by text-entry        </property>
            <property name="name">bukusearch</property>
            <property name="width_request">75</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">search by given text-entry of user </property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image4</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukusearch_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">6</property>
            <property name="y">86</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukudelete">
            <property name="label" translatable="yes">delete a entry  by #        </property>
            <property name="name">bukudelete</property>
            <property name="width_request">75</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">delete by input the number of database</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image5</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukudelete_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">199</property>
            <property name="y">85</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukuimportfile">
            <property name="label" translatable="yes">import from file               </property>
            <property name="name">bukuimportfile</property>
            <property name="width_request">75</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">import bookmarks based on file extension
supports 'html', 'json', 'md', 'org', 'db'</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image6</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukuimportfile_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">199</property>
            <property name="y">47</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukusearchtagged">
            <property name="label" translatable="yes">search tagged entries     </property>
            <property name="name">bukusearchtagged</property>
            <property name="width_request">75</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">search bookmarks that are tagged
you can enter one ore more tags
if you enter more tags add a space between
them</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image7</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukusearchtagged_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">6</property>
            <property name="y">166</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukulistalltags">
            <property name="label" translatable="yes">list all tags                          </property>
            <property name="name">bukulistalltags</property>
            <property name="width_request">75</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">lists all unique tags alphabetically</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image8</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukulistalltags_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">6</property>
            <property name="y">126</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukusearchanddelete">
            <property name="label" translatable="yes">search and delete entry</property>
            <property name="name">bukusearchanddelete</property>
            <property name="width_request">75</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">search and delete a number by input of keyword
could be more than one keyword
if so  - input a space between them
</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image9</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukusearchanddelete_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">199</property>
            <property name="y">126</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukuexportfile">
            <property name="label" translatable="yes">export from database    </property>
            <property name="name">bukuexportfile</property>
            <property name="width_request">70</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">export buku database to file :
choose HTML, Markdown, Orgfile or
 a new database. 
extensions : *.html *.md *org *.db</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image10</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukuexportfile_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">198</property>
            <property name="y">166</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukudragndrop">
            <property name="label" translatable="yes">dragndrop</property>
            <property name="name">bukudragndrop</property>
            <property name="width_request">70</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">Opens a dnd-window that stays on top.
dragndrop one ore more urls to it.
While dnd-window is opened you dont have acess to other functions of buku-frontend-p. </property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image11</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukudragndrop_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">6</property>
            <property name="y">205</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukuencrypt">
            <property name="label" translatable="yes">encrypt db</property>
            <property name="name">bukuencrypt</property>
            <property name="width_request">70</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="tooltip_text" translatable="yes">encrypt database
enter 8 digits
note : you wont see what youve entered
you have to enter it twice for confirmation</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image12</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukuencrypt_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">168</property>
            <property name="y">214</property>
          </packing>
        </child>
        <child>
          <object class="GtkButton" id="bukudecrypt">
            <property name="label" translatable="yes">decrypt db</property>
            <property name="width_request">70</property>
            <property name="height_request">30</property>
            <property name="visible">True</property>
            <property name="can_focus">True</property>
            <property name="receives_default">True</property>
            <property name="halign">start</property>
            <property name="valign">start</property>
            <property name="image">image13</property>
            <property name="always_show_image">True</property>
            <signal name="clicked" handler="on_bukudecrypt_clicked" swapped="no"/>
          </object>
          <packing>
            <property name="x">275</property>
            <property name="y">214</property>
          </packing>
        </child>
      </object>
    </child>
  </object>
</interface>
and the code of the testmain.py:

Code: Select all

#!/usr/bin/python
# -*- coding: utf-8 -*-
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk

class Handler:
    @staticmethod
    def onDestroy(*args):
        Gtk.main_quit()

class Handler1:
    @staticmethod
    def on_bukushowall_clicked(button):
        import os
        os.system('./bukushowall')

class Handler2:
    @staticmethod
    def on_bukuadd_clicked(button):
        import os
        os.system('xsel | buku -a')

class Handler3:
    @staticmethod
    def on_bukusearchclip_clicked(button):
        import os
        os.system('xsel | buku -s')

class Handler4:
    @staticmethod
    def on_bukusearch_clicked(button):
        import os
        os.system('./bukusearch')

class Handler5:
    @staticmethod
    def on_bukulistalltags_clicked(button):
        import os
        os.system('./bukulistalltags')

class Handler6:
    @staticmethod
    def on_bukusearchtagged_clicked(button):
        import os
        os.system('./bukusearchtagged')

class Handler7:
    @staticmethod
    def on_bukuimportfile_clicked(button):
        import os
        os.system('./bukuimportfile')

class Handler8:
    @staticmethod
    def on_bukudelete_clicked(button):
        import os
        os.system('./bukudelete')

class Handler9:
    @staticmethod
    def on_bukusearchanddelete_clicked(button):
        import os
        os.system('./bukusearchanddelete')

class Handler10:
    @staticmethod
    def on_bukuexportfile_clicked(button):
        import os
        os.system('./bukuexportfile')

class Handler11:
    @staticmethod
    def on_bukudragndrop_clicked(button):
        import os
        os.system('./bukudragndrop')

class Handler12:
    @staticmethod
    def on_bukuencrypt_clicked(button):
        import os
        os.system('buku -l')

class Handler13:
    @staticmethod
    def on_bukudecrypt_clicked(button):
        import os
        os.system('buku -k')

builder = Gtk.Builder()
builder.add_from_file("main/window_main.xml")
window = builder.get_object("window_main")
window.connect("destroy",Handler.onDestroy)

button = builder.get_object("bukushowall")
button.connect("clicked",Handler1.on_bukushowall_clicked)

button = builder.get_object("bukuadd")
button.connect("clicked",Handler2.on_bukuadd_clicked)

button = builder.get_object("bukusearchclip")
button.connect("clicked",Handler3.on_bukusearchclip_clicked)

button = builder.get_object("bukusearch")
button.connect("clicked",Handler4.on_bukusearch_clicked)

button = builder.get_object("bukulistalltags")
button.connect("clicked",Handler5.on_bukulistalltags_clicked)

button = builder.get_object("bukusearchtagged")
button.connect("clicked",Handler6.on_bukusearchtagged_clicked)

button = builder.get_object("bukuimportfile")
button.connect("clicked",Handler7.on_bukuimportfile_clicked)

button = builder.get_object("bukudelete")
button.connect("clicked",Handler8.on_bukudelete_clicked)

button = builder.get_object("bukusearchanddelete")
button.connect("clicked",Handler9.on_bukusearchanddelete_clicked)

button = builder.get_object("bukuexportfile")
button.connect("clicked",Handler10.on_bukuexportfile_clicked)

button = builder.get_object("bukudragndrop")
button.connect("clicked",Handler11.on_bukudragndrop_clicked)

button = builder.get_object("bukuencrypt")
button.connect("clicked",Handler12.on_bukuencrypt_clicked)

button = builder.get_object("bukudecrypt")
button.connect("clicked",Handler13.on_bukudecrypt_clicked)

window.show_all()

Gtk.main()

For testing purposes download the working py-version from here :

edit : cancelled (will probably not run in your system)
Last edited by secureIT on Mon Oct 12, 2020 12:18 pm, edited 2 times in total.
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend for buku cli

Post by secureIT »

Hello again,

now i coded the whole thing in python - without the extern yad-scripts.
These are now python-scripts.

For testing purposes download the working py-version of buku-frontend-v-0.01 from here :

http://www.filedropper.com/buku-frontend-v-001tar

Unzip the buku-frontend-v-0.01.tar.gz to :

/home/YOURNAME/bin/

If the bin folder doesnt exist in your home directory .... simply create it.

And take a look at the :

01-readme-first.txt

inside of it.
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend (gtk3) for buku cli

Post by secureIT »

Added button for open a bookmark in standard-browser

Image

new version (buku-frontend-v-0.02.tar.gz) here :

edit : cancelled (will probably not run in your system)
Last edited by secureIT on Mon Oct 12, 2020 12:15 pm, edited 1 time in total.
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend (gtk3) for buku cli

Post by secureIT »

Now i started to make a real app of it. :)

Beginning with version 0.03 ........

Has for now the same functions as the button-version, but more functions to come in next version ..........

Image

Image

Image

Image

Image

testversion here :

edit : cancelled (will probably not run in your system)
Last edited by secureIT on Mon Oct 12, 2020 12:14 pm, edited 1 time in total.
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend (gtk3) for buku cli

Post by secureIT »

This is the 4th test-(preliminary version) of the buku-gtk3-frontend


Changelog for buku-gtk3-frontend-0.04:


The application starts now without terminal-view.

All search-functions has their feedback now in own gtk3-windows.

Also the add-functions runs in their own gtk3-windows.

The height of the application window, the drag & drop window and the dnd feedback-window have been adjusted so that they can be placed at the top of the screen above the browser.

The delete- and database-functions open from the application with terminal view. (for now)


To do:

I will try to implement a Gtk3 query and feedback window for the delete- and database-functions.

I will add more functions.


Image


download:

edit : cancelled (will probably not run in your system)
Last edited by secureIT on Mon Oct 12, 2020 12:14 pm, edited 1 time in total.
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend (gtk3) for buku cli

Post by secureIT »

This is the 5th test-(preliminary version) of the buku-gtk3-frontend

buku-gtk3-frontend-0.05 changelog

Added more functions :

in > search :

show last entries

in > database :

import database (directly) from chrome, chromium or firefox

in > browser-view :

browse search results immediately

in > help :

The about window is now independent on the script side and separate from the main window

A help function has been integrated.

Added new menu > update

update bookmark by indices

search and update bookmark

---------------------

A bug in the search functions has been eliminated:
if cancel is clicked "cancel clicked" appears now in the output window .........

To do:

I will try to implement a Gtk3 query and feedback window for the delete- and database-functions.

Image

Image

Image

Image

download :

edit : cancelled (will probably not run in your system)
Last edited by secureIT on Mon Oct 12, 2020 12:13 pm, edited 1 time in total.
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend (gtk3) for buku cli

Post by secureIT »

Hello everybody,

As I said, I'm not a python hero.

When I tested the frontend on another system with a freshly installed LM 20 Xfce, no input worked - and neither did the dnd window.

On the other hand, everything works on the system on which I developed the frontend (also LM 20 Xfce).

After some searching, I found out what the reason for this is:

Python 2.7.18 and python 3.8.2 are installed on the development system.

The scripts that call

Code: Select all

#!/usr/bin/env python
run under 2.7.18

A really stupid mistake on my part! :oops:


On an LM20 standard installation,

Code: Select all

 #!/usr/bin/env python3
must be called.

Under python 3, however, certain commands such as : print os.system () dont work any more.


So I apologize to everyone who tested it - and who it didn't work!
(probably 100%)


And now I'm trying to adapt the commands to Python 3.

However, I don't know whether I'll be able to do that ......

So i take a break and think it over.
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend (gtk3) for buku cli

Post by secureIT »

Coming back with 6th test-(preliminary version) of the buku-gtk3-frontend.

Tested : and works with no errors on a fresh installed LM 20 Xfce.
Should also work on cinnamon or mate .....

buku-gtk3-frontend-0.06 changelog

All python scripts runs now on python3.

To make it more common for all editions (which ma be run on different Terminal environments) :
all functions shows their feedback now in gtk3-vte-terminal-views.
(Exception is the dnd feedback window - which shows the dnd input in a gtk3-text-view)

Note for listings of extensive databases :
There is no more need to adjust the scrolling values of the Terminal of your DE.
This setting is integrated in the scripts for the vte-views and only belongs to them.
(will not touch any values of the Terminal of your DE)

For vte-view a new dependency is needed. (libvte-2.91-0)

For feeding the vte-terminal with commands resulting of gtk-entries no python3 solution was found by me.
The dialogs again were created by use of yad-scripts.

So yad has to be installed.

Also the start-commands for launchers were changed.

see readme-first.txt

To do for next test-Version 0.07 :

creating dialogs for encrypt-and decrypt-password-entries
adding more functions from buku-cli
creating more help-items in help-window
trying to adjust the layout of the app to the already existing css file in > src

Planned for a future Version 1.00 :
All vte-views should not run with their own processes in extern-windows.
The vte-views should run with a single process, that is integrated as a subwindow of the main app ......

Download for testing purposes:

http://www.filedropper.com/buku-gtk-frontend-006tar

Would be a great help, if anyone who tested it with cinnamon or mate or any other debian De would give a feedback, if it runs on their systems.
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend (gtk3) for buku cli

Post by secureIT »

I've come a big step further :

(it was a nice excercise in python3) :)

here is test-version 0.07 :

changelog :

Most of the individual python scripts were merged in the testscript.

Integrated a gtk3-vte-terminal into the main app.

All functions shows their feedback now in this one gtk3-vte-terminal.
(Exception is the dnd feedback window - which shows the dnd input into an extern gtk3-text-view)


The dialogs are still created with yad-scripts.


To do :

Creating dialogs for encrypt-and decrypt-password-entries

Adding more functions of the buku-cli

Creating more help-items in help-window

Trying to adjust the layout of the app to the already existing css file in > src

New items:

Integrating the dnd-feedback-window into the box at the bottom of the main-app.

Trying to get rid of that yad-dependency for the dialogs by using python and gtk3.


Image

download :

http://www.filedropper.com/buku-gtk-frontend-007tar
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend (gtk3) for buku cli

Post by secureIT »

This is test-version 0.08 :

buku-gtk3-frontend-0.08 changelog

Start-commands changed (see readme-first-txt)

Dnd-Handling changed in some other test-environment (see readme-first-txt)

Colors of textview of dnd feedback window changed in some other test-environment (see readme-first-txt)

Implement of dnd-feedback view in main-app was not sucessfull : it caused errors with stdout and stdin in vte.
So its better to let dnd stay in subprocess or extern process.

Added search-items :

1. search regex

2. search exclude

Note : The dialogs are still created with yad-scripts.
And as now i see no possibility to do same thing with gtk3-entries.
But no matter - with yad scripts, things are easier to implement with fewer lines of code.


To do :

Creating dialogs for encrypt-and decrypt-password-entries

Adding more functions of the buku-cli

Creating more help-items in help-window

Trying to adjust the layout of the app to the already existing css file in > src

---------------------------------------

Suggestions for improvement are welcome.

download :

http://www.filedropper.com/buku-gtk-frontend-008tar
.
secureIT
Level 4
Level 4
Posts: 290
Joined: Wed Dec 05, 2018 1:26 pm

Re: frontend (gtk3) for buku cli

Post by secureIT »

This is test-version 0.09 :

buku-gtk3-frontend-0.09 changelog

This frontend holds now 23 items from buku-cli (and growing)

As I mentioned in the opening post: the cli has a lot of functions.
So there will still be some work needed to fully integrate these functions into the frontend.

Some bugs fixed :

An wrong call of cli when calling >search exclude has been fixed
Wrong version-name in about-menu has been fixed
------------------------------------

New items from buku-cli added :

Added new menu : menu>list

The difference between ANY and ALL has been taken into account in the search functions

Added new item in menu>search: >search ALL

Added new item in menu>search: >search in substrings

Added new item in menu>database : >replace tagname

-------------------------------------

To do :

Creating dialogs for encrypt-and decrypt-password-entries
(for now seems to be impossible from a subprocess, because gives stdin-stdout-errors from cli)

Add more functions from buku-cli

Creating more help-items in help-window

Trying to adjust the layout of the app to the already existing css file in > src

---------------------------------------

Suggestions for improvement are welcome.

download :

http://www.filedropper.com/buku-gtk-frontend-009tar
.
Post Reply

Return to “Community Projects”