Re: [Sugar-devel] Does Sugar on XO-1 support Python 3?

2024-03-14 Thread James Simmons
Ibiam,

I just noticed that SoaS is based on Fedora 34 and the XO-1 distribution is
based on Fedora 18. My guess is that this is because of the large number of
Activities only available for Python 2.

James Simmons


On Thu, Mar 14, 2024 at 10:09 AM Chihurumnaya Ibiam 
wrote:

> Is Python3 installed and working as expected for the XO1?
>
> --
>
> Ibiam Chihurumnaya
> ib...@sugarlabs.org
>
>
>
> On Thu, Mar 14, 2024 at 3:59 PM James Simmons  wrote:
>
>> One of the tasks in the deployment checklist is to use Browse to install
>> the updated Activity and see if it works. I decided to dig out my XO-1 and
>> update it to the latest version of Sugar and use Gmail to send my .xo files
>> to the laptop for installation. I discovered two things:
>>
>> 1. The Browse Activity cannot log into Gmail because it disables cookies.
>> The version of Browse I can run on Fedora does not have this problem.
>>
>> 2. When I copy the .xo files from a USB drive to the Journal they install
>> OK but don't start. No messages whatsoever in the Log Activity, but empty
>> files are created for messages.
>>
>> It looks like you cannot get a version of Sugar using Python 3 for an
>> XO-1 laptop.
>>
>> Thanks,
>>
>> James Simmons
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Does Sugar on XO-1 support Python 3?

2024-03-14 Thread James Simmons
One of the tasks in the deployment checklist is to use Browse to install
the updated Activity and see if it works. I decided to dig out my XO-1 and
update it to the latest version of Sugar and use Gmail to send my .xo files
to the laptop for installation. I discovered two things:

1. The Browse Activity cannot log into Gmail because it disables cookies.
The version of Browse I can run on Fedora does not have this problem.

2. When I copy the .xo files from a USB drive to the Journal they install
OK but don't start. No messages whatsoever in the Log Activity, but empty
files are created for messages.

It looks like you cannot get a version of Sugar using Python 3 for an XO-1
laptop.

Thanks,

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] sugar-runner pull request available

2024-03-13 Thread James Simmons
I made some sugar-runner release notes and updated the README.md to explain
how to build and run it, including explaining that it only works using
Xorg. I think this is ready to release.

I used it to test several applications and it worked fine. While it is
possible to do a lot of testing of Activities without running the Sugar
environment in a Xephyr window, having the whole environment available is
needed for testing collaboration, for launching an Activity from another
Activity, for testing what happens when you launch an Activity from the
Journal, etc.

I believe we can close the other pull requests for this project.

Thanks.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Still trying to get sugar-runner working

2024-03-12 Thread James Simmons
Ibiam,

sugar-runner works just fine when running GNOME on Xorg. Now that I know
that I'll write up some release notes and do a pull request.

Thanks,

James Simmons

On Tue, Mar 12, 2024 at 10:27 AM James Simmons  wrote:

> Ibiam,
>
> That's a good idea. I'll try it tonight. I saw the word "Wayland" in the
> messages but had no idea what it meant.
>
> James Simmons
>
>
> On Tue, Mar 12, 2024 at 7:29 AM Chihurumnaya Ibiam 
> wrote:
>
>> Maybe Xephyr on Wayland has issues, Sugar doesn't have support for
>> Wayland yet and maybe that's why sugar-commander
>> couldn't work, test sugar-commander on x11 and see if you encounter same
>> issues - Xephyr too -.
>>
>> --
>>
>> Ibiam Chihurumnaya
>> ib...@sugarlabs.org
>>
>>
>>
>> On Mon, Mar 11, 2024 at 7:19 PM James Simmons  wrote:
>>
>>> I haven't had any luck getting sugar-runner working so I thought I'd try
>>> just getting Xephyr working by itself and see what I could learn that way.
>>>
>>> I found this tutorial on YouTube:
>>>
>>> https://www.youtube.com/watch?v=ECHH2JFA8SM
>>>
>>> So I tried it out. The Xephr window came up, but gnome-shell failed with
>>> these messages:
>>>
>>> jamessimmons@unknownF4390913EB01:~$ Xephyr :5 -ac -br -noreset -screen
>>> 800x600 -dpi 96 &
>>> [1] 330048
>>> jamessimmons@unknownF4390913EB01:~$ The XKEYBOARD keymap compiler
>>> (xkbcomp) reports:
>>> > Warning:  Could not resolve keysym XF86CameraAccessEnable
>>> > Warning:  Could not resolve keysym XF86CameraAccessDisable
>>> > Warning:  Could not resolve keysym XF86CameraAccessToggle
>>> > Warning:  Could not resolve keysym XF86NextElement
>>> > Warning:  Could not resolve keysym XF86PreviousElement
>>> > Warning:  Could not resolve keysym XF86AutopilotEngageToggle
>>> > Warning:  Could not resolve keysym XF86MarkWaypoint
>>> > Warning:  Could not resolve keysym XF86Sos
>>> > Warning:  Could not resolve keysym XF86NavChart
>>> > Warning:  Could not resolve keysym XF86FishingChart
>>> > Warning:  Could not resolve keysym XF86SingleRangeRadar
>>> > Warning:  Could not resolve keysym XF86DualRangeRadar
>>> > Warning:  Could not resolve keysym XF86RadarOverlay
>>> > Warning:  Could not resolve keysym XF86TraditionalSonar
>>> > Warning:  Could not resolve keysym XF86ClearvuSonar
>>> > Warning:  Could not resolve keysym XF86SidevuSonar
>>> > Warning:  Could not resolve keysym XF86NavInfo
>>> Errors from xkbcomp are not fatal to the X server
>>>
>>> jamessimmons@unknownF4390913EB01:~$ DISPLAY=:5 dbus-run-session
>>> gnome-shell &
>>> [2] 330078
>>> jamessimmons@unknownF4390913EB01:~$ dbus-daemon[330082]: [session
>>> uid=1000 pid=330082] Activating service name='org.gtk.vfs.Daemon' requested
>>> by ':1.0' (uid=1000 pid=330084 comm="gnome-shell"
>>> label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
>>> dbus-daemon[330082]: [session uid=1000 pid=330082] Successfully
>>> activated service 'org.gtk.vfs.Daemon'
>>>
>>>
>>>
>>> *fusermount3: failed to access mountpoint /run/user/1000/gvfs:
>>> Permission deniedlibmutter-Message: 12:01:54.089: Running GNOME Shell
>>> (using mutter 45.4) as a Wayland display serverFailed to setup: Could not
>>> take control: GDBus.Error:System.Error.EBUSY: Device or resource busyA
>>> connection to the bus can't be made*
>>>
>>> Does this suggest anything to anyone?
>>>
>>> Thanks. And also thanks for putting up with me venting on this stuff.
>>>
>>> James Simmons
>>>
>>>
>>> ___
>>> Sugar-devel mailing list
>>> Sugar-devel@lists.sugarlabs.org
>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>
>>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Still trying to get sugar-runner working

2024-03-12 Thread James Simmons
Ibiam,

That's a good idea. I'll try it tonight. I saw the word "Wayland" in the
messages but had no idea what it meant.

James Simmons


On Tue, Mar 12, 2024 at 7:29 AM Chihurumnaya Ibiam 
wrote:

> Maybe Xephyr on Wayland has issues, Sugar doesn't have support for Wayland
> yet and maybe that's why sugar-commander
> couldn't work, test sugar-commander on x11 and see if you encounter same
> issues - Xephyr too -.
>
> --
>
> Ibiam Chihurumnaya
> ib...@sugarlabs.org
>
>
>
> On Mon, Mar 11, 2024 at 7:19 PM James Simmons  wrote:
>
>> I haven't had any luck getting sugar-runner working so I thought I'd try
>> just getting Xephyr working by itself and see what I could learn that way.
>>
>> I found this tutorial on YouTube:
>>
>> https://www.youtube.com/watch?v=ECHH2JFA8SM
>>
>> So I tried it out. The Xephr window came up, but gnome-shell failed with
>> these messages:
>>
>> jamessimmons@unknownF4390913EB01:~$ Xephyr :5 -ac -br -noreset -screen
>> 800x600 -dpi 96 &
>> [1] 330048
>> jamessimmons@unknownF4390913EB01:~$ The XKEYBOARD keymap compiler
>> (xkbcomp) reports:
>> > Warning:  Could not resolve keysym XF86CameraAccessEnable
>> > Warning:  Could not resolve keysym XF86CameraAccessDisable
>> > Warning:  Could not resolve keysym XF86CameraAccessToggle
>> > Warning:  Could not resolve keysym XF86NextElement
>> > Warning:  Could not resolve keysym XF86PreviousElement
>> > Warning:  Could not resolve keysym XF86AutopilotEngageToggle
>> > Warning:  Could not resolve keysym XF86MarkWaypoint
>> > Warning:  Could not resolve keysym XF86Sos
>> > Warning:  Could not resolve keysym XF86NavChart
>> > Warning:  Could not resolve keysym XF86FishingChart
>> > Warning:  Could not resolve keysym XF86SingleRangeRadar
>> > Warning:  Could not resolve keysym XF86DualRangeRadar
>> > Warning:  Could not resolve keysym XF86RadarOverlay
>> > Warning:  Could not resolve keysym XF86TraditionalSonar
>> > Warning:  Could not resolve keysym XF86ClearvuSonar
>> > Warning:  Could not resolve keysym XF86SidevuSonar
>> > Warning:  Could not resolve keysym XF86NavInfo
>> Errors from xkbcomp are not fatal to the X server
>>
>> jamessimmons@unknownF4390913EB01:~$ DISPLAY=:5 dbus-run-session
>> gnome-shell &
>> [2] 330078
>> jamessimmons@unknownF4390913EB01:~$ dbus-daemon[330082]: [session
>> uid=1000 pid=330082] Activating service name='org.gtk.vfs.Daemon' requested
>> by ':1.0' (uid=1000 pid=330084 comm="gnome-shell"
>> label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
>> dbus-daemon[330082]: [session uid=1000 pid=330082] Successfully activated
>> service 'org.gtk.vfs.Daemon'
>>
>>
>>
>> *fusermount3: failed to access mountpoint /run/user/1000/gvfs: Permission
>> deniedlibmutter-Message: 12:01:54.089: Running GNOME Shell (using mutter
>> 45.4) as a Wayland display serverFailed to setup: Could not take control:
>> GDBus.Error:System.Error.EBUSY: Device or resource busyA connection to the
>> bus can't be made*
>>
>> Does this suggest anything to anyone?
>>
>> Thanks. And also thanks for putting up with me venting on this stuff.
>>
>> James Simmons
>>
>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Still trying to get sugar-runner working

2024-03-11 Thread James Simmons
I haven't had any luck getting sugar-runner working so I thought I'd try
just getting Xephyr working by itself and see what I could learn that way.

I found this tutorial on YouTube:

https://www.youtube.com/watch?v=ECHH2JFA8SM

So I tried it out. The Xephr window came up, but gnome-shell failed with
these messages:

jamessimmons@unknownF4390913EB01:~$ Xephyr :5 -ac -br -noreset -screen
800x600 -dpi 96 &
[1] 330048
jamessimmons@unknownF4390913EB01:~$ The XKEYBOARD keymap compiler (xkbcomp)
reports:
> Warning:  Could not resolve keysym XF86CameraAccessEnable
> Warning:  Could not resolve keysym XF86CameraAccessDisable
> Warning:  Could not resolve keysym XF86CameraAccessToggle
> Warning:  Could not resolve keysym XF86NextElement
> Warning:  Could not resolve keysym XF86PreviousElement
> Warning:  Could not resolve keysym XF86AutopilotEngageToggle
> Warning:  Could not resolve keysym XF86MarkWaypoint
> Warning:  Could not resolve keysym XF86Sos
> Warning:  Could not resolve keysym XF86NavChart
> Warning:  Could not resolve keysym XF86FishingChart
> Warning:  Could not resolve keysym XF86SingleRangeRadar
> Warning:  Could not resolve keysym XF86DualRangeRadar
> Warning:  Could not resolve keysym XF86RadarOverlay
> Warning:  Could not resolve keysym XF86TraditionalSonar
> Warning:  Could not resolve keysym XF86ClearvuSonar
> Warning:  Could not resolve keysym XF86SidevuSonar
> Warning:  Could not resolve keysym XF86NavInfo
Errors from xkbcomp are not fatal to the X server

jamessimmons@unknownF4390913EB01:~$ DISPLAY=:5 dbus-run-session gnome-shell
&
[2] 330078
jamessimmons@unknownF4390913EB01:~$ dbus-daemon[330082]: [session uid=1000
pid=330082] Activating service name='org.gtk.vfs.Daemon' requested by
':1.0' (uid=1000 pid=330084 comm="gnome-shell"
label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
dbus-daemon[330082]: [session uid=1000 pid=330082] Successfully activated
service 'org.gtk.vfs.Daemon'



*fusermount3: failed to access mountpoint /run/user/1000/gvfs: Permission
deniedlibmutter-Message: 12:01:54.089: Running GNOME Shell (using mutter
45.4) as a Wayland display serverFailed to setup: Could not take control:
GDBus.Error:System.Error.EBUSY: Device or resource busyA connection to the
bus can't be made*

Does this suggest anything to anyone?

Thanks. And also thanks for putting up with me venting on this stuff.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Sugar Commander release checklist

2024-03-10 Thread James Simmons
I did a simple update of this Activity to make it run under Python 3.

Checklist - maintainer

* check version of latest tarball release in
download.sugarlabs.org/sources/sucrose/fructose/ or
download.sugarlabs.org/sources/honey/,

No tarball release for this Activity.

* check for a release version git tag, e.g. v34,

There were no Git tags seen for this Activity

*  correlate with activity_version metadata in activity/activity.info,

Updated to version 11.

*  look for commits after any of these, in either;
master branch of repository at sugarlabs,
any other branches,
any other forks,
orphaned repositories with the same bundle_id value, using GitHub
or Google Search,
deprecated repositories at git.sugarlabs.org,

Nothing like this found.

* review and merge all pull requests,

No other pull requests.

* apply all desired commits, making pull requests if review is needed,

Done. I made a new branch for the PR for release notes.

* apply any translate.sugarlabs.org changes, e.g. using a download script,
if there is a po/*.pot file, regenerate using python setup.py genpot,
review the changes, and commit,
notify our translation-community manager @leonardcj if the POT file
changes contain new or changed strings,

No translated strings were affected by this update.

* update the README.md file if necessary,

Not needed. No changes in functionality.

* write release notes for the NEWS file, change the activity_version
metadata in activity/activity.info, commit, and git tag the version,

Done

* update the activity documentation in the help-activity repository,

Not needed. The Activity works the same as it always did.

* for activities that include a tarball release, or where Fedora or Debian
packages may be made, create a tarball using python setup.py dist_source,
and upload tarball to download.sugarlabs.org using shell account,

I have no such account. I don't do enough Activity development to
justify having one.

* create bundle using python setup.py dist_xo, and test that it can be
installed by Browse,

I have not tested this.

* rebase any other maintained branches or pull requests, such as those for
past or future versions of Python, or past releases of Fedora, Ubuntu or
libraries.

No other pull requests.

* for Python 3 Activities, copy the bundle to ~activities-v4/bundles,
remove any other old versions of the bundle from ~activities-v4/bundles,
and trigger a rebuild of the static site using rebuild-aslo command, verify
if your bundle is visible on https://v4.activities.sugarlabs.org . For more
information, it is recommended to take a look at the Activities4 wiki page

   I don't think this is something I have the ability to do.

Thanks,

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Read Activity release checklist

2024-03-10 Thread James Simmons
I would like to release a new version of the Read Activity containing a bug
fix needed so the Activity can start under Fedora 39:

Checklist - maintainer

* check version of latest tarball release in
download.sugarlabs.org/sources/sucrose/fructose/ or
download.sugarlabs.org/sources/honey/,

Latest version is 123.

* check for a release version git tag, e.g. v34,

There were no Git tags seen for this Activity

*  correlate with activity_version metadata in activity/activity.info,

Updated to version 124

*  look for commits after any of these, in either;
master branch of repository at sugarlabs,
any other branches,
any other forks,
orphaned repositories with the same bundle_id value, using GitHub
or Google Search,
deprecated repositories at git.sugarlabs.org,

Nothing like this found.

* review and merge all pull requests,

I looked at the one other pull request. It isn't clear to me what it's
doing. I was created
back in 2020 and never applied.

* apply all desired commits, making pull requests if review is needed,

Done. I made a new branch for the PR for release notes.

* apply any translate.sugarlabs.org changes, e.g. using a download script,
if there is a po/*.pot file, regenerate using python setup.py genpot,
review the changes, and commit,
notify our translation-community manager @leonardcj if the POT file
changes contain new or changed
strings,

No translated strings were affected by this update.

* update the README.md file if necessary,

Not needed. No changes in functionality.

* write release notes for the NEWS file, change the activity_version
metadata in activity/activity.info, commit, and git tag the version,

Done

* update the activity documentation in the help-activity repository,

Not needed. The Activity works the same as it always did.

* for activities that include a tarball release, or where Fedora or Debian
packages may be made, create a tarball using python setup.py dist_source,
and upload tarball to download.sugarlabs.org using shell account,

I have no such account. I don't do enough Activity development to
justify having one.

* create bundle using python setup.py dist_xo, and test that it can be
installed by Browse,

I have not tested this.

* rebase any other maintained branches or pull requests, such as those for
past or future versions of Python, or past releases of Fedora, Ubuntu or
libraries.

The other pull request appears to be abandoned. It could be closed.

* for Python 3 Activities, copy the bundle to ~activities-v4/bundles,
remove any other old versions of the bundle from ~activities-v4/bundles,
and trigger a rebuild of the static site using rebuild-aslo command, verify
if your bundle is visible on https://v4.activities.sugarlabs.org . For more
information, it is recommended to take a look at the Activities4 wiki page

   I don't think this is something I have the ability to do.

Thanks,

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Get Books ready to release

2024-03-09 Thread James Simmons
Here is my checklist for Get Books Activity:

Checklist - maintainer

* check version of latest tarball release in
download.sugarlabs.org/sources/sucrose/fructose/ or
download.sugarlabs.org/sources/honey/,

Latest version is 19.

* check for a release version git tag, e.g. v34,

There are no Git tags for this Activity

*  correlate with activity_version metadata in activity/activity.info,

Updated to version 20

*  look for commits after any of these, in either;
master branch of repository at sugarlabs,
any other branches,
any other forks,
orphaned repositories with the same bundle_id value, using GitHub
or Google Search,
deprecated repositories at git.sugarlabs.org,

Nothing like this found.

* review and merge all pull requests,

I looked at the other pull requests. There were two that attempted to
make the application\
work under Python 3. They ran into the same problems with feedparser.py
and Python 3 not having
sgmllib that I did. I fixed those problems by using a later version
(but not current) version
of feedparser that included its own version of sgmllib.

* apply all desired commits, making pull requests if review is needed,

Done

* apply any translate.sugarlabs.org changes, e.g. using a download script,
if there is a po/*.pot file, regenerate using python setup.py genpot,
review the changes, and commit,
notify our translation-community manager @leonardcj if the POT file
changes contain new or changed
strings,

No translated strings were affected by this update.

* update the README.md file if necessary,

Just did that. *This required a second pull request as the first was
already done.*

* write release notes for the NEWS file, change the activity_version
metadata in activity/activity.info, commit, and git tag the version,

Done

* update the activity documentation in the help-activity repository,

Not needed. The Activity works the same as it always did.

* for activities that include a tarball release, or where Fedora or Debian
packages may be made, create a tarball using python setup.py dist_source,
and upload tarball to download.sugarlabs.org using shell account,

   * I have no such account.*

* create bundle using python setup.py dist_xo, and test that it can be
installed by Browse,

   * I have not tested this.*

* rebase any other maintained branches or pull requests, such as those for
past or future versions of Python, or past releases of Fedora, Ubuntu or
libraries.

*The other pull requests appear to be abandoned. They could be closed.*

* for Python 3 Activities, copy the bundle to ~activities-v4/bundles,
remove any other old versions of the bundle from ~activities-v4/bundles,
and trigger a rebuild of the static site using rebuild-aslo command, verify
if your bundle is visible on https://v4.activities.sugarlabs.org . For more
information, it is recommended to take a look at the Activities4 wiki page

   *I don't think this is something I have the ability to do.*

I will make similar lists for the Read Activity (minor bug fix),
GetIABooks, and Sugar Commander when I have time.

Thanks.

James Simmons


On Sat, Mar 9, 2024 at 2:04 PM James Cameron  wrote:

> Thanks.  I've merged.
>
> Steps for releasing are at
>
> https://github.com/sugarlabs/sugar-docs/blob/master/src/contributing.md#checklist---maintainer
>
> Skip any you feel are not helpful.
>
> Tell us of any you can't or won't proceed with.
>
> On Sat, Mar 09, 2024 at 10:20:19AM -0600, James Simmons wrote:
> > I have a pull request for the Get Books Activity ready to review.
> >
> > Feedbooks is going out of business, so only Internet Archive is
> supported. I
> > investigated several other OPDS feeds but they all had issues. The
> Activity
> > runs under Python 3 now.
> >
> > I think this is ready to release.
> >
> > James Simmons
> >
>
> > ___
> > Sugar-devel mailing list
> > Sugar-devel@lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Get Books ready to release

2024-03-09 Thread James Simmons
I have a pull request for the Get Books Activity ready to review.

Feedbooks is going out of business, so only Internet Archive is supported.
I investigated several other OPDS feeds but they all had issues. The
Activity runs under Python 3 now.

I think this is ready to release.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Get Books pull request ready to go

2024-03-09 Thread James Simmons
I got the Get Books activity working pretty well. It only supports the
Internet Archive at the moment, because Feedbooks is going out of business
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Some thoughts on GetBooks activity

2024-03-06 Thread James Simmons
I tried updating feedparser.py with a later version that still fits in two
files. It looks like the developers made some attempt to get it working
with Python 3 but did not finish it. I spent a couple of hours with it and
it looks like it's working. I can browse OPDS feeds now. That's the good
news.

The bad news is it looks like the OPDS feeds for Feedbooks don't exist
anymore and in a month or so Feedbooks itself won't exist. I'm looking into
alternative feeds.

The Internet Archive feeds work. I'm thinking of getting rid of one. It is
supposed to list books in alpha order. What it actually does is list out
letters of the alphabet and there appears to be no way to drill down to see
books for that letter. Even if you could do that, the lists would be too
long to be useful.

There are other lists I might add for Internet Archive. For example, there
is one for Kids books.

Clicking on a book in one of these lists should make it available for
download. That isn't working now. I'll fix it.

There is a way to list out My Books, which are books in your journal. It
looks like you can copy books from thumb drives into the Journal too. Looks
a bit like my Sugar Commander Activity.

In any case, I think I can make this Activity worth having.

James Simmons


On Tue, Mar 5, 2024 at 11:20 AM James Simmons  wrote:

> It turns out that feedparser has a version that is new enough to support
> Python 3 but old enough to fit in two files, one of which replaces sgml.py.
> I can get rid of the current files instead of trying to make them work with
> Python 3 myself. I'm going to try this tonight.
>
> It also turns out that the Activity does use OPDS for Internet Archive,
> just not for book searches. It uses it to browse catalogs like most
> downloaded, newly added, alphabetical by title, etc. So if I got that
> working we'd have a fancier Get IA Books even if Feedbooks goes away.
>
> James Simmons
>
> On Tue, Mar 5, 2024 at 10:07 AM Chihurumnaya Ibiam 
> wrote:
>
>> Agreed, activities depending on external APIs are difficult to maintain
>> and if anyone is willing to do it
>> then it can work.
>>
>> --
>>
>> Ibiam Chihurumnaya
>> ib...@sugarlabs.org
>>
>>
>>
>> On Tue, Mar 5, 2024 at 6:04 AM James Cameron  wrote:
>>
>>> Yes, I remember some of this from when I last maintained those
>>> activities.
>>>
>>> I felt that activities that depended on external APIs become difficult
>>> to maintain.  ;-)
>>>
>>> On Mon, Mar 04, 2024 at 01:46:44PM -0600, James Simmons wrote:
>>> > Back in 2009 I wrote the Get IA Books activity which uses the Advanced
>>> Search
>>> > service of the Internet Archive to search their catalog and makes it
>>> possible
>>> > to download these books to the Journal and put some metadata in there
>>> as well.
>>> >
>>> > Shortly after I finished this Sayamindu Dasgupta made a similar
>>> Activity that
>>> > used OPDS to search book catalogs. Specifically he was interested in
>>> using OPDS
>>> > to search [1]https://www.feedbooks.com, which had an OPDS server that
>>> included
>>> > public domain books. He also made it possible for the Activity user to
>>> add an
>>> > entry for his own OPDS server, but you had to edit a text file using
>>> the
>>> > Terminal activity to do it.
>>> >
>>> > I have just fixed my own Activity to work with Python 3 and wanted to
>>> try
>>> > fixing this one too. I've run into a few problems which makes me think
>>> this
>>> > Activity might not be fixable.
>>> >
>>> > 1. Feedbooks.com is going out of business very soon. It is possible
>>> that their
>>> > OPDS server is already not working: [2]
>>> https://www.feedbooks.com/catalog/
>>> > public_domain
>>> > 2. There are other ODPS servers, but not for public domain titles:
>>> [3]http://
>>> > opdshome.uo1.net/
>>> > 3. The Internet Archive has an OPDS server but this Activity doesn't
>>> use it.
>>> > Instead it adapted code from my GetIABooks activity. Apparently the IA
>>> OPDS
>>> > server had issues when this was written.
>>> > 3. The Activity makes use of code from [4]http://feedparser.org/.
>>> > Unfortunately, the latest version of this cannot be contained in just
>>> one file.
>>> > The old version depends on sgmllib.py, which was included with Python
>>> 2 but not
>>> > with 3. Somebody found the code for this and ran it through a Python 2
>>> to 

Re: [Sugar-devel] Some thoughts on GetBooks activity

2024-03-05 Thread James Simmons
It turns out that feedparser has a version that is new enough to support
Python 3 but old enough to fit in two files, one of which replaces sgml.py.
I can get rid of the current files instead of trying to make them work with
Python 3 myself. I'm going to try this tonight.

It also turns out that the Activity does use OPDS for Internet Archive,
just not for book searches. It uses it to browse catalogs like most
downloaded, newly added, alphabetical by title, etc. So if I got that
working we'd have a fancier Get IA Books even if Feedbooks goes away.

James Simmons

On Tue, Mar 5, 2024 at 10:07 AM Chihurumnaya Ibiam 
wrote:

> Agreed, activities depending on external APIs are difficult to maintain
> and if anyone is willing to do it
> then it can work.
>
> --
>
> Ibiam Chihurumnaya
> ib...@sugarlabs.org
>
>
>
> On Tue, Mar 5, 2024 at 6:04 AM James Cameron  wrote:
>
>> Yes, I remember some of this from when I last maintained those activities.
>>
>> I felt that activities that depended on external APIs become difficult to
>> maintain.  ;-)
>>
>> On Mon, Mar 04, 2024 at 01:46:44PM -0600, James Simmons wrote:
>> > Back in 2009 I wrote the Get IA Books activity which uses the Advanced
>> Search
>> > service of the Internet Archive to search their catalog and makes it
>> possible
>> > to download these books to the Journal and put some metadata in there
>> as well.
>> >
>> > Shortly after I finished this Sayamindu Dasgupta made a similar
>> Activity that
>> > used OPDS to search book catalogs. Specifically he was interested in
>> using OPDS
>> > to search [1]https://www.feedbooks.com, which had an OPDS server that
>> included
>> > public domain books. He also made it possible for the Activity user to
>> add an
>> > entry for his own OPDS server, but you had to edit a text file using the
>> > Terminal activity to do it.
>> >
>> > I have just fixed my own Activity to work with Python 3 and wanted to
>> try
>> > fixing this one too. I've run into a few problems which makes me think
>> this
>> > Activity might not be fixable.
>> >
>> > 1. Feedbooks.com is going out of business very soon. It is possible
>> that their
>> > OPDS server is already not working: [2]
>> https://www.feedbooks.com/catalog/
>> > public_domain
>> > 2. There are other ODPS servers, but not for public domain titles:
>> [3]http://
>> > opdshome.uo1.net/
>> > 3. The Internet Archive has an OPDS server but this Activity doesn't
>> use it.
>> > Instead it adapted code from my GetIABooks activity. Apparently the IA
>> OPDS
>> > server had issues when this was written.
>> > 3. The Activity makes use of code from [4]http://feedparser.org/.
>> > Unfortunately, the latest version of this cannot be contained in just
>> one file.
>> > The old version depends on sgmllib.py, which was included with Python 2
>> but not
>> > with 3. Somebody found the code for this and ran it through a Python 2
>> to 3
>> > converter. I added this to the project.
>> > 4. I managed to convert enough code in feedparser.py and sgmllib.py to
>> get the
>> > Activity to run without generating diagnostic messages. I have no idea
>> if it is
>> > actually working.
>> >
>> > Thoughts?
>> >
>> > James Simmons
>> >
>> > References:
>> >
>> > [1] https://www.feedbooks.com/
>> > [2] https://www.feedbooks.com/catalog/public_domain
>> > [3] http://opdshome.uo1.net/
>> > [4] http://feedparser.org/
>>
>> > ___
>> > Sugar-devel mailing list
>> > Sugar-devel@lists.sugarlabs.org
>> > http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Some thoughts on GetBooks activity

2024-03-04 Thread James Simmons
Back in 2009 I wrote the Get IA Books activity which uses the Advanced
Search service of the Internet Archive to search their catalog and makes it
possible to download these books to the Journal and put some metadata in
there as well.

Shortly after I finished this Sayamindu Dasgupta made a similar Activity
that used OPDS to search book catalogs. Specifically he was interested in
using OPDS to search https://www.feedbooks.com, which had an OPDS server
that included public domain books. He also made it possible for the
Activity user to add an entry for his own OPDS server, but you had to edit
a text file using the Terminal activity to do it.

I have just fixed my own Activity to work with Python 3 and wanted to try
fixing this one too. I've run into a few problems which makes me think this
Activity might not be fixable.

1. Feedbooks.com is going out of business very soon. It is possible that
their OPDS server is already not working:
https://www.feedbooks.com/catalog/public_domain
2. There are other ODPS servers, but not for public domain titles:
http://opdshome.uo1.net/
3. The Internet Archive has an OPDS server but this Activity doesn't use
it. Instead it adapted code from my GetIABooks activity. Apparently the IA
OPDS server had issues when this was written.
3. The Activity makes use of code from http://feedparser.org/.
Unfortunately, the latest version of this cannot be contained in just one
file. The old version depends on sgmllib.py, which was included with Python
2 but not with 3. Somebody found the code for this and ran it through a
Python 2 to 3 converter. I added this to the project.
4. I managed to convert enough code in feedparser.py and sgmllib.py to get
the Activity to run without generating diagnostic messages. I have no idea
if it is actually working.

Thoughts?

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Progress on getting sugar-runner working again

2024-03-03 Thread James Simmons
James,

I didn't understand the purpose in forking before but now I do. A new fork
with my changes in a branch is here:

https://github.com/jdsimmons/sugar-runner/tree/python3

I updated the README with suggestions on how to test.

I just tried:

sugar-activity3 GetIABooksActivity.GetIABooksActivity

and it worked. I had no idea it would. I haven't worked on Sugar Activities
since 2014. After I wrote E-Book Enlightenment I went down a rabbit hole
where I prepared lots of books for archive,org and Project Gutenberg, wrote
and self published a memoir of my youth among the Hare Krishnas, figured
out how to use LaTeX to bring public domain books back into print and self
published a bunch of them until Amazon put a stop to it, and even started a
novel.

I would have stayed in that rabbit hole if a bright eight year old boy had
not decided that he wanted an old computer running Linux I had intended to
give to his older brothers.

As for why I still want to get sugar-runner working, it is because it gives
me the whole Sugar environment. After I use Get IA Books to download books
I need to check the books out in the Journal and make sure they got in
there OK and are readable. Activities using collaboration really need the
whole environment working and making screenshots that look like what the
Activity looks like on an XO laptop is easy with sugar-runner.

Thanks again,

James Simmons

On Sat, Mar 2, 2024 at 11:45 PM James Cameron  wrote:

> On Sat, Mar 02, 2024 at 08:14:20PM -0600, James Simmons wrote:
> > [...]
> > If someone wants to try this out I could post a branch with my
> > changes to GitHub if I was given needed permissions to do so.
> >
> > For now, I'm stuck.
>
> Fork the repository, push your branch to your fork, then create a pull
> request with details on how to try it out.
>
> Also, I'm curious, what does Sugar Runner get you that running
> "sugar-activity3" doesn't get you?
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Progress on getting sugar-runner working again

2024-03-02 Thread James Simmons
When I used to work on Sugar Activities I made use of sugar-runner (then
called sugar-emulator) and I was disappointed to find out it was not
included in Fedora 39 and was no longer maintained.

I have been fooling with this and while I haven't got it working yet I feel
like I've made some progress, which I'd like to share with you.

The code is in this repo:

https://github.com/sugarlabs/sugar-runner

To build it you need to do autogen.sh, then make, then sudo make install.
There is a directory "scripts" which has four Python scripts (although the
files do not end in .py) and you need to convert them from Python 2 to
Python 3. There is an online utility to do this which can be used as a
starting point.

There is also a "lib" directory containing C code. I believe that this code
and the Makefile that builds and installs it does not need to be modified.
However, when you do sudo make install it will put the files in /usr/local
directories which Python 3 will need help to find:

export GI_TYPELIB_PATH=/usr/local/lib/girepository-1.0
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

These two commands run before sugar-runner seem to do the trick.

You will also need to install Xephyr:

sudo dnf install Xephyr

After you do this, sugar-runner will report a few places where your Python
2 code needs to be changed to Python 3. One of these is a complaint that
you are using strings when you should be using bytes. This is caused by a
difference in the way that Python reads files. Python 2 reads bytes by
default, Python 3 reads UTF-8 strings.

You can fix this by opening files as 'rb' and converting strings to bytes
using the .decode() method.  I'm pretty sure about the first one, not as
much about the second.

After all this when you run sugar-runner you get this:

sugar-runner
WARNING: Running setxkbmap against an Xwayland server

The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:  Could not resolve keysym XF86CameraAccessEnable
> Warning:  Could not resolve keysym XF86CameraAccessDisable
> Warning:  Could not resolve keysym XF86CameraAccessToggle
> Warning:  Could not resolve keysym XF86NextElement

.. a bunch of warnings ...

No symbols defined for  (keycode 217)
No symbols defined for  (keycode 219)
No symbols defined for  (keycode 222)
No symbols defined for  (keycode 230)
No symbols defined for  (keycode 248)
discover_other_daemon: 1xinit: connection to X server lost

waiting for X server to shut down

The screen goes black for a moment and then you're back to the terminal. So
it looks like Xephyr is at least trying to start.

If someone wants to try this out I could post a branch with my changes to
GitHub if I was given needed permissions to do so.

For now, I'm stuck.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] getiabooks ready to release, I'd like to be a contributor for sugar commander

2024-02-27 Thread James Simmons
I managed to make getiabooks work pretty well on Python3 and fix a bug
where the book list table was disabled during downloads and not
re-enabled if the download failed. I also got rid of some cruft where the
Activity supported two different versions of the toolbar. The only thing I
was unable to fix was getting the Activity to stop saving Journal entries
for itself when it closes. I had code to prevent that which does not work
anymore.

In any case, it is an improvement over the broken current version and can
be published, in my opinion.

I also managed to get my Activity sugar-commander working with Python 3 but
I would need to be a contributor to update that repository,

I may try to update the Get Books Activity when I have time. It is
currently broken. I won't ask for contributor access until I have something
to release.

I have not done any Activity maintenance for years, but I got back into it
because I had an old desktop computer running Fedora 39 to give away and a
bright eight year old boy who wanted it. He came by on Friday to pick it
up. I think he was impressed.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Advice needed on sugar-runner

2024-02-20 Thread James Simmons
James,

I've been reading about GObject Introspection and I think you've put me on
the right track. I'll let everyone know if I get it working. My more
immediate goal is to fix a minor bug in Get IA Books so I can publish it,
so I won't be looking at sugar-runner for a while.

Thanks again,

James Simmons


On Mon, Feb 19, 2024 at 6:07 PM James Cameron  wrote:

> I'll speculate.  Perhaps something changed in how GObject introspection
> packages are built and installed between the time that sugar-runner and
> sugar-toolkit-gtk3 were both supported, and the time now.  If so, then
> commits that change Makefile.am in sugar-toolkit-gtk3 may explain.
>
> To not speculate, use strace -f on the sugar-toolkit-gtk3 build steps to
> find out when and why the SugarExt typelib is installed, figure out what
> source file is responsible, then deduce how to make similar effect on
> sugar-runner.
>
> Hope that helps!
>
> On Mon, Feb 19, 2024 at 04:50:44PM -0600, James Simmons wrote:
> > James,
> >
> > I am a novice with Make. I did look at the Make files for sugar-runner
> and I
> > found that Makefile.in had some lines reported as Bad directive:
> >
> > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/
> > libsugarrunner_la-sugar-runner-window.Plo@am__quote@ #
> am--include-marker
> >
> > @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/
> > libsugarrunner_la-sugar-runner.Plo@am__quote@ # am--include-marker
> >
> > $(am__depfiles_remade):
> >
> > @$(MKDIR_P) $(@D)
> >
> > @echo '# dummy' >$@-t && $(am__mv) $@-t $@
> >
> > am--depfiles: $(am__depfiles_remade)
> >
> > .c.o:
> >
> > @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF
> $(DEPDIR)/$*.Tpo
> > -c -o $@ $<
> >
> > @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo
> $(DEPDIR)/$*.Po
> >
> > @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@'
> libtool=no
> > @AMDEPBACKSLASH@
> >
> > @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE)
> $(depcomp)
> > @AMDEPBACKSLASH@
> >
> > @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
> >
> > .c.obj:
> >
> > @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF
> $(DEPDIR)/$*.Tpo
> > -c -o $@ `$(CYGPATH_W) '$<'`
> >
> > @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo
> $(DEPDIR)/$*.Po
> >
> > @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@'
> libtool=no
> > @AMDEPBACKSLASH@
> >
> > @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE)
> $(depcomp)
> > @AMDEPBACKSLASH@
> >
> > @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@
> `$(CYGPATH_W) '$
> > <'`
> >
> > The ones with red underlines are the ones. The generated Makefile does
> not
> > report any errors.
> >
> > I'm going to try generating a Makefile for sugar-toolkit-gtk3 and see if
> that
> > suggests anything.
> >
> > Thanks.
> >
> > James Simmons
> >
> > On Mon, Feb 19, 2024 at 1:42 PM James Cameron <[1]qu...@laptop.org>
> wrote:
> >
> > Make sure the typelib has been installed correctly.  Perhaps the
> install
> > steps are also bit rot.
> >
> > Compare the steps against the SugarExt typelib installed by the
> > sugar-toolkit-gtk3 package.
> >
> > In particular, I seem to recall an introspection scanner step is
> required,
> > but not sure if it is part of "make install" or if it fails if the
> tool is
> > not installed.
> >
> > On Mon, Feb 19, 2024 at 09:47:36AM -0600, James Simmons wrote:
> > > I've been preparing an old computer I just replaced as a gift for a
> > bright
> > > eight year old boy and his older brother. It will run Fedora 39. In
> > addition to
> > > the XFCE environment I want to give him a Sugar environment with
> > Activities.
> > >
> > > In the process of setting this up I discovered that some of the
> > Activities I
> > > wrote years ago have succumbed to bit rot and needed updating. I
> was able
> > to do
> > > this, but I was disappointed to find that I could not use
> sugar-runner to
> > run
> > > the Sugar environment in a window because it had not been
> maintained.
> > >
> > > I thought I'd take a stab at getting sugar-runner working. I
> checked out
> > the
> > > project, installed all the depende

Re: [Sugar-devel] Advice needed on sugar-runner

2024-02-19 Thread James Simmons
James,

I am a novice with Make. I did look at the Make files for sugar-runner and
I found that Makefile.in had some lines reported as *Bad directive*:

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)
/libsugarrunner_la-sugar-runner-window.Plo@am__quote@ # am--include-marker

@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)
/libsugarrunner_la-sugar-runner.Plo@am__quote@ # am--include-marker


$(am__depfiles_remade):

@$(MKDIR_P) $(@D)

@echo '# dummy' >$@-t && $(am__mv) $@-t $@


am--depfiles: $(am__depfiles_remade)


.c.o:

@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*
.Tpo -c -o $@ $<

@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po

@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@'
libtool=no @AMDEPBACKSLASH@

@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@

@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<


.c.obj:

@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*
.Tpo -c -o $@ `$(CYGPATH_W) '$<'`

@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po

@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@'
libtool=no @AMDEPBACKSLASH@

@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp)
@AMDEPBACKSLASH@

@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W)
'$<'`


The ones with red underlines are the ones. The generated Makefile does not
report any errors.


I'm going to try generating a Makefile for sugar-toolkit-gtk3 and see if
that suggests anything.


Thanks.


James Simmons

On Mon, Feb 19, 2024 at 1:42 PM James Cameron  wrote:

> Make sure the typelib has been installed correctly.  Perhaps the install
> steps are also bit rot.
>
> Compare the steps against the SugarExt typelib installed by the
> sugar-toolkit-gtk3 package.
>
> In particular, I seem to recall an introspection scanner step is required,
> but not sure if it is part of "make install" or if it fails if the tool is
> not installed.
>
> On Mon, Feb 19, 2024 at 09:47:36AM -0600, James Simmons wrote:
> > I've been preparing an old computer I just replaced as a gift for a
> bright
> > eight year old boy and his older brother. It will run Fedora 39. In
> addition to
> > the XFCE environment I want to give him a Sugar environment with
> Activities.
> >
> > In the process of setting this up I discovered that some of the
> Activities I
> > wrote years ago have succumbed to bit rot and needed updating. I was
> able to do
> > this, but I was disappointed to find that I could not use sugar-runner
> to run
> > the Sugar environment in a window because it had not been maintained.
> >
> > I thought I'd take a stab at getting sugar-runner working. I checked out
> the
> > project, installed all the dependencies autogen.sh asked for, updated the
> > scripts to use python3, then ran what looked to be a successful make and
> sudo
> > make install. Then I tried to run
> >
> > sugar-runner
> >
> > and I got these Python errors:
> >
> > jamessimmons@unknownF4390913EB01:~$ sugar-runner
> > Traceback (most recent call last):
> >   File "/usr/local/bin/sugar-runner", line 28, in 
> > gi.require_version('SugarRunner', '1.0')
> >   File "/usr/lib64/python3.12/site-packages/gi/__init__.py", line 126, in
> > require_version
> >     raise ValueError('Namespace %s not available' % namespace)
> > ValueError: Namespace SugarRunner not available
> >
> > At this point I'm stuck. If any of you have any suggestions on how to
> proceed
> > I'd love to hear them.
> >
> > Thanks,
> >
> > James Simmons
> >
>
> > ___
> > Sugar-devel mailing list
> > Sugar-devel@lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Advice needed on sugar-runner

2024-02-19 Thread James Simmons
I've been preparing an old computer I just replaced as a gift for a bright
eight year old boy and his older brother. It will run Fedora 39. In
addition to the XFCE environment I want to give him a Sugar environment
with Activities.

In the process of setting this up I discovered that some of the Activities
I wrote years ago have succumbed to bit rot and needed updating. I was able
to do this, but I was disappointed to find that I could not use
sugar-runner to run the Sugar environment in a window because it had not
been maintained.

I thought I'd take a stab at getting sugar-runner working. I checked out
the project, installed all the dependencies autogen.sh asked for, updated
the scripts to use python3, then ran what looked to be a successful make
and sudo make install. Then I tried to run

sugar-runner

and I got these Python errors:

jamessimmons@unknownF4390913EB01:~$ sugar-runner
Traceback (most recent call last):
  File "/usr/local/bin/sugar-runner", line 28, in 
gi.require_version('SugarRunner', '1.0')
  File "/usr/lib64/python3.12/site-packages/gi/__init__.py", line 126, in
require_version
raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace SugarRunner not available

At this point I'm stuck. If any of you have any suggestions on how to
proceed I'd love to hear them.

Thanks,

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] I think I need push access in GitHub for some Sugar Activities

2024-02-16 Thread James Simmons
It turned out to be fairly simple to fix the Read Activity. It was
complaining that it had no MICRO_VERSION attribute in the EvinceDocument
object, so I just removed it from the _validate_min_version() method in
evinceadapter.py:

def update_toc(self, activity):

if self._validate_min_version(3, 5):

# check version because does not work and crash with older evince

doc = self._model.get_document()

if not doc.has_document_links():

logging.error('The pdf file does not have a index')

return False

else:

self._job_links = EvinceView.JobLinks.new(document=doc)

self._job_links.connect('finished', self.__index_loaded_cb,

activity)

EvinceView.Job.scheduler_push_job(

self._job_links,

EvinceView.JobPriority.PRIORITY_NONE)

return True

else:

return False


def handle_link(self, link):

self._view.handle_link(link)


def _validate_min_version(self, major, minor):

"""

Check if Evince version is at major or equal than the requested

"""

evince_version = [EvinceDocument.MAJOR_VERSION,

EvinceDocument.MINOR_VERSION]

return evince_version >= [major, minor]


Now it works.


I was getting the same error from the version of Read Activity that shipped
with Fedora 39.


I made a pull request for Get IA Books. It looks like I can do the merge
myself. Not sure of what the procedure is to get the revised Activity
published.


James Simmons




On Fri, Feb 16, 2024 at 5:47 PM James Cameron  wrote:

> Thanks.  What about the activity provided by Fedora 39?
>
> On Fri, Feb 16, 2024 at 05:28:35PM -0600, James Simmons wrote:
> > I just confirmed that the master branch of the Read Activity has this
> problem
> > with Evince when running on Fedora 39:
> >
> > Traceback (most recent call last):
> >   File "/usr/bin/sugar-activity3", line 5, in 
> > activityinstance.main()
> >   File
> "/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py",
> > line 230, in main
> > instance = create_activity_instance(activity_constructor,
> activity_handle)
> >
>  ^^^
> >   File
> "/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py",
> > line 59, in create_activity_instance
> > activity = constructor(handle)
> >^^^
> >   File "/home/jamessimmons/git/read-activity/readactivity.py", line 374,
> in
> > __init__
> > self.read_file(self._jobject.file_path)
> >   File "/home/jamessimmons/git/read-activity/readactivity.py", line 747,
> in
> > read_file
> > self._load_document('file://' + tempfile)
> >   File "/home/jamessimmons/git/read-activity/readactivity.py", line
> 1054, in
> > _load_document
> > self._update_toc()
> >   File "/home/jamessimmons/git/read-activity/readactivity.py", line 627,
> in
> > _update_toc
> > if self._view.update_toc(self):
> >^^^
> >   File "/home/jamessimmons/git/read-activity/evinceadapter.py", line
> 275, in
> > update_toc
> > if self._validate_min_version(3, 5, 92):
> >
> >   File "/home/jamessimmons/git/read-activity/evinceadapter.py", line
> 301, in
> > _validate_min_version
> > EvinceDocument.MICRO_VERSION]
> > 
> >   File "/usr/lib64/python3.12/site-packages/gi/module.py", line 126, in
> > __getattr__
> > raise AttributeError("%r object has no attribute %r" % (
> > AttributeError: 'gi.repository.EvinceDocument' object has no attribute
> > 'MICRO_VERSION'. Did you mean: 'MINOR_VERSION'?
> > Exited with status 1, pid 106639 activity_id
> > 37db76336c5474c61078f525c28c1f9de48fab9a
> >
> > James Simmons
> >
> > On Fri, Feb 16, 2024 at 4:09 PM James Simmons <[1]nices...@gmail.com>
> wrote:
> >
> > James,
> >
> > I'm using Fedora 39, a fresh install on a computer I just got and an
> older
> > one I'm giving away. I'm using the version of Read that ships with
> Fedora.
> > I just checked out the master branch of Read from Git and could run a
> > python 3 setup.py dev on it to see if that version has the problem.
> I won't
> > be able to do that right away, but when I do I'll let you know if it
> works.
> >
> > James Simmons
> >
> > On Fri, Feb 16, 2024 at 3:42 PM James Cameron <[2]qu...@laptop.org>
> wrote:
> >
> > That's surprising.  Thought we fixed that.
> >
> > What Linux distribution and release are you 

Re: [Sugar-devel] I think I need push access in GitHub for some Sugar Activities

2024-02-16 Thread James Simmons
I just confirmed that the master branch of the Read Activity has this
problem with Evince when running on Fedora 39:

Traceback (most recent call last):
  File "/usr/bin/sugar-activity3", line 5, in 
activityinstance.main()
  File
"/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py",
line 230, in main
instance = create_activity_instance(activity_constructor,
activity_handle)

 ^^^
  File
"/usr/lib/python3.12/site-packages/sugar3/activity/activityinstance.py",
line 59, in create_activity_instance
activity = constructor(handle)
   ^^^
  File "/home/jamessimmons/git/read-activity/readactivity.py", line 374, in
__init__
self.read_file(self._jobject.file_path)
  File "/home/jamessimmons/git/read-activity/readactivity.py", line 747, in
read_file
self._load_document('file://' + tempfile)
  File "/home/jamessimmons/git/read-activity/readactivity.py", line 1054,
in _load_document
self._update_toc()
  File "/home/jamessimmons/git/read-activity/readactivity.py", line 627, in
_update_toc
if self._view.update_toc(self):
   ^^^
  File "/home/jamessimmons/git/read-activity/evinceadapter.py", line 275,
in update_toc
if self._validate_min_version(3, 5, 92):
   
  File "/home/jamessimmons/git/read-activity/evinceadapter.py", line 301,
in _validate_min_version
EvinceDocument.MICRO_VERSION]

  File "/usr/lib64/python3.12/site-packages/gi/module.py", line 126, in
__getattr__
raise AttributeError("%r object has no attribute %r" % (
AttributeError: 'gi.repository.EvinceDocument' object has no attribute
'MICRO_VERSION'. Did you mean: 'MINOR_VERSION'?
Exited with status 1, pid 106639 activity_id
37db76336c5474c61078f525c28c1f9de48fab9a

James Simmons

On Fri, Feb 16, 2024 at 4:09 PM James Simmons  wrote:

> James,
>
> I'm using Fedora 39, a fresh install on a computer I just got and an older
> one I'm giving away. I'm using the version of Read that ships with Fedora.
> I just checked out the master branch of Read from Git and could run a
> python 3 setup.py dev on it to see if that version has the problem. I won't
> be able to do that right away, but when I do I'll let you know if it works.
>
> James Simmons
>
> On Fri, Feb 16, 2024 at 3:42 PM James Cameron  wrote:
>
>> That's surprising.  Thought we fixed that.
>>
>> What Linux distribution and release are you doing this on?
>>
>> On Fri, Feb 16, 2024 at 02:23:11PM -0600, James Simmons wrote:
>> > James,
>> >
>> > I don't want to use Evince as part of Get IA Books. It is the Read
>> Activity
>> > itself that has a problem.
>> >
>> > When I tested opening books from the Journal the Read Activity would
>> not start.
>> > I thought the problem might be in the way Get IA Books was adding books
>> to the
>> > Journal, so as a sanity check I used the Browse activity to download
>> some PDFs
>> > to the Journal and also downloaded one EPUB. The Read Activity opened
>> the EPUB
>> > just fine but not the PDFs. There was a stack trace (copied to an
>> earlier
>> > email) that made it look like the code Evince needs to interface with
>> Python
>> > has changed. It was complaining about an Evince micro version number.
>> That was
>> > the thing I wanted to look at in the Read Activity.
>> >
>> > I'll probably send an email to the wider group explaining the issue.
>> >
>> > Thanks.
>> >
>> > James Simmons
>> >
>> > On Fri, Feb 16, 2024 at 2:01 PM James Cameron <[1]qu...@laptop.org>
>> wrote:
>> >
>> > There's also VScode and GitHub desktop if you want to try other
>> > methods.  It is difficult to keep up with GitHub's security posture
>> > lately.
>> >
>> > The Read activity has the integration with Evince.  If you want your
>> > activity to show PDF inside it, rather than activate Read, then
>> borrow
>> > code from Read.
>> >
>> > By the way, you're using our membership team alias, which is just
>> > Alex, myself, and Ibiam.  If you'd like wider and public readership,
>> > there's the sugar-devel@ mailing list.
>> >
>> > [2]http://lists.sugarlabs.org/listinfo/sugar-devel
>> >
>> > On Fri, Feb 16, 2024 at 08:03:20AM -0600, James Simmons wrote:
>> > > Ibiam,
>> > >
>> > > I think the probl

Re: [Sugar-devel] Porting task - Can we use Mac OS and Virtual Box ?

2019-12-18 Thread James Simmons
Abhay,

The Floss manual for *Make Your Own Sugar Activities!* is a bit out of
date, but does have some thoughts on setting up a development environment,
including using Virtual Box:

http://write.flossmanuals.net/make-your-own-sugar-activities/setting-up-a-development-environment/


It also recommends what I do, which is to get a cheap reconditioned
computer and put Linux on that. It doesn't take much hardware to develop
Sugar activities. There are also suggestions for development tools.

James Simmons

On Wed, Dec 18, 2019 at 1:43 PM James Cameron  wrote:

> G'day,
>
> Thanks for asking.  Your scenario is familiar.  Yes, in your situation
> you must use a virtualisation software, such as Parallels, vmWare, or
> VirtualBox.
>
> Then, for our Port to Python 3 tasks, the only viable choice is to
> install our Sugar Live Build into a virtual machine.
>
> You can iterate through this until comfortable;
>
> 1.  install the first or next virtualisation software; most of us
> would use VirtualBox, but there are other choices,
>
> 2.  create a virtual machine, connect the virtual CD drive to the
> ISO9660 image of Sugar Live Build, and start the virtual machine,
>
> 3.  at the prompt, select the default, and this will run the guest
> operating system in a way that does not make any permanent change to
> the virtual machine disk; then test the features of Sugar as you will
> find in our documentation https://help.sugarlabs.org/ ... when this is
> complete just turn off the virtual machine.
>
> 4.  start the virtual machine again with the Sugar Live Build image,
> and this time select an installation option, then go through the
> guided installation process, and when it is complete eject the virtual
> CD and reboot; this will run the guest operating system from a virtual
> disk, and any changes you make are kept.  To restart this step, you
> can just turn off the virtual machine.
>
> 5.  install an integrated development environment on your macOS
> system, one that supports Python and editing over SSH.  (I don't have
> any specific recommendations, and can't suggest you use what I use,
> because of the extra knowledge required to use it.  emacs and magit.)
>
> 6.  set up inbound SSH on the virtual machine, e.g. sudo apt install
> openssh-server,
>
> 7.  connect from a macOS Terminal to the virtual machine using SSH, to
> test, and for any system administration,
>
> 8.  clone sources on the virtual machine using git, test the activity
> on the virtual machine, then edit the sources over SSH using your IDE,
> test the modified activity on the virtual machine, and commit the
> changes, etc, as per the usual GitHub workflow.
>
> Hope that helps!
>
> On Wed, Dec 18, 2019 at 05:48:44PM +0530, Abhay Malik wrote:
> > Hey,
> >   After quite some time, I found out sugar runs on a different
> operating system fedora, initially to run on my Mac book air I used virtual
> box to run sugar desktop. I am successfully able to run sugar on a stick on
> my Mac.
> >
> > I asked my mom wether I can install fedora on my Mac but she said I
> can't :(
> >
> > Also It looks hard to install a different OS.
> >
> > Is there any other specific way of trying out a sugar activity from a
> code locally on my Mac machine using Mac OS and virtual box?
> >
> >
> > Thanks,
> > Abhay
> > ___
> > Sugar-devel mailing list
> > Sugar-devel@lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
>
> --
> James Cameron
> http://quozl.netrek.org/
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [sugarlabs/readetexts] [WIP] Port to sugar3.speech (#9)

2018-09-25 Thread James Simmons
Ibiam,

I wrote the original readetexts and also wrote a book which among other
things explained how it works:

http://write.flossmanuals.net/make-your-own-sugar-activities/adding-text-to-speech/

The book is way out of date and I've done nothing at all for the project
for years, but I'm still subscribed to some mailing lists. In any case,
check out the link and it might help.

I am grateful and humbled that someone is still maintaining my old
Activities.

James Simmons

On Tue, Sep 25, 2018 at 10:36 AM Ibiam Chihurumnaya <
notificati...@github.com> wrote:

> @quozl <https://github.com/quozl> changes made,
>
> You have removed word highlighting feature? That's an unfortunate
> regression.
>
> I'm yet to figure out what went wrong, before the port the highlight
> feature used speech.highlight - which was defined in speech.py - and
> assigned the highlight callback to it, I'm wondering how that worked, any
> ideas.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/sugarlabs/readetexts/pull/9#issuecomment-424390261>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AJuZYeQmYeSq6zJPSlRnoLzZkVjH4Ko0ks5uek18gaJpZM4WbU47>
> .
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Minor update to Make Your Own Sugar Activities!

2017-03-18 Thread James Simmons
Tony,

The code for the EPUB utility is here:

https://github.com/sugarlabs/ebooktools

This is the repository I set up for *E-Book Enlightenment.* The relevant
files are:

striphtml.py

and

genbook.sh

You export your manuscript as HTML with the file name input.html, then run
genbook.sh. That creates a file named TOC.xhtml that you can import into
Sigil. You would then use the "Split At Markers" menu option to split this
file into one file per chapter. If you're handy with Sigil you can make a
fully formatted EPUB with just a few clicks of the mouse.

After I wrote my two OLPC manuals I got the bug to write a bunch of other
stuff. I had a typewritten rough draft of my days in the Hare Krishna
movement which I had written 30 years before, and I used the techniques I
researched in *E-Book Enlightenment* to do OCR on the pages, then revised
it for publication as *The Life And Times Of Bhakta Jim*. After that I
wrote a novel, then started a second one. I got pretty good at publishing
things as e-book and Create Space books, and it never occurred to me that I
knew things that other authors did not until I started corresponding with a
science fiction author in Canada and found out how much she was paying
people to do things I was doing for myself. That led me to write *Format
Your Own Damned Book*:

https://www.amazon.com/Format-Your-Own-Damned-Book-ebook/dp/B06WP5N93F

This has not sold a single copy.

James Simmons


On Fri, Mar 17, 2017 at 8:24 PM, Tony Anderson <tony_ander...@usa.net>
wrote:

> Hi, James
>
> I think your code to convert html to epub could be useful. At the moment,
> my preferred scheme is to write tutorials using the Zim Wiki, then export
> them to html. However, epub files might be easier to download and to read
> with Browse. I have patched Browse so that it downloads pdf, epub, and
> plain/text files instead of streaming since the users do not have time in
> class to read them. BeautifulSoup is indeed a marvel. Much of the content
> on the school server comes from scraping websites (e.g. ASLO).
>
> I completely agree on the need to move beyond hello world (it is still the
> customary place to start). In the case of Python, Al Sweigart has written
> three books on programming for children (Invent Your Own Game in Python)
> and they have Creative Commons licenses. The style is to present a program
> and then to work through line by line explaining the code. With Pippy
> students can convert the examples to Sugar activities. Many of the programs
> are rewrites of Basic programs from David Ahl's Basic Computer Games.
>
> He has written a fourth book 'Automate the Boring Stuff with Python'.
> Sadly, the problem is how to relate these tasks with real tasks for
> students. One idea I would like to explore is to use Python to process
> Soccer records (such as World Cup). Rwanda follows the English Premier
> League very closely. Perhaps a program to update records with results of
> fixtures (games in Euro talk). The program could then try to predict who
> will survive group play or chances of a particular team reaching the
> finals. While not matching baseball for 'big data', world soccer has a lot
> including current ranks of national teams.
>
> One of my goals is to use projects to motivate learning in science,
> mathematics, language and other subjects. For example, at a conference I
> talked to a speaker about simple ways to get into computer vision. His
> professor assigned the task of putting the camera under a simple frame able
> to hold ping-pong balls. The camera is put underneath the frame and the
> program is to identify when a ping pong ball is in the frame and its color.
> Such a project is easy to understand, but far from trivial to program.
>
> Another possibility to go from lunar lander to an attempt to model the
> trajectory of a rocket. (My first computer application as an trainee was
> working with a range safety program to model what would happen if a rocket
> engine shut down prematurely and where would it land? ).
>
> Programmable robots represent a fertile opportunity to use computer vision
> and to learn the limitations of sensors and programming to meet real-time
> requirements.
>
> Possibly the most intriguing is to design a program which improves based
> on experience. I think this area is made more difficult by attempts to
> relate the algorithms to human learning. If you skip that discussion and
> get to how the program can change its behavior from experience,  it should
> be reachable. For example, could a program improve its ability to play the
> game of mastermind? Or could a program use computer vision to be able to
> play pong? (too processor intensive, but could get students into C and
> learning a lot about limitations in computer performance).
>
> As always, there is an incredi

Re: [Sugar-devel] Minor update to Make Your Own Sugar Activities!

2017-03-17 Thread James Simmons
Tony,

I strongly agree that students should be exposed to the command line and
learn all about Software Tools. The key, I think, is to give them fun
things to do that demonstrate the power of the command line. They need
something more interesting than Hello World and calculating the current
value of the thirty dollars used to buy Manhattan Island.

I've used Python and shell scripts to write a utility that converts a Word
or Libre Office document saved as HTML as an XHTML file that can be
converted into a nice EPUB using Sigil. I've got another utility that takes
an Instagram web page saved to the clipboard using Inspect Element in
Firefox and downloads all the images. (Both of these use the Beautiful Soup
library).

Whenever a student has a tedious job to do he should think about how a
shell script and some Python might do it for him.

It sounds like you've been programming computers longer than I have. Where
I work they think I knew Charles Babbage personally.

James Simmons


On Thu, Mar 16, 2017 at 9:33 PM, Tony Anderson <tony_ander...@usa.net>
wrote:

> Gonzalo,
>
> I did look at the activity. However, I think there is immense value in
> introducing learners to the Terminal activity and the nano text editor.
> Through the shell, Sugar users have access to the file system and to all of
> the power of the Unix programming environment.
>
> At the moment the tutorial shows learners how to run their program as a
> shell command (hello.py as hello in /usr/local/bin). It doesn't show how to
> interpret options and arguments, but that might be very instructive to
> develop understanding of how command line programs work. Probably, the
> tutorial should discuss pipes and how they work with programs implemented
> as filters. I still have the book - Kernighan and Pike, Unix Programming
> Environment.
>
> When James and I started programming, constructive learning (called
> on-the-job training) was the only way to learn to program. He is absolutely
> correct - in that era you learned to write the complete program. I still
> remember that IBM 1401 programs started at memory location 333 (after the
> last position used by the printer). Our notion of an IDE was to have the
> card punch near the computer (as I recall, a standard tray held 2000
> punched cards).
>
> There were libraries (punched card decks that could be added to programs)
> and own code procedures you could add to another program (e.g. a custom
> sort routine). There was even version control in punched cards (coding in
> cols 73-80) that enabled patches to be placed after a card deck that would
> overlay the earlier code at load time.
>
> Later, risc proponents were aghast that the Intel architecture segmented
> memory in 64kb segments, when at that time (8080) that was larger than the
> typical installed memory. The 64 in the Commodore 64 highlighted a design
> flaw in the Apple II that limited its memory capacity to 48kb. Apple's
> architects at the time couldn't imagine a personal computer with that much
> memory.
>
> I fondly remember mentoring a middle-school student who was programming
> the IBM 1620, a decimal machine. His only reference was the IBM system
> manual. So he programmed in machine language. I obtained an Assembler
> manual (Autocoder), but he was happy to continue programming with absolute
> addresses. One day he came with a problem. He had gotten an error: out of
> memory.  What to do - he then learned about overlays - the technique of the
> day. But how to you introduce overlays to a program written on punch cards
> using absolute addresses and machine language? Game over.
>
> In his book James talks about virtual memory beginning with the System
> 360. I would rather refer back to RPG on the 1401 which was an emulator for
> the IBM tab machines (IBM 407). It was often claimed that most of the
> cycles on the System 360 were used running RPG programs written to emulate
> tab programs (implemented by wires on a punchboard). This is an historical
> forerunner to our current effort to rewrite Sugar activities in javascript.
>
> Tony
>
>
> On 03/16/2017 11:24 PM, James Simmons wrote:
>
> Gonzalo,
>
> I looked at it maybe two years ago. I still lurk on the mailing lists for
> this project but I'm not actively developing anything, so my opinions may
> have passed their sell by date.
>
> James Simmons
>
>
> On Thu, Mar 16, 2017 at 6:33 AM, Gonzalo Odiard <godi...@gmail.com> wrote:
>
>> Have you tried Develop activity?
>>
>> http://activities.sugarlabs.org/en-US/sugar/addon/4058
>>
>> On Thu, Mar 16, 2017 at 12:32 AM, Tony Anderson < <tony_ander...@usa.net>
>> tony_ander...@usa.net> wrote:
>>
>>> James,
>>>
>>> Sugar now provides in the Journa

Re: [Sugar-devel] Minor update to Make Your Own Sugar Activities!

2017-03-16 Thread James Simmons
Gonzalo,

I looked at it maybe two years ago. I still lurk on the mailing lists for
this project but I'm not actively developing anything, so my opinions may
have passed their sell by date.

James Simmons


On Thu, Mar 16, 2017 at 6:33 AM, Gonzalo Odiard <godi...@gmail.com> wrote:

> Have you tried Develop activity?
>
> http://activities.sugarlabs.org/en-US/sugar/addon/4058
>
> On Thu, Mar 16, 2017 at 12:32 AM, Tony Anderson <tony_ander...@usa.net>
> wrote:
>
>> James,
>>
>> Sugar now provides in the Journal a link to the Documents directory.
>> This, of course, has the problem that the display does not show
>> subdirectories. I have toyed with the idea of having the tutorials use
>> Sugar Commander and the excellent gedit activity instead of the shell and
>> nano. However, at the end I believe that the Terminal activity is simple to
>> use and that learners should become familiar with the file system through
>> shell commands. The nano editor is easy to use.
>>
>> I think that a second round of tutorials introducing Sugar Commander,
>> gedit, and git could be introduced for learners already familiar with shell
>> commands and nano.
>>
>> Tony
>>
>>
>> On 03/15/2017 10:49 PM, James Simmons wrote:
>>
>> Tony,
>>
>> I own an XO laptop from the first Give One Get One promotion, so I know
>> what it can do. I've used the Terminal Activity and I wrote the Sugar
>> Commander Activity because I thought that the original design of Sugar,
>> which made your thumb drive look like the Journal, was not such a hot idea.
>> In my opinion files and directories should look like files and directories
>> and the Journal should look like the Journal. I know that some of the newer
>> XO's can switch to a GNOME desktop.
>>
>> I never tried developing Activities on an XO because I never had to. It
>> is definitely easier to do things the way I do it, and for someone living
>> in the U.S. with reliable internet it's pretty cheap. I agree that this is
>> not the case for all the students, or even most of them. It's a case of "to
>> those who have, more shall be given."
>>
>> I had the same situation when I wrote *E-Book Enlightenment*. Free
>> e-books in English are plentiful, other languages not so much. I had to
>> write chapters on making e-books, figuring out what is in the public
>> domain, photographing book pages, building a device to hold books in place
>> for being photographed, doing optical character recognition, donating books
>> to PG and archive.org, etc.
>>
>> Maybe MYOSA needs a chapter on using the XO for developing applications,
>> installing Git and using it locally, etc. My own XO has been in a drawer
>> for a couple of years.
>>
>> James Simmons
>>
>>
>> On Wed, Mar 15, 2017 at 12:46 AM, Tony Anderson <tony_ander...@usa.net>
>> wrote:
>>
>>> Hi, James
>>>
>>> If you go to activities.sugarlabs.org, you can register via the
>>> register link at the top right. This is not registration for Sugarlabs but
>>> for ASLO.
>>>
>>> As I understand the github repository, access with the ability to commit
>>> changes is closely held. The enables proposed changes to be vetted before a
>>> commit.
>>> However, the web page has a sign in link which gives limited access
>>> (create pull requests and comment on them, for example). That same two-step
>>> process is used for ASLO. The developer submits the change which puts it
>>> into a sandbox pending review.
>>>
>>> Actually Sugar has files, directories and a command shell (Terminal
>>> activity). It is relatively easy to switch activities via the Frame. I say
>>> this from several years of experience developing on the XO (easier than
>>> using usb flash keys to move code to the XO to test). The fact that Browse
>>> does not support flex and the unique XO screen makes testing on an XO
>>> essential if that is the target.
>>>
>>> The process of making changes via github to the Sugar core is certainly
>>> reasonable. However, nothing in this procedure interferes with a developer
>>> modifying and testing a change on an installed Sugar independently of the
>>> internet. Access to the internet being needed only to submit the change.
>>>
>>> The issue is not to use Sugar for everything, it is to use the available
>>> computer for everything (XO). In general, the XO is the first computer our
>>> users have used and, aside from an Android device, the only computer
&g

Re: [Sugar-devel] Minor update to Make Your Own Sugar Activities!

2017-03-15 Thread James Simmons
Tony,

I own an XO laptop from the first Give One Get One promotion, so I know
what it can do. I've used the Terminal Activity and I wrote the Sugar
Commander Activity because I thought that the original design of Sugar,
which made your thumb drive look like the Journal, was not such a hot idea.
In my opinion files and directories should look like files and directories
and the Journal should look like the Journal. I know that some of the newer
XO's can switch to a GNOME desktop.

I never tried developing Activities on an XO because I never had to. It is
definitely easier to do things the way I do it, and for someone living in
the U.S. with reliable internet it's pretty cheap. I agree that this is not
the case for all the students, or even most of them. It's a case of "to
those who have, more shall be given."

I had the same situation when I wrote *E-Book Enlightenment*. Free e-books
in English are plentiful, other languages not so much. I had to write
chapters on making e-books, figuring out what is in the public domain,
photographing book pages, building a device to hold books in place for
being photographed, doing optical character recognition, donating books to
PG and archive.org, etc.

Maybe MYOSA needs a chapter on using the XO for developing applications,
installing Git and using it locally, etc. My own XO has been in a drawer
for a couple of years.

James Simmons


On Wed, Mar 15, 2017 at 12:46 AM, Tony Anderson <tony_ander...@usa.net>
wrote:

> Hi, James
>
> If you go to activities.sugarlabs.org, you can register via the register
> link at the top right. This is not registration for Sugarlabs but for ASLO.
>
> As I understand the github repository, access with the ability to commit
> changes is closely held. The enables proposed changes to be vetted before a
> commit.
> However, the web page has a sign in link which gives limited access
> (create pull requests and comment on them, for example). That same two-step
> process is used for ASLO. The developer submits the change which puts it
> into a sandbox pending review.
>
> Actually Sugar has files, directories and a command shell (Terminal
> activity). It is relatively easy to switch activities via the Frame. I say
> this from several years of experience developing on the XO (easier than
> using usb flash keys to move code to the XO to test). The fact that Browse
> does not support flex and the unique XO screen makes testing on an XO
> essential if that is the target.
>
> The process of making changes via github to the Sugar core is certainly
> reasonable. However, nothing in this procedure interferes with a developer
> modifying and testing a change on an installed Sugar independently of the
> internet. Access to the internet being needed only to submit the change.
>
> The issue is not to use Sugar for everything, it is to use the available
> computer for everything (XO). In general, the XO is the first computer our
> users have used and, aside from an Android device, the only computer
> available. While used desktops and laptops are available, the $100+ funds
> are not available.
>
> The 'current setup' you mention depends on ready access to the internet,
> something not available for at least 2/3 of our users. It is a strength of
> Sugar that the source code is immediately available to the user without
> need of a repository (except access to activities not installed - a need
> supplied by a schoolserver). This allows learners to get into programming
> in a meaningful way using only what is installed on the XO.
>
> Tony
>
>
> On 03/14/2017 11:25 PM, James Simmons wrote:
>
> All,
>
> I only meant to make the manual actually tell where we currently put our
> code repositories, without rewriting the whole chapter. (I had hoped that a
> Google Code-In mentee might do that, but it didn't happen). The one piece
> of information that is still lacking is how to have your account added to
> the sugarlabs organization. That happened so long ago that I forgot how it
> happened. If someone could remind me I'll add that information to the note.
>
> I haven't done any Sugar development in years but I do program computers
> for a living and I use Git in my day job.
>
> Sugar has some good Activities to teach programming, but I don't think it
> is a great Activity development platform. For that you really need files
> and directories and a command shell, the ability to run Sugar as more than
> one user at a time, etc.
>
> I understand the desire to use Sugar for everything, but I think it would
> always get in the way. You wouldn't expect to be able to develop an iphone
> app on an iphone, or at least I wouldn't.
>
> If I wanted to teach Activity development to children I'd get some
> reconditioned desktop computers and install Fedora and Sugar on

Re: [Sugar-devel] Minor update to Make Your Own Sugar Activities!

2017-03-14 Thread James Simmons
All,

I only meant to make the manual actually tell where we currently put our
code repositories, without rewriting the whole chapter. (I had hoped that a
Google Code-In mentee might do that, but it didn't happen). The one piece
of information that is still lacking is how to have your account added to
the sugarlabs organization. That happened so long ago that I forgot how it
happened. If someone could remind me I'll add that information to the note.

I haven't done any Sugar development in years but I do program computers
for a living and I use Git in my day job.

Sugar has some good Activities to teach programming, but I don't think it
is a great Activity development platform. For that you really need files
and directories and a command shell, the ability to run Sugar as more than
one user at a time, etc.

I understand the desire to use Sugar for everything, but I think it would
always get in the way. You wouldn't expect to be able to develop an iphone
app on an iphone, or at least I wouldn't.

If I wanted to teach Activity development to children I'd get some
reconditioned desktop computers and install Fedora and Sugar on them. I
have used nothing but reconditioned computers myself for years. It is
amazing to me what you can get reconditioned on Amazon and elsewhere for
around a hundred bucks. This is basically my price range for a "new"
computer, and for that I can get a Lenovo or other quality brand with more
than adequate disk space and memory. These computers are built for use in
offices and have many years of life left in them. In Fedora you can run
Sugar as a desktop environment as well as in a window. You can hook them up
to a TV or a projector (something I remember many people wanted to do with
the XO).

I don't see ASLO being separate from Git as a problem. I think of it like
the production environment at work. If it's good enough to use it goes on
ASLO. If not, it stays in Git, but I might push my code to the central
repository so others could fool around with it.

Part of teach a child programming should be teaching him good work habits,
and I think our current setup promotes that.

James Simmons

On Tue, Mar 14, 2017 at 9:28 AM, Laura Vargas <la...@somosazucar.org> wrote:

>
>
> 2017-03-14 7:13 GMT-05:00 Walter Bender <walter.ben...@gmail.com>:
>
>>
>>
>> On Tue, Mar 14, 2017 at 12:45 AM, Tony Anderson <tony_ander...@usa.net>
>> wrote:
>>
>>>
>>>
>>> On 03/14/2017 12:03 PM, Alex Perez wrote:
>>>
>>>
>>> I would think ASLO could simply be made to inspect the contents of an
>>> activity, upon upload, (since it’s just a zip file), and look for the
>>> necessary string within activity.info, such that it could be displayed
>>> under a “details” section of an Activity, within ASLO.
>>>
>>>
>>> What I propose is that the ASLO page have a link to the github
>>> repository. See the attached screenshot which shows a link to home page. I
>>> would see this link being added here.
>>>
>>
>> +1. But that can be done if (1) we include the repo path in the info file
>> and (2) do the work on ALSO to display it (I think alsroot was looking into
>> this).
>>
>
> +1 to add the repository link field on ASLO.
>
> This is an example where we all agree that something needs to be done.
>
> Now, how do you propose we get it done?
>
>
>> You proposal has no bearing on where the repo is hosted, as it should
>> not.
>>
>>>
>>> Tony
>>>
>>> ___
>>> Sugar-devel mailing list
>>> Sugar-devel@lists.sugarlabs.org
>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>
>>>
>>
>>
>> --
>> Walter Bender
>> Sugar Labs
>> http://www.sugarlabs.org
>> <http://www.sugarlabs.org>
>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>
>
> --
> Laura V.
> * I SomosAZUCAR.Org*
>
> “No paradox, no progress.”
> ~ Niels Bohr
>
> Happy Learning!
>
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Minor update to Make Your Own Sugar Activities!

2017-03-13 Thread James Simmons
All,

I have been neglecting the manual *Make Your Own Sugar Activities!* ever
since I first wrote it. However, I did manage to make one needed update in
the laziest way possible. Since Sugar Labs has moved away from
git.sugarlabs.org in favor of GitHub since I wrote the version control
chapter I have added the following note to that chapter:

*Important Note*: When this chapter was written Sugar Labs was still
using *git.sugarlabs.org
<http://git.sugarlabs.org>* as its code repository. While this still
exists, the preferred repository is now https://github.com/, using the
*sugarlabs* organization. This chapter is still a reasonable introduction
to using Git, but when you set up your project repository you should use
the excellent instructions provided on GitHub instead of the Gitorious
instructions provided here.


I hope this helps in some way.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Question about Sugarizing a Python program

2017-03-08 Thread James Simmons
Lam,

Glad you like the book. I would point out that the chapter on version
control needs updating. While git.sugarlabs.org still exists, the official
place to put code for Sugar Labs is in Github, under the sugarlabs
organization.

Like this:

https://github.com/sugarlabs/readetexts

Other than that you should be OK.

James Simmons


On Wed, Mar 8, 2017 at 10:17 AM, Nguyen, Lam <nguye...@dickinson.edu> wrote:

> Thank you for the responses. James Simmon's book looks especially
> interesting. We will look into the approaches suggested. Meanwhile, we
> welcome any further suggestion that could help us with this process.
>
>
> Best regards,
>
> Lam Nguyen
>
> --
> *From:* Sugar-devel <sugar-devel-boun...@lists.sugarlabs.org> on behalf
> of Tony Anderson <tony_ander...@usa.net>
> *Sent:* Tuesday, March 7, 2017 19:20
> *To:* sugar-devel@lists.sugarlabs.org
> *Subject:* Re: [Sugar-devel] Question about Sugarizing a Python program
>
> I have good luck with two methods. One is to download helloworld-6.xo.
> It is actually a zip file and so can be unzipped.
>
> The pertinent information is given in the activity.info file. Change all
> references to HelloWorld to your name for the activity.
>
> A Sugar activity wants an svg icon to show on the Home view. So
> substitute your icon for the one in the activity folder.
>
> The program is in directory activity.py as a python class. Change the
> class name to match the exec line in activity.info.
>
> Usually what I do is make a bundle with python setup.py dist_xo (reset
> version in activity.info to 1 first). This bundle can be installed by
> sugar-install-bundle hello-6.xo (substitute name of your bundle - e.g.
> spell-1.xo).
>
> Now launching the activity should show hello world to show that your
> changes have created a working activity.
>
> Now all that should be needed is to modify the activity to invoke your
> code. Note that you need much of the existing code to set up the Sugar
> toolbar. So I generally modify the code at the point that it provides a
> Gtk.Label('Hello World').
>
> The other approach is to use pippy.py. Copy and paste your code into the
> text area. Now execute the code with pippy run to verify that it is
> working there.
> Then you can export as a bundle (activity toolbar).
>
> I fully endorse Sebastian's recommendation of James Simmons text. This
> will help with any problems you may encounter.
>
> Tony
>
> On 03/08/2017 04:53 AM, Sebastian Silva wrote:
> >
> > On 07/03/17 15:47, Sebastian Silva wrote:
> >> Also, don't miss the excellent "Make Your Own Sugar Activities" by
> >> James Simmons:
> >>
> >> http://write.flossmanuals.net/make-your-own-sugar-
> activities/introduction/
> >>
> > specifically the chapter:
> >
> > http://write.flossmanuals.net/make-your-own-sugar-
> activities/making-activities-using-pygame/
> > ___
> > Sugar-devel mailing list
> > Sugar-devel@lists.sugarlabs.org
> > http://lists.sugarlabs.org/listinfo/sugar-devel
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
> Sugar-devel Info Page <http://lists.sugarlabs.org/listinfo/sugar-devel>
> lists.sugarlabs.org
> Sugar-devel -- Discussion of Sugar development and other technical
> matters. About Sugar-devel
>
>
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Are you using Sugar daily for your own education?

2016-06-07 Thread James Simmons
Dave,

If you think it will help, please do.

James Simmons

On Tue, Jun 7, 2016 at 12:38 PM, Dave Crossland <d...@lab6.com> wrote:

>
> On 7 June 2016 at 10:47, James Simmons <nices...@gmail.com> wrote:
>
>> Considering that I am fifty years older than the target audience for
>> Sugar I'd have to say that's pretty good.
>
>
> LOL
>
> This is great! Can I use your text as a testimonial on the website? :)
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Are you using Sugar daily for your own education?

2016-06-07 Thread James Simmons
Dave,

I don't use Sugar daily now, but a few years ago I did. I was looking for a
good way to read Project Gutenberg etexts and Kindles were going for $399.
That was the year of "Give One, Get One" and for the price of a Kindle I
could get an XO laptop for myself plus another for a child I would never
meet. It sounded like a good deal so I went for it.

The Read Activity in the XO only supported PDF's to begin with, which was a
disappointment. I decided to learn how to program the XO so I could make my
own ebook Activity and ended up making several, including one for plain
text files and two different ones for comic books in .cbz format. I also
made an Activity that made it easy to search for and download ebooks from
the Internet Archive.

Learning how to do this led me to write two manuals for the project: one on
programming Sugar Activities and a second one on finding and creating
ebooks. The first book was translated into Spanish by a team of volunteers,

I used my XO to read ebooks just about every day, I read some really
obscure ones like Edison's Conquest Of Mars by G. P. Serviss,

My manuals got published on Create Space and in the Kindle and Nook Stores,
and learning how to do that led to many other publishing writing and
publishing projects.

I haven't used my XO in a long time. Kindles and tablets got better and
cheaper, and my primary interest in the XO was as an e-reader so it got
left behind. However, it is fair to say that Sugar gave me a good
constructionist education and led to me doing a lot of interesting projects
that I would not have done otherwise. Considering that I am fifty years
older than the target audience for Sugar I'd have to say that's pretty good.

James Simmons

On Mon, May 30, 2016 at 11:46 AM, Dave Crossland <d...@lab6.com> wrote:

> Hi
>
> That's a great idea :) I added it to the end of
> https://wiki.sugarlabs.org/go/Vision_proposal_2016
>
> On 30 May 2016 at 06:28, Gonzalo Odiard <godi...@gmail.com> wrote:
>
>> One of my nephews has been diagnosed with a autism related condition.
>> Even when he does not speak, he connected fast with the simple Sugar
>> interface and activities,
>> and use the text to speech feature.
>> I know this is not our main target, but I think it's interesting to know
>> it.
>>
>> Gonzalo
>>
>>
>> On Mon, May 30, 2016 at 9:14 AM, Laura Vargas <la...@somosazucar.org>
>> wrote:
>>
>>>
>>> 2016-05-30 10:56 GMT+08:00 Dave Crossland <d...@lab6.com>:
>>>
>>>>
>>>> On 29 May 2016 at 19:10, Laura Vargas <la...@somosazucar.org> wrote:
>>>>
>>>>> I believe Sugar is a powerful tool for other homeschoolers as well.
>>>>
>>>>
>>>> I agree, I think the unschooling home/parent market has high
>>>> product/market-fit potential :)
>>>>
>>>
>>> I agree, and it is a growing market. Check the infographic, although
>>> they are just US numbers, a significant 98,3% of homeshooled students use a
>>> computer at home.
>>>
>>> --
>>> Laura V.
>>> I SomosAZUCAR.Org
>>> IRC kaametza
>>>
>>> Happy Learning!
>>>
>>>
>>> ___
>>> Sugar-devel mailing list
>>> Sugar-devel@lists.sugarlabs.org
>>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>>
>>>
>>
>>
>> --
>> [image: photo]
>> *Gonzalo Odiard*
>> Lider de proyecto
>> tel.: 4210-7748 | www.trinom.ioAv Calchaqui 4936· 2do Piso. Quilmes
>> <http://www.facebook.com/trinomiosrl>
>> <https://www.linkedin.com/company/trinom-io>
>>
>>
>
>
> --
> Cheers
> Dave
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [ASLO] Release Read ETexts-27

2016-01-25 Thread James Simmons
James,

I'll have a look at the accelerator.

My code needs its own speech function because I highlight each word as it
is being spoken. That function never worked that well, but I'd like to keep
it. Read ETexts is the first application to use the gstreamer espeak
plugin. I'll need to update the MYOSA TTS chapter to include the speech
module.

I had no idea that everyone moved from Gitorious to GitHib. The MYOSA book
describes using GitHub, so it looks like I'll need to move all my code and
rewrite that chapter. I won't be able to do either one for awhile, but I'll
get to it. In the interim I'll put the new entry in activity.info.

Read ETexts has a collaboration feature (file transfer, not Tubes). I
haven't had the opportunity to check that yet. Hopefully it still works.

This Activity is an old one, from the days when a Kindle was more expensive
than an XO and Project Gutenberg did not have much support for PDF (the
only format the Read Activity could use at the time). I had a lot more time
to work on Sugar code and documentation back then. I don't remember how.

James Simmons


On Sun, Jan 24, 2016 at 9:06 PM, James Cameron <qu...@laptop.org> wrote:

> G'day James,
>
> Line 476 of your ReadEtextsActivity.py changes the accelerator for the
> stop button to 'Q', but the default in Sugar is
> 'Q', and the only activities that ought not use the default are
> those where ctrl-q has special meaning, such as Terminal.
>
> References:
>
> https://wiki.sugarlabs.org/go/Hotkeys
>
> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/activity/widgets.py#L87
>
> For speech, is there any reason you can't use the speech module in the
> sugar-toolkit-gtk3 package?
>
>
> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/speech.py
>
> Thanks for the gitorious pointer, I wasn't aware which source control
> repository you were using.  Everybody else has moved to GitHub, but nobody
> has taken down Sugar Labs gitorious yet, perhaps there are others like
> you still using it.
>
> Your activity/activity.info file can have a new field for that;
>
> repository = 
>
> On Sun, Jan 24, 2016 at 08:11:39PM -0600, James Simmons wrote:
> > James,
> >
> > I tested on Fedora 23 Workstation. The speech feature works OK there. I
> don't
> > think I'm doing anything with Ctrl-q.
> >
> > This is the code that I think is being complained about when it disables
> > speech:
> >
> > [1]http://git.sugarlabs.org/readetexts/mainline/blobs/master/speech.py
> >
> > The line is:
> >
> > Gst.ElementFactory.make('espeak')
> >
> > I see similar lines elsewhere where a second argument is used, specifying
> > source or sink.
> >
> > I'll give this another try later, probably tomorrow evening. Don't
> release this
> > version.
> >
> > I could use some clarification on what ctrl-q is supposed to do. I
> haven't done
> > Sugar coding for something like three years and this sounds new.
> >
> > James Simmons
> >
> > On Sun, Jan 24, 2016 at 6:18 PM, James Cameron <[2]qu...@laptop.org>
> wrote:
> >
> > On Sun, Jan 24, 2016 at 04:28:50PM -0500, Sugar Labs Activities
> wrote:
> > > [3]
> http://activities.sugarlabs.org/downloads/file/29159/read_etexts-27.xo
> >
> > Tested briefly on Fedora 20.
> >
> > 1.  the ctrl-q short cut does not work, an older ctrl-shift-q does,
> >
> > 2.  no speech feature seen,
> >
> > 3.  functional test passed, downloaded Emma by Jane Austen,
> >
> > Logs: [4]http://dev.laptop.org/~quozl/z/1aNUoS.txt
> >
> > --
> > James Cameron
> > [5]http://quozl.netrek.org/
> > ___
> > Sugar-devel mailing list
> > [6]Sugar-devel@lists.sugarlabs.org
> > [7]http://lists.sugarlabs.org/listinfo/sugar-devel
> >
> > References:
> >
> > [1] http://git.sugarlabs.org/readetexts/mainline/blobs/master/speech.py
> > [2] mailto:qu...@laptop.org
> > [3]
> http://activities.sugarlabs.org/downloads/file/29159/read_etexts-27.xo
> > [4] http://dev.laptop.org/~quozl/z/1aNUoS.txt
> > [5] http://quozl.netrek.org/
> > [6] mailto:Sugar-devel@lists.sugarlabs.org
> > [7] http://lists.sugarlabs.org/listinfo/sugar-devel
>
> --
> James Cameron
> http://quozl.netrek.org/
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [ASLO] Release Read ETexts-27

2016-01-25 Thread James Simmons
James,

At the moment the highlighting code doesn't work that well. What it does is
to insert tags into your text, then create a list of tuples containing
start and end positions of the words in the text area. The gstreamer code
gives me the sequence number of each word, I look up the tuple and
highlight the word. The highlighting skips over words or lags behind much
of the time. Not really robust enough to share with anyone at this point.

James Simmons



On Mon, Jan 25, 2016 at 3:01 PM, James Cameron <qu...@laptop.org> wrote:

> Thanks.
>
> How practical is it to add a word highlight callback to the sugar3
> speech module?  It might be useful for other activities.
>
> On Mon, Jan 25, 2016 at 11:29:39AM -0600, James Simmons wrote:
> > James,
> >
> > I'll have a look at the accelerator.
> >
> > My code needs its own speech function because I highlight each word as
> it is
> > being spoken. That function never worked that well, but I'd like to keep
> it.
> > Read ETexts is the first application to use the gstreamer espeak plugin.
> I'll
> > need to update the MYOSA TTS chapter to include the speech module.
> >
> > I had no idea that everyone moved from Gitorious to GitHib. The MYOSA
> book
> > describes using GitHub, so it looks like I'll need to move all my code
> and
> > rewrite that chapter. I won't be able to do either one for awhile, but
> I'll get
> > to it. In the interim I'll put the new entry in [1]activity.info.
> >
> > Read ETexts has a collaboration feature (file transfer, not Tubes). I
> haven't
> > had the opportunity to check that yet. Hopefully it still works.
> >
> > This Activity is an old one, from the days when a Kindle was more
> expensive
> > than an XO and Project Gutenberg did not have much support for PDF (the
> only
> > format the Read Activity could use at the time). I had a lot more time
> to work
> > on Sugar code and documentation back then. I don't remember how.
> >
> > James Simmons
> >
> > On Sun, Jan 24, 2016 at 9:06 PM, James Cameron <[2]qu...@laptop.org>
> wrote:
> >
> > G'day James,
> >
> > Line 476 of your ReadEtextsActivity.py changes the accelerator for
> the
> > stop button to 'Q', but the default in Sugar is
> > 'Q', and the only activities that ought not use the default are
> > those where ctrl-q has special meaning, such as Terminal.
> >
> > References:
> >
> > [3]https://wiki.sugarlabs.org/go/Hotkeys
> > [4]
> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/
> > activity/widgets.py#L87
> >
> > For speech, is there any reason you can't use the speech module in
> the
> > sugar-toolkit-gtk3 package?
> >
> > [5]
> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/
> > speech.py
> >
> > Thanks for the gitorious pointer, I wasn't aware which source control
> > repository you were using.  Everybody else has moved to GitHub, but
> nobody
> > has taken down Sugar Labs gitorious yet, perhaps there are others
> like
> > you still using it.
> >
> > Your activity/[6]activity.info file can have a new field for that;
> >
> > repository = 
> >
> > On Sun, Jan 24, 2016 at 08:11:39PM -0600, James Simmons wrote:
> > > James,
> > >
> > > I tested on Fedora 23 Workstation. The speech feature works OK
> there. I
> > don't
> > > think I'm doing anything with Ctrl-q.
> > >
> > > This is the code that I think is being complained about when it
> disables
> > > speech:
> > >
> > > [1][7]
> http://git.sugarlabs.org/readetexts/mainline/blobs/master/speech.py
> > >
> > > The line is:
> > >
> > > Gst.ElementFactory.make('espeak')
> > >
> > > I see similar lines elsewhere where a second argument is used,
> specifying
> > > source or sink.
> > >
> > > I'll give this another try later, probably tomorrow evening. Don't
> > release this
> > > version.
> > >
> > > I could use some clarification on what ctrl-q is supposed to do. I
> > haven't done
> > > Sugar coding for something like three years and this sounds new.
> > >
> > > James Simmons
> > >
> > > On Sun, Jan 24, 2016 at 6:18 PM, James Cameron <[2][8]
> qu...@laptop.org&g

Re: [Sugar-devel] [ASLO] Release Read ETexts-27

2016-01-25 Thread James Simmons
James,

I've made the changes. It works on the latest Fedora. Accelerator for Stop
button is fixed.

James Simmons


On Mon, Jan 25, 2016 at 5:30 PM, James Simmons <nices...@gmail.com> wrote:

> James,
>
> At the moment the highlighting code doesn't work that well. What it does
> is to insert tags into your text, then create a list of tuples containing
> start and end positions of the words in the text area. The gstreamer code
> gives me the sequence number of each word, I look up the tuple and
> highlight the word. The highlighting skips over words or lags behind much
> of the time. Not really robust enough to share with anyone at this point.
>
> James Simmons
>
>
>
> On Mon, Jan 25, 2016 at 3:01 PM, James Cameron <qu...@laptop.org> wrote:
>
>> Thanks.
>>
>> How practical is it to add a word highlight callback to the sugar3
>> speech module?  It might be useful for other activities.
>>
>> On Mon, Jan 25, 2016 at 11:29:39AM -0600, James Simmons wrote:
>> > James,
>> >
>> > I'll have a look at the accelerator.
>> >
>> > My code needs its own speech function because I highlight each word as
>> it is
>> > being spoken. That function never worked that well, but I'd like to
>> keep it.
>> > Read ETexts is the first application to use the gstreamer espeak
>> plugin. I'll
>> > need to update the MYOSA TTS chapter to include the speech module.
>> >
>> > I had no idea that everyone moved from Gitorious to GitHib. The MYOSA
>> book
>> > describes using GitHub, so it looks like I'll need to move all my code
>> and
>> > rewrite that chapter. I won't be able to do either one for awhile, but
>> I'll get
>> > to it. In the interim I'll put the new entry in [1]activity.info.
>> >
>> > Read ETexts has a collaboration feature (file transfer, not Tubes). I
>> haven't
>> > had the opportunity to check that yet. Hopefully it still works.
>> >
>> > This Activity is an old one, from the days when a Kindle was more
>> expensive
>> > than an XO and Project Gutenberg did not have much support for PDF (the
>> only
>> > format the Read Activity could use at the time). I had a lot more time
>> to work
>> > on Sugar code and documentation back then. I don't remember how.
>> >
>> > James Simmons
>> >
>> > On Sun, Jan 24, 2016 at 9:06 PM, James Cameron <[2]qu...@laptop.org>
>> wrote:
>> >
>> > G'day James,
>> >
>> > Line 476 of your ReadEtextsActivity.py changes the accelerator for
>> the
>> > stop button to 'Q', but the default in Sugar is
>> > 'Q', and the only activities that ought not use the default
>> are
>> > those where ctrl-q has special meaning, such as Terminal.
>> >
>> > References:
>> >
>> > [3]https://wiki.sugarlabs.org/go/Hotkeys
>> > [4]
>> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/
>> > activity/widgets.py#L87
>> >
>> > For speech, is there any reason you can't use the speech module in
>> the
>> > sugar-toolkit-gtk3 package?
>> >
>> > [5]
>> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/
>> > speech.py
>> >
>> > Thanks for the gitorious pointer, I wasn't aware which source
>> control
>> > repository you were using.  Everybody else has moved to GitHub, but
>> nobody
>> > has taken down Sugar Labs gitorious yet, perhaps there are others
>> like
>> > you still using it.
>> >
>> > Your activity/[6]activity.info file can have a new field for that;
>> >
>> > repository = 
>> >
>> > On Sun, Jan 24, 2016 at 08:11:39PM -0600, James Simmons wrote:
>> > > James,
>> > >
>> > > I tested on Fedora 23 Workstation. The speech feature works OK
>> there. I
>> > don't
>> > > think I'm doing anything with Ctrl-q.
>> >     >
>> > > This is the code that I think is being complained about when it
>> disables
>> > > speech:
>> > >
>> > > [1][7]
>> http://git.sugarlabs.org/readetexts/mainline/blobs/master/speech.py
>> > >
>> > > The line is:
>> > >
>> > > Gst.ElementFactory.make('espeak')
>> > >
>> > > I see similar lines elsewhere where a second argu

Re: [Sugar-devel] [ASLO] Release Read ETexts-27

2016-01-24 Thread James Simmons
James,

I tested on Fedora 23 Workstation. The speech feature works OK there. I
don't think I'm doing anything with Ctrl-q.

This is the code that I think is being complained about when it disables
speech:

http://git.sugarlabs.org/readetexts/mainline/blobs/master/speech.py

The line is:

Gst.ElementFactory.make('espeak')

I see similar lines elsewhere where a second argument is used, specifying
source or sink.

I'll give this another try later, probably tomorrow evening. Don't release
this version.

I could use some clarification on what ctrl-q is supposed to do. I haven't
done Sugar coding for something like three years and this sounds new.

James Simmons




On Sun, Jan 24, 2016 at 6:18 PM, James Cameron <qu...@laptop.org> wrote:

> On Sun, Jan 24, 2016 at 04:28:50PM -0500, Sugar Labs Activities wrote:
> > http://activities.sugarlabs.org/downloads/file/29159/read_etexts-27.xo
>
> Tested briefly on Fedora 20.
>
> 1.  the ctrl-q short cut does not work, an older ctrl-shift-q does,
>
> 2.  no speech feature seen,
>
> 3.  functional test passed, downloaded Emma by Jane Austen,
>
> Logs: http://dev.laptop.org/~quozl/z/1aNUoS.txt
>
> --
> James Cameron
> http://quozl.netrek.org/
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Working text to speech example needed

2016-01-23 Thread James Simmons
James,

I actually had some standalone programs in the MYOSA book. It looks like
the problem is with importing gst. I get this stack trace:

[jsimmons@olpc Adding_TTS_gtk3]$ ./gst_simple_example.py
Traceback (most recent call last):
  File "./gst_simple_example.py", line 24, in 
import gst
  File "/usr/lib64/python2.7/site-packages/gst-0.10/gst/__init__.py", line
193, in 
from _gst import *
ImportError: could not import gobject (could not find _PyGObject_API object)

I have installed gstreamer-plugins-espeak:

Package gstreamer-plugins-espeak-0.4.0-7.fc23.x86_64 is already installed,
skipping.

The code I'm using is one of the examples written by Aleksey Lim:

import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import gst

def gstmessage_cb(bus, message, pipe):
if message.type in (gst.MESSAGE_EOS, gst.MESSAGE_ERROR):
pipe.set_state(gst.STATE_NULL)

pipeline = 'espeak text="Hello, World!" ! autoaudiosink'
pipe = gst.parse_launch(pipeline)

bus = pipe.get_bus()
bus.add_signal_watch()
bus.connect('message', gstmessage_cb, pipe)

pipe.set_state(gst.STATE_PLAYING)

Gtk.main()


You can't get much simpler than that.

I'll keep looking at this, but my guess is that something didn't get
installed.

James Simmons


On Sat, Jan 23, 2016 at 7:51 AM, James Simmons <nices...@gmail.com> wrote:

> James,
>
> Correction, it looks like the Clock Activity uses Gst. You've given me
> some things to try out. Thanks.
>
> James Simmons
>
>
> On Fri, Jan 22, 2016 at 8:56 PM, James Cameron <qu...@laptop.org> wrote:
>
>> G'day James,
>>
>> Here's some ideas.
>>
>> Can you try the imports by hand in a Python interpreter to find which
>> are failing and why?
>>
>> Can you remove your exception handlers temporarily to find out whether
>> the import is failing, or something else?
>>
>> What environment are you developing within?
>>
>> Can you use 'from sugar3.speech import SpeechManager'?
>>
>>
>> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/speech.py
>>
>> See example of use, the Clock activity:
>>
>> https://github.com/godiard/clock-activity/blob/master/speaker.py
>>
>> Can you check you are looking at latest Speak source?  It looks
>> different to yours.  See Speech activity on GitHub:
>>
>> https://github.com/godiard/speak/blob/master/local_espeak.py
>>
>> On Fri, Jan 22, 2016 at 08:21:21PM -0600, James Simmons wrote:
>> > I have been neglecting my Sugar Activities for a long time, and I'm
>> trying to
>> > get them back in shape and using GTK3. I find that my Read Etexts
>> Activity, one
>> > of the first to use Aleksey Lim's gstreamer for espeak, no longer
>> works. I have
>> > code in there which is supposed to detect the presence of the gst espeak
>> > package and use it if available and hide the speech buttons on the
>> toolbar if
>> > it cannot.
>> >
>> > Needless to say, the buttons are hidden.
>> >
>> > I'm looking for Activities that use speech and work. The obvious
>> candidate,
>> > Speak, has code in Git that looks very much like the code I'm using. I
>> saw
>> > several versions in Git and they all use similar code:
>> >
>> > [1]http://git.sugarlabs.org/readetexts/mainline/blobs/master/speech.py
>> >
>> > shows the code I use to detect whether gst-plugins-espeak will work.
>> The log
>> > messages show it disabled.
>> >
>> > I thought updating the code to use Gst might be the answer, but I don't
>> have
>> > that working either.
>> >
>> > Are there any working applications that use gst-plugins-espeak?
>> >
>> > James Simmons
>> >
>> > References:
>> >
>> > [1] http://git.sugarlabs.org/readetexts/mainline/blobs/master/speech.py
>>
>> > ___
>> > Sugar-devel mailing list
>> > Sugar-devel@lists.sugarlabs.org
>> > http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>> --
>> James Cameron
>> http://quozl.netrek.org/
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Working text to speech example needed

2016-01-23 Thread James Simmons
Jerry,

It's already installed, unfortunately.

Package pygobject2-2.28.6-14.fc23.x86_64 is already installed, skipping.

I have managed to convert some of Aleksey's code to work with Gst. It isn't
perfect, but speech comes out. So maybe that's a clue. I think I can
convert my Activity to use Gst. Apparently later versions of Sugar can
support that.

James Simmons


On Sat, Jan 23, 2016 at 2:33 PM, Jerry Vonau <m...@jvonau.ca> wrote:

> Think you might be missing the pygobject2 rpm, from 'dnf info pygobject2'
> Description : The pygobject2 package provides a convenient wrapper for the
> GObject library
> : for use in Python programs.
>
> Hope it helps and/or works,
>
> Jerry
>
> > On January 23, 2016 at 12:55 PM James Simmons <nices...@gmail.com>
> wrote:
> >
> >
> > James,
> >
> > I actually had some standalone programs in the MYOSA book. It looks like
> > the problem is with importing gst. I get this stack trace:
> >
> > [jsimmons@olpc Adding_TTS_gtk3]$ ./gst_simple_example.py
> > Traceback (most recent call last):
> >   File "./gst_simple_example.py", line 24, in 
> > import gst
> >   File "/usr/lib64/python2.7/site-packages/gst-0.10/gst/__init__.py",
> > line
> > 193, in 
> > from _gst import *
> > ImportError: could not import gobject (could not find _PyGObject_API
> > object)
> >
> > I have installed gstreamer-plugins-espeak:
> >
> > Package gstreamer-plugins-espeak-0.4.0-7.fc23.x86_64 is already
> > installed,
> > skipping.
> >
> > The code I'm using is one of the examples written by Aleksey Lim:
> >
> > import gi
> > gi.require_version('Gtk', '3.0')
> > from gi.repository import Gtk
> > import gst
> >
> > def gstmessage_cb(bus, message, pipe):
> > if message.type in (gst.MESSAGE_EOS, gst.MESSAGE_ERROR):
> > pipe.set_state(gst.STATE_NULL)
> >
> > pipeline = 'espeak text="Hello, World!" ! autoaudiosink'
> > pipe = gst.parse_launch(pipeline)
> >
> > bus = pipe.get_bus()
> > bus.add_signal_watch()
> > bus.connect('message', gstmessage_cb, pipe)
> >
> > pipe.set_state(gst.STATE_PLAYING)
> >
> > Gtk.main()
> >
> >
> > You can't get much simpler than that.
> >
> > I'll keep looking at this, but my guess is that something didn't get
> > installed.
> >
> > James Simmons
> >
> >
> > On Sat, Jan 23, 2016 at 7:51 AM, James Simmons <nices...@gmail.com>
> > wrote:
> >
> > > James,
> > >
> > > Correction, it looks like the Clock Activity uses Gst. You've given me
> > > some things to try out. Thanks.
> > >
> > > James Simmons
> > >
> > >
> > > On Fri, Jan 22, 2016 at 8:56 PM, James Cameron <qu...@laptop.org>
> > > wrote:
> > >
> > >> G'day James,
> > >>
> > >> Here's some ideas.
> > >>
> > >> Can you try the imports by hand in a Python interpreter to find which
> > >> are failing and why?
> > >>
> > >> Can you remove your exception handlers temporarily to find out whether
> > >> the import is failing, or something else?
> > >>
> > >> What environment are you developing within?
> > >>
> > >> Can you use 'from sugar3.speech import SpeechManager'?
> > >>
> > >>
> > >>
> https://github.com/sugarlabs/sugar-toolkit-gtk3/blob/master/src/sugar3/speech.py
> > >>
> > >> See example of use, the Clock activity:
> > >>
> > >> https://github.com/godiard/clock-activity/blob/master/speaker.py
> > >>
> > >> Can you check you are looking at latest Speak source?  It looks
> > >> different to yours.  See Speech activity on GitHub:
> > >>
> > >> https://github.com/godiard/speak/blob/master/local_espeak.py
> > >>
> > >> On Fri, Jan 22, 2016 at 08:21:21PM -0600, James Simmons wrote:
> > >> > I have been neglecting my Sugar Activities for a long time, and I'm
> > >> trying to
> > >> > get them back in shape and using GTK3. I find that my Read Etexts
> > >> Activity, one
> > >> > of the first to use Aleksey Lim's gstreamer for espeak, no longer
> > >> works. I have
> > >> > code in there which is supposed to detect the presence of the gst
> > >> > espeak
> > >> > package and use it if available and hide the speech 

[Sugar-devel] Working text to speech example needed

2016-01-22 Thread James Simmons
I have been neglecting my Sugar Activities for a long time, and I'm trying
to get them back in shape and using GTK3. I find that my Read Etexts
Activity, one of the first to use Aleksey Lim's gstreamer for espeak, no
longer works. I have code in there which is supposed to detect the presence
of the gst espeak package and use it if available and hide the speech
buttons on the toolbar if it cannot.

Needless to say, the buttons are hidden.

I'm looking for Activities that use speech and work. The obvious candidate,
Speak, has code in Git that looks very much like the code I'm using. I saw
several versions in Git and they all use similar code:

http://git.sugarlabs.org/readetexts/mainline/blobs/master/speech.py

shows the code I use to detect whether gst-plugins-espeak will work. The
log messages show it disabled.

I thought updating the code to use Gst might be the answer, but I don't
have that working either.

Are there any working applications that use gst-plugins-espeak?

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Problem with espeak in Read ETexts

2016-01-13 Thread James Simmons
I haven't done any Sugar Activity coding in awhile and I just found out
that some of my Activities don't work on recent versions of Sugar. I'm
working my way through these and fixing them, and so far it hasn't been too
difficult.

However, while fixing up Read ETexts I discovered that text to speech is
disabled. There are a few lines that try to determine if the espeak
gstreamer plugin is installed, and if it is the TTS buttons are added to
the toolbar, otherwise they aren't. This is that code:

supported = True

try:
import gst
gst.element_factory_make('espeak')
from speech_gst import *
_logger.info('use gst-plugins-espeak')
except Exception, e:
_logger.info('disable gst-plugins-espeak: %s' % e)
try:
from speech_dispatcher import *
_logger.info('use speech-dispatcher')
except Exception, e:
supported = False
_logger.info('disable speech: %s' % e)

This is supposed to throw an exception if the espeak gstreamer plugin is
not installed, but it is installed and I still get the exception. It looks
like the gst module exists, but its trying to do something itself that
causes the exception. "Could not import gobject" is the text in the
exception.

Other Activities like Speak are using code that looks like mine, so I don't
know what is happening.

Thoughts?

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Need help getting started

2016-01-08 Thread James Simmons
Akhil,

I'd recommend having a look at this as well:

http://en.flossmanuals.net/make-your-own-sugar-activities/

James Simmons

On Fri, Jan 8, 2016 at 12:37 PM, Julio Daniel Reyes <nemesisco...@gmail.com>
wrote:

> Hello akhil,
>
> Some useful links:
>
> *Development environment:*
> https://developer.sugarlabs.org/dev-environment.md.html
>
> *Wiki:*
> wiki.sugarlabs.org
>
> *Bug tracker:*
> https://bugs.sugarlabs.org/
>
> *Repositories: *
> https://github.com/sugarlabs
> https://github.com/walterbender
>
> Regards,
>
> Julio Reyes
>
> On 8 January 2016 at 14:20, akhil akhil <akhee2...@gmail.com> wrote:
>
>> Hello everyone,
>>
>> I'm akhil, i'm new to open source and i would love to contribute, can
>> someone help me get started, Thanks in advance.
>>
>> ___
>> Sugar-devel mailing list
>> Sugar-devel@lists.sugarlabs.org
>> http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>
> ___
> Sugar-devel mailing list
> Sugar-devel@lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Current status of collaboration work

2015-12-26 Thread James Simmons
Tony,

I have been lurking on these mailing lists for the past few years but
haven't made any contribution to Sugar in that time. You may recall that I
wrote a couple of FLOSS manuals for OLPC, and strangely enough that led me
away from the project, because it convinced me I had a future as an author.
I've written and published a few books since then, none of which have found
as big an audience as the two FLOSS manuals did.

After reading your recent emails, I see that one of my FLOSS manuals is on
its way to being out of date, and my Sugar Activities are getting there
too. I'd like to fix that. I don't know how much time I'll have to devote
to this, but I want to do it.

I'd like to know more about this Tubes wrapper to start with. Is there
anything I can read to start learning about it?

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Translations with our NEW Pootle instance

2014-12-25 Thread James Simmons
Martin,

I have copied several of my Activities to github. On the Wiki page they are
shown as being maintained by Jdsimmons. I'm trying to figure out how to add
pootle to the committers and if I did everything right. The projects are:

viewslides
read-sd-comics
sugar-commander
get-ia-books

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Need your views, ASAP.

2014-03-21 Thread James Simmons
Kamal,

I cannot speak for the whole community but my understanding is that Python
3 is not at all backward compatible with the Python we use now. If every
Activity we have had to be rewritten in Python 3 that would be a huge
impact.

You may be familiar with my book:

http://en.flossmanuals.net/make-your-own-sugar-activities/

I recently (like a month ago) updated the book to use GTK3 in the examples
rather than GTK2. That was a big, but necessary, effort. The current Sugar
supports both GTK2 and GTK3, so no Activities need to be rewritten. GTK3 is
supposed to give better support for tablets and touch screens and of course
we want to use the latest supported software.

In any case, while using GTK3 over time may have a big impact in the short
term it doesn't break anything. I'm not sure we could say the same thing
about rewriting Sugar to use Python 3.

James Simmons


On Thu, Mar 20, 2014 at 3:55 AM, Kamal Kaur kamal.kaur...@gmail.com wrote:

 Hello all members,

 I need help with the first question in You and Community section. As
 I'll be working for project Port to python 3, I need three answers,
 one of which will I get from the mentors and other from memberss So
 the members and mentors reading this message, Please give your answer
 regarding what will be the impact after completion of my project on
 community? I need to add this answer there and it should be of 1-3
 paragraphs.

 There are four outlined steps:
 Step 1. Make use of GTK3 instead of GTK2 because sugar and the apps use it.
 Step 2. Port the Sugar core to python3.
 Step 3. Developing a robust test suite.
 Step 4: Port an existing sugar activity to python3 and document process

 Please tell me what are your views about the effect on community after
 completion of this project?

 Thank you

 --
 Kamaljeet Kaur

 kamalkaur188.wordpress.com
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Need your views, ASAP.

2014-03-21 Thread James Simmons
Walter,

I wasn't saying we shouldn't do it. It just sounded like it would have more
impact than anything we've attempted so far. If you could do it in such a
way that most older Activities remain functional that's great. I got the
impression you could not.

James Simmons



On Fri, Mar 21, 2014 at 10:46 AM, Walter Bender walter.ben...@gmail.comwrote:

 With all due respect James, we need to keep moving with upstream. So
 we need to look at Python 3. We also need to do it in a way that won't
 break all the old activities, hence the distinction between Sugar and
 the toolkit(s).

 regards

 -walter

 On Fri, Mar 21, 2014 at 10:47 AM, James Simmons nices...@gmail.com
 wrote:
  Kamal,
 
  I cannot speak for the whole community but my understanding is that
 Python 3
  is not at all backward compatible with the Python we use now. If every
  Activity we have had to be rewritten in Python 3 that would be a huge
  impact.
 
  You may be familiar with my book:
 
  http://en.flossmanuals.net/make-your-own-sugar-activities/
 
  I recently (like a month ago) updated the book to use GTK3 in the
 examples
  rather than GTK2. That was a big, but necessary, effort. The current
 Sugar
  supports both GTK2 and GTK3, so no Activities need to be rewritten. GTK3
 is
  supposed to give better support for tablets and touch screens and of
 course
  we want to use the latest supported software.
 
  In any case, while using GTK3 over time may have a big impact in the
 short
  term it doesn't break anything. I'm not sure we could say the same thing
  about rewriting Sugar to use Python 3.
 
  James Simmons
 
 
  On Thu, Mar 20, 2014 at 3:55 AM, Kamal Kaur kamal.kaur...@gmail.com
 wrote:
 
  Hello all members,
 
  I need help with the first question in You and Community section. As
  I'll be working for project Port to python 3, I need three answers,
  one of which will I get from the mentors and other from memberss So
  the members and mentors reading this message, Please give your answer
  regarding what will be the impact after completion of my project on
  community? I need to add this answer there and it should be of 1-3
  paragraphs.
 
  There are four outlined steps:
  Step 1. Make use of GTK3 instead of GTK2 because sugar and the apps use
  it.
  Step 2. Port the Sugar core to python3.
  Step 3. Developing a robust test suite.
  Step 4: Port an existing sugar activity to python3 and document process
 
  Please tell me what are your views about the effect on community after
  completion of this project?
 
  Thank you
 
  --
  Kamaljeet Kaur
 
  kamalkaur188.wordpress.com
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 
 
 
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 



 --
 Walter Bender
 Sugar Labs
 http://www.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Make Your Own Sugar Activities! updated on FLOSS Manuals website

2014-03-05 Thread James Simmons
I have been updating code samples to GTK 3 (finishing the excellent work
Aneesh Dogra started for GCI in 2012), making new screen shots, and making
other needed changes to get MYOSA in shape for Sugar 3. I have gotten
enough of this work done that I felt that the updated chapters were ready
for their first publication, which you can see here:

http://en.flossmanuals.net/make-your-own-sugar-activities/index/

This will need some polishing and testing before it is ready for real
publishing as a printed book and e-book on Amazon, but it is getting there.

In GCI 2012 I promised everyone who made guest chapters for this book that
I would send them a printed copy of the book when it was ready and also
that I would include their pictures on the back cover. I am still willing
to do all that, but to do it I'll need pictures of all of you. Ideally
these pictures would be at least 300 DPI because that is what CreateSpace
wants. I don't know yet just how large your picture will be on the back
cover, but giving me a 300 DPI or better photo gives me some flexibility.
This means I want a picture directly from a digital camera or phone if at
all possible. Posting the picture to Facebook or mailing it from a phone
dramatically cuts down on the DPI.

When you send me your picture please also give me an address to send your
book to.

This offer is not limited to GCI contestants. Lionel made a really fine
chapter for the book and I want him to be in on this as well.

If you want to update your bio in the About The Authors chapter this
would be a good time to do that.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] HTML 5 chapters for Make Your Own Sugar Activities!

2014-02-26 Thread James Simmons
During the 2012 Google code-in Lionel wrote a nice chapter for MYOSA on
making Activities using HTML 5 and WebKit. I have been slowly and steadily
updating the other chapters in the book to use Sugar 3 and GTK 3. I have
not updated the website with the latest changes because I don't want the
book to be in a half-done state, but I have been making steady progress.

One thing I have noticed from lurking on this mailing list is that HTML 5
and Sugar have made a lot of progress since that chapter was written. I get
the impression that what is written there may already be obsolete. I also
feel that I'm not the guy who can fix that. I did a fair amount of Activity
development before writing MYOSA but I've drifted away from it since then.

I believe that HTML 5 is going to be a big deal for Sugar and that MYOSA
needs to have some new or updated chapters to reflect that. I am hoping
that some of you might contribute this content.

As for my own updates, some of them might be published in a couple of weeks.

Working on this book has been a rewarding experience for me. I consider it
part of my own Constructionist education. Since finishing it I have been
involved in writing or publishing many other books. I have transcribed
books for Project Gutenberg and Project Gutenberg Canada. I have scanned a
bunch of books for the Internet Archive, using a scanner I designed and
built myself. I updated a memoir of my days among the Hare Krishnas that
had been on a shelf for 30 years and published it, getting five star
reviews on Amazon. I have formatted for publishing a twelve volume
illustrated English edition of *The Mahabharata*, the great epic of India.
I have written a science fiction novel and am working on a second one.

I am not suggesting that contributing HTML 5 chapters to this book will
change your life. However, it definitely changed mine.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] HTML 5 chapters for Make Your Own Sugar Activities!

2014-02-26 Thread James Simmons
Sai,

I agree with you that the Booki software in FLOSS Manuals isn't all it
could be. It's caused me a lot of frustration too. The good thing about it
is that it gives you a way to work in a Wiki where the content isn't
automatically published to the whole world. The public website is generated
from the Wiki as static pages. You only publish when the content is ready
to publish. You can also create PDFs in the sizes needed for book
publishing, plus EPUBs for e-books (which can be easily converted to Kindle
books). That is the brilliant thing about it. The page editing lacks a lot.
It is just as bad today as it was two years ago.

I use Open Office to create my published books other than my two FLOSS
Manuals. If you don't need to collaborate on the web it works very well.

I'm willing to deal with FM if somebody else creates the content. You can
paste HTML from other sources into FM if it is simple HTML without styles,
font tags, etc. I wrote a utility in Python using Beautiful Soup which
takes the HTML generated by a word processor and strips out the extra junk.
I use it to create e-books from Open Office documents.

As for a whole book on HTML 5 Activities, that might be a good idea but
what I had in mind was something on how to take an HTML 5 application and
put a Sugar Activity wrapper around it that can save and restore with the
Journal, maybe do some collaboration, etc. In MYOSA I have a chapter on
PyGame which doesn't actually teach you to use PyGame, but instead shows
you how to take a PyGame application and put an Activity wrapper around it
using sugargame. There are other good resources for learning PyGame and
HTML 5.

It sounds like we may have a Sugar specific HTML 5 library being developed
and that would be out of scope, other than pointing the reader to
information about it.

James Simmons



On Wed, Feb 26, 2014 at 10:56 AM, Sai Vineet saivinee...@gmail.com wrote:

 Hi,

 Yes we need a Web Activity chapter. But a whole book would be probably
 nicer, since the whole method of development changes in Web Activities. Do
 we have docs for sugar-web? I haven't found any ... I think we should make
 a new book on Web Activities.

 Also I would like to say that editing books on FLOSS manuals is a pain. I
 tried doing it during GCI, but it didn't work in Chrome, and worked
 sometimes in Firefox but mostly not. I think that may be the reason for
 people not contributing much. It would be better if it's shifted somewhere
 else, maybe something like developer.sugarlabs.org?

 Regards,
 Vineet.


 On Wed, Feb 26, 2014 at 10:15 PM, James Simmons nices...@gmail.comwrote:

 During the 2012 Google code-in Lionel wrote a nice chapter for MYOSA on
 making Activities using HTML 5 and WebKit. I have been slowly and steadily
 updating the other chapters in the book to use Sugar 3 and GTK 3. I have
 not updated the website with the latest changes because I don't want the
 book to be in a half-done state, but I have been making steady progress.

 One thing I have noticed from lurking on this mailing list is that HTML 5
 and Sugar have made a lot of progress since that chapter was written. I get
 the impression that what is written there may already be obsolete. I also
 feel that I'm not the guy who can fix that. I did a fair amount of Activity
 development before writing MYOSA but I've drifted away from it since then.

 I believe that HTML 5 is going to be a big deal for Sugar and that MYOSA
 needs to have some new or updated chapters to reflect that. I am hoping
 that some of you might contribute this content.

 As for my own updates, some of them might be published in a couple of
 weeks.


 Nice!


 Working on this book has been a rewarding experience for me. I consider
 it part of my own Constructionist education. Since finishing it I have been
 involved in writing or publishing many other books. I have transcribed
 books for Project Gutenberg and Project Gutenberg Canada. I have scanned a
 bunch of books for the Internet Archive, using a scanner I designed and
 built myself. I updated a memoir of my days among the Hare Krishnas that
 had been on a shelf for 30 years and published it, getting five star
 reviews on Amazon. I have formatted for publishing a twelve volume
 illustrated English edition of *The Mahabharata*, the great epic of
 India. I have written a science fiction novel and am working on a second
 one.

 I am not suggesting that contributing HTML 5 chapters to this book will
 change your life. However, it definitely changed mine.

 James Simmons


 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Docs for sugar-runner?

2014-02-21 Thread James Simmons
Awhile back we stopped using sugar-build and started using sugar-runner. So
the docs at developer.sugarlabs.org should be obsolete. I've been trying to
find any information at all on sugar-runner and I've come up empty. Can
somebody point me to some?

I'm trying to update the Make Your Own Sugar Activities! book and under
development environment setup I had a section considering the pros and cons
of using sugar-jhbuild, later revised to sugar-build.

Maybe I'm just confused. If you wanted to check out the latest Sugar code
and run it on your desktop how would you do it?

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Docs for sugar-runner?

2014-02-21 Thread James Simmons
Thanks to you and Alan for your answers. That does clear things up.

James Simmons



On Fri, Feb 21, 2014 at 4:33 PM, Daniel Narvaez dwnarv...@gmail.com wrote:

 Hello,

 sugar-build is not obsolete. If you want the very latest sugar from git or
 an approach that works independently from the linux distribution you are
 using, it's the way to go.

 sugar-runner is just a script to run sugar without setting it up as a
 separate login manager session, it replaces sugar-emulator. You can use
 sugar-runner inside sugar-build (through the osbuild run command). Or you
 can use it directly if you distribution has recent enough sugar packages
 (on Fedora 20 for example).

 Is that clear enough?


 On 21 February 2014 22:26, James Simmons nices...@gmail.com wrote:

 Awhile back we stopped using sugar-build and started using sugar-runner.
 So the docs at developer.sugarlabs.org should be obsolete. I've been
 trying to find any information at all on sugar-runner and I've come up
 empty. Can somebody point me to some?

 I'm trying to update the Make Your Own Sugar Activities! book and under
 development environment setup I had a section considering the pros and cons
 of using sugar-jhbuild, later revised to sugar-build.

 Maybe I'm just confused. If you wanted to check out the latest Sugar code
 and run it on your desktop how would you do it?

 James Simmons


 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




 --
 Daniel Narvaez

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] PyGame/ Sugargame issues with GTK 3

2014-02-19 Thread James Simmons
It occurs to me to ask if sugargame is still something you need to copy the
code into your activity to use or if it is part of sugar proper. I'm still
taking the latest code and copying it in.

James Simmons



On Wed, Feb 19, 2014 at 2:52 AM, James Simmons nices...@gmail.com wrote:

 Alan,

 Grabbing focus definitely helped. I get the arrow keys now. However, I
 also use the plus and minus keys and I still don't get them. In the logs I
 see these messages:

 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key Num_Lock unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key Scroll_Lock unrecognized
 Key Scroll_Lock unrecognized
 Key Scroll_Lock unrecognized
 Key Scroll_Lock unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_8 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_2 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_4 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_6 unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Add unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Subtract unrecognized
 Key KP_Add unrecognized

Re: [Sugar-devel] PyGame/ Sugargame issues with GTK 3

2014-02-19 Thread James Simmons
Manuel,

I am aware of the test Activity. I wrote this chapter on using PyGame to
develop Activities:

http://en.flossmanuals.net/make-your-own-sugar-activities/making-activities-using-pygame/

The code changes to sugargame to make it recognize the plus and minus keys
aren't hard to figure out, and I could correct my personal copy of
sugargame. I was a bit surprised to find that while so much has changed in
Sugar since I wrote the book but sugargame still isn't an official part of
the Sugar API. It's been a couple of years now.

James Simmons



On Wed, Feb 19, 2014 at 5:56 AM, Manuel Quiñones ma...@laptop.org wrote:

 2014-02-19 6:26 GMT-03:00 James Simmons nices...@gmail.com:
  It occurs to me to ask if sugargame is still something you need to copy
 the
  code into your activity to use or if it is part of sugar proper. I'm
 still
  taking the latest code and copying it in.

 Yes, you need to copy sugargame inside your activity.

 Inside sugargame repository there is a test Activity
 https://git.sugarlabs.org/sugargame/mainline/trees/master/test

 It displays a bouncing ball.  You should be able to change the ball
 direction with left and right arrows.  Can you test the activity?

 Note that you should use PyGame events, not GTK+.  The demo listens to
 pygame.KEYDOWN event in pygame.K_LEFT and pygame.K_RIGHT.

 
  James Simmons
 
 
 
  On Wed, Feb 19, 2014 at 2:52 AM, James Simmons nices...@gmail.com
 wrote:
 
  Alan,
 
  Grabbing focus definitely helped. I get the arrow keys now. However, I
  also use the plus and minus keys and I still don't get them. In the
 logs I
  see these messages:
 
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key Num_Lock unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_6 unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Subtract unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key KP_Add unrecognized
  Key Scroll_Lock unrecognized
  Key Scroll_Lock unrecognized
  Key Scroll_Lock unrecognized
  Key Scroll_Lock unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_8 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_2 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_4 unrecognized
  Key KP_6 unrecognized
  Key KP_6

[Sugar-devel] PyGame/ Sugargame issues with GTK 3

2014-02-18 Thread James Simmons
Receiving a GCI T-shirt last week when I didn't actually mentor anyone
shamed me into resuming work on the revisions needed for a GTK 3 edition of
Make Your Own Sugar Activities!. I have been polishing up the examples
that Aneesh Dogra already converted last year and working on converting
examples he didn't do, notably the Making Activities With PyGame example.

This is where my GTK3 code for that is:

http://git.sugarlabs.org/myo-sugar-activities-examples/mainline/trees/master/Making_Activities_Using_PyGame_gtk3

I updated sugargame to the latest code I found in Gitorious, which clearly
uses GTK3. I was able to get the Activity to start up and run with no log
errors, but while it runs it ignores my key presses. I don't know if the
problem is with sugargame or with sugar-runner. (I use Fedora 20 and the
sugar-runner that ships with that). My Read Etexts example recognizes the
arrow keys when running under sugar-runner so I don't know why pygame would
have a problem. The stand alone version (no sugar or Gtk) works just fine.
This makes me thing there is a bug in the new sugargame. I wonder if anyone
has thoughts on how I could diagnose and fix this.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Does it make sense to have Activities copy text to the clipboard?

2014-01-15 Thread James Simmons
The code for the Activity is here:

http://git.sugarlabs.org/myo-sugar-activities-examples/mainline/blobs/master/Add_Refinements_gtk3/ReadEtextsActivity2.py

The code being executed is:

def edit_toolbar_copy_cb(self, button):
textbuffer = self.textview.get_buffer()
begin, end = textbuffer.get_selection_bounds()
copy_text = textbuffer.get_text(begin, end,  False)
self.clipboard.set_text(copy_text)

The definition for self.clipboard is:

   self.clipboard = Gtk.Clipboard()


on line 166.


This code is similar to what was in my Read Etexts Activity. I'll have
to see if that one still works. I know textbuffer.get_text() used to
take only two parameters and now needs three.


But thanks for confirming that the clipboard works as I described.
That means it's my problem and I can try and figure it out.


James Simmons



On Tue, Jan 14, 2014 at 6:40 PM, Walter Bender walter.ben...@gmail.comwrote:

 On Tue, Jan 14, 2014 at 6:20 PM, James Simmons nices...@gmail.com wrote:
  GCI has come and gone and none of my MYOSA tasks got done so I decided
 that
  if I'm going to get a GCI T-shirt this year I'd better do something to
 earn
  it. So I'm doing the tasks that I tried to get GCI-ers to do for me.
 
  I'm really rusty at this, but I did manage to update the Gtk3 version of
 the
  Adding Refinements example to use the current toolbar. However, when
 testing
  it I discovered that copying text to the clipboard doesn't work the way I
  remembered it. It seems to me that when I did the copy in the past there
  would be an object in the frame that was the clipboard entry. You could
 have
  several of these, and there was a menu option to make Journal entries
 out of
  them. That's how I remember it, anyway.
 
  I don't see this anymore, and I wonder if it is a change to Sugar itself
 or
  just a bug in my code.

 Hard to say without a link to your code :P

 You prob. want something like this:

 clipboard = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
 text_buffer.copy_clipboard(clipboard)

 regards

 -walter

 
  James Simmons
 
 
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 



 --
 Walter Bender
 Sugar Labs
 http://www.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Does it make sense to have Activities copy text to the clipboard?

2014-01-15 Thread James Simmons
I'm using Fedora 20 and the version of sugar-runner that ships with that.
I'm modifying the Gtk3 versions of the code that Aneesh Dogra did for last
year's GCI. It doesn't sound like Sugar is the issue here.

James Simmons



On Wed, Jan 15, 2014 at 5:07 AM, Gonzalo Odiard godi...@sugarlabs.orgwrote:

 What version of Sugar are you using?
 The clipboard should continue working as you describe.

 Gonzalo


 On Tue, Jan 14, 2014 at 8:20 PM, James Simmons nices...@gmail.com wrote:

 GCI has come and gone and none of my MYOSA tasks got done so I decided
 that if I'm going to get a GCI T-shirt this year I'd better do something to
 earn it. So I'm doing the tasks that I tried to get GCI-ers to do for me.

 I'm really rusty at this, but I did manage to update the Gtk3 version of
 the Adding Refinements example to use the current toolbar. However, when
 testing it I discovered that copying text to the clipboard doesn't work the
 way I remembered it. It seems to me that when I did the copy in the past
 there would be an object in the frame that was the clipboard entry. You
 could have several of these, and there was a menu option to make Journal
 entries out of them. That's how I remember it, anyway.

 I don't see this anymore, and I wonder if it is a change to Sugar itself
 or just a bug in my code.

 James Simmons


 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




 --
 Gonzalo Odiard

 SugarLabs - Learning Software for children

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Does it make sense to have Activities copy text to the clipboard?

2014-01-14 Thread James Simmons
GCI has come and gone and none of my MYOSA tasks got done so I decided that
if I'm going to get a GCI T-shirt this year I'd better do something to earn
it. So I'm doing the tasks that I tried to get GCI-ers to do for me.

I'm really rusty at this, but I did manage to update the Gtk3 version of
the Adding Refinements example to use the current toolbar. However, when
testing it I discovered that copying text to the clipboard doesn't work the
way I remembered it. It seems to me that when I did the copy in the past
there would be an object in the frame that was the clipboard entry. You
could have several of these, and there was a menu option to make Journal
entries out of them. That's how I remember it, anyway.

I don't see this anymore, and I wonder if it is a change to Sugar itself or
just a bug in my code.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] How to add tasks to GCI list?

2013-11-25 Thread James Simmons
I have been preoccupied with my day job lately and haven't spent as much
time looking into GCI as I should. Today I checked and find that I can see
the list of tasks but I don't see a way to add new ones.

One of the tasks I suggested made it to the list: Use Latest Toolbars in
MYOSA Examples. I see that Aneesh Dogra is the mentor on that, and I think
he'll do a great job.

What I'd like to do is split this into more than one task.  Updating the
examples in the GTK3 section of the repository is one, and copying the
samples into the book and updating the relevant text describing it would be
another.  Before you can copy the examples you need to shorten the lines to
80 characters or less using Python line-wrapping rules. The examples are
pasted in full, then parts of it are broken out and discussed in the
chapter. This will be a fair amount of work, so maybe each chapter is one
task, or maybe two chapters is a task.

I'd like to be the mentor for these chapter updates.

The Object Chooser has apparently been improved so that could be part of
the Fun With The Journal chapter updates.

The new SimpleActivity class from Augustin could use a chapter.

A lot has happened with HTML5 since Lionel contributed his guest chapter on
the topic and that could use a chapter too. At least one.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] your help needed

2013-10-23 Thread James Simmons
Walter,

I have a melange account from last year, but I don't see anywhere to
volunteer to be a Mentor on the site.  I have some tasks for updating the *Make
Your Own Sugar Activities!* manual that I should have done myself, but
never did.  Basically bringing the example code up to date to use the new
toolbars (or what I called the new toolbars in the first edition).
 Possibly some other tasks.

James Simmons


On Tue, Oct 22, 2013 at 1:45 PM, Walter Bender walter.ben...@gmail.comwrote:

 We have less than one week to pull together our preliminary list of
 mentors and tasks for our Google Code In application. Please see [1]
 if you are interested in being a mentor (many tasks do not involve
 coding, so non-programmers most welcome too).

 Also, please add possible tasks to the table here [2] (or just add
 them in plain text after the table, if it is easier. we can edit
 later)

 thanks.

 -walter

 [1] http://wiki.sugarlabs.org/go/Google_Code_In_2013/Participate#Mentors
 [2] http://wiki.sugarlabs.org/go/Google_Code_In_2013#Tasks

 --
 Walter Bender
 Sugar Labs
 http://www.sugarlabs.org
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activities with deprecated fields in activity.info

2013-10-22 Thread James Simmons
Gonzalo,

I just got around to checking this and I find that View Slides, latest
version 14, does not have the extra entry in activity.info.
Get IA Books, latest version 7, no service_name.
Sugar Commander, latest version 9, same thing.
Read SD Comics, latest version 3, same thing.

So I have nothing to update, from what I can see.

James Simmons



On Tue, Oct 1, 2013 at 6:29 AM, Gonzalo Odiard gonz...@laptop.org wrote:

 In sugar 0.98 or newer, we not longer read the fields service_name and
 class
 in the activity.info file. These fields were deprecated on sugar 0.96 [1]
 and sugar-toolkit-gtk3 never used them.
 The following activities use these fields in the last versions available
 on ASLO:

 Activities with 'class =' ['About Me', 'JAMActivityFlash', 'EduKT', 'Sin
 diente', 'Java', 'Guido van Robot', 'Edit', 'Madagascar', 'ListenAndSpell',
 'Hop-A-Round', 'Quinteti', 'BlockParty', 'Jam Game Boy Advance',
 'JAMClock', 'EscribirEspacial', 'Ayuda', 'FreeFromMalaria', 'Juani
 Downloader', 'EatBoom', 'Super Chef', 'ElementsActivity', 'Ecomundo',
 'Aide', 'FileShare', 'Domino', 'Wine', 'JAMediaImagenes', 'Sugar File
 Manager', 'gvSIG Batovi Map Viewer', 'ParticipAccion', 'NES',
 'ConstellationsFlashCards', 'AguBrowser', 'Ajedrez', 'SocialCalcActivity',
 'x2o', 'TeachTeacher', 'Mirage', 'Wordsearch', 'Sonata', 'XOlympics',
 'SharedTextDemo', 'Plot']

 Activities with 'service_name =' ['View Slides', 'FoodForceII', 'About
 Me', 'JAMActivityFlash', 'Math Quwy', 'falabracman', 'PyEyes', 'EduKT',
 'Sin diente', 'Develop', 'BioDiv', 'Java', 'Totem', 'Guido van Robot',
 'Madagascar', 'ListenAndSpell', 'Analyze', 'Lemonade', 'Quinteti',
 'hMouse', 'idle', 'BlockParty', 'Jam Game Boy Advance', 'Tuxmath', 'GoGo',
 'JAMClock', 'EscribirEspacial', 'Ayuda', 'FoodForce2', 'Watch Me',
 'FreeFromMalaria', 'Blocku', 'Get IA Books', 'EatBoom', 'Super Chef',
 'Micropolis', 'ElementsActivity', 'Ecomundo', 'Sugar Commander', 'Aide',
 'FileShare', 'Domino', 'Wine', 'JAMediaImagenes', 'Sugar File Manager',
 'Radio', 'ParticipAccion', 'Read SD Comics', 'ClubOthello', 'NES',
 'Colors', 'ConstellationsFlashCards', 'Bubble Pop', 'AguBrowser', 'Story
 Builder', 'Puzzleton', 'Sort Game', 'MathGraph32', 'Ajedrez',
 'SocialCalcActivity', 'x2o', 'TeachTeacher', 'Mirage', 'Wordsearch',
 'Sonata', 'XOlympics', 'Arithmetic', 'SharedTextDemo', 'Gnumeric']

 Please, developers update them.
 (Yes, I have some to update too)

 Gonzalo

 [1] http://wiki.sugarlabs.org/go/0.96/Notes#API

 (For the courious, I used the attached script to check this, after
 download all the latest .xo files)

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [IAEP] Sugar Digest 2013-08-22

2013-08-23 Thread James Simmons
Walter,

Several points in your digest got my attention.  First, I like the Disreali
quote.  I have just finished writing a novel and I learned more from doing
that than from every literature class I ever took.  The funny thing is I
had been assigned to write short stories in high school, but my teachers
never told you how to go about it. I only learned the process from reading
books by Jack Woodford (http://en.wikipedia.org/wiki/Jack_Woodford).  I
wish I had those books in high school. They explain everything. A lot of
well known authors learned how to make stories and novels from those books,
including Ray Bradbury.

Second, I am also an admirer of Flavio Danesse.  He has a website in
Spanish that is a great resource for a new Python programmer.  I agree that
IDEs are probably something to avoid when learning to program, at least the
more complex ones.  I learned C from Turbo C, which was not much more than
an editor with a compiler that let you click on a compile error and be
taken to the line in the editor that had the problem.  Something like that
is worthwhile.  Eric is pretty much just that for Python, plus syntax
highlighting.  If you mess up the indenting it will tell you.

I have a niece at Thomas Jefferson High School that I tutored in Java
programming.  Her books were written by her teachers and licensed using
Creative Commons, but apparently they weren't published anywhere.  They
didn't use IDEs either.  It was a tough class for some very bright kids.

Finally, the whole Spirituality For Kids thing.  I suppose people have
different ideas on what Spirituality is.  The website promotes astrology,
which I find kind of dubious.  I got all my ideas about Spirituality from
my wasted youth in the Hare Krishna movement, so I was hoping for something
more like my own education.  In the first lesson you'd learn how You're
not that body! and other lessons would include The Path Of Knowledge, The
Path Of Action, The Path Of Devotion, and so on.  After the final lesson
the child would be given a bag full of *Bhagavad Gitas* and sent to the
nearest airport.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Usage of sugar-build

2013-07-26 Thread James Simmons
I probably will not do much updating to MYOSA on sugar-build until the
chroot branch has been merged, then.  As long as Xephyr is still in there
the instructions I have should be tolerable.  I might put in something
about the need to update the sudoers table with visudo and give an
example, as that could be a stumbling block for some.

I am a bit puzzled about profile not working.  I *think* I'm doing it
right.

James Simmons



On Fri, Jul 26, 2013 at 5:55 AM, Manuel Quiñones ma...@laptop.org wrote:

 2013/7/25 James Simmons nices...@gmail.com:
  I tried out Alt-Tab switching and it works fine.  I also tried
 prefs.json,
  with mixed results.  This is the contents of the file:
 
  {
  resolution: 1024x768,
  profile: Willy Wonka
  }
 
  Resolution worked just fine, and Sugar showed up in a window just like
 the
  old days.  Instead of saying Sugar in a Window it says Sugar Runner.
  I
  can't tell if it still uses Xephyr or not.

 If you are running sugar-build master, then yes, it uses Xephyr.  You
 can tell by looking at the running processes, for example with: ps -e
 --forest

 The chroot branch has not been merged yet.

 --
 .. manuq ..

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Usage of sugar-build

2013-07-25 Thread James Simmons
I finally got sugar-build working on Fedora 19 last night.  I plan to
update Make Your Own Sugar Activities! to discuss this.  Some stuff I
plan to include:

How to use visudo to edit the sudoers file to allow your account to
install RPMs using sudo.

How to install gcc and python development, which are required for
osbuild build to work.

How to use Ctrl-Alt-F2 to open a virtual terminal, which you will use to
run ./osbuild run.  Using Ctrl-Alt-Fkey to go from the Sugar environment
to your Python development environment.

Running multiple copies of sugar-build as different users to test
collaboration with just one PC.

Using the older version of Sugar which runs in a window, and why the
current one does not use a window (problems with keystrokes being
intercepted by Xephyr, etc.)

Avoiding the Shut Down option in sugar-build, because it actually shuts
down the machine.  Using Alt-Shift-Q to quit the Sugar environment.

Speculation on what will happen with future RPM distributions of Sugar.
Will there still be a menu option under Education?

Anything else anyone can think of?

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Usage of sugar-build

2013-07-25 Thread James Simmons
Manuel,

I am aware that ./osbuild run can be done from within a GNOME session.  I
did it that way the first time I ran it.  What I need to provide to my
readers is a way they can easily move from a development environment to a
Sugar environment and back again.  Running Sugar in a window made that
easy.  Generally when I debug a Sugar Activity I just quit and relaunch the
Activity to test it.  Relaunching Sugar is not necessary.  The business
with launching it from a virtual terminal makes that possible, and also
makes it possible to run multiple copies of Sugar under different IDs so
you can test collaboration.  In the absence of any instructions I assumed
that this is what I was meant to do.  If there is an easier way to bounce
between Sugar and GNOME without restarting Sugar each time I'd love to hear
about it.

As for web activities, we do have a guest chapter from Lionel on the
subject.  I agree the book needs more but I get the impression that we're
still working out the details on this.  I am somewhat comfortable with
HTML, JS, CSS, embedded fonts, and the like but I may not be the best
person to write these chapters, at least until things stabilize a bit.

James Simmons


On Thu, Jul 25, 2013 at 10:38 AM, Manuel Quiñones ma...@laptop.org wrote:

 2013/7/25 James Simmons nices...@gmail.com:
  I finally got sugar-build working on Fedora 19 last night.  I plan to
 update
  Make Your Own Sugar Activities! to discuss this.

 Excellent James!

  How to use Ctrl-Alt-F2 to open a virtual terminal, which you will use
 to
  run ./osbuild run.  Using Ctrl-Alt-Fkey to go from the Sugar
 environment
  to your Python development environment.

 Is this really needed? ./osbuild run can be done from inside the
 GNOME session.

  Anything else anyone can think of?

 Start promoting the development of web activities?

 .. manuq ..

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Usage of sugar-build

2013-07-25 Thread James Simmons
I noticed that the sugar-build script installs the framebuffer version of
X11 so I assumed it was meant to start from a virtual terminal.  That does
work.

If it is running in a GNOME window but full screen how do you go about
switching to another window?  Would Alt-Tab do it?  I remember that we
wanted to get rid of Xephyr, and I've experienced problems with Sugar in
Xephyr myself so I can see why, but I'm still kind of puzzled by this and I
think MYOSA readers would be too.

James Simmons



On Thu, Jul 25, 2013 at 11:19 AM, Walter Bender walter.ben...@gmail.comwrote:

 On Thu, Jul 25, 2013 at 12:10 PM, James Simmons nices...@gmail.com
 wrote:
  Manuel,
 
  I am aware that ./osbuild run can be done from within a GNOME session.  I
  did it that way the first time I ran it.  What I need to provide to my
  readers is a way they can easily move from a development environment to a
  Sugar environment and back again.  Running Sugar in a window made that
 easy.
  Generally when I debug a Sugar Activity I just quit and relaunch the
  Activity to test it.  Relaunching Sugar is not necessary.  The business
 with
  launching it from a virtual terminal makes that possible, and also makes
 it
  possible to run multiple copies of Sugar under different IDs so you can
 test
  collaboration.  In the absence of any instructions I assumed that this is
  what I was meant to do.  If there is an easier way to bounce between
 Sugar
  and GNOME without restarting Sugar each time I'd love to hear about it.

 When you run Sugar using ./osbuild run, even though Sugar is running
 full screen, it is running in a window in GNOME, so you can switch to
 other windows within the GNOME session, and, for example, edit
 activities.

 
  As for web activities, we do have a guest chapter from Lionel on the
  subject.  I agree the book needs more but I get the impression that we're
  still working out the details on this.  I am somewhat comfortable with
 HTML,
  JS, CSS, embedded fonts, and the like but I may not be the best person to
  write these chapters, at least until things stabilize a bit.
 
  James Simmons
 
 
  On Thu, Jul 25, 2013 at 10:38 AM, Manuel Quiñones ma...@laptop.org
 wrote:
 
  2013/7/25 James Simmons nices...@gmail.com:
   I finally got sugar-build working on Fedora 19 last night.  I plan to
   update
   Make Your Own Sugar Activities! to discuss this.
 
  Excellent James!
 
   How to use Ctrl-Alt-F2 to open a virtual terminal, which you will
 use
   to
   run ./osbuild run.  Using Ctrl-Alt-Fkey to go from the Sugar
   environment
   to your Python development environment.
 
  Is this really needed? ./osbuild run can be done from inside the
  GNOME session.
 
   Anything else anyone can think of?
 
  Start promoting the development of web activities?
 
  .. manuq ..
 
 
 
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 



 --
 Walter Bender
 Sugar Labs
 http://www.sugarlabs.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Usage of sugar-build

2013-07-25 Thread James Simmons
I tried out Alt-Tab switching and it works fine.  I also tried prefs.json,
with mixed results.  This is the contents of the file:

{
resolution: 1024x768,
profile: Willy Wonka
}

Resolution worked just fine, and Sugar showed up in a window just like the
old days.  Instead of saying Sugar in a Window it says Sugar Runner.  I
can't tell if it still uses Xephyr or not.

On the other hand, profile got ignored.  In the F1 and F2 views of Sugar
I am identified as James Simmons from my login id, not Willy Wonka.

It seems to me that getting rid of Xephyr was supposed to be a big change
but I'm not seeing that.  If you specify a window size everything seems the
same as before.  You *can* run Sugar from a text mode virtual terminal,
which may or may not be new.

James Simmons



On Thu, Jul 25, 2013 at 8:01 PM, moku...@earthtreasury.org wrote:

 Alt-tab to go between Sugar and other programs is very clumsy at first,
 but works. When I do this from a full-screen Sugar session I don't get the
 usual view of icons of other applications to choose from, but once I have
 Sugar and the program I want to alternate with set up for toggling
 between, it is quite easy.

 On Thu, July 25, 2013 12:10 pm, James Simmons wrote:
  Manuel,
 
  I am aware that ./osbuild run can be done from within a GNOME session.
 I
  did it that way the first time I ran it.  What I need to provide to my
 readers is a way they can easily move from a development environment to
 a
  Sugar environment and back again.  Running Sugar in a window made that
 easy.  Generally when I debug a Sugar Activity I just quit and relaunch
 the
  Activity to test it.  Relaunching Sugar is not necessary.  The business
 with launching it from a virtual terminal makes that possible, and also
 makes it possible to run multiple copies of Sugar under different IDs so
 you can test collaboration.  In the absence of any instructions I
 assumed
  that this is what I was meant to do.  If there is an easier way to
 bounce
  between Sugar and GNOME without restarting Sugar each time I'd love to
 hear
  about it.
 
  As for web activities, we do have a guest chapter from Lionel on the
 subject.  I agree the book needs more but I get the impression that
 we're
  still working out the details on this.  I am somewhat comfortable with
 HTML, JS, CSS, embedded fonts, and the like but I may not be the best
 person to write these chapters, at least until things stabilize a bit.
 
  James Simmons
 
 
  On Thu, Jul 25, 2013 at 10:38 AM, Manuel Quiñones ma...@laptop.org
 wrote:
 
  2013/7/25 James Simmons nices...@gmail.com:
   I finally got sugar-build working on Fedora 19 last night.  I plan to
  update
   Make Your Own Sugar Activities! to discuss this.
  Excellent James!
   How to use Ctrl-Alt-F2 to open a virtual terminal, which you will
  use
  to
   run ./osbuild run.  Using Ctrl-Alt-Fkey to go from the Sugar
  environment
   to your Python development environment.
  Is this really needed? ./osbuild run can be done from inside the
 GNOME session.
   Anything else anyone can think of?
  Start promoting the development of web activities?
  .. manuq ..
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 


 --
 Edward Mokurai

 (#40664;#38647;/#2344;#2367;#2358;#2348;#2381;#2342;#2327;#2352;#2381;#2332;/#1606;#1588;#1576;#1583;#1711;#1585;#1580;)
 Cherlin
 Silent Thunder is my name, and Children are my nation.
 The Cosmos is my dwelling place, the Truth my destination.
 http://wiki.sugarlabs.org/go/Replacing_Textbooks





___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Problems downloading RPM's in osbuild

2013-07-23 Thread James Simmons
I am trying to run osbuild in Fedora 19.  I use Dropbox on that computer,
so the repository for Dropbox is the first RPM repo osbuild looks at.  Also
the last.  When it needs to download an RPM it looks at the Dropbox repo,
can't find it there, and gives up:

[james@olpc sugar-build]$ ./osbuild build

= Distribution information =

Name: fedora
Version: 19
Lib directory: None
Supported: True

sudo yum install mesa-libGLES-devel libsoup-devel libcanberra-devel ccache
gtk2-devel pycairo-devel nodejs npm automake alsa-lib-devel autoconf
dbus-glib-devel GConf2-devel glib2-devel gnome-common
gobject-introspection-devel gsettings-desktop-schemas-devel
gstreamer1-devel gstreamer1-plugins-base-devel gtk3-devel icon-naming-utils
icon-slicer intltool librsvg2-devel libtool telepathy-glib-devel bison
cairo-gobject-devel espeak-devel flex geoclue-devel gperf gtk-doc
libicu-devel iso-codes-devel libjpeg-turbo-devel libsecret-devel
libwebp-devel libxml2-devel libxslt-devel texinfo ragel ruby sqlite-devel
libxkbfile-devel libXtst-devel yasm
[sudo] password for james:
Loaded plugins: langpacks, refresh-packagekit
http://linux.dropbox.com/fedora/19/repodata/repomd.xml: [Errno 14] HTTP
Error 404 - Not Found
Trying other mirror.
Error: failure: repodata/repomd.xml from Dropbox: [Errno 256] No more
mirrors to try.
http://linux.dropbox.com/fedora/19/repodata/repomd.xml: [Errno 14] HTTP
Error 404 - Not Found
Traceback (most recent call last):
  File /home/james/olpc/sugar-build/build/commands/build, line 4, in
module
common.run(build)
  File /home/james/olpc/sugar-build/build/commands/common.py, line 75, in
run
setup()
  File /home/james/olpc/sugar-build/build/commands/common.py, line 68, in
setup
if not main.setup(config_args, check_args):
  File
/home/james/olpc/sugar-build/build/out/sandbox/install/lib/python2.7/site-packages/osbuild/main.py,
line 61, in setup
if not system.check(**check_args):
  File
/home/james/olpc/sugar-build/build/out/sandbox/install/lib/python2.7/site-packages/osbuild/system.py,
line 44, in check
if not _run_checks(package_manager, config.load_dependencies(),
packages):
  File
/home/james/olpc/sugar-build/build/out/sandbox/install/lib/python2.7/site-packages/osbuild/system.py,
line 195, in _run_checks
package_manager.install_packages(to_install)
  File
/home/james/olpc/sugar-build/build/out/sandbox/install/lib/python2.7/site-packages/osbuild/plugins/fedora.py,
line 35, in install_packages
command.run_with_sudo(args)
  File
/home/james/olpc/sugar-build/build/out/sandbox/install/lib/python2.7/site-packages/osbuild/command.py,
line 50, in run_with_sudo
subprocess.check_call(args_with_sudo)
  File /usr/lib/python2.7/subprocess.py, line 542, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', 'yum', 'install',
u'mesa-libGLES-devel', u'libsoup-devel', u'libcanberra-devel', u'ccache',
u'gtk2-devel', u'pycairo-devel', u'nodejs', u'npm', u'automake',
u'alsa-lib-devel', u'autoconf', u'dbus-glib-devel', u'GConf2-devel',
u'glib2-devel', u'gnome-common', u'gobject-introspection-devel',
u'gsettings-desktop-schemas-devel', u'gstreamer1-devel',
u'gstreamer1-plugins-base-devel', u'gtk3-devel', u'icon-naming-utils',
u'icon-slicer', u'intltool', u'librsvg2-devel', u'libtool',
u'telepathy-glib-devel', u'bison', u'cairo-gobject-devel', u'espeak-devel',
u'flex', u'geoclue-devel', u'gperf', u'gtk-doc', u'libicu-devel',
u'iso-codes-devel', u'libjpeg-turbo-devel', u'libsecret-devel',
u'libwebp-devel', u'libxml2-devel', u'libxslt-devel', u'texinfo', u'ragel',
u'ruby', u'sqlite-devel', u'libxkbfile-devel', u'libXtst-devel', u'yasm']'
returned non-zero exit status 1

It looks like a problem with yum as it does the same damned thing when I
try running yum from the command line after doing su.  On the other hand
the graphical package manager works just fine.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Docs for sugar build not where I thought

2013-07-07 Thread James Simmons
I've decided it is time to start updating MYOSA again and to start things
off I thought I would upgrade to Fedora 19 (which I did) then install
sugar-build.  In MYOSA I say that the instructions for sugar-build are here:

http://wiki.sugarlabs.org/go/Development_Team/Sugar-Build

They are not.  There are two links on this page and both are dead.  So I'm
stuck and so are my readers.

Can somebody give me an up to date link?

Thanks,

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Is PyGame already installed on real XO ?

2013-06-28 Thread James Simmons
Laurent,

There is a Git repo containing all the sample code in the FLOSS Manual.
You can judge for yourself how well PyGame might work for you.  I am not a
PyGame expert but in making the examples I thought it worked OK.

There is a guest chapter on making an Activity using HTML and JavaScript
which you may find worth checking out.  There has been a LOT of discussion
on the list lately about how best to do this, so this chapter cannot be
considered the last word on the subject, but it should be a good place to
begin.

James Simmons



On Thu, Jun 27, 2013 at 7:04 PM, laurent bernabe
laurent.bern...@gmail.comwrote:

 Thanks for the advice,

 So I think I'll start a program from scratch, using Gtk3 (as I suppose
 that GCompris is built upon PyGame).

 Regards


 2013/6/28 Gonzalo Odiard gonz...@laptop.org

 IMHO, PyGame does not integrate well with gtk, and we see different
 issues with activities using it,
 better use Gtk3 or do a web activity.

 Gonzalo


 On Thu, Jun 27, 2013 at 6:56 AM, laurent bernabe 
 laurent.bern...@gmail.com wrote:

 Hello everyone,

 I plan to write an activity in order to let users learn basics chess
 rules.

 But I am wondering whether I should write it in GTK3 or PyGame as I
 don't know if the real XO (not the emulator instances like in my
 environment) has already an installation of PyGame, so that no extra work
 need to be done in order to install the activity I'll try to write.

 Thanks in advance.

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Fwd: Is PyGame already installed on real XO ?

2013-06-27 Thread James Simmons
Laurent,

I'm forwarding this to the list.  The only thing I know about GCompris
chess is that it exists.  It looks like GCompris use to be distributed as a
bunch of individual Activities and now they are all one Activity.  Someone
on the list may be able to help.

James Simmons


-- Forwarded message --
From: laurent bernabe laurent.bern...@gmail.com
Date: Thu, Jun 27, 2013 at 11:06 AM
Subject: Re: [Sugar-devel] Is PyGame already installed on real XO ?
To: James Simmons nices...@gmail.com


Hello again,

I've searched for the GCompris MoveLearner repository in GitSugarLabs, but
I've just found the GCompris main line.
Is there a simple way for me to fetch Gcompris Chess Move Learner project
code ? Apologizes, again I've only simple usage of git.

Regards


2013/6/27 laurent bernabe laurent.bern...@gmail.com

 Thanks James,

 Sorry for not having read all the floss yet : I'll go on reading this
 chapter whose topic is PyGame :)

 I agree to try involving the existing chess learning app from GCompris set
 of activities : particularly MoveLearn. In the application I planned to
 write, I had the idea to ask a simple question in the form can this piece
 go in this cell ? can this piece eat this one ?.  As it is not exactly the
 same idea than the MoveLearn : it could be added as mode. I think I could
 do it.
 Also, I planned to add a theory mode : where one can learn all pieces move
 and captures.

 Does not sound as simple indeed, as chess is very particular, but it seems
 realizable.

  Regards


 2013/6/27 James Simmons nices...@gmail.com

 Laurent,

 There is a chapter in Make Your Own Sugar Activities! about PyGame that
 you might find helpful.


 http://en.flossmanuals.net/make-your-own-sugar-activities/making-activities-using-pygame/

 The other thing to think about is that there are already some Activities
 for learning Chess, like this one:


 http://activities.sugarlabs.org/en-US/sugar/addon/4105?collection_uuid=6fcec139%26%2345%3B099c%26%2345%3Bcf60%26%2345%3B2a37%26%2345%3B90579a282d8c

 That doesn't mean that you shouldn't do yours, but you probably should
 check out what GCompris does and think of how you could improve on it.

 James Simmons



 On Thu, Jun 27, 2013 at 4:56 AM, laurent bernabe 
 laurent.bern...@gmail.com wrote:

 Hello everyone,

 I plan to write an activity in order to let users learn basics chess
 rules.

 But I am wondering whether I should write it in GTK3 or PyGame as I
 don't know if the real XO (not the emulator instances like in my
 environment) has already an installation of PyGame, so that no extra work
 need to be done in order to install the activity I'll try to write.

 Thanks in advance.

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Running sugar in a window

2013-06-26 Thread James Simmons
I do use Sugar running in a window when I develop Activities.  Granted it
doesn't work that well, and some kinds of keystrokes don't make it into the
window, but I find that it is a convenient way to test my Activities.  I
understand that you can have more than one X session going on a Linux box
and maybe that is an alternative but I can never remember how to do it.  So
I'd prefer to keep it as an option even if there are known problems.

James Simmons


On Tue, Jun 25, 2013 at 8:16 PM, Gonzalo Odiard gonz...@laptop.org wrote:

 I use the option too.
 For me should be better keep it, just document where does not work.

 Gonzalo


 On Tue, Jun 25, 2013 at 9:34 PM, Manuel Quiñones ma...@laptop.org wrote:

 As Walter said.  For me it is nice to have the window option, and I use
 it.  But if it is a pain to maintain and takes time from you Daniel, I'm +1
 for dropping it.


 2013/6/25 Walter Bender walter.ben...@gmail.com

 From the POV of developers, the only advantage I see for seeing a
 window size is to test how Sugar/Activities run at different screen
 sizes. But much of this can be accomplished by setting the resolution
 of the full-screen X display, so I would argue it is not a priority.

 regards.

 -walter

 On Tue, Jun 25, 2013 at 2:07 PM, Daniel Narvaez dwnarv...@gmail.com
 wrote:
  Hello,
 
  with sugar-emulator we used to run by default in a window. These days
  sugar-runner defaults to full screen but it's still possible to make
 it use
  a window by setting the resolution preference.
 
  I would like to understand how badly it would affect people if we only
  allowed to run in fullscreen. Are you using the resolution preference?
 Would
  it be a major problem if it went away?
 
  The issue is that at the moment there is no good solution for nesting X
  inside X. Xephyr is buggy and pretty much unmaintained, and it's now
  crashing at startup on unstable Ubuntu. Xvnc  might be an alternative
 but
  last time I tried it was also crashy, it would be a bit complicated to
 setup
  and it won't allow us to test hardware acceleration if we need that in
 the
  future.
 
  Always running a full X session would probably simplify and make
  sugar-runner more solid. There are challenges with that approach too
 with
  systemd, but I believe those might be solvable.
 
  I'm probably not going to do anything about this until it becomes a
 problem
  for sugar-build officially supported distros, but I'm thinking about
 the
  issue and I'm interested in people feedback.
 
  --
  Daniel Narvaez
 
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 



 --
 Walter Bender
 Sugar Labs
 http://www.sugarlabs.org
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel




 --
 .. manuq ..

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Sugar Framework for full HTML5 activity - subject proposal for GSoC

2013-03-22 Thread James Simmons
Lionel,

I think this is definitely a great idea for GSoC.  I like the work you've
done in this area, but there was a fair amount of discussion on this list
recently about different ways you could go about making an HTML 5 Activity
and maybe this task could involve looking at several of these options.

I definitely like the idea of having a sort of Phone Gap for Sugar where
you could package up HTML 5 as an Activity without writing Python code.

James Simmons

On Fri, Mar 22, 2013 at 8:16 AM, lio...@olpc-france.org wrote:

 Hi all,

 ** **

 I’m thinking to do a proposal for GSoC around “Sugar Framework for writing
 activity in full HTML5/JavaScript”.

 My idea is to package and enhance the work I’ve done on [1], specifically
 to fully avoid the need to write any Python code.

 I’ve got experience of student mentoring but never on GSoC mentoring.

 Plus I’m not fully aware of Sugar internal and about the capacity to build
 something like a new sort of activity packaging.

 So, if you think that it could be a good GSoC subject for Sugar and if
 someone is okay to co-mentoring with me, I could do a proposal.

 ** **

 Tell me.

 ** **

 Best regards from France.

 ** **

 Lionel.

 ** **

 ** **

 [1]
 http://booki.flossmanuals.net/make-your-own-sugar-activities/_draft/_v/1.0/developing-sugar-activities-using-html5/
 

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Sugar Framework for full HTML5 activity - subject proposal for GSoC

2013-03-22 Thread James Simmons
Edward,

Since the Read Activity uses WebKit for reading EPUBs it seems likely that
you could make an EPUB with JavaScript in it and make a sort of electronic
pop-up book out of it.  It might not be a strictly kosher EPUB, but Read
probably wouldn't care.

Maybe this could be something else to look at.  You could make a packaging
utility that takes an HTML file and any subdirectories beneath it and
packages it as either a Sugar Activity or an EPUB.  The utility could be
written in Python and PyGTK so you could run it on any OS, and maybe it
could run as a Sugar Activity as well.

James Simmons

On Fri, Mar 22, 2013 at 11:22 AM, Edward Mokurai Cherlin 
moku...@sugarlabs.org wrote:

 On Fri, March 22, 2013 10:29 am, James Simmons wrote:
  Lionel,
 
  I think this is definitely a great idea for GSoC.  I like the work you've
  done in this area, but there was a fair amount of discussion on this list
  recently about different ways you could go about making an HTML 5
 Activity
  and maybe this task could involve looking at several of these options.
 
  I definitely like the idea of having a sort of Phone Gap for Sugar where
  you could package up HTML 5 as an Activity without writing Python code.

 Would there be a way to integrate HTML 5 with existing Sugar
 activities? This would help greatly in our Replacing Textbooks
 program, so that we could integrate Sugar into a curriculum and all of
 its learning materials.

  James Simmons
 
  On Fri, Mar 22, 2013 at 8:16 AM, lio...@olpc-france.org wrote:
 
  Hi all,
 
  ** **
 
  I’m thinking to do a proposal for GSoC around “Sugar Framework for
  writing
  activity in full HTML5/JavaScript”.
 
  My idea is to package and enhance the work I’ve done on [1],
  specifically
  to fully avoid the need to write any Python code.
 
  I’ve got experience of student mentoring but never on GSoC
  mentoring.
 
  Plus I’m not fully aware of Sugar internal and about the capacity to
  build
  something like a new sort of activity packaging.
 
  So, if you think that it could be a good GSoC subject for Sugar and if
  someone is okay to co-mentoring with me, I could do a proposal.
 
  ** **
 
  Tell me.
 
  ** **
 
  Best regards from France.
 
  ** **
 
  Lionel.

 --
 Edward Mokurai (默雷/निशब्दगर्ज/نشبدگرج) Cherlin
 Silent Thunder is my name, and Children are my nation.
 The Cosmos is my dwelling place, the Truth my destination.
 http://wiki.sugarlabs.org/go/Replacing_Textbooks
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Activity to improve collaboration in the classroom

2013-03-15 Thread James Simmons
Gonzalo,

This sounds a bit like the Library Activity that Aleksey Lim worked on:

http://activities.sugarlabs.org/en-US/sugar/addon/4089

The sharing part was supposed to be something like you would create a list
of Journal entries that you wished to share (something like a bookshelf),
and these entries would be available for download by anyone you had shared
the list with.  This functionality was supposed to be part of version 2
which never got written.

James Simmons


On Fri, Mar 15, 2013 at 4:12 PM, Gonzalo Odiard gonz...@laptop.org wrote:

  A few times, we found simple operations are not so simple for teachers in
 Sugar,
 one case is share one file with all the kids in a class, request a task to
 do
 and later get all the work done by the kids.

 I am working in one activity to try to solve this issue, I want share a
 prototype,
 and a few ideas around this issue.

 JournalShare [1] allow select a number of items in the Journal and after
 collaboration is
 established, download the files. Pending is the implementation of
 transference of files in the opposed direction. Right now,
 display only the favorite items in the journal, like Portfolio,
 but probably will allow select individual items or use tags to search.

 I used webkit to display the UI and a simple server to
 provide the data in JSON format. javascript in the client creates the UI.
 Using HTML and CSS allow fast and easy formating. Right now,
 the format is ugly, but will be improved later.

 I think we can improve this to allow adding comments or other social
 features,
 like walter proposed webservices plugins do. Other reason to use a web
 interface
 and not do the client with gtk, is allow easy migration to other future
 environments
 or allow run this in the schoolserver to access the backedup journal items.

 The most important thing right now is implement the transference from the
 client
 to the server, and test if can scale to have a entire class working
 together.

 Download a file is implemented with the downloadmanager from Browse,
 but for any reason does not show the alert when the download start
 but at the end, (probably gtk is blocking the thread or similar), is
 something to solve.
 I stolen code from other activities, like Portfolio, Read and the
 original JournalShare from Agustin. To all the developers, thanks :)

 Comments, ideas, bugs or patches are welcomed.

 Gonzalo

 [1] http://dev.laptop.org/~gonzalo/activities/JournalShare-1.xo

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Revised version of Make Your Own Sugar Activities! just published

2013-03-12 Thread James Simmons
Lionel Laske just updated his chapter on making Activities with HTML5 and
WebKit, plus I corrected the instructions for using Git, Pootle, and using
setup.py to package your Activity, including updating what should be in
your activity.info file.

There are some bios of Google Code-in participants in the About The Authors
chapter you might like to check out.

There's still a bunch of updates to do.  I have to fix the code samples so
that new style toolbars are simply toolbars and a few other things.
However, the book is steadily getting up to date.

Check it out here:

http://en.flossmanuals.net/make-your-own-sugar-activities/index/

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [ASLO] [SANDBOX] View Slides-14

2013-03-04 Thread James Simmons
Alan,

I'm looking in
https://git.sugarlabs.org/viewslides/mainline/trees/master/locale/en

It doesn't look like Git was affected by the problem.  I do see the
duplicated files in the .xo bundle.  So it looks like the stack traces I
was seeing running setup.py are not related to this problem.

As for running bundlebuilder I do run it from within the source directory I
checked out from Git.  setup.py is part of that source, and I run it as:

./setup.py dist_xo

I have never run setup.py any other way than that.

James Simmons


On Sun, Mar 3, 2013 at 3:10 PM, Alan Jhonn Aguiar Schwyn 
alan...@hotmail.com wrote:

   I got traces saying that locale files were missing. Mysteriously these
 messages went away when I ran git commit -a

 When you execute the dist_xo the bundlebuilder makes a:

 git ls-files

 If the .po not are tracked, it no returns that files.


  all ran ./setup.py dist_xo with no problem.

 In the command you don't see nothing, but the bundle is no correct made.

 Make this:

 -download your activity:
 http://download.sugarlabs.org/activities/4039/view_slides-14.xo
 -rename it from .xo to .zip
 -open (don't extract, only open with archive manager or similar)
 -go to locale folder and check any language, for example, en (english)

 you must see duplicated files:

 LC_MESSAGES
 org.laptop.ViewSlidesActivity.mo
 org.laptop.ViewSlidesActivity.mo
 activity.linfo
 activity.info

 No have sense have big bundles with duplicated files unnecessary.

 This issue let me guess that you make dist_xo outside of the git folder,
 it's that true?


 --
 Date: Sun, 3 Mar 2013 14:57:43 -0600
 Subject: Re: [Sugar-devel] [ASLO] [SANDBOX] View Slides-14
 From: nices...@gmail.com
 To: alan...@hotmail.com
 CC: a...@lists.sugarlabs.org; sugar-devel@lists.sugarlabs.org


 Alan,

 In the Activities that Aneesh did GTK3 updates for I have a problem
 running setup.py dist_xo.  I got traces saying that locale files were
 missing. Mysteriously these messages went away when I ran git commit -a.  I
 didn't know what to make of it at the time.

 The two Activities where I did not update to GTK3, but merely fixed up
 activity.info, deleted MANIFEST, and updated the bundlebuilder import in
 setup.py, all ran ./setup.py dist_xo with no problem.

 James Simmons

 On Sun, Mar 3, 2013 at 2:08 PM, Alan Jhonn Aguiar Schwyn 
 alan...@hotmail.com wrote:

 This is what I want to say days ago: there are a problem with
 bundlebuilder!!

 See the locale folder of this:
 http://download.sugarlabs.org/activities/4039/view_slides-14.xo

  To: nices...@gmail.com
  Date: Sun, 3 Mar 2013 15:03:00 -0500
  From: activit...@sugarlabs.org
  CC: a...@lists.sugarlabs.org
  Subject: [ASLO] [SANDBOX] View Slides-14

 
  Activity View Slides-14 have been retained in the sandbox by a Sugar
 Labs Activities editor.
 
  Review Information:
  Reviewer: Alan Aguiar
  Comments: This activity have the problem that I send days ago:
 duplicated .mo and .linfo files.
 
  If you have questions about this review, please answer to this e-mail or
 join #sugar on chat.freenode.net.
 
  Sugar Labs Activities
  http://activities.sugarlabs.org
 
  ___
  ASLO mailing list
  a...@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/aslo

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [IAEP] Sugar Digest 2013-03-03

2013-03-04 Thread James Simmons
Walter,

I'd like to fix my Activities to work with an on-screen keyboard.  Is there
any way to simulate having one of these for desktop testing?  Also, a few
of my Activities use the arrow keys for paging and scrolling.  The numeric
pad arrow keys map to one of the gaming controls on my XO-1 so you can use
that control to page through books when the XO-1 when it is in tablet
mode.  Will there be a similar control on the XO-4?

James Simmons


On Sun, Mar 3, 2013 at 11:15 AM, Walter Bender walter.ben...@gmail.comwrote:

 == Sugar Digest ==

 1. It has been crazy busy. With the upcoming XO4 launch, Sugar with
 touch support will be making its debut. The developer team has done a
 great job but we are lagging behind a bit on the activity level:
 Activities that use keyboard input need to be modified to use the
 on-screen keyboard; and now that tablet mode will be used more often,
 we need to better attend to the issue of screen rotation.

 In order to adapt to the on-screen keyboard, there are two adjustments
 that need to be made: (1) use either a GTK Entry or TextView instead
 of directly querying the keyboard; and (2) make sure that the Entry is
 visible when the keyboard is visible. To address both issues, I have
 been mostly using GTK Fixed in order to re-position the Entry
 appropriately. But also, I have been using a strategy of moving the
 Entry to the top of the activity.

 There are two issues with dealing with landscape vs portrait mode. One
 is to make sure that the work area of an activity accommodates the
 change in size and aspect ration. Perhaps the easiest way to do this
 is simply to define a square work are inside of a scrolling window.
 There are times when this strategy won't work, such as with Paint, but
 for the most part, it is a simple solution.

 The toolbars are another matter. It is often the case that not all of
 the elements fit when in portrait mode. The default behavior of Sugar,
 to make a list on a palette that displays on the edge of the screen is
 somewhat lacking, both in that many toolbar items are either not shown
 or inoperable in that form. And aesthetically, it is not very
 Sugar-like. I've been experimenting with some different approaches to
 generating palettes, and also moving some toolbar elements around
 (e.g., moving some buttons to secondary toolbars). Alas, none of these
 solutions are idea or completely generalizable. But I think there are
 harbingers of a solution.

 Another issue with touch is that Gtk2 ComboBoxes don't work. The
 problem has been fixed in the Gtk3 version of the Sugar tool-kit, but,
 not being a fan of Combo Boxes to begin with, I see it as an
 opportunity to minimize their use. For example, using bigger/smaller
 buttons is arguably an easier way to adjust font size using touch.

 Ultimately, we'll want to add more gesture support as well. Many
 activities could readily support panning and zooming. And a long
 press can replace the un-Sugar-like reliance of right-click that some
 activities are using.

 I've packaged many of these ideas into some experimental (and
 production) versions of some activities (Please see [1-7]). Feedback
 most welcome.

 2. It occurred to me that the Web Services framework that Raul and I
 developed a few weeks ago might make a nice home for a simple
 classroom service: handing in homework assignments and receiving back
 comments from the teacher and fellow students. Such a service could be
 dropped right into the same framework we built for Facebook, so in the
 Journal, there would be a Share with (or Copy to) Teacher and comments
 would appear in the Journal detail view (and be directly integrated in
 the Portfolio). Simple, but potentially quite useful.

 === Tech Talk ===

 3. Adam Holt reported on the School Server Hack Sprint held in Toronto
 (See [8]).

 4. Daniel Narvaez has been making great progress on Agora, his
 attempt to achieve the goals of the Sugar Learning Platform using the
 web technologies (See [9]).

 === Sugar Labs ===

 Visit our planet [10] for more updates about Sugar and Sugar deployments.

 -walter

 ---

 [1] http://people.sugarlabs.org/~walter/Abacus-47.1.xo
 [2] http://people.sugarlabs.org/~walter/Chart-9.1.xo
 [3] http://people.sugarlabs.org/~walter/Chat-78.1.xo
 [4] http://people.sugarlabs.org/~walter/Labyrinth-14.4.xo
 [5] http://people.sugarlabs.org/~walter/Portfolio-41.2.xo
 [6] http://people.sugarlabs.org/~walter/Speak-44.6.xo
 [7]
 http://activities.sugarlabs.org/en-US/sugar/addons/versions/4027#version-173
 (TurtleBlocks-173.xo)
 [8]
 http://lists.laptop.org/pipermail/server-devel/2013-February/006258.html
 [9]
 http://lists.sugarlabs.org/archive/sugar-devel/2013-February/041847.html
 [10] http://planet.sugarlabs.org


 --
 Walter Bender
 Sugar Labs
 http://www.sugarlabs.org
 ___
 IAEP -- It's An Education Project (not a laptop project!)
 i...@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/iaep

Re: [Sugar-devel] Sugar bundleBuilder

2013-03-04 Thread James Simmons
Gonzalo,

The chapters in MYOSA that might be out of date are these:

http://en.flossmanuals.net/make-your-own-sugar-activities/package-the-activity/

http://en.flossmanuals.net/make-your-own-sugar-activities/add-your-activity-code-to-version-control/
(what belongs in .gitignore?)

http://en.flossmanuals.net/make-your-own-sugar-activities/going-international-with-pootle/

http://en.flossmanuals.net/make-your-own-sugar-activities/distribute-your-activity/

I'm not looking for anyone to update these chapters.  I'm more looking for
this is wrong and this is what it should say instead.

James Simmons


On Mon, Mar 4, 2013 at 9:25 AM, James Simmons nices...@gmail.com wrote:

 Gonzalo,

 I may be understanding my problem better now. In the three Activities I
 had trouble with the locale directory was in .git.  I never heard from
 anyone that it was not supposed to be there.  In the old bundlebuilder that
 used MANIFEST I had the locale directory in the MANIFEST.  Maybe the thing
 to do is do a git rm on the locale directory, commit and push it, then run
 setup.py again.

 There are chapters in Make Your Own Sugar Activities! that describe
 packaging an Activity, using Pootle, and distributing the Activity.  It
 looks like some of the stuff in these chapters is no longer true (I'd like
 to think it was all true at one time).  I'd appreciate it if you and Alan
 could look over these chapters and identify anything that needs revision.
 I don't want the book to lead anyone astray.

 James Simmons



 On Sat, Mar 2, 2013 at 5:25 PM, Gonzalo Odiard gonz...@laptop.org wrote:

 The .mo and the .linfo files should not be in git anyway, right?

 Gonzalo

 On Sat, Mar 2, 2013 at 12:04 AM, Alan Jhonn Aguiar Schwyn 
 alan...@hotmail.com wrote:

 Hi,

 I found a problem with bundlebuilder (sugar-toolkit) when use dist_xo
 out
 of git. The locale folder adds twice times the same .mo and the same
 .linfo.
 The problem is easy solved, but exist some ways.
 Basically: when execute the command, the .po are compiled. After, when
 no git - use list_files function (that returns all files including the
 locale
 folder files).
 In the package function, the files of get_files_in_git are add to the
 .zip
 After, the locale files are again added:

 def package(self):
 bundle_zip = zipfile.ZipFile(self.package_path, 'w',
  zipfile.ZIP_DEFLATED)

 for f in self.get_files_in_git():
 bundle_zip.write(os.path.join(self.config.source_dir, f),
  os.path.join(self.config.bundle_root_dir,
 f))
 locale_dir = os.path.join(self.config.source_dir, 'locale')
 locale_files = list_files(locale_dir, IGNORE_DIRS, IGNORE_FILES)

 for f in locale_files:
 bundle_zip.write(os.path.join(locale_dir, f),
  os.path.join(self.config.bundle_root_dir,
   'locale', f))

 I have installed python-sugar-toolkit-0.96.
 Some .XO can have bigger size due to this issue.

 Regards!

 Alan


 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Sugar bundleBuilder

2013-03-04 Thread James Simmons
Yes, my problem was that my locale directory is in Git.  Back when we were
using MANIFEST that might have been normal.

Daniel has given me enough info to update my book, and since FLOSS Manuals
are made with a Wiki I probably will be able to make a Diff.

James Simmons


On Mon, Mar 4, 2013 at 11:19 AM, Alan Jhonn Aguiar Schwyn 
alan...@hotmail.com wrote:

  On 2 March 2013 04:04, Alan Jhonn Aguiar Schwyn alan...@hotmail.com
 wrote:
   Hi,
  
   I found a problem with bundlebuilder (sugar-toolkit) when use
 dist_xo out
   of git. The locale folder adds twice times the same .mo and the same
 .linfo.
   The problem is easy solved, but exist some ways.
   Basically: when execute the command, the .po are compiled. After, when
   no git - use list_files function (that returns all files including the
   locale
   folder files).
   In the package function, the files of get_files_in_git are add to the
 .zip
 
  Where is the duplication? get_files_in_git should not include anything
  inside locale/, list_files should include only stuff in locale/...

 The problem seems appears in the case that you have locale folder include
 in git
 (james problem?)

 and when you execute the ./setup.py dist_xo outisde of the git folder (for
 example, you have
 a makefile or script that creates a folder tmp and build inside of it)

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Sugar bundleBuilder

2013-03-04 Thread James Simmons
Alan,

I'll do that at home this evening, about 6 hours from now.

James Simmons

On Mon, Mar 4, 2013 at 11:51 AM, Alan Jhonn Aguiar Schwyn 
alan...@hotmail.com wrote:

 You try remove the folder from GIT (and make a commit) and make the .xo
 again?


 --
 Date: Mon, 4 Mar 2013 11:48:43 -0600
 From: nices...@gmail.com
 To: alan...@hotmail.com
 CC: dwnarv...@gmail.com; sugar-devel@lists.sugarlabs.org

 Subject: Re: [Sugar-devel] Sugar bundleBuilder

 Yes, my problem was that my locale directory is in Git.  Back when we were
 using MANIFEST that might have been normal.

 Daniel has given me enough info to update my book, and since FLOSS Manuals
 are made with a Wiki I probably will be able to make a Diff.

 James Simmons


 On Mon, Mar 4, 2013 at 11:19 AM, Alan Jhonn Aguiar Schwyn 
 alan...@hotmail.com wrote:

  On 2 March 2013 04:04, Alan Jhonn Aguiar Schwyn alan...@hotmail.com
 wrote:
   Hi,
  
   I found a problem with bundlebuilder (sugar-toolkit) when use
 dist_xo out
   of git. The locale folder adds twice times the same .mo and the same
 .linfo.
   The problem is easy solved, but exist some ways.
   Basically: when execute the command, the .po are compiled. After, when
   no git - use list_files function (that returns all files including the
   locale
   folder files).
   In the package function, the files of get_files_in_git are add to the
 .zip
 
  Where is the duplication? get_files_in_git should not include anything
  inside locale/, list_files should include only stuff in locale/...

 The problem seems appears in the case that you have locale folder include
 in git
 (james problem?)

 and when you execute the ./setup.py dist_xo outisde of the git folder (for
 example, you have
 a makefile or script that creates a folder tmp and build inside of it)

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



 ___ Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [ASLO] [SANDBOX] View Slides-14

2013-03-03 Thread James Simmons
Alan,

In the Activities that Aneesh did GTK3 updates for I have a problem running
setup.py dist_xo.  I got traces saying that locale files were missing.
Mysteriously these messages went away when I ran git commit -a.  I didn't
know what to make of it at the time.

The two Activities where I did not update to GTK3, but merely fixed up
activity.info, deleted MANIFEST, and updated the bundlebuilder import in
setup.py, all ran ./setup.py dist_xo with no problem.

James Simmons

On Sun, Mar 3, 2013 at 2:08 PM, Alan Jhonn Aguiar Schwyn 
alan...@hotmail.com wrote:

 This is what I want to say days ago: there are a problem with
 bundlebuilder!!

 See the locale folder of this:
 http://download.sugarlabs.org/activities/4039/view_slides-14.xo

  To: nices...@gmail.com
  Date: Sun, 3 Mar 2013 15:03:00 -0500
  From: activit...@sugarlabs.org
  CC: a...@lists.sugarlabs.org
  Subject: [ASLO] [SANDBOX] View Slides-14

 
  Activity View Slides-14 have been retained in the sandbox by a Sugar
 Labs Activities editor.
 
  Review Information:
  Reviewer: Alan Aguiar
  Comments: This activity have the problem that I send days ago:
 duplicated .mo and .linfo files.
 
  If you have questions about this review, please answer to this e-mail or
 join #sugar on chat.freenode.net.
 
  Sugar Labs Activities
  http://activities.sugarlabs.org
 
  ___
  ASLO mailing list
  a...@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/aslo

 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] How to make a GTK3 EventBox accept the focus?

2013-03-01 Thread James Simmons
Daniel,

I played with your code last night at home.  I modified it so it actually
loads pictures in the left and right Gtk.Image.  I found that when I tabbed
through the controls in the window that the focus_in and focus_out methods
were invoked.  However, when I tried to change the focus by clicking on
either image nothing happened.  Before trying this I changed View Slides to
eliminate the event box and the Activity still doesn't work.

I added code like this:

self.image1.set_events(Gdk.EventMask.KEY_PRESS_MASK |
Gdk.EventMask.BUTTON_PRESS_MASK)

to your example but it had no effect.  You can tab into an Image but you
can't make it take the focus by clicking on it.

This link suggests that the event box is necessary:

http://stackoverflow.com/questions/14861503/catching-button-click-on-gtk-image-python-gtk3

I'm going to fool with this some more this weekend.

James Simmons

On Thu, Feb 28, 2013 at 10:20 AM, Daniel Narvaez dwnarv...@gmail.comwrote:

 GtkImage only works for me:

 from gi.repository import Gtk

 def image1_focus_in_cb(a, b):
 print(focus in 1)

 def image1_focus_out_cb(a, b):
 print(focus out 1)

 def image2_focus_in_cb(a, b):
 print(focus in 2)

 def image2_focus_out_cb(a, b):
 print(focus out 2)


 window = Gtk.Window()
 box = Gtk.HBox()

 image1 = Gtk.Image.new_from_file()
 image1.set_can_focus(True)

 image1.connect(focus-in-event, image1_focus_in_cb)
 image1.connect(focus-out-event, image1_focus_out_cb)

 image2 = Gtk.Image.new_from_file()
 image2.set_can_focus(True)

 image2.connect(focus-in-event, image2_focus_in_cb)
 image2.connect(focus-out-event, image2_focus_out_cb)

 box.pack_start(image1, False, False, 0)
 box.pack_start(image2, False, False, 0)

 window.add(box)
 window.show_all()

 Gtk.main()


 On 28 February 2013 17:06, Daniel Narvaez dwnarv...@gmail.com wrote:
  Two things you could try:
 
  - set_visible_window(True) the event box and also set_can_focus
 
  - Remove the box and set_can_focus the image.
 
 
  On Thursday, 28 February 2013, James Simmons wrote:
 
  Gonzalo,
 
  The problem with that it I want the arrow keys to page through the
 images
  only when the image has the focus.  There are other places in the
 Activity
  where I don't want to interfere with the arrow keys.  For instance, you
 can
  make annotations for a specific image.
 
  I notice that GtkImage is a subclass of GtkWidget, so maybe that means
  that I don't need the event box anymore.  Maybe the image itself can
 accept
  the focus and receive the events.  The problem I have with that is that
 the
  old GTK made Image extend Widget also, and as I remember it you
 couldn't get
  events from an Image.  It was years ago.  Maybe I've been doing it
 wrong the
  whole time.
 
  James Simmons
 
 
  On Wed, Feb 27, 2013 at 6:24 PM, Gonzalo Odiard gonz...@laptop.org
  wrote:
 
  Can you catch the key-press-event in the activity class?
  I think other activities like Read or Terminal do this.
 
  Gonzalo
 
  On Wed, Feb 27, 2013 at 1:53 PM, James Simmons nices...@gmail.com
  wrote:
 
  Aneesh,
 
  I'm trying to incorporate your GTK3 update to View Slides and release
  the result on ASLO.  The problem I'm still having is that I cannot
 page
  through the images using the keyboard as I used to.  What I did in
 the past
  was to nest the image control in an event box and make the event box
 able to
  accept the focus.  Then the user clicks on the image with the mouse
 to set
  the focus and at that point the event box receives key press events.
 
  When you upgraded View Slides to use GTK3 you removed the code to make
  the event box focusable.  I have tried to replace the missing line of
 code
  with what seems to be the GTK3 equivalent but it isn't working.  I've
 done a
  lot of google searches trying to figure out the problem and I'm not
 getting
  anywhere.  I cannot release View Slides as it is.  It really needs to
 be
  able to navigate through the images with the keyboard to be usable.
 
  I'm hoping you might have some thoughts or maybe an idea of how to do
  the keyboard paging a different way.
 
  James Simmons
 
 
  On Mon, Feb 25, 2013 at 6:20 AM, Manuel Quiñones ma...@laptop.org
  wrote:
 
  Hi James,
 
  2013/2/24 James Simmons nices...@gmail.com:
   I was looking at the upgrade to GTK3 done for View Slides and it
   seems that
   it no longer responds to the keyboard.  What I had done previously
 to
   get it
   to do that was to put the image I was displaying in an event box.
  I
   then
   made the event box accept the focus like this:
  
   self.eventbox.set_events(gtk.gdk.KEY_PRESS_MASK |
   gtk.gdk.BUTTON_PRESS_MASK)
   self.eventbox.set_flags(gtk.CAN_FOCUS)
  
   The Gtk3 port changed the code to this:
  
   self.eventbox.set_events(Gdk.EventMask.KEY_PRESS_MASK |
   Gdk.EventMask.BUTTON_PRESS_MASK)
  
   There was no code to make it accept the focus.  I tried adding
 this:
  
   self.eventbox.set_can_focus(True)
  
   This does not prevent the Activity from running

Re: [Sugar-devel] How to make a GTK3 EventBox accept the focus?

2013-03-01 Thread James Simmons
Daniel,

Your code was very helpful.  As it turned out, my event box code was
working fine.  When Aneesh Dogra updated the code to use GTK3 he neglected
to change the use of .value in Gtk.Adjustment to get_value() and
set_value().  As a result the Activity was processing the arrow keys OK but
could not page through the images because the code to adjust the image in
the scroller was broken.  That's an easy mistake to make and it took me a
long time to find, and your code samples helped me figure out what wasn't
causing the problem.

Thanks again,

James Simmons

On Fri, Mar 1, 2013 at 1:12 PM, Daniel Narvaez dwnarv...@gmail.com wrote:

 Sigh, I hoped gtk3 had got rid of the no-window widgets mess...

 I think you need to use EventBox with a window and grab_focus on
 button_press events. See the attached test.

 On 1 March 2013 18:32, James Simmons nices...@gmail.com wrote:
  Daniel,
 
  I played with your code last night at home.  I modified it so it actually
  loads pictures in the left and right Gtk.Image.  I found that when I
 tabbed
  through the controls in the window that the focus_in and focus_out
 methods
  were invoked.  However, when I tried to change the focus by clicking on
  either image nothing happened.  Before trying this I changed View Slides
 to
  eliminate the event box and the Activity still doesn't work.
 
  I added code like this:
 
  self.image1.set_events(Gdk.EventMask.KEY_PRESS_MASK |
  Gdk.EventMask.BUTTON_PRESS_MASK)
 
  to your example but it had no effect.  You can tab into an Image but you
  can't make it take the focus by clicking on it.
 
  This link suggests that the event box is necessary:
 
 
 http://stackoverflow.com/questions/14861503/catching-button-click-on-gtk-image-python-gtk3
 
  I'm going to fool with this some more this weekend.
 
  James Simmons
 
  On Thu, Feb 28, 2013 at 10:20 AM, Daniel Narvaez dwnarv...@gmail.com
  wrote:
 
  GtkImage only works for me:
 
  from gi.repository import Gtk
 
  def image1_focus_in_cb(a, b):
  print(focus in 1)
 
  def image1_focus_out_cb(a, b):
  print(focus out 1)
 
  def image2_focus_in_cb(a, b):
  print(focus in 2)
 
  def image2_focus_out_cb(a, b):
  print(focus out 2)
 
 
  window = Gtk.Window()
  box = Gtk.HBox()
 
  image1 = Gtk.Image.new_from_file()
  image1.set_can_focus(True)
 
  image1.connect(focus-in-event, image1_focus_in_cb)
  image1.connect(focus-out-event, image1_focus_out_cb)
 
  image2 = Gtk.Image.new_from_file()
  image2.set_can_focus(True)
 
  image2.connect(focus-in-event, image2_focus_in_cb)
  image2.connect(focus-out-event, image2_focus_out_cb)
 
  box.pack_start(image1, False, False, 0)
  box.pack_start(image2, False, False, 0)
 
  window.add(box)
  window.show_all()
 
  Gtk.main()
 
 
  On 28 February 2013 17:06, Daniel Narvaez dwnarv...@gmail.com wrote:
   Two things you could try:
  
   - set_visible_window(True) the event box and also set_can_focus
  
   - Remove the box and set_can_focus the image.
  
  
   On Thursday, 28 February 2013, James Simmons wrote:
  
   Gonzalo,
  
   The problem with that it I want the arrow keys to page through the
   images
   only when the image has the focus.  There are other places in the
   Activity
   where I don't want to interfere with the arrow keys.  For instance,
 you
   can
   make annotations for a specific image.
  
   I notice that GtkImage is a subclass of GtkWidget, so maybe that
 means
   that I don't need the event box anymore.  Maybe the image itself can
   accept
   the focus and receive the events.  The problem I have with that is
 that
   the
   old GTK made Image extend Widget also, and as I remember it you
   couldn't get
   events from an Image.  It was years ago.  Maybe I've been doing it
   wrong the
   whole time.
  
   James Simmons
  
  
   On Wed, Feb 27, 2013 at 6:24 PM, Gonzalo Odiard gonz...@laptop.org
   wrote:
  
   Can you catch the key-press-event in the activity class?
   I think other activities like Read or Terminal do this.
  
   Gonzalo
  
   On Wed, Feb 27, 2013 at 1:53 PM, James Simmons nices...@gmail.com
   wrote:
  
   Aneesh,
  
   I'm trying to incorporate your GTK3 update to View Slides and
 release
   the result on ASLO.  The problem I'm still having is that I cannot
   page
   through the images using the keyboard as I used to.  What I did in
   the past
   was to nest the image control in an event box and make the event
 box
   able to
   accept the focus.  Then the user clicks on the image with the mouse
   to set
   the focus and at that point the event box receives key press
 events.
  
   When you upgraded View Slides to use GTK3 you removed the code to
   make
   the event box focusable.  I have tried to replace the missing line
 of
   code
   with what seems to be the GTK3 equivalent but it isn't working.
  I've
   done a
   lot of google searches trying to figure out the problem and I'm not
   getting
   anywhere.  I cannot release View Slides as it is.  It really needs
 to
   be
   able

Re: [Sugar-devel] How to make a GTK3 EventBox accept the focus?

2013-02-28 Thread James Simmons
Gonzalo,

The problem with that it I want the arrow keys to page through the images
only when the image has the focus.  There are other places in the Activity
where I don't want to interfere with the arrow keys.  For instance, you can
make annotations for a specific image.

I notice that GtkImage is a subclass of GtkWidget, so maybe that means that
I don't need the event box anymore.  Maybe the image itself can accept the
focus and receive the events.  The problem I have with that is that the old
GTK made Image extend Widget also, and as I remember it you couldn't get
events from an Image.  It was years ago.  Maybe I've been doing it wrong
the whole time.

James Simmons


On Wed, Feb 27, 2013 at 6:24 PM, Gonzalo Odiard gonz...@laptop.org wrote:

 Can you catch the key-press-event in the activity class?
 I think other activities like Read or Terminal do this.

 Gonzalo

 On Wed, Feb 27, 2013 at 1:53 PM, James Simmons nices...@gmail.com wrote:

 Aneesh,

 I'm trying to incorporate your GTK3 update to View Slides and release the
 result on ASLO.  The problem I'm still having is that I cannot page through
 the images using the keyboard as I used to.  What I did in the past was to
 nest the image control in an event box and make the event box able to
 accept the focus.  Then the user clicks on the image with the mouse to set
 the focus and at that point the event box receives key press events.

 When you upgraded View Slides to use GTK3 you removed the code to make
 the event box focusable.  I have tried to replace the missing line of code
 with what seems to be the GTK3 equivalent but it isn't working.  I've done
 a lot of google searches trying to figure out the problem and I'm not
 getting anywhere.  I cannot release View Slides as it is.  It really needs
 to be able to navigate through the images with the keyboard to be usable.

 I'm hoping you might have some thoughts or maybe an idea of how to do the
 keyboard paging a different way.

 James Simmons


 On Mon, Feb 25, 2013 at 6:20 AM, Manuel Quiñones ma...@laptop.orgwrote:

 Hi James,

 2013/2/24 James Simmons nices...@gmail.com:
  I was looking at the upgrade to GTK3 done for View Slides and it seems
 that
  it no longer responds to the keyboard.  What I had done previously to
 get it
  to do that was to put the image I was displaying in an event box.  I
 then
  made the event box accept the focus like this:
 
  self.eventbox.set_events(gtk.gdk.KEY_PRESS_MASK |
 gtk.gdk.BUTTON_PRESS_MASK)
  self.eventbox.set_flags(gtk.CAN_FOCUS)
 
  The Gtk3 port changed the code to this:
 
  self.eventbox.set_events(Gdk.EventMask.KEY_PRESS_MASK |
  Gdk.EventMask.BUTTON_PRESS_MASK)
 
  There was no code to make it accept the focus.  I tried adding this:
 
  self.eventbox.set_can_focus(True)
 
  This does not prevent the Activity from running, but it doesn't make
 the
  Event Box focusable either.

 Have you tried self.eventbox.grab_focus() ?


 http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-grab-focus

 --
 .. manuq ..



 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] How to make a GTK3 EventBox accept the focus?

2013-02-28 Thread James Simmons
Daniel,

Thanks, that's a big help!

James Simmons


On Thu, Feb 28, 2013 at 10:20 AM, Daniel Narvaez dwnarv...@gmail.comwrote:

 GtkImage only works for me:

 from gi.repository import Gtk

 def image1_focus_in_cb(a, b):
 print(focus in 1)

 def image1_focus_out_cb(a, b):
 print(focus out 1)

 def image2_focus_in_cb(a, b):
 print(focus in 2)

 def image2_focus_out_cb(a, b):
 print(focus out 2)


 window = Gtk.Window()
 box = Gtk.HBox()

 image1 = Gtk.Image.new_from_file()
 image1.set_can_focus(True)

 image1.connect(focus-in-event, image1_focus_in_cb)
 image1.connect(focus-out-event, image1_focus_out_cb)

 image2 = Gtk.Image.new_from_file()
 image2.set_can_focus(True)

 image2.connect(focus-in-event, image2_focus_in_cb)
 image2.connect(focus-out-event, image2_focus_out_cb)

 box.pack_start(image1, False, False, 0)
 box.pack_start(image2, False, False, 0)

 window.add(box)
 window.show_all()

 Gtk.main()


 On 28 February 2013 17:06, Daniel Narvaez dwnarv...@gmail.com wrote:
  Two things you could try:
 
  - set_visible_window(True) the event box and also set_can_focus
 
  - Remove the box and set_can_focus the image.
 
 
  On Thursday, 28 February 2013, James Simmons wrote:
 
  Gonzalo,
 
  The problem with that it I want the arrow keys to page through the
 images
  only when the image has the focus.  There are other places in the
 Activity
  where I don't want to interfere with the arrow keys.  For instance, you
 can
  make annotations for a specific image.
 
  I notice that GtkImage is a subclass of GtkWidget, so maybe that means
  that I don't need the event box anymore.  Maybe the image itself can
 accept
  the focus and receive the events.  The problem I have with that is that
 the
  old GTK made Image extend Widget also, and as I remember it you
 couldn't get
  events from an Image.  It was years ago.  Maybe I've been doing it
 wrong the
  whole time.
 
  James Simmons
 
 
  On Wed, Feb 27, 2013 at 6:24 PM, Gonzalo Odiard gonz...@laptop.org
  wrote:
 
  Can you catch the key-press-event in the activity class?
  I think other activities like Read or Terminal do this.
 
  Gonzalo
 
  On Wed, Feb 27, 2013 at 1:53 PM, James Simmons nices...@gmail.com
  wrote:
 
  Aneesh,
 
  I'm trying to incorporate your GTK3 update to View Slides and release
  the result on ASLO.  The problem I'm still having is that I cannot
 page
  through the images using the keyboard as I used to.  What I did in
 the past
  was to nest the image control in an event box and make the event box
 able to
  accept the focus.  Then the user clicks on the image with the mouse
 to set
  the focus and at that point the event box receives key press events.
 
  When you upgraded View Slides to use GTK3 you removed the code to make
  the event box focusable.  I have tried to replace the missing line of
 code
  with what seems to be the GTK3 equivalent but it isn't working.  I've
 done a
  lot of google searches trying to figure out the problem and I'm not
 getting
  anywhere.  I cannot release View Slides as it is.  It really needs to
 be
  able to navigate through the images with the keyboard to be usable.
 
  I'm hoping you might have some thoughts or maybe an idea of how to do
  the keyboard paging a different way.
 
  James Simmons
 
 
  On Mon, Feb 25, 2013 at 6:20 AM, Manuel Quiñones ma...@laptop.org
  wrote:
 
  Hi James,
 
  2013/2/24 James Simmons nices...@gmail.com:
   I was looking at the upgrade to GTK3 done for View Slides and it
   seems that
   it no longer responds to the keyboard.  What I had done previously
 to
   get it
   to do that was to put the image I was displaying in an event box.
  I
   then
   made the event box accept the focus like this:
  
   self.eventbox.set_events(gtk.gdk.KEY_PRESS_MASK |
   gtk.gdk.BUTTON_PRESS_MASK)
   self.eventbox.set_flags(gtk.CAN_FOCUS)
  
   The Gtk3 port changed the code to this:
  
   self.eventbox.set_events(Gdk.EventMask.KEY_PRESS_MASK |
   Gdk.EventMask.BUTTON_PRESS_MASK)
  
   There was no code to make it accept the focus.  I tried adding
 this:
  
   self.eventbox.set_can_focus(True)
  
   This does not prevent the Activity from running, but it doesn't
 make
   the
   Event Box focusable either.
 
  Have you tried self.eventbox.grab_focus() ?
 
 
 
 http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-grab-focus
 
  --
  .. manuq ..
 
 
 
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 
 
 
 
 
  --
  Daniel Narvaez
 



 --
 Daniel Narvaez

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] How to make a GTK3 EventBox accept the focus?

2013-02-27 Thread James Simmons
Aneesh,

I'm trying to incorporate your GTK3 update to View Slides and release the
result on ASLO.  The problem I'm still having is that I cannot page through
the images using the keyboard as I used to.  What I did in the past was to
nest the image control in an event box and make the event box able to
accept the focus.  Then the user clicks on the image with the mouse to set
the focus and at that point the event box receives key press events.

When you upgraded View Slides to use GTK3 you removed the code to make the
event box focusable.  I have tried to replace the missing line of code with
what seems to be the GTK3 equivalent but it isn't working.  I've done a lot
of google searches trying to figure out the problem and I'm not getting
anywhere.  I cannot release View Slides as it is.  It really needs to be
able to navigate through the images with the keyboard to be usable.

I'm hoping you might have some thoughts or maybe an idea of how to do the
keyboard paging a different way.

James Simmons

On Mon, Feb 25, 2013 at 6:20 AM, Manuel Quiñones ma...@laptop.org wrote:

 Hi James,

 2013/2/24 James Simmons nices...@gmail.com:
  I was looking at the upgrade to GTK3 done for View Slides and it seems
 that
  it no longer responds to the keyboard.  What I had done previously to
 get it
  to do that was to put the image I was displaying in an event box.  I then
  made the event box accept the focus like this:
 
  self.eventbox.set_events(gtk.gdk.KEY_PRESS_MASK |
 gtk.gdk.BUTTON_PRESS_MASK)
  self.eventbox.set_flags(gtk.CAN_FOCUS)
 
  The Gtk3 port changed the code to this:
 
  self.eventbox.set_events(Gdk.EventMask.KEY_PRESS_MASK |
  Gdk.EventMask.BUTTON_PRESS_MASK)
 
  There was no code to make it accept the focus.  I tried adding this:
 
  self.eventbox.set_can_focus(True)
 
  This does not prevent the Activity from running, but it doesn't make the
  Event Box focusable either.

 Have you tried self.eventbox.grab_focus() ?

 http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-grab-focus

 --
 .. manuq ..

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] How to make a GTK3 EventBox accept the focus?

2013-02-24 Thread James Simmons
I was looking at the upgrade to GTK3 done for View Slides and it seems that
it no longer responds to the keyboard.  What I had done previously to get
it to do that was to put the image I was displaying in an event box.  I
then made the event box accept the focus like this:

self.eventbox.set_events(gtk.gdk.KEY_PRESS_MASK | gtk.gdk.BUTTON_PRESS_MASK)
self.eventbox.set_flags(gtk.CAN_FOCUS)

The Gtk3 port changed the code to this:

self.eventbox.set_events(Gdk.EventMask.KEY_PRESS_MASK |
Gdk.EventMask.BUTTON_PRESS_MASK)

There was no code to make it accept the focus.  I tried adding this:

self.eventbox.set_can_focus(True)

This does not prevent the Activity from running, but it doesn't make the
Event Box focusable either.

The idea of making the event box focusable is that the user can page
through a bunch of images using the keyboard arrow keys, which is much more
convenient than clicking buttons with the mouse.

The code for the application is here:

https://git.sugarlabs.org/viewslides

The relevant file is this:

https://git.sugarlabs.org/viewslides/mainline/blobs/master/viewslides.py

I did look through what PyGtk docs I could find and there doesn't seem to
be anything for version 3.

If anyone can point me in the right direction I'd be greatly obliged.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Read Etexts needs additional testing

2013-02-15 Thread James Simmons
All,

I have merged Aneesh Dogra's changes to Read Etexts, plus I added my own
fix to use a custom user agent string when downloading books from Project
Gutenberg.  PG rejects downloads that use the default urllib agent string.
I have committed and pushed the changes and have tested the code on my
desktop computer.  Normally I would test the .xo file on my XO-1 laptop and
if it worked there I would release it on activities.sugarlabs.org.

Unfortunately my XO hasn't been updated in awhile and it may be a few days
before I can get to it.  I don't think it supports GTK3, which was what
Aneesh's changes were.  If someone can try out the .xo file linked below on
an XO I can release it a bit sooner:

http://dl.dropbox.com/u/8919415/ReadETexts-25.xo

Also, while I have merged in Aneesh's changes his merge requests remain
open.  I don't know what to do about that and I'm hoping someone here can
give me some guidance.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] setup.py not including bookcatalog.txt in Read Etexts XO file

2013-02-15 Thread James Simmons
I just updated my laptop to the latest release of Sugar so I could test my
latest xo file for Read Etexts.  What I discovered is that when you enter

./setup.py dist_xo

the file created does NOT contain bookcatalog.txt, even though that is
listed in MANIFEST but does contain .gitignore which is NOT in MANIFEST.
The activity needs to contain bookcatalog.txt to work.  This file is NOT in
the Git repository.  It needs to be recreated from files downloaded from
Project Gutenberg and PG Australia.  It doesn't make sense to put it into
Git because it is a data file.  However, Read Etexts won't work without it.

In the past setup.py always put this file in my .xo and I'm wondering why
it isn't doing it now.

Thanks,

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Problems downloading PG titles without a web browser

2013-02-14 Thread James Simmons
Daniel,

Thanks for your tips.  I was able to add a user agent string like this:

OLPCReader/1.0; +mailto:nices...@gmail.com

and that fixed the problem.  The code has been committed to Git and I'll
release a new .xo file shortly.

I don't know that I'll submit a path for network.py as the user agent
string is not a problem for most uses.

James Simmons


On Sun, Feb 10, 2013 at 7:05 PM, Daniel Narvaez dwnarv...@gmail.com wrote:

 Actually it seems like you might be able to do it with urllib too.

 http://docs.python.org/2/library/urllib.html

 Search for urlopener, there is an example.

 On Monday, 11 February 2013, Daniel Narvaez wrote:


 http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/network.py

 That code *looks* trivial to port to urllib2. You could do that, submit
 the patch and in the meantime just copy and paste the ported code in your
 activity (it doesn't seem to have dependencies on other toolkit stuff).
 Well, unless it's a gtk2 activity, in that case you can skip the submit
 the patch step :)

 On Monday, 11 February 2013, James Simmons wrote:

 Marcello (and everyone else who replied):

 It looks like the mirrors have the same policy.  I'm currently using
 this to download from the URL:


 http://doc.sugarlabs.org/epydocs/sugar.network.GlibURLDownloader-class.html

 I'm not seeing a way to put a user agent in using this code.  It looks
 like urllib2 supports it.  I used the other because I was already using it
 for collaboration and it gives me a way to do a progress report on the
 download.  I appreciate everyone's detective work and suggestions.

 James Simmons


 On Sun, Feb 10, 2013 at 1:22 PM, Marcello Perathoner 
 marce...@perathoner.de wrote:

 On 02/10/2013 06:46 PM, James Simmons wrote:

 I had created an Activity for the One Laptop Per Child project which
 downloads and reads the Plain Text version of PG titles.  I use the
 offline
 catalogue and some Python code to list available titles in the
 catalogue
 that match a search string.  For instance the child might enter
 Twain and
 get a list of all the books by and about Twain.  Then the child can
 download the book using the same program.

 This has been working well for years but lately it has stopped working.
 When I try to debug it I see it trying to download this URL for
 instance:

 http://www.gutenberg.org/dirs/**1/1/119/119.ziphttp://www.gutenberg.org/dirs/1/1/119/119.zip



 Supply a user-agent that clearly defines your app and provides a way to
 contact you eg.

   OLPCReader/1.0; 
 +http://www.olpc-reader.org/**app-info.htmlhttp://www.olpc-reader.org/app-info.html

   OLPCReader/1.0; +mailto:m...@example.com

 The standard Python-urllib user agent will not do!


 or


 use a mirror site. See: www.gutenberg.org/MIRRORS.ALL





 Regards

 --
 Marcello Perathoner
 webmas...@gutenberg.org




 --
 Daniel Narvaez



 --
 Daniel Narvaez


___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Problems downloading PG titles without a web browser

2013-02-10 Thread James Simmons
I had created an Activity for the One Laptop Per Child project which
downloads and reads the Plain Text version of PG titles.  I use the offline
catalogue and some Python code to list available titles in the catalogue
that match a search string.  For instance the child might enter Twain and
get a list of all the books by and about Twain.  Then the child can
download the book using the same program.

This has been working well for years but lately it has stopped working.
When I try to debug it I see it trying to download this URL for instance:

http://www.gutenberg.org/dirs/1/1/119/119.zip

Put this URL in any web browser and it will download A Tramp Abroad by
Mark Twain.  However, try and download the same URL using my Python code
and you get this:

Forbidden

You don't have permission to access /dirs/1/1/119/119.zip on this server.
--
Apache Server at www.gutenberg.org Port 80

My Activity is a much more convenient way of downloading books than a web
browser. For one thing, it gives the downloaded file a more intelligent
name than 119.zip.  I would like for it to work again as it did before.
Suggestions?

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [gutvol-d] Problems downloading PG titles without a web browser

2013-02-10 Thread James Simmons
Marcello (and everyone else who replied):

It looks like the mirrors have the same policy.  I'm currently using this
to download from the URL:

http://doc.sugarlabs.org/epydocs/sugar.network.GlibURLDownloader-class.html

I'm not seeing a way to put a user agent in using this code.  It looks like
urllib2 supports it.  I used the other because I was already using it for
collaboration and it gives me a way to do a progress report on the
download.  I appreciate everyone's detective work and suggestions.

James Simmons


On Sun, Feb 10, 2013 at 1:22 PM, Marcello Perathoner marce...@perathoner.de
 wrote:

 On 02/10/2013 06:46 PM, James Simmons wrote:

 I had created an Activity for the One Laptop Per Child project which
 downloads and reads the Plain Text version of PG titles.  I use the
 offline
 catalogue and some Python code to list available titles in the catalogue
 that match a search string.  For instance the child might enter Twain
 and
 get a list of all the books by and about Twain.  Then the child can
 download the book using the same program.

 This has been working well for years but lately it has stopped working.
 When I try to debug it I see it trying to download this URL for instance:

 http://www.gutenberg.org/dirs/**1/1/119/119.ziphttp://www.gutenberg.org/dirs/1/1/119/119.zip



 Supply a user-agent that clearly defines your app and provides a way to
 contact you eg.

   OLPCReader/1.0; 
 +http://www.olpc-reader.org/**app-info.htmlhttp://www.olpc-reader.org/app-info.html

   OLPCReader/1.0; +mailto:m...@example.com

 The standard Python-urllib user agent will not do!


 or


 use a mirror site. See: www.gutenberg.org/MIRRORS.ALL





 Regards

 --
 Marcello Perathoner
 webmas...@gutenberg.org

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] GCI2012 follow up

2013-01-22 Thread James Simmons
Chris,

I fixed my stuff.  The chapters on MYOSA are done and published with one
notable exception.  The chapter on WebKit that Kshitij Kumar did fell short
of what I felt was needed.  I wanted an example of how to create a
self-contained Activity using WebKit (HTML, js, css, etc. inside the .xo
file), and there were other things I thought needed work. Lionel Laske
adapted an article he did for OLPC News as a guest chapter for MYOSA.  Part
of his original article contained the information I wanted Ksitij's chapter
to have.  He left this part of the article out of his chapter so the two
chapters would not be redundant.  So either Kshitij will finish his or
Lionel can add back the stuff he took out.

Aneesh Dogra finished his tasks for me.  However he also did some GTK3
conversions of three of my Activities and those versions have not been
merged in Git or published on ASLO.  I did not know anyone was working on
these Activities, but now that I do we can finish this up.  I just need to
know what version of Sugar is the oldest that uses GTK3 so I can list that
version on ASLO.

James Simmons


On Tue, Jan 22, 2013 at 1:15 AM, Chris Leonard cjlhomeaddr...@gmail.comwrote:

 Dear GCI mentors (and activity authors, in particular),

 We want to make sure that we digest and incorporate any
 contributions made by our GCI students.  In some cases, patches have
 already been committed and deployed, in other cases, a merge request
 may be pending for the submitted work.  In order to help us track each
 of the completed tasks to their final disposition, I have created the
 following wiki page:

 http://wiki.sugarlabs.org/go/Google_Code-In_2012/GCI2012_followup

 Listed on this page are the completed tasks, one per row.  If you were
 the mentor for a given task, please review the list of completed tasks
 and if the task is completely incorporated, just delete the row from
 the table.  Otherwise, add some annotation to the follow-up needed or
 comment columns.  Note that I have already removed all of the OCR
 re-formatting and wiki clean-up tasks from this list.  I marked a few
 i18n tasks as complete in bot hthe follow-up needed and comment
 columns; but I will be going back and jsut deleting these rwos from
 the table as these tasks have no follow-up needed, they have been
 fully landed in our infrastructure.

 To get more information on a task, append the Key onto a URL to see
 the original history of the task on the GCI Melange server.

 e.g.

 add 7986212 to the end of:

 http://www.google-melange.com/gci/task/view/google/gci2012/

 to see the history of that task on Melange
 http://www.google-melange.com/gci/task/view/google/gci2012/7986212

 cjl
 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] [IAEP] About to teach Python programming

2013-01-14 Thread James Simmons
Steve,

In my book I develop an e-book reader, starting with a standalone program
and then converting it to a simple Activity, followed by adding toolbars,
etc.  The examples are simple but not trivial.  I'm not a big fan of Hello
World.  I prefer a simple program that actually does something useful.  I
don't have to understand absolutely every line of code to learn from an
example.

My first exposure to Turbo C was Hello World.  However, I really learned
the language by typing in code for useful programs in C Chest And Other C
Treasures, especially since I didn't always type them in correctly and
then I had to figure out where I went wrong.

If I was teaching a class I'd probably use the examples in my book.  I've
never taught a class in anything so I have no idea if that would work, but
that's how I would do it.

The worst computer class I ever took was my introductory BAL class.  We had
Green Cards (IBM Assembly Pocket Reference) and we spent several class
periods going over BAL instructions and what they did.  It was probably the
dumbest way you could teach BAL.

James Simmons


On Mon, Jan 14, 2013 at 5:08 PM, Steve Thomas sthom...@gosargon.com wrote:

 On Sat, Jan 12, 2013 at 9:58 PM, fors...@ozonline.com.au wrote:

 Hi

 As a beginner, I found creating a Sugar Activity difficult. More
 difficult than creating a program to run from Terminal or Pippy. You might
 get better value using Pygame and writing something that can run from
 Pippy. The goal could be to create more Pippy built in samples.

 If you are going to write an Activity, you could give them a 'hello
 world' template and get them to build on that rather than starting from the
 beginning. Your 'hello world' template could have the basics:a text box for
 text entry/display, a canvas for graphical display and an example of
 keyboard and mouse capture.

 Agreed. Having a template to build on for an Activity would make things
 much simpler.


 Good luck. Please ask if you need help.

 Ditto.  When will you start the class?  I am also teaching Python to some
 kids now, and  interested sharing ideas.

 Stephen


 Tony

  gerald.ard...@gmail.com wrote:
   Hello.
   I have been asked by my school district to teach a one semester
 course on
   computer programming to some of our high school students. I was
 already
   settled on Python. In my planning, I thought it would be great if the
   students built an application for Sugar/XO Laptop. I have, as I think
 you
   know, been using them in our school for a few years, I think the
 transition
   from consumer to producer would be great.
  
   I am not a Python programmer, although I understand the basic
 concepts and
   can muddle my way through. So,here's my question -- what should the
 students
   know/be able to do in Python before they are able to write an
 Activity?
 
  Beyond the basics, understanding the concept of classes and
  inheritance is pretty essential. Some GTK stuff, but that is pretty
  straightforward.
 
  -walter
 
  
   I hope this makes sense. And I appreciate your time.
  
   Best,
   Gerald Ardito
  
   ___
   Sugar-devel mailing list
   Sugar-devel@lists.sugarlabs.org
   http://lists.sugarlabs.org/listinfo/sugar-devel
  
 
 
 
  --
  Walter Bender
  Sugar Labs
  http://www.sugarlabs.org
  ___
  Sugar-devel mailing list
  Sugar-devel@lists.sugarlabs.org
  http://lists.sugarlabs.org/listinfo/sugar-devel
 
  _
  This mail has been virus scanned by Australia On Line
  see http://www.australiaonline.net.au/mailscanning

 ___
 IAEP -- It's An Education Project (not a laptop project!)
 i...@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/iaep



 ___
 IAEP -- It's An Education Project (not a laptop project!)
 i...@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/iaep

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] More new stuff in Make Your Own Sugar Activities1

2013-01-07 Thread James Simmons
I just re-published the FLOSS Manual *Make Your Own Sugar Activities!*
Several people did updates this weekend.  Lionel Laské wrote a new Guest
Chapter on* Developing Sugar Activities Using HTML5.*  Daniel Francis put
the finishing touches on ***Making contributions to Sugar.  *I even did
some revisions to* Setting Up a Sugar Development Environment.*  And there
is more good stuff to come.  We should have a chapter on using WebKit in
your Activities, and possibly one on using the accelerometer that newer
XO's have in your Activities.  And of course I will bring all the chapters
I wrote up to date.

All of this Activity has come from the Google Code-In (in Lionel's case it
was indirect, as he offered to help someone in GCI finish his
chapter).  However,
the book can use new content from authors of all ages.  If you have an idea
for a Guest Chapter why not share it, or better still write the chapter
yourself?

Thanks to everyone who has contributed to the manual.

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] New Guest Chapters in Make Your Own Sugar Activities!

2013-01-04 Thread James Simmons
As a result of the Google Code-In we have three new guest chapters and a
new chapter section in MYOSA. You can read them at:

http://en.flossmanuals.net/make-your-own-sugar-activities/index/

The three Guest Chapters are in the section with that name and the new
section is at the end of MAKING ACTIVITIES USING PYGAME, and is titled *Porting
Activities from Olpcgames to Sugargame.  *Daniel Francis wrote this section.
*

*We also have a new bio of Aneesh Dogra in the *Ab**out The Authors* chapter
.*

*There is an additional chapter about using WebKit in Activities that is
incomplete, thus unpublished.  I have advised the author what it needs to
have added to be complete.  Lionel Laské has offered to adapt his articles
for OLPC News as a possible second chapter on WebKit.  The articles are
here:

http://www.olpcnews.com/software/sugar/developing_sugar_activities_using_html5_part_1.html
http://www.olpcnews.com/software/sugar/developing_sugar_activities_using_html5_part_2.html

I've been impressed with the work of our GCI guest authors, but since GCI
rewards quantity of tasks completed more than quality (a student can only
work on one task at a time, so if the mentor refuses to mark something
complete when it is *mostly *complete he feels like a bad guy) there is still
some polishing needed on some of this stuff that may not get done until GCI
is over with.  On the whole I think these chapters are worth checking out.

I need to do a lot of revisions to the rest of the book, since so much has
changed since I published it.  New style toolbars are just toolbars now,
Hippo Canvas is deprecated, sugar-jhbuild is no more, and supporting Fedora
10 and later versions at the same time isn't a hot topic anymore.  I will
work on updates to the main chapters as time permits.  I'll be publishing
to the web regularly, but the printed and ebook versions will wait until I
think we have something worth publishing.  I'll get a new ISBN number from
Create Space for the printed books and stop selling the old ones.  I'll do
something different for the ebooks so you can get a revised copy without
buying it again, and free downloads for old and new will be on archive.org.

I'm hoping to get more guest chapters, and not just from our younger
developers (of course they will be especially welcome).

James Simmons
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Sugar Digest 2012-12-17

2012-12-17 Thread James Simmons
Walter,

Actually, we have added a Guest Chapters section in *Make Your Own Sugar
Activities!* with three chapters so far.  The first one, on using WebKit,
is about half finished.  It shows how to include WebKit in your Activity
and how to link it to external content but it really needs to show how to
make a self contained Activity with HTML, JavaScript, style sheets and
embedded fonts included in the .xo file.  The author is unable to work on
the chapter for another week or so.

The other two need just a bit of polishing.  One is on converting
GTK2-GTK3 and the second is on replacing HippoCanvas with regular GTK
controls.

The reason you can't see them at the moment is that the publish step in
the process isn't done.  I'm holding off on doing that for awhile.  If
anyone wants to check out how they look now you can get an account on
booki.flossmanuals.net and do a View on the chapters.

I decided to create a Guest Chapters section because we have topics that
are small and somewhat self contained that could be the work of a single
author.  They aren't exactly advanced topics and they don't really fit into
the other chapters either.  I'm hoping we can have more, especially by
younger authors but not limited to them.

At the moment I just plan to publish on the web.  When things have
stabilized enough I'll create a new book on Create Space and Amazon with a
new ISBN and stop selling the old one.

Every author will get a free printed copy of the book from me, sent to
wherever he or she lives.  Authors might get their pictures on the back
cover too.

James Simmons


On Mon, Dec 17, 2012 at 3:53 PM, Walter Bender walter.ben...@gmail.comwrote:

 == Sugar Digest ==

 1. Google Code In [1] continues at a rapid pace. So far, we have 49
 participants working on more than 170 tasks (we continue to add more
 tasks as the contest progresses over the next four weeks). Students
 have done a great job with documentation, for example, there is now a
 chapter in Make Your Own Sugar Activity that describes how to port
 from GTK2 to GTK3 [2], a video introduction to Sugar on a Stick [3],
 and a new Turtle Art introductory guide [4]. They have do a lot of
 coding: contributions such as setting the background image on the
 homepage [5]; improvements to activities [6, 7]. If you have
 suggestions for projects--easy or hard--please don't hesitate to
 contact me.

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] Question on GTK3 and HippoCanvas

2012-12-12 Thread James Simmons
I just got the comment below from Aneesh Dogra.  He has been working on the
GTK2-GTK3 task for Google code-in and one of the examples in the book is a
simplified version of the Chat Activity which uses Hippo Canvas.  It is the
*only *example in the book that does, and it only does that because I just
stripped down the existing Chat Activity to create it.  I was writing a
chapter on how to make Activities collaborate and I needed a simplified
Chat to do that.

I understand that we don't want to use Hippo Canvas any more, but I think
rewriting the whole UI for Chat is more than I expected Aneesh to do for
this particular task.  Actually, if you were going to do that it would make
sense to do it in the GTK2 version so neither one had any Hippo in it.  I
would suggest that doing this could be a task itself, and the person doing
it would have the option of writing a new guest chapter with tips on
replacing Hippo Canvas with regular GTK components.

I'm interested in everyone's thoughts on this.

James Simmons


-- Forwarded message --
From: no-re...@google-melange.appspotmail.com
Date: Wed, Dec 12, 2012 at 1:52 PM
Subject: [Google Code-in 2012] New comment on Make your own Sugar activity:
GTK3 examples
To: nices...@gmail.com


 Hi,

 Aneesh Dogra has left the following comment at Make your own Sugar
activity: GTK3 examples
http://www.google-melange.com/gci/task/view/google/gci2012/8015209:

*Deadline extension Request*

Hello James,



I am midway in porting the Mini Chat to gtk3, Its taking a lot of time
because I basically have to remake the application's whole UI (because it
uses hippo) and we don't support hippo anymore.



I am trying my level best and would like some more time for it. (Atleast 24
hours more)



Thanks

Aneesh

   Greetings,
The Google Open Source Programs Team
 ---

You are receiving this message because you are subscribed to Make your own
Sugar activity: GTK3 examples.
To stop receiving these messages, go to:
http://www.google-melange.com/gci/task/view/google/gci2012/8015209.
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Question on GTK3 and HippoCanvas

2012-12-12 Thread James Simmons
Gonzalo,

I had originally had translating the new materials as a GCI task, but it
looks like that is something GCI did not want.  However, I did not forget
the need to have the new stuff translated.  What I was thinking is that I
would publish the new stuff to the website only at first.  When the changes
reach a critical mass then I'll publish a new book on Create Space with a
new ISBN, etc. and remove the old one from the distribution channels.  I'll
also send printed copies to the guest chapter authors.

The printed book refers to the website, so it's OK for the website to have
more current content than the latest printed book.  The printed books
aren't selling all that well in any case.

As new content is added to the published book on the web I'll send
announcements to the lists.  We might have an easier time getting
translators once GCI is over with.

James Simmons


On Wed, Dec 12, 2012 at 2:48 PM, Gonzalo Odiard gonz...@laptop.org wrote:

 Hi James,
 Replacing hippo in Chat was not trivial, but is already done.
 You (or Aneesh) can see the code used right now in the activity.

 If you need a simple activity to show how collaborate,
 I think is better use simple gtk controls, labels or entries.

 As your book is our best reference for developers,
 should be great if you add a note about not using hippo,
 and ideal if no examples use hippo.

 Please, tell us if you plan do a new release of the book,
 to update the Spanish translation.

 Gonzalo



 On Wed, Dec 12, 2012 at 5:37 PM, James Simmons nices...@gmail.com wrote:

 I just got the comment below from Aneesh Dogra.  He has been working on
 the GTK2-GTK3 task for Google code-in and one of the examples in the book
 is a simplified version of the Chat Activity which uses Hippo Canvas.  It
 is the *only *example in the book that does, and it only does that
 because I just stripped down the existing Chat Activity to create it.  I
 was writing a chapter on how to make Activities collaborate and I needed a
 simplified Chat to do that.

 I understand that we don't want to use Hippo Canvas any more, but I think
 rewriting the whole UI for Chat is more than I expected Aneesh to do for
 this particular task.  Actually, if you were going to do that it would make
 sense to do it in the GTK2 version so neither one had any Hippo in it.  I
 would suggest that doing this could be a task itself, and the person doing
 it would have the option of writing a new guest chapter with tips on
 replacing Hippo Canvas with regular GTK components.

 I'm interested in everyone's thoughts on this.

 James Simmons


 -- Forwarded message --
 From: no-re...@google-melange.appspotmail.com
 Date: Wed, Dec 12, 2012 at 1:52 PM
 Subject: [Google Code-in 2012] New comment on Make your own Sugar
 activity: GTK3 examples
 To: nices...@gmail.com


  Hi,

  Aneesh Dogra has left the following comment at Make your own Sugar
 activity: GTK3 examples
 http://www.google-melange.com/gci/task/view/google/gci2012/8015209:

 *Deadline extension Request*

 Hello James,



 I am midway in porting the Mini Chat to gtk3, Its taking a lot of time
 because I basically have to remake the application's whole UI (because it
 uses hippo) and we don't support hippo anymore.



 I am trying my level best and would like some more time for it. (Atleast
 24 hours more)



 Thanks

 Aneesh

Greetings,
 The Google Open Source Programs Team
  ---

 You are receiving this message because you are subscribed to Make your
 own Sugar activity: GTK3 examples.
 To stop receiving these messages, go to:
 http://www.google-melange.com/gci/task/view/google/gci2012/8015209.


 ___
 Sugar-devel mailing list
 Sugar-devel@lists.sugarlabs.org
 http://lists.sugarlabs.org/listinfo/sugar-devel



___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Timing problem with GCI tasks

2012-12-09 Thread James Simmons
Aneesh,

I haven't had a chance to look at your patches.  What I had actually had in
mind was having separate Git directories for the GTK3 versions of the code.
 We aren't using GTK3 in the field so much yet, so I wanted readers of the
book to have complete samples of both versions of the Activities to look
at.  I also wanted to avoid re-doing the code listings in the book itself.
 What I was thinking was that the book would have the current listings but
we'd point out that the Git repository had both and we'd have a chapter
with tips on how to do the migration.

I don't know how you would get credit for what you already did, but Walter
seems to think you will and he would know.

Cynthia Wasonga has the task now.  She only just got it.  I'd like to see
what she does with it.

Thanks and good luck,

James Simmons

On Sun, Dec 9, 2012 at 11:00 AM, Aneesh Dogra lionane...@gmail.com wrote:


  OK.  The GCI tasks are supposed to be two hours work for an experienced
  developer and quantity of tasks completed counts (two things I only
 learned
  today.  I should have read the mentoring instructions more carefully).
  Splitting up the tasks for GTK3 might improve the situation for Aneesh.
 
  The other tasks aren't as large.
  And some are much larger. The problem is, it is not possible to make
  every task the same in terms of either time or difficultly. Not every
  task can be broken down into small bites. As far as the overall
  distribution of difficultly, I think the GTK3 manual is well within a
  std dev of the mean.

 Will I be recieving credit for the 2 example GTK3 ports I did? Actually I
 can make that 3. The third one will just take a few more time (already half
 way through). I unclaimed the task because we needed another sample (which
 would replace the pygame sample) as suggested by Walter and by the time I
 finished that, someone else claimed that task. I am not blaiming anyone
 here, Walter made himself clear before I decided to unclaim. So, back to
 the question, will I get credit for those ports?
 ples.  I think the problem is that there

 --
 Thanks
 Aneesh Dogra (lionaneesh)

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


  1   2   3   4   >