Re: [Sugar-devel] dumping datastore to another filesystem

2009-05-13 Thread Sameer Verma
On Tue, May 12, 2009 at 9:52 PM, torello tore...@torosoft.com wrote:
 Sameer Verma ha scritto:

 Is there a script that will dump all objects from the sugar datastore
 to another filesystem (FAT or ext2)? Dragging and dropping objects one
 at a time from the journal onto the USB icon is painfully slow.

 cheers,
 Sameer


 Hi,

 there is a fuse modules that allow to see the datastore object like a
 filesystem. You can so copy the datastore object out of datastore.
 Actually this way can be done only in a environment where normal linux
 desktop is present. Actually this way is not  suitable from Soas or real XO.
 The code about this will be release in the next days.

 Cheers, Torello.


Wow! a fuse module would be terrific! Can't wait to see it.

cheers,
Sameer
-- 
Dr. Sameer Verma, Ph.D.
Associate Professor of Information Systems
San Francisco State University
San Francisco CA 94132 USA
http://verma.sfsu.edu/
http://opensource.sfsu.edu/
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


[Sugar-devel] [sugar-devel] Recent fiddlings with Print Support

2009-05-13 Thread Vamsi Krishna Davuluri
Okay, so here's the latest dope.

Assertion: abiword 2.6.8 might be the best stable out there, but its a
nightmare for my project.
Reason: It requires an intermediate conversion, and the final pdf which is
achieved doesn't have text that can copy/pasted (bug)
Correction: Avoid 2.6.8 for the deployments

My new code is version independent anyway,

And if we can Avoid 2.6.8, we won't have to worry about text being drawn as
image artifacts; they will be drawn as text only.


This week's job, integrate this into fork() of read.


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


Re: [Sugar-devel] [IAEP] How Can We Showcase Turtle Art Portfolio

2009-05-13 Thread Sean DALY
I'll be sure to have my camcorder ready... and my understanding is
that Saturday's presentations will be streamed live


On Wed, May 13, 2009 at 12:23 AM, John Tierney jtis4...@hotmail.com wrote:
 Hello All,

 Would like commentary from the community on how we can try and showcase the
 abilities of Turtle art Portfolio
 along with the things each of us are working on. The email below came from
 my inability(due to my confusing question)
 to start the thread in our IRC marketing meeting today. I hope those of you
 going to Paris get a chance to spend some time
 on this subject. This is an important piece of our Educational Outreach and
 a capability that all community members
 can showcase. Therefore, I have cross-posted to IAEP, Developer, and
 Marketing-please pass along to
 others who can be of help to the conversation.

 Thanks,
 John Tierney

Hi Walter,

Sorry I wasn't so clear in my question was just trying to start thread
 about importance of Showcasing
TA Portfolio-The Journal and TA Portfolio combination for Teachers ability
 to see child's work and progression is one
of the themes we should push.

The idea that every activity integrates with the Portfolio is great selling
 point for teachers. When developers
and activity designers discuss and describe their work mentioning it
 integrates with TA portfolio reinforces
key concepts of reflection and critique and allows for children to showcase
 their creativity for Parents, Teachers, Peers
and Community.

 From the non-technical/developer world I am not sure if it works with all
 activities. Showcasing and featuring the
TA Portfolio as an additional assessment source which allows children to
 let their creativity shine is an important
thing to get across. Allowing all community members to market this
 ability(Helps or Works with TA Portfolio) will
help bring many more Teachers and others into the fold.

Having a little session with the members at Sugar Camp Paris and with OLPC
 France about TA Portfolio and its ability
to help Teachers and Students and the Programs ability would be very
 beneficial, even more so if it was recorded.

Much like Evangeline's and your presentation at Sugar Camp it was one of
 the most instructive pieces on how this
ability can make a true difference in the classroom. Now that the TA
 Portfolio activity has been realized, putting forth
it's usability seems advantageous.

Just an idea-

 Spot on. The reason why I give all my talks using Turtle Art is
 exactly to make this point of closing the loop.

 -walter

 ___
 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] Quoting in shell scripts (was: Re: [sugar-devel] Recent fiddlings with Print Support)

2009-05-13 Thread Sascha Silbe

On Wed, May 13, 2009 at 01:03:26PM +0530, Vamsi Krishna Davuluri wrote:


Okay, so here's the latest dope.
I hope you don't mind me pointing out a few oversights in your script 
publically. The main reason is that I want to remember others (e.g. GSoC 
students) to be careful about quoting - a topic that unfortunately 
doesn't seem to get as much attention in university courses as it 
deserves.



sandbox=${TMPDIR-/tmp}/cups-odftops.$$
(umask 077  mkdir $sandbox) || exit 1
TMPDIR and thus later sandbox may contain any character, so you need to 
quote them.
BTW: I usually issue set -e in front of any script and explicitly 
handle the cases where I know that some command may fail and I _do_ want 
to continue, BTW. Doing it the other way round increases the likelyhood 
of forgetting to check for an error and thus making the real error hard 
to find.



fn2=`echo $fn1 | sed -e 's/odt/ps/' `
This invocation is the reason for this mail: You should (*) quote both 
fn1 and the result of the calculation. This would give:


fn2=`echo \$fn1\ | sed -e 's/odt/ps/' `

As you see, it's a bit awkward. That's why I recommend using $(...) 
instead of `...`:


fn2=$(echo $fn1 | sed -e 's/odt/ps/')

The given sed invocation will replace the _first_ occurence of odt 
(e.g. Godtfred Kirk Christiansen.odt - Gpsfred Kirk 
Christiansen.odt)  , BTW. You should append $ after odt to make it 
match just the end of the string.



if cat $fn2 | grep -q %!PS-Adobe-3.0

Useless use of cat: you can use shell redirection instead:

if grep -q %!PS-Adobe-3.0  $fn2


break;
Hmm, I don't see any loop that could be aborted. Do you mean exit 0 
instead?



(*) For this particular occurence, it isn't strictly necessary to fn1, 
as it is passed to echo which will behave the same either way. This 
isn't true for most other commands, so it's useful to develop a habit of 
always quoting arguments if they may contain arbitrary / unknown / 
user-specified data.


CU Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/

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


Re: [Sugar-devel] Logo

2009-05-13 Thread Martin Dengler
On Tue, May 12, 2009 at 11:54:50AM -0500, Andrés Arrieta Perréard wrote:
 Hi,
 I'm trying to modify the logo on soas that says Sugar at the boot.

http://lists.sugarlabs.org/archive/sugar-devel/2009-May/014230.html

 Alphinux

Martin


pgpAlyrWoaaIP.pgp
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Quoting in shell scripts (was: Re: [sugar-devel] Recent fiddlings with Print Support)

2009-05-13 Thread Jonas Smedegaard
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

On Wed, May 13, 2009 at 10:25:36AM +0200, Sascha Silbe wrote:
 On Wed, May 13, 2009 at 01:03:26PM +0530, Vamsi Krishna Davuluri 
 wrote:

 Okay, so here's the latest dope.
 I hope you don't mind me pointing out a few oversights in your script 
 publically. The main reason is that I want to remember others (e.g. 
 GSoC students) to be careful about quoting - a topic that 
 unfortunately doesn't seem to get as much attention in university 
 courses as it deserves.

 sandbox=${TMPDIR-/tmp}/cups-odftops.$$
 (umask 077  mkdir $sandbox) || exit 1
 TMPDIR and thus later sandbox may contain any character, so you need 
 to quote them.

While we are at it, I believe it is safer and more elegant to use mktemp 
than $$ (which in theory can be captured by evil-doers using simple ps 
on a very slow system).  Also, I usually avoid subshells to not risk 
hiding failures (you need to do set -e inside each subshell).

Here's my suggested variant of above:


sandbox=$(mktemp -t cups-odftops.XX)
mkdir -m 077 $sandbox || exit 1


Enjoy :-)

  - Jonas

- -- 
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

  [x] quote me freely  [ ] ask before reusing  [ ] keep private
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREDAAYFAkoKmIEACgkQn7DbMsAkQLi6VQCeIsalYM8qNJApqtDA6MHuszjV
A5sAoIGEd4avfdoYB/syXpwg7l2vdI4/
=iMab
-END PGP SIGNATURE-
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] Quoting in shell scripts (was: Re: [sugar-devel] Recent fiddlings with Print Support)

2009-05-13 Thread Vamsi Krishna Davuluri
Thanks. I have taken into account your suggestions and made another script.

This had been not a competition to beautify or verify the rigidity of the
script, rather to see if opensuse accepted it. Which it still doesnt
Something to do with lp user file create permissions.
Though the script works fine on ubuntu and fedora.
And also, this is my first shell script


#!/bin/bash -e
# CUPS filter to process ODT files using abiword


# $6 happens to be the path to file passed as argument
fn=$6

#in case its not defined
TMPDIR=/tmp

# we are creating a dummy folder, which can take different file types using
mkdir, change to =/tmp/cups-odftops
sandbox=${TMPDIR-/tmp}/cups-odftops.
(umask 077  mkdir $sandbox) || exit 1

#our two dummy files
fn1=$sandbox/temp123.odt
cp $fn $fn1

# Call abiword quietly, securely
abiword --to=ps $fn1
fn2=`echo $fn1 | sed -e 's/odt/ps/' `

#check if our version doesn't require an intermediate conversion, if it
does, do it, else break;

if [ -n `grep -q %!PS-Adobe-3.0  $fn2 ` ];then
abiword --to=doc $fn1
abiword --to=ps `echo $fn1 | sed -e 's/odt/doc/' `
fi

cat $fn2
#remove the sandbox folder, for debugging purposes check by commenting the
following line and see what is in the /tmp/ folder
#rm -rf $sandbox
#NOTES: CURSE me for not realizing that these scripts cant write to anyplace
other than tmp dirs, and wasting about 20 hrs doing all sorts of
combinations of selinux tweaking, writing sample scripts (which magically
did the job) and CHMODing


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


Re: [Sugar-devel] dumping datastore to another filesystem

2009-05-13 Thread Daniel Drake
2009/5/12 Sameer Verma sve...@sfsu.edu:
 Is there a script that will dump all objects from the sugar datastore
 to another filesystem (FAT or ext2)? Dragging and dropping objects one
 at a time from the journal onto the USB icon is painfully slow.

Some scripts we use in paraguay for full backup/restore to XS:
http://dev.laptop.org/ticket/9250

Could easily be adapted to work with other mediums.

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


[Sugar-devel] Activities in Sucrose release cycle

2009-05-13 Thread Aleksey Lim
Hi all,

Do we really need activities in Sucrose release cycle?

Think about issue with last Browse which doesn't run on sugar 0.82
(but old Browse from 0.82 didn't have needed feature).
Another problem - small but valuable fixes(like updating i18n for example)
deployers have to patch it by themselves.
Or in common, new activity versions in sucrose-0.85 release cycle, are
they so 0.85 centric that 0.84(0.82) users cant use these versions.

These versions could be 0.85 centric but we could wrap all sucrose
related differences to toplevel API in separate package
(I use sugar-port for this purpose[1]).
For example on 0.84+ ObjectChooser(from sugar-port) will use
preselected mime type but on 0.82 only fake(errorless) code.
In that case activity authors can follow this API
and write sucrose independent activities.

[1] http://wiki.sugarlabs.org/go/Development_Team/sugar-port

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


Re: [Sugar-devel] Quoting in shell scripts (was: Re: [sugar-devel] Recent fiddlings with Print Support)

2009-05-13 Thread Jonas Smedegaard
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160

On Wed, May 13, 2009 at 04:33:22PM +0530, Vamsi Krishna Davuluri wrote:

#in case its not defined
TMPDIR=/tmp

Above means that you override if it was defined.  Use this instead:

TMPDIR=${TMPDIR:-/tmp}

Or use mktemp which has same fallback (and more!) internally.


# we are creating a dummy folder, which can take different file types using
mkdir, change to =/tmp/cups-odftops

It is common practice to keep lines maximum 72 characters long, to avoid 
them wrapping in e.g. emails.


sandbox=${TMPDIR-/tmp}/cups-odftops.

There is absolutely no improved security in 4x$.  $$ resolves to the 
current process id, which (on most systems?) is not random but 
aequential so relatively easy to guess by evil-doers.   simply means 
use the same process id twice.

My recommendation was to use mktemp with a _skeleton_ value that 
includes , which means add a random number that is 4 characters 
long.


(umask 077  mkdir $sandbox) || exit 1

If a system for some reason fails to set umask, above command silently 
continues!


Kind regards,

  - Jonas

- -- 
* Jonas Smedegaard - idealist og Internet-arkitekt
* Tlf.: +45 40843136  Website: http://dr.jones.dk/

  [x] quote me freely  [ ] ask before reusing  [ ] keep private
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREDAAYFAkoK4SsACgkQn7DbMsAkQLgpAACfSuqCDsFQmFwCPYTjKVSyKRKR
rLUAnA2/5HuoN3VnXc2+3/iaznf8dHgG
=cqf9
-END PGP SIGNATURE-
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


Re: [Sugar-devel] I have booked a space for Sunday May 16th Sugar Labs meeting

2009-05-13 Thread Sean DALY
By the way, hours will be from 10:00 AM to 7:00 PM
Sean


On Tue, May 12, 2009 at 6:53 PM, Sean DALY sdaly...@gmail.com wrote:
 La Ruche
 84 quai de Jemmapes
 75010 Paris
 Tél.:+33 (0)1 48 03 92 00
 http://www.la-ruche.net


 La Ruche (The Beehive) describes itself as a living laboratory.
 It's an alternative space which provides office infrastructure and
 support in a relaxed environment for ethical entrepreneurs (social
 business).

 Their meeting room has a capacity of 30 people and is equipped with
 wifi, videoprojector, and whiteboard. Outside the meeting room is a
 lounge area conducive for informal discussions.

 They are located along the charming Canal Saint Martin
 (http://paris.bypainters.com/10eme/images/canal%20dt%20Martin/peintures/rafflewski%20-Rolf-paris-le-canal-st-martin.jpg)
 a short walk from Place de la République. Film buffs will recognize
 the Hôtel du Nord. Many restaurants and cafés are in the vicinity.

 It's more expensive than I planned because of the Sunday charge, but I
 feel sure we will have a great meeting there!

 Sean

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