Write your own addon, Step 2

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Write your own addon, Step 2

Stephen Adams
Hi everyone,

Writing to request write access to https://github.com/gramps-project/addons-source project.

I'm going to start with something simple like a "on this day in family history" gramplet before moving on to something more useful.

Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Write your own addon, Step 2

Stephen Adams
My git username is  ThariusDawnbreaker

I'm not prepared to submit an addon just yet, I'm working at getting the programming environment created and wondering if programming or testing can be done on windows or if windows bash will suffice.

Steve

On Tue, May 22, 2018 at 10:11 PM, Sam Manzi <[hidden email]> wrote:
Hi Stephen,

Sounds great :)

While I don't have the ability to give you that access on github, I have cc'd Nick Hall.

In the meantime you can:
* Provide your Github username (so a request to be a member of addons-source can be sent)
* Submit a PR with the addon first so that it can be reviewed.

Kind regards
Sam

On 23 May 2018 at 08:55, Stephen Adams <[hidden email]> wrote:
Hi everyone,

Writing to request write access to https://github.com/gramps-project/addons-source project.

I'm going to start with something simple like a "on this day in family history" gramplet before moving on to something more useful.

Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Write your own addon, Step 2

Stephen Adams
Thanks Sam,

I'll review them in the morning.  I'm feeling a bit of a dumb ass right now because my Windows-Bash is still giving me errors:

tharius@BigBlue:/mnt/f/src/addons-source$ ./make.py gramps50 init ThisDayInFamilyHistory
make.py: LANGUAGE is en_US.UTF-8... good!
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.glade: No such file or directory at /usr/bin/intltool-extract line 212.
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.xml: No such file or directory at /usr/bin/intltool-extract line 212.
xgettext: error while opening "ThisDayInFamilyHistory/*.glade.h" for reading: No such file or directory
xgettext: error while opening "ThisDayInFamilyHistory/*.xml.h" for reading: No such file or directory
tharius@BigBlue:/mnt/f/src/addons-source$


Trying to figure it out before pestering anyone, uncertain if it's a windows issue or if it's just because I have no strings to export at this point (I am using the basic hello world with classes as the starting point).

Thanks again,
Steve

On Wed, May 23, 2018 at 12:12 AM, Sam Manzi <[hidden email]> wrote:
Hi Steve,

For developing Gramps on Microsoft Windows you may find the following links useful.

On 23 May 2018 at 12:29, Stephen Adams <[hidden email]> wrote:
My git username is  ThariusDawnbreaker

I'm not prepared to submit an addon just yet, I'm working at getting the programming environment created and wondering if programming or testing can be done on windows or if windows bash will suffice.

Steve

On Tue, May 22, 2018 at 10:11 PM, Sam Manzi <[hidden email]> wrote:
Hi Stephen,

Sounds great :)

While I don't have the ability to give you that access on github, I have cc'd Nick Hall.

In the meantime you can:
* Provide your Github username (so a request to be a member of addons-source can be sent)
* Submit a PR with the addon first so that it can be reviewed.

Kind regards
Sam

On 23 May 2018 at 08:55, Stephen Adams <[hidden email]> wrote:
Hi everyone,

Writing to request write access to https://github.com/gramps-project/addons-source project.

I'm going to start with something simple like a "on this day in family history" gramplet before moving on to something more useful.

Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel






------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Write your own addon, Step 2

Nick Hall
In reply to this post by Stephen Adams
On 23/05/18 03:29, Stephen Adams wrote:
My git username is  ThariusDawnbreaker

I'm not prepared to submit an addon just yet, I'm working at getting the programming environment created and wondering if programming or testing can be done on windows or if windows bash will suffice.

I have sent you an invitation.  You should receive an email shortly.

Nick.



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Write your own addon, Step 2

Stephen Adams
In reply to this post by Stephen Adams
Hi Sam,

I have done both.

The good news is that the hello world gramplet does run in my AIO copy of gramps regardless of other errors, so I can at least begin.  If need be I will simply spin up an Ubunto VM for this.

Steve


On Wed, May 23, 2018 at 7:19 PM, Sam Manzi <[hidden email]> wrote:
In short you need to to install the intltool  package and  use only python 3 to run the source code.

Kind regards
Sam

On 23 May 2018 at 14:26, Stephen Adams <[hidden email]> wrote:
Thanks Sam,

I'll review them in the morning.  I'm feeling a bit of a dumb ass right now because my Windows-Bash is still giving me errors:

tharius@BigBlue:/mnt/f/src/addons-source$ ./make.py gramps50 init ThisDayInFamilyHistory
make.py: LANGUAGE is en_US.UTF-8... good!
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.glade: No such file or directory at /usr/bin/intltool-extract line 212.
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.xml: No such file or directory at /usr/bin/intltool-extract line 212.
xgettext: error while opening "ThisDayInFamilyHistory/*.glade.h" for reading: No such file or directory
xgettext: error while opening "ThisDayInFamilyHistory/*.xml.h" for reading: No such file or directory
tharius@BigBlue:/mnt/f/src/addons-source$


Trying to figure it out before pestering anyone, uncertain if it's a windows issue or if it's just because I have no strings to export at this point (I am using the basic hello world with classes as the starting point).

Thanks again,
Steve




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Write your own addon, Step 2

Stephen Adams
When I reviewed the online documentation it never directed me to create a .glade file, nor di dI see a reference to what it is.   So to say it's missing it unsurprising, it was never created.  If it's not generated then I'll have to find what it is and create it.

tharius@BigBlue:/mnt/f/src/addons-source$ LANGUAGE=en_US.UTF-8 gramps=/mnt/f/src/gramps python3 make.py gramps50 init ThisDayInFamilyHistory
make.py: LANGUAGE is en_US.UTF-8... good!
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.glade: No such file or directory at /usr/bin/intltool-extract line 212.
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.xml: No such file or directory at /usr/bin/intltool-extract line 212.
xgettext: error while opening "ThisDayInFamilyHistory/*.glade.h" for reading: No such file or directory
xgettext: error while opening "ThisDayInFamilyHistory/*.xml.h" for reading: No such file or directory
tharius@BigBlue:/mnt/f/src/addons-source$ sudo apt-get install intltool
Reading package lists... Done
Building dependency tree
Reading state information... Done
intltool is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 170 not upgraded.
tharius@BigBlue:/mnt/f/src/addons-source$

The project itself couldn't be simpler:
# File: ThisDayInFamilyHistory.gpr.py
register(GRAMPLET,
         id="This Day in Family History Gramplet", 
         name=_("This Day in Family History"),
         description = _("A program that shows you the events from your family history on this date."),
         version="0.0.1",
         gramps_target_version="5.0",
         status = STABLE,
         fname="ThisDayInFamilyHistory.py",
         height = 20, 
         gramplet = 'ThisDayInFamilyHistoryGramplet',
         gramplet_title=_("This Day Gramplet"),
         help_url="This Day In Family History Gramplet"
         )



# File: ThisDayInFamilyHistory.py
from gramps.gen.plug import Gramplet

class ThisDayInFamilyHistoryGramplet(Gramplet):
    def init(self):
        self.set_text("Hello world!")



On Wed, May 23, 2018 at 7:33 PM, Stephen Adams <[hidden email]> wrote:
Hi Sam,

I have done both.

The good news is that the hello world gramplet does run in my AIO copy of gramps regardless of other errors, so I can at least begin.  If need be I will simply spin up an Ubunto VM for this.

Steve


On Wed, May 23, 2018 at 7:19 PM, Sam Manzi <[hidden email]> wrote:
In short you need to to install the intltool  package and  use only python 3 to run the source code.

Kind regards
Sam

On 23 May 2018 at 14:26, Stephen Adams <[hidden email]> wrote:
Thanks Sam,

I'll review them in the morning.  I'm feeling a bit of a dumb ass right now because my Windows-Bash is still giving me errors:

tharius@BigBlue:/mnt/f/src/addons-source$ ./make.py gramps50 init ThisDayInFamilyHistory
make.py: LANGUAGE is en_US.UTF-8... good!
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.glade: No such file or directory at /usr/bin/intltool-extract line 212.
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.xml: No such file or directory at /usr/bin/intltool-extract line 212.
xgettext: error while opening "ThisDayInFamilyHistory/*.glade.h" for reading: No such file or directory
xgettext: error while opening "ThisDayInFamilyHistory/*.xml.h" for reading: No such file or directory
tharius@BigBlue:/mnt/f/src/addons-source$


Trying to figure it out before pestering anyone, uncertain if it's a windows issue or if it's just because I have no strings to export at this point (I am using the basic hello world with classes as the starting point).

Thanks again,
Steve





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Write your own addon, Step 2

prculley
The script attempts to process .glade and .xml files, just in case your add-on uses them.  Not having them is not a real error.


Paul C.

On Wed, May 23, 2018, 6:41 PM Stephen Adams <[hidden email]> wrote:
When I reviewed the online documentation it never directed me to create a .glade file, nor di dI see a reference to what it is.   So to say it's missing it unsurprising, it was never created.  If it's not generated then I'll have to find what it is and create it.

tharius@BigBlue:/mnt/f/src/addons-source$ LANGUAGE=en_US.UTF-8 gramps=/mnt/f/src/gramps python3 make.py gramps50 init ThisDayInFamilyHistory
make.py: LANGUAGE is en_US.UTF-8... good!
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.glade: No such file or directory at /usr/bin/intltool-extract line 212.
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.xml: No such file or directory at /usr/bin/intltool-extract line 212.
xgettext: error while opening "ThisDayInFamilyHistory/*.glade.h" for reading: No such file or directory
xgettext: error while opening "ThisDayInFamilyHistory/*.xml.h" for reading: No such file or directory
tharius@BigBlue:/mnt/f/src/addons-source$ sudo apt-get install intltool
Reading package lists... Done
Building dependency tree
Reading state information... Done
intltool is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 170 not upgraded.
tharius@BigBlue:/mnt/f/src/addons-source$

The project itself couldn't be simpler:
# File: ThisDayInFamilyHistory.gpr.py
register(GRAMPLET,
         id="This Day in Family History Gramplet", 
         name=_("This Day in Family History"),
         description = _("A program that shows you the events from your family history on this date."),
         version="0.0.1",
         gramps_target_version="5.0",
         status = STABLE,
         fname="ThisDayInFamilyHistory.py",
         height = 20, 
         gramplet = 'ThisDayInFamilyHistoryGramplet',
         gramplet_title=_("This Day Gramplet"),
         help_url="This Day In Family History Gramplet"
         )



# File: ThisDayInFamilyHistory.py
from gramps.gen.plug import Gramplet

class ThisDayInFamilyHistoryGramplet(Gramplet):
    def init(self):
        self.set_text("Hello world!")



On Wed, May 23, 2018 at 7:33 PM, Stephen Adams <[hidden email]> wrote:
Hi Sam,

I have done both.

The good news is that the hello world gramplet does run in my AIO copy of gramps regardless of other errors, so I can at least begin.  If need be I will simply spin up an Ubunto VM for this.

Steve


On Wed, May 23, 2018 at 7:19 PM, Sam Manzi <[hidden email]> wrote:
In short you need to to install the intltool  package and  use only python 3 to run the source code.

Kind regards
Sam

On 23 May 2018 at 14:26, Stephen Adams <[hidden email]> wrote:
Thanks Sam,

I'll review them in the morning.  I'm feeling a bit of a dumb ass right now because my Windows-Bash is still giving me errors:

tharius@BigBlue:/mnt/f/src/addons-source$ ./make.py gramps50 init ThisDayInFamilyHistory
make.py: LANGUAGE is en_US.UTF-8... good!
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.glade: No such file or directory at /usr/bin/intltool-extract line 212.
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.xml: No such file or directory at /usr/bin/intltool-extract line 212.
xgettext: error while opening "ThisDayInFamilyHistory/*.glade.h" for reading: No such file or directory
xgettext: error while opening "ThisDayInFamilyHistory/*.xml.h" for reading: No such file or directory
tharius@BigBlue:/mnt/f/src/addons-source$


Trying to figure it out before pestering anyone, uncertain if it's a windows issue or if it's just because I have no strings to export at this point (I am using the basic hello world with classes as the starting point).

Thanks again,
Steve




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Write your own addon, Step 2

Stephen Adams
Having discovered what a glade file is, I was beginning to believe that might be the case.  Thanks for the reassurance.  I always fret over errors in build scripts, especially when the warning is forenoted that the scripts will not work on Windows without modifications.  They do appear, however, to work fine on Windows 10 Ubuntu Bash.

Steve

On Wed, May 23, 2018 at 10:15 PM, Paul Culley <[hidden email]> wrote:
The script attempts to process .glade and .xml files, just in case your add-on uses them.  Not having them is not a real error.


Paul C.

On Wed, May 23, 2018, 6:41 PM Stephen Adams <[hidden email]> wrote:
When I reviewed the online documentation it never directed me to create a .glade file, nor di dI see a reference to what it is.   So to say it's missing it unsurprising, it was never created.  If it's not generated then I'll have to find what it is and create it.

tharius@BigBlue:/mnt/f/src/addons-source$ LANGUAGE=en_US.UTF-8 gramps=/mnt/f/src/gramps python3 make.py gramps50 init ThisDayInFamilyHistory
make.py: LANGUAGE is en_US.UTF-8... good!
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.glade: No such file or directory at /usr/bin/intltool-extract line 212.
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.xml: No such file or directory at /usr/bin/intltool-extract line 212.
xgettext: error while opening "ThisDayInFamilyHistory/*.glade.h" for reading: No such file or directory
xgettext: error while opening "ThisDayInFamilyHistory/*.xml.h" for reading: No such file or directory
tharius@BigBlue:/mnt/f/src/addons-source$ sudo apt-get install intltool
Reading package lists... Done
Building dependency tree
Reading state information... Done
intltool is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 170 not upgraded.
tharius@BigBlue:/mnt/f/src/addons-source$

The project itself couldn't be simpler:
# File: ThisDayInFamilyHistory.gpr.py
register(GRAMPLET,
         id="This Day in Family History Gramplet", 
         name=_("This Day in Family History"),
         description = _("A program that shows you the events from your family history on this date."),
         version="0.0.1",
         gramps_target_version="5.0",
         status = STABLE,
         fname="ThisDayInFamilyHistory.py",
         height = 20, 
         gramplet = 'ThisDayInFamilyHistoryGramplet',
         gramplet_title=_("This Day Gramplet"),
         help_url="This Day In Family History Gramplet"
         )



# File: ThisDayInFamilyHistory.py
from gramps.gen.plug import Gramplet

class ThisDayInFamilyHistoryGramplet(Gramplet):
    def init(self):
        self.set_text("Hello world!")



On Wed, May 23, 2018 at 7:33 PM, Stephen Adams <[hidden email]> wrote:
Hi Sam,

I have done both.

The good news is that the hello world gramplet does run in my AIO copy of gramps regardless of other errors, so I can at least begin.  If need be I will simply spin up an Ubunto VM for this.

Steve


On Wed, May 23, 2018 at 7:19 PM, Sam Manzi <[hidden email]> wrote:
In short you need to to install the intltool  package and  use only python 3 to run the source code.

Kind regards
Sam

On 23 May 2018 at 14:26, Stephen Adams <[hidden email]> wrote:
Thanks Sam,

I'll review them in the morning.  I'm feeling a bit of a dumb ass right now because my Windows-Bash is still giving me errors:

tharius@BigBlue:/mnt/f/src/addons-source$ ./make.py gramps50 init ThisDayInFamilyHistory
make.py: LANGUAGE is en_US.UTF-8... good!
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.glade: No such file or directory at /usr/bin/intltool-extract line 212.
Generating C format header file for translation.
can't open ./ThisDayInFamilyHistory/*.xml: No such file or directory at /usr/bin/intltool-extract line 212.
xgettext: error while opening "ThisDayInFamilyHistory/*.glade.h" for reading: No such file or directory
xgettext: error while opening "ThisDayInFamilyHistory/*.xml.h" for reading: No such file or directory
tharius@BigBlue:/mnt/f/src/addons-source$


Trying to figure it out before pestering anyone, uncertain if it's a windows issue or if it's just because I have no strings to export at this point (I am using the basic hello world with classes as the starting point).

Thanks again,
Steve




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel