<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Jatin,<br>
<br>
The activities directory has a numbered directory for each
activity such as 4024. This scheme was apparently based on
Mozilla's design for the add-on feature to Firefox. The number
associated with a specific activity is arbitrary - probably based
on when the activity was added to ASLO. It has nothing to do with
version number. James Cameron went to point releases (there is
nothing in the software to prevent that - the number is a string).
He says it was because he didn't know how to update ASLO at the
time. He is becoming an administrator at ASLO so that should solve
his problem. <br>
<br>
Tony<br>
<br>
<br>
On 05/25/2017 06:42 PM, Jatin Dhankhar wrote:<br>
</div>
<blockquote
cite="mid:CAD+LdAHyaUzQo9n5cjMO9BTx4mKFrgJxL0wgAWbj9vRQB2goxw@mail.gmail.com"
type="cite">
<div dir="ltr">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span
style="font-size:12.8px">One of my attractions to Sugar was
the refreshing decision to start activity versions with 1
and increment by 1 for each next version. Note that the file
name of the bundle is browse-200.xo but the bundle is stored
in activities/4024/.</span></blockquote>
<div>Then why is it stored in 4024 directory ? Does it mean it
was 2.0 of the browser activity. Found some activities here <a
moz-do-not-send="true"
href="http://activities.sugarlabs.org/activities/4024/"><a class="moz-txt-link-freetext" href="http://activities.sugarlabs.org/activities/4024/">http://activities.sugarlabs.org/activities/4024/</a></a>
that use following naming scheme as well <a
moz-do-not-send="true"
href="http://activities.sugarlabs.org/activities/4024/browse-149.1.xo"><a class="moz-txt-link-freetext" href="http://activities.sugarlabs.org/activities/4024/browse-149.1.xo">http://activities.sugarlabs.org/activities/4024/browse-149.1.xo</a></a>. </div>
<div><br>
</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span
style="font-size:12.8px">Sam is comfortable with Flask. I
have not used Flask and am more comfortable with Django. You
need to decide which you plan to use for the project. No
matter your choice, neither Sam's code nor mine is going to
meet the needs. You'll make best progress by using the code
as clues on functions that are needed and how they could be
implemented.</span></blockquote>
<div>I think Flask would be easy to pick up. </div>
<div><br>
</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span
style="font-size:12.8px">I should have given you more help
with the static setup - it is one of Django's more
irritating tasks. For historical reasons, my file system is
structured </span><br style="font-size:12.8px">
<br style="font-size:12.8px">
<span style="font-size:12.8px">/library/schoolsite/static
containing directories: admin css icons image js </span><br
style="font-size:12.8px">
<span style="font-size:12.8px">Django then supports a
simplified reference: img src='/static/icons/{{ json.icon
}}'></img></span><br style="font-size:12.8px">
<br style="font-size:12.8px">
<span style="font-size:12.8px">where /static refers to
/library/schoolsite/static. Schoolsite is the Django
project, static/ is defined in the settings:</span><br
style="font-size:12.8px">
<br style="font-size:12.8px">
<span style="font-size:12.8px">STATIC_URL = '/static/'</span><br
style="font-size:12.8px">
<span style="font-size:12.8px">STATICFILES_DIR = (</span><br
style="font-size:12.8px">
<span style="font-size:12.8px">
'/library/schoolsite/static/',</span><br
style="font-size:12.8px">
<span style="font-size:12.8px">)</span><br
style="font-size:12.8px">
<br style="font-size:12.8px">
<span style="font-size:12.8px">If you get that right, the
images should appear in your display. As I said, you can
diagnose problems by (in Firefox - right click on the
missing image and look at view image info.) In your version:
/static/ can be any name you want to give to your static
files (js, css, images and so on). Static works. The path
then points to the root. So paths are 'absolute' but start
with the static_url and not the file system root.</span></blockquote>
<div><br>
</div>
<div>Thanks will try that as well.</div>
<div><br>
</div>
<div> </div>
<div><br>
</div>
<div> </div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, May 25, 2017 at 3:15 PM, Tony
Anderson <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:tony@olenepal.org" target="_blank">tony@olenepal.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div class="m_-8691543904081375930moz-cite-prefix">Hi, <br>
<br>
I think the stored bundle should always be
browse-200.xo. The latest is determined by the highest
version number among those in the addon directory. This
way no administrative step is needed when a new version
is released - it just needs to be put in the directory.
So the structure would be: <br>
<br>
<a moz-do-not-send="true"
href="http://download.sugarlabs.org/4024/browse-200.xo"
target="_blank">download.sugarlabs.org/4024/<wbr>browse-200.xo</a>.
Programmers seem to be culturally impelled to use a
version number to convey all kinds of information. My
favorite is Sugar which went from 0.98 to 0.100. THe
only case I know of where 0.96 < 0.100. One of my
attractions to Sugar was the refreshing decision to
start activity versions with 1 and increment by 1 for
each next version. Note that the file name of the bundle
is browse-200.xo but the bundle is stored in
activities/4024/.<br>
<br>
Sam is comfortable with Flask. I have not used Flask and
am more comfortable with Django. You need to decide
which you plan to use for the project. No matter your
choice, neither Sam's code nor mine is going to meet the
needs. You'll make best progress by using the code as
clues on functions that are needed and how they could be
implemented.<br>
<br>
I should have given you more help with the static setup
- it is one of Django's more irritating tasks. For
historical reasons, my file system is structured <br>
<br>
/library/schoolsite/static containing directories: admin
css icons image js <br>
Django then supports a simplified reference: img
src='/static/icons/{{ json.icon }}'></img><br>
<br>
where /static refers to /library/schoolsite/static.
Schoolsite is the Django project, static/ is defined in
the settings:<br>
<br>
STATIC_URL = '/static/'<br>
STATICFILES_DIR = (<br>
'/library/schoolsite/static/',<br>
)<br>
<br>
If you get that right, the images should appear in your
display. As I said, you can diagnose problems by (in
Firefox - right click on the missing image and look at
view image info.) In your version: /static/ can be any
name you want to give to your static files (js, css,
images and so on). Static works. The path then points to
the root. So paths are 'absolute' but start with the
static_url and not the file system root. <br>
<span class="HOEnZb"><font color="#888888"> <br>
Tony</font></span>
<div>
<div class="h5"><br>
<br>
On 05/25/2017 05:15 PM, Jatin Dhankhar wrote:<br>
</div>
</div>
</div>
<div>
<div class="h5">
<blockquote type="cite">
<div dir="ltr">
<blockquote class="gmail_quote" style="margin:0px
0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"><span
style="font-size:12.8px">Attached is a python
script which separates the jsons within
update.json to separate jsons, one per line.
The line is still long but it is easier to see
what is going on. I just did ctrl+a on the
text at the url and copied to a file
updatejson. The output is a file jsons. The
script assumes the source file is in the same
directory and writes json to the same
directory.</span></blockquote>
<div>Thanks, I tried it and it works, </div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px
0px 0px 0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex"><span
style="font-size:12.8px">ASLO is based
(loosely) on the Firefox addons so the
activities are identified by the addon number.
ASLOv3 can use the activity name (name line
in </span><a moz-do-not-send="true"
href="http://activity.info/" rel="noreferrer"
style="font-size:12.8px" target="_blank">activity.info</a><span
style="font-size:12.8px">) and have a standard
prefix for the activity download url (</span><a
moz-do-not-send="true"
href="http://download.sugarlabs.org/activities/"
rel="noreferrer" style="font-size:12.8px"
target="_blank">download.sugarlabs.org/activi<wbr>ties/</a><span
style="font-size:12.8px">. The trick will be
to find the most recent version since multiple
versions are stored in the addon directory.
While it is easy to get a python list of the
bundles from addons, a sort will not work with
non-integer version numbers. </span><span
style="font-size:12.8px">For example,
browse-157.3.xo sorts before browse-157. There
will be a need for a 'lint'-like script to
verify that new bundles are setup correctly.
If we stick to integer version numbers,
downloading the last activity bundle in the
list should work.</span></blockquote>
<div>Sticking to integer version number is the
easiest way to handle this. So that we have
following structure <a moz-do-not-send="true"
href="http://aslo.sugarlabs.org/activities/browse/157"
target="_blank">aslo.sugarlabs.org/activities/<wbr>browse/157</a>
or <a moz-do-not-send="true"
href="http://aslo.sugarlabs.org/activities/browse/157"
target="_blank">aslo.sugarlabs.org/<wbr>activities/browse/latest/</a> <wbr>which
will always point to latest. If we decide to use
a standard way for float version numbers then
something like this can be done (as long as all
stick to same version format) <a
moz-do-not-send="true"
href="http://aslo.sugarlabs.org/activities/browse/157"
target="_blank">aslo.sugarlabs.org/<wbr>activities/browse/157/3.0</a>/ </div>
<div><br>
</div>
<div>My main question is, should I continue with
developing new Aslo or improve/fork Sam's
version of aslo ?</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Jatin Dhankhar</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, May 25, 2017 at
10:06 AM, Tony Anderson <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:tony@olenepal.org"
target="_blank"><a class="moz-txt-link-abbreviated" href="mailto:tony@olenepal.org">tony@olenepal.org</a></a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">Hi,<br>
<br>
I have had some apparent malware problems with
the email. Had to hard reboot twice.<br>
<br>
Attached is a python script which separates
the jsons within update.json to separate
jsons, one per line. The line is still long
but it is easier to see what is going on. I
just did ctrl+a on the text at the url and
copied to a file updatejson. The output is a
file jsons. The script assumes the source file
is in the same directory and writes json to
the same directory.<br>
<br>
jsons shows 49 activities.<br>
<br>
This is the last one:<br>
<br>
{"xo_url": "<a moz-do-not-send="true"
href="http://download.sugarlabs.org/activities2/in.seeta.Deducto_v9.xo"
rel="noreferrer" target="_blank">http://download.sugarlabs.org<wbr>/activities2/in.seeta.Deducto_<wbr>v9.xo</a>",
"xo_size": 245277, "version": 9,
"minSugarVersion": "0.86"}<br>
<br>
So each one has a url, size, version, and
minimum version (oldest version on which the
activity works).<br>
<br>
Sam Parkinson created a separate directory for
his bundles (activities2). His bundle names
are quite different from standard practice.<br>
'in.seeta.Deducto is the bundle_id whereas we
use the activity name. The size is the bundle
size not the installed size. The
minSugarVersion is presumably the earliest
version of Sugar on which the activity works
(and that it works on all subsequent
versions). I have no idea how this can be
tested.<span
class="m_-8691543904081375930HOEnZb"><font
color="#888888"><br>
<br>
Tony<br>
<br>
<br>
<br>
<br>
<br>
</font></span></blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</body>
</html>