Re: Update.1 activities download script

2008-03-25 Thread Walter Bender
 could auto-magically key off these pages

One problem is that the naming scheme in the activities.default file,
which is what I used to post the activities on the Peru page, is not
the same as what one sees when you use xo-get or download bundles from
the wiki. Some resolution of the two would be necessary.

-walter

2008/3/25 Ixo X oxI [EMAIL PROTECTED]:
 FYI,
 Chris,
   To also help make the 'official' Activity Pack(s) (or bundled activities,
 or whatever final terminology), I've tried to start a 'clear and written'
 list of such mentioned Activities.

   http://wiki.laptop.org/go/G1G1_bundled_activities

 with a similar vein of thought, started another brainstorm for a main
 deployment coming up
   http://wiki.laptop.org/go/Peru_bundled_activities

 This pattern could continue for each deployment... countries  specific
 target users... etc...

 And I wonder in the future, 'xo-get' script could auto-magically key off
 these pages to create a useful tool like...
 # xo-get upgrade G1G1_activity_pack
 (i.e.   # xo -get  upgrade [DeploymentName]_activity_pack)

 which would just take the latest list from the wiki page
   http://wiki.laptop.org/go/[DeploymentName]_activity_pack

 Both of the first two pages I listed above, has already gotten some great
 updates by several people, and recent revisions answer a lot of questions, I
 had on what is or is not included in those deployments.

  :-)  Take a gander yourself, and offer your thoughts
 Thanks,  -Ixo



 On Mon, Mar 17, 2008 at 7:52 AM, Chris Hager [EMAIL PROTECTED] wrote:

 
  I've implemented the upgrade script now -- on the next xo-get update
  it will ask to update to version 1.2.5 and then it's capable of xo-get
  upgrade.
 
  When called, it will re-download the upgrade script from
  http://dev.laptop.org/~bert/update-activities.py all 48 hours, save it
  in ~/.xo_get/update-activities.py, and run it without parameters.
 
  Best,  - Chris
 
 
 
 
 
 
  Chris Hager wrote:
   I'm just about implementing the script into xo-get, and I was thinking
   on how to do it. Either simply integrating it into xo-get.py (xo-get is
   a 1-file script), or download it on an 'xo-get upgrade' if it's not
   available. This might be smarter, so changes in the upgrade script can
   be made without changing xo-get.
  
  
   Bert Freudenberg wrote:
  
   To save download time, do something like this first:
   cp -a /usr/share/activities/*.activity /home/olpc/Activities
  
   Maybe only make symlinks?
  
 ln -s /usr/share/activities/*.activity /home/olpc/Activities/
  
  
Chris
 

 ___
  Devel mailing list
  Devel@lists.laptop.org
  http://lists.laptop.org/listinfo/devel





-- 
Walter Bender
One Laptop per Child
http://laptop.org
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-24 Thread Ixo X oxI
FYI,
Chris,
  To also help make the 'official' Activity Pack(s) (or bundled activities,
or whatever final terminology), I've tried to start a 'clear and written'
list of such mentioned Activities.

  http://wiki.laptop.org/go/G1G1_bundled_activities

with a similar vein of thought, started another brainstorm for a main
deployment coming up
  http://wiki.laptop.org/go/Peru_bundled_activities

This pattern could continue for each deployment... countries  specific
target users... etc...

And I wonder in the future, 'xo-get' script could auto-magically key off
these pages to create a useful tool like...
   # xo-get upgrade G1G1_activity_pack
(i.e.   # xo -get  upgrade [DeploymentName]_activity_pack)

which would just take the latest list from the wiki page
  
http://wiki.laptop.org/go/[DeploymentName]_activity_packhttp://wiki.laptop.org/go/%5BDeploymentName%5D_activity_pack

Both of the first two pages I listed above, has already gotten some great
updates by several people, and recent revisions answer a lot of questions, I
had on what is or is not included in those deployments.

:-)  Take a gander yourself, and offer your thoughts
Thanks,  -Ixo


On Mon, Mar 17, 2008 at 7:52 AM, Chris Hager [EMAIL PROTECTED] wrote:

 I've implemented the upgrade script now -- on the next xo-get update
 it will ask to update to version 1.2.5 and then it's capable of xo-get
 upgrade.

 When called, it will re-download the upgrade script from
 http://dev.laptop.org/~bert/update-activities.pyhttp://dev.laptop.org/%7Ebert/update-activities.pyall
  48 hours, save it
 in ~/.xo_get/update-activities.py, and run it without parameters.

 Best,  - Chris


 Chris Hager wrote:
  I'm just about implementing the script into xo-get, and I was thinking
  on how to do it. Either simply integrating it into xo-get.py (xo-get is
  a 1-file script), or download it on an 'xo-get upgrade' if it's not
  available. This might be smarter, so changes in the upgrade script can
  be made without changing xo-get.
 
 
  Bert Freudenberg wrote:
 
  To save download time, do something like this first:
  cp -a /usr/share/activities/*.activity /home/olpc/Activities
 
  Maybe only make symlinks?
 
ln -s /usr/share/activities/*.activity /home/olpc/Activities/
 
 
   Chris

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-17 Thread Chris Hager
Bert Freudenberg wrote:
 Xo-get does a lot more with its database of installed activities etc. 
 Mine simply downloads and installs activities from the repository for 
 supported activities.

 But I'd be happy if someone merged my script into xo-get, I do not 
 intend to maintain it indefinitely.

Bert, I'm happy to merge your script into xo-get. Something like 'xo-get 
upgrade' mabe? :)



 It should be simple to add the official activity repo to xo-get. 

What's the official activity repo?


- Chris


 In my script I like the simplicity of the default operation, which 
 simply upgrades all installed activities to the latest version found 
 in the repo. Also working from the console/ssh is useful, possibly one 
 should even support for installation without Sugar running (by simply 
 unzipping the .xo).

 - Bert -



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-17 Thread Bert Freudenberg
On Mar 16, 2008, at 20:13 , Chris Hager wrote:

 Bert Freudenberg wrote:
 Xo-get does a lot more with its database of installed activities  
 etc. Mine simply downloads and installs activities from the  
 repository for supported activities.

 But I'd be happy if someone merged my script into xo-get, I do not  
 intend to maintain it indefinitely.

 Bert, I'm happy to merge your script into xo-get. Something like 'xo- 
 get upgrade' mabe? :)

Sounds good :)

 It should be simple to add the official activity repo to xo-get.

 What's the official activity repo?

http://mock.laptop.org/repos/local.update1/XOS/index.html

- Bert -


 - Chris


 In my script I like the simplicity of the default operation, which  
 simply upgrades all installed activities to the latest version  
 found in the repo. Also working from the console/ssh is useful,  
 possibly one should even support for installation without Sugar  
 running (by simply unzipping the .xo).

 - Bert -



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-17 Thread Chris Hager
Bert Freudenberg wrote:
 Xo-get does a lot more with its database of installed activities etc. 
 Mine simply downloads and installs activities from the repository for 
 supported activities.

 But I'd be happy if someone merged my script into xo-get, I do not 
 intend to maintain it indefinitely.

I'm happy to merge your script into xo-get. Maybe something like 'xo-get 
upgrade'...?


 It should be simple to add the official activity repo to xo-get. 

What's the official activity repo?

- Chris


 In my script I like the simplicity of the default operation, which 
 simply upgrades all installed activities to the latest version found 
 in the repo. Also working from the console/ssh is useful, possibly one 
 should even support for installation without Sugar running (by simply 
 unzipping the .xo).

 - Bert -




___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-17 Thread Chris Hager
I've implemented the upgrade script now -- on the next xo-get update 
it will ask to update to version 1.2.5 and then it's capable of xo-get 
upgrade.

When called, it will re-download the upgrade script from 
http://dev.laptop.org/~bert/update-activities.py all 48 hours, save it 
in ~/.xo_get/update-activities.py, and run it without parameters.

Best,
  - Chris


Chris Hager wrote:
 Sorry for posting twice here before, but somehow I didn't receive any 
 devel and sugar mails for 2 days... Now seems to work again. :p

 I'm just about implementing the script into xo-get, and I was thinking 
 on how to do it. Either simply integrating it into xo-get.py (xo-get is 
 a 1-file script), or download it on an 'xo-get upgrade' if it's not 
 available. This might be smarter, so changes in the upgrade script can 
 be made without changing xo-get.


 Bert Freudenberg wrote:
   
 ...

 To save download time, do something like this first:

 cp -a /usr/share/activities/*.activity /home/olpc/Activities
 

 Maybe only make symlinks?

   ln -s /usr/share/activities/*.activity /home/olpc/Activities/

   
 And finally, there is a trick in the script so it connects to the  
 current Sugar session even if run from the console or via ssh - may be  
 useful to somebody:

 if not 'SUGAR_PREFIX' in os.environ:
Connect to running Sugar session
cp = ConfigParser()
cp.read(env.get_profile_path('session.info'))
os.environ['DBUS_SESSION_BUS_ADDRESS'] = cp.get('Session',  
 'dbus_address')
dbus.set_default_main_loop(dbus.mainloop.NULL_MAIN_LOOP)
 

 Thanks a lot, this is really useful for me already! Maybe also put it 
 somewhere in the wiki... [[Programming Tricks]] :)


 - Chris

 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel


   

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-17 Thread Bert Freudenberg
On Mar 17, 2008, at 15:52 , Chris Hager wrote:

 I've implemented the upgrade script now -- on the next xo-get  
 update it will ask to update to version 1.2.5 and then it's capable  
 of xo-get upgrade.

 When called, it will re-download the upgrade script from 
 http://dev.laptop.org/~bert/update-activities.py 
  all 48 hours, save it in ~/.xo_get/update-activities.py, and run it  
 without parameters.


Hehe, now that's cute. But remember it will only upgrade the official  
activities, it does not consider other repositories.

- Bert -
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-17 Thread Bert Freudenberg
On Mar 17, 2008, at 14:48 , Chris Hager wrote:

 Bert Freudenberg wrote:
 ...

 To save download time, do something like this first:

 cp -a /usr/share/activities/*.activity /home/olpc/Activities

 Maybe only make symlinks?

 ln -s /usr/share/activities/*.activity /home/olpc/Activities/

Err, the point of my script is to download activities that are deleted  
from /usr/share/activities once you upgrade to update.1-699 or later.  
There are no more pre-installed activities (except for the Journal).

 And finally, there is a trick in the script so it connects to the   
 current Sugar session even if run from the console or via ssh - may  
 be  useful to somebody:

 if not 'SUGAR_PREFIX' in os.environ:
   Connect to running Sugar session
   cp = ConfigParser()
   cp.read(env.get_profile_path('session.info'))
   os.environ['DBUS_SESSION_BUS_ADDRESS'] = cp.get('Session',   
 'dbus_address')
   dbus.set_default_main_loop(dbus.mainloop.NULL_MAIN_LOOP)

 Thanks a lot, this is really useful for me already! Maybe also put  
 it somewhere in the wiki... [[Programming Tricks]] :)


I actually have no idea how evil that snippet really is ;) Wold be  
nice if some Sugar/DBus expert could comment.

- Bert -


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-17 Thread Tomeu Vizoso
On Mon, Mar 17, 2008 at 4:53 PM, Bert Freudenberg [EMAIL PROTECTED] wrote:
 On Mar 17, 2008, at 14:48 , Chris Hager wrote:

   Bert Freudenberg wrote:
   ...
  
   To save download time, do something like this first:
  
   cp -a /usr/share/activities/*.activity /home/olpc/Activities
  
   Maybe only make symlinks?
  
   ln -s /usr/share/activities/*.activity /home/olpc/Activities/

  Err, the point of my script is to download activities that are deleted
  from /usr/share/activities once you upgrade to update.1-699 or later.
  There are no more pre-installed activities (except for the Journal).


   And finally, there is a trick in the script so it connects to the
   current Sugar session even if run from the console or via ssh - may
   be  useful to somebody:
  
   if not 'SUGAR_PREFIX' in os.environ:
 Connect to running Sugar session
 cp = ConfigParser()
 cp.read(env.get_profile_path('session.info'))
 os.environ['DBUS_SESSION_BUS_ADDRESS'] = cp.get('Session',
   'dbus_address')
 dbus.set_default_main_loop(dbus.mainloop.NULL_MAIN_LOOP)
  
   Thanks a lot, this is really useful for me already! Maybe also put
   it somewhere in the wiki... [[Programming Tricks]] :)


  I actually have no idea how evil that snippet really is ;) Wold be
  nice if some Sugar/DBus expert could comment.

Don't really know why that file is there, but from this comment from
the code that creates it, it's not something you can rely in the long
term:

http://dev.laptop.org/git?p=sugar;a=blob;f=src/main.py;h=e78570769e8138c827e04c1a6af820c6ce712955;hb=HEAD#l53

Perhaps in the xo you could rely on this hardcoded value?

os.environ['DBUS_SESSION_BUS_ADDRESS'] = 'unix:path=/tmp/olpc-session-bus'

Tomeu
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-15 Thread Bert Freudenberg
On Mar 15, 2008, at 1:55 , Gary C Martin wrote:

 On 15 Mar 2008, at 00:34, Ixo X oxI wrote:

 Another great program to use to install .xo bundles. is  'xo-
 get'.  Has
 both a console/terminal and Sugar/GUI interface.

 http://wiki.laptop.org/go/Xo-get

 Currently under going testing, but pretty darn close with only a
 handful of
 'un-documented features left'. :-)

 -iXo

 p.s xo-get also has one of the most extensive collections of
 available .xo
 activities to install .

 Yea, I use xo-get quite a bit previously very useful. However the GUI
 version has failed to work on any recent xo builds for quite some time
 (using a B4 here), and you do have to have already somehow installed a
 working terminal activity before you can use the command line version
 of xo-get, as it seems to have sugar dependancies that prevent it from
 running in the hidden command line. Maybe there are new versions that
 work under these situations?

 So not too great a fix just now for the activity bloodletting going on
 in the latest update-1 candidates ;-)

Xo-get does a lot more with its database of installed activities etc.  
Mine simply downloads and installs activities from the repository for  
supported activities.

But I'd be happy if someone merged my script into xo-get, I do not  
intend to maintain it indefinitely.

It should be simple to add the official activity repo to xo-get. In my  
script I like the simplicity of the default operation, which simply  
upgrades all installed activities to the latest version found in the  
repo. Also working from the console/ssh is useful, possibly one should  
even support for installation without Sugar running (by simply  
unzipping the .xo).

- Bert -

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Update.1 activities download script

2008-03-14 Thread Bert Freudenberg
Hi Scott, and all,

I made a script that downloads and installs or upgrades the official  
activities for Update.1 from the repository at:

http://mock.laptop.org/repos/local.update1/XOS/Dictionary-1.xo

The script is available at

http://dev.laptop.org/~bert/update-activities.py

and it makes testing these activities on build 700 rather simple.

Usage: update-activities.py [options] [ACTIVITIES]

If no ACTIVITIES are listed, operate on all activities

Options:
   -h, --help  show this help message and exit
   -u, --upgrade   upgrade installed activities [default]
   -i, --install   install non-installed activities
   -d, --download  only download, do not actually install or upgrade
   -l, --list  only list, do not actually install or upgrade

To save download time, do something like this first:

cp -a /usr/share/activities/*.activity /home/olpc/Activities

I also noticed problems with some of the .xo bundles, see

http://dev.laptop.org/ticket/6696
http://dev.laptop.org/ticket/6697

And finally, there is a trick in the script so it connects to the  
current Sugar session even if run from the console or via ssh - may be  
useful to somebody:

if not 'SUGAR_PREFIX' in os.environ:
   Connect to running Sugar session
   cp = ConfigParser()
   cp.read(env.get_profile_path('session.info'))
   os.environ['DBUS_SESSION_BUS_ADDRESS'] = cp.get('Session',  
'dbus_address')
   dbus.set_default_main_loop(dbus.mainloop.NULL_MAIN_LOOP)

- Bert -


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-14 Thread Bert Freudenberg

On Mar 14, 2008, at 17:15 , Bert Freudenberg wrote:

 Hi Scott, and all,

 I made a script that downloads and installs or upgrades the official
 activities for Update.1 from the repository at:

 http://mock.laptop.org/repos/local.update1/XOS/Dictionary-1.xo

I meant

http://mock.laptop.org/repos/local.update1/XOS/index.html

of course ...

- Bert -

 The script is available at

 http://dev.laptop.org/~bert/update-activities.py

 and it makes testing these activities on build 700 rather simple.

 Usage: update-activities.py [options] [ACTIVITIES]

 If no ACTIVITIES are listed, operate on all activities

 Options:
   -h, --help  show this help message and exit
   -u, --upgrade   upgrade installed activities [default]
   -i, --install   install non-installed activities
   -d, --download  only download, do not actually install or upgrade
   -l, --list  only list, do not actually install or upgrade

 To save download time, do something like this first:

 cp -a /usr/share/activities/*.activity /home/olpc/Activities

 I also noticed problems with some of the .xo bundles, see

 http://dev.laptop.org/ticket/6696
 http://dev.laptop.org/ticket/6697

 And finally, there is a trick in the script so it connects to the
 current Sugar session even if run from the console or via ssh - may be
 useful to somebody:

 if not 'SUGAR_PREFIX' in os.environ:
   Connect to running Sugar session
   cp = ConfigParser()
   cp.read(env.get_profile_path('session.info'))
   os.environ['DBUS_SESSION_BUS_ADDRESS'] = cp.get('Session',
 'dbus_address')
   dbus.set_default_main_loop(dbus.mainloop.NULL_MAIN_LOOP)

 - Bert -


 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-14 Thread Ixo X oxI
FYI,
Another great program to use to install .xo bundles. is  'xo-get'.  Has
both a console/terminal and Sugar/GUI interface.

  http://wiki.laptop.org/go/Xo-get

Currently under going testing, but pretty darn close with only a handful of
'un-documented features left'. :-)

-iXo

p.s xo-get also has one of the most extensive collections of available .xo
activities to install .

On Fri, Mar 14, 2008 at 10:39 PM, Charles Merriam [EMAIL PROTECTED]
wrote:

 Very nice!

 On Fri, Mar 14, 2008 at 11:29 AM, Bert Freudenberg [EMAIL PROTECTED]
 wrote:
 
   On Mar 14, 2008, at 17:15 , Bert Freudenberg wrote:
 
Hi Scott, and all,
   
I made a script that downloads and installs or upgrades the official
activities for Update.1 from the repository at:
   
http://mock.laptop.org/repos/local.update1/XOS/Dictionary-1.xo
 
   I meant
 
   http://mock.laptop.org/repos/local.update1/XOS/index.html
 
   of course ...
 
   - Bert -
 
 
 
The script is available at
   

  http://dev.laptop.org/~bert/update-activities.pyhttp://dev.laptop.org/%7Ebert/update-activities.py
   
and it makes testing these activities on build 700 rather simple.
   
Usage: update-activities.py [options] [ACTIVITIES]
   
If no ACTIVITIES are listed, operate on all activities
   
Options:
  -h, --help  show this help message and exit
  -u, --upgrade   upgrade installed activities [default]
  -i, --install   install non-installed activities
  -d, --download  only download, do not actually install or upgrade
  -l, --list  only list, do not actually install or upgrade
   
To save download time, do something like this first:
   
cp -a /usr/share/activities/*.activity /home/olpc/Activities
   
I also noticed problems with some of the .xo bundles, see
   
http://dev.laptop.org/ticket/6696
http://dev.laptop.org/ticket/6697
   
And finally, there is a trick in the script so it connects to the
current Sugar session even if run from the console or via ssh - may
 be
useful to somebody:
   
if not 'SUGAR_PREFIX' in os.environ:
  Connect to running Sugar session
  cp = ConfigParser()
  cp.read(env.get_profile_path('session.info'))
  os.environ['DBUS_SESSION_BUS_ADDRESS'] = cp.get('Session',
'dbus_address')
  dbus.set_default_main_loop(dbus.mainloop.NULL_MAIN_LOOP)
   
- Bert -
   
   
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel
 
 
 
   ___
   Devel mailing list
   Devel@lists.laptop.org
   http://lists.laptop.org/listinfo/devel
 
 ___
 Devel mailing list
 Devel@lists.laptop.org
 http://lists.laptop.org/listinfo/devel

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: Update.1 activities download script

2008-03-14 Thread Gary C Martin
On 15 Mar 2008, at 00:34, Ixo X oxI wrote:

 Another great program to use to install .xo bundles. is  'xo- 
 get'.  Has
 both a console/terminal and Sugar/GUI interface.

  http://wiki.laptop.org/go/Xo-get

 Currently under going testing, but pretty darn close with only a  
 handful of
 'un-documented features left'. :-)

 -iXo

 p.s xo-get also has one of the most extensive collections of  
 available .xo
 activities to install .

Yea, I use xo-get quite a bit previously very useful. However the GUI  
version has failed to work on any recent xo builds for quite some time  
(using a B4 here), and you do have to have already somehow installed a  
working terminal activity before you can use the command line version  
of xo-get, as it seems to have sugar dependancies that prevent it from  
running in the hidden command line. Maybe there are new versions that  
work under these situations?

So not too great a fix just now for the activity bloodletting going on  
in the latest update-1 candidates ;-)

G

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel