Activity co-op: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
No edit summary
 
(16 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{stub}}
{{draft}}
Developers -- When you use an activity and there's something you don't like... what do you do?
Developers -- When you use an activity and there's something you don't like... what do you do?
# Ignore it
# Ignore it
# Tell the activity's dev about it
# Tell the activity's dev about it
# File a proper bug report for it
# File a proper bug report for it
# Fix it locally
# '''Fix it locally'''
# Make a patch for it
# '''Make a patch for it'''
# git push
# '''git push'''


The activity co-op is for developers who, when they find something they don't like about their own system, want to immediately fix and upstream their changes.
The activity co-op is for developers who, when they find something they don't like about their own system, want to immediately fix and upstream their changes. This will require a '''simplification''' and '''standardization''' of diff/'''patch generation''' and '''delivery'''.


The current incarnation of this idea is "Brian's Script", which is a structured list of some activity repositories on dev.laptop.org, and a script for making symlinks so the '''git repositories''' show up as usable activities in sugar. The advantage of this is that you can easily update to the '''newest available version''' of an activity ([[Joyride]] style) with a simple git pull in the directory, while allowing you to launch the activities from Sugar as usual.
= Step 1 - installing activities =
vi siminput
# i (insert mode)
# paste:
<pre>
# FORMAT:
# 1. git clone command
# 2. activity/../ directory
# 3. activity/activity.info name = ______


Brian's script assumes a clean install with no activities. It also assumes you have nothing important on the laptop. '''Brian's script is incredibly dangerous'''. But you're the adventurous type... right? Don't live in fear! '''Embrace the failings''' of bleeding edge activity development!
git clone git://dev.laptop.org/projects/terminal-activity
terminal-activity
git clone git://dev.laptop.org/activities/x2o
x2o
git clone git://dev.laptop.org/users/dsd/tamtam
tamtam
git clone git://dev.laptop.org/activities/xomail
xomail
git clone git://dev.laptop.org/activities/model
model
git clone git://dev.laptop.org/activities/physics
physics
git clone git://dev.laptop.org/journal-activity
journal-activity
git clone git://dev.laptop.org/activities/develop
develop/develop-activity
#git clone git://dev.laptop.org/projects/etoys
#? no idea.
git clone git://dev.laptop.org/projects/connect-activity
connect-activity
git clone git://dev.laptop.org/projects/read-activity
read-activity
#git clone git://dev.laptop.org/projects/listen-spell
#?
git clone git://dev.laptop.org/users/dsd/record
record
git clone git://dev.laptop.org/users/cscott/firefox-activity
firefox-activity
git clone git://dev.laptop.org/mamamedia/story-builder
story-builder
git clone git://dev.laptop.org/web-activity
web-activity
git clone git://dev.laptop.org/chat-activity
chat-activity
git clone git://dev.laptop.org/projects/calculate
calculate
git clone git://dev.laptop.org/projects/pippy-activity
pippy-activity
git clone git://dev.laptop.org/projects/write
write
</pre>


It also assumes the activities in the repository are using relative file locations for stuff in their own/other activities and absolute file locations for things outside of their activity (not other activities).


= Brian's Script: STEPS FOR SUCCESS: 1 =
sh briansscript.sh
ctrl + alt + neighborhood view

su olpc
= New script =
sudo yum install git
<pre>
#!/usr/local/bin/python
import os

siminput = open("siminput")
infoline = siminput.readlines()
i = 0
git = []
activity = []
for record in infoline:
if not i % 2 and not record.startswith("#"):
git.append(record.strip("\n")) # git command
if i % 2 and not record.startswith("#"):
activity.append(record.strip("\n")) # activity folder path
i += 1
print activity

for g in git:
os.system(g)

for v in activity:
print v
activityinfo = open(v + "/activity/activity.info")
infoline = activityinfo.readlines()
for line in infoline:
if line.startswith("name"):
print line[7:].strip("\n") + "test"
os.system("ln -s ../" + v + " Activities/" + line[7:].strip("\n") + ".activity")
</pre>

= STEPS FOR SUCCESS: 1 =
1.
cd ~
cd ~
wget http://dev.laptop.org/~bjordan/briansscript/gitlist
vi gitlist
wget http://dev.laptop.org/~bjordan/briansscript/briansscript.py

Press i to begin input mode... input:

<pre>
git clone git://dev.laptop.org/projects/terminal-activity
terminal-activity
git clone git://dev.laptop.org/activities/x2o
x2o
#git clone git://dev.laptop.org/users/dsd/tamtam
#tamtam
git clone git://dev.laptop.org/activities/xomail
xomail
git clone git://dev.laptop.org/activities/model
model/activity
git clone git://dev.laptop.org/activities/physics
physics
git clone git://dev.laptop.org/journal-activity
journal-activity
git clone git://dev.laptop.org/activities/develop
develop/develop-activity
#git clone git://dev.laptop.org/projects/etoys
#? no idea.
git clone git://dev.laptop.org/projects/connect-activity
connect-activity
git clone git://dev.laptop.org/projects/read-activity
read-activity
#git clone git://dev.laptop.org/projects/listen-spell
#?
git clone git://dev.laptop.org/users/dsd/record
record
git clone git://dev.laptop.org/users/cscott/firefox-activity
firefox-activity
git clone git://dev.laptop.org/mamamedia/story-builder
story-builder
git clone git://dev.laptop.org/web-activity
web-activity
git clone git://dev.laptop.org/chat-activity
chat-activity
git clone git://dev.laptop.org/projects/calculate
calculate
git clone git://dev.laptop.org/projects/pippy-activity
pippy-activity
git clone git://dev.laptop.org/projects/write
write
</pre>

Press esc to exit input mode. Press "gg" to see top of file. Confirm there is no leading newline, as this would destroy all.

Type :wq to write and quit.


= STEPS FOR SUCESS: 2 =
= Brian's Script: STEPS FOR SUCCESS: 2 =
So simple, there is no step number two.
vi briansscript.py


= Brian's Script: STEPS FOR SUCCESS: 3 =
again, insert into this file:
mkdir Activities
<pre>
#!/usr/local/bin/python
import os


Cross your fingers. This will take but two minutes.
siminput = open("gitlist")
infoline = siminput.readlines()
i = 0
git = []
activity = []
for record in infoline:
if not i % 2 and not record.startswith("#"):
git.append(record.strip("\n")) # git command
if i % 2 and not record.startswith("#"):
activity.append(record.strip("\n")) # activity folder path
i += 1
print activity


python briansscript.py
for g in git:
os.system(g)


Keep your fingers crossed. Yell at Brian. Fix it.
for v in activity:
print v
activityinfo = open(v + "/activity/activity.info")
infoline = activityinfo.readlines()
for line in infoline:
if line.startswith("name"):
print line[7:].strip("\n") + "test"
os.system("ln -s ../" + v + " Activities/" + line[7:].strip("\n") + ".activity")
</pre>

Latest revision as of 07:30, 24 July 2008

This article is a stub. You can help the OLPC project by expanding it.


Pencil.png NOTE: The contents of this page are not set in stone, and are subject to change!

This page is a draft in active flux ...
Please leave suggestions on the talk page.

Pencil.png

Developers -- When you use an activity and there's something you don't like... what do you do?

  1. Ignore it
  2. Tell the activity's dev about it
  3. File a proper bug report for it
  4. Fix it locally
  5. Make a patch for it
  6. git push

The activity co-op is for developers who, when they find something they don't like about their own system, want to immediately fix and upstream their changes. This will require a simplification and standardization of diff/patch generation and delivery.

The current incarnation of this idea is "Brian's Script", which is a structured list of some activity repositories on dev.laptop.org, and a script for making symlinks so the git repositories show up as usable activities in sugar. The advantage of this is that you can easily update to the newest available version of an activity (Joyride style) with a simple git pull in the directory, while allowing you to launch the activities from Sugar as usual.

Brian's script assumes a clean install with no activities. It also assumes you have nothing important on the laptop. Brian's script is incredibly dangerous. But you're the adventurous type... right? Don't live in fear! Embrace the failings of bleeding edge activity development!

It also assumes the activities in the repository are using relative file locations for stuff in their own/other activities and absolute file locations for things outside of their activity (not other activities).

Brian's Script: STEPS FOR SUCCESS: 1

ctrl + alt + neighborhood view
su olpc
sudo yum install git
cd ~
wget http://dev.laptop.org/~bjordan/briansscript/gitlist
wget http://dev.laptop.org/~bjordan/briansscript/briansscript.py

Brian's Script: STEPS FOR SUCCESS: 2

So simple, there is no step number two.

Brian's Script: STEPS FOR SUCCESS: 3

mkdir Activities

Cross your fingers. This will take but two minutes.

python briansscript.py

Keep your fingers crossed. Yell at Brian. Fix it.