[Sugar-devel] Fwd: GSOC
Tony Anderson
tony_anderson at usa.net
Wed May 18 03:05:36 EDT 2016
Hi Walter,
Utkarsh is using the datastore class so that is what he is doing already.
Tony
On 05/18/2016 12:06 AM, Walter Bender wrote:
>
> On Tue, May 17, 2016 at 4:44 PM, Ütkarsh Tiwari
> <iamutkarshtiwari at gmail.com <mailto:iamutkarshtiwari at gmail.com>> wrote:
>
> I need to overwrite(delete) the existing object with a new object in
> the Journal.
>
>
> Can you explain your use case a bit more? Why is it not adequate to
> just modify the existing object? What is achieved by replacing it?
>
>
> Thanks,
> Utkarsh Tiwari
>
> On 5/18/16, Sam Parkinson <sam.parkinson3 at gmail.com
> <mailto:sam.parkinson3 at gmail.com>> wrote:
> > If you make an activity, all of the journal interaction is
> handled by
> > the Journal. Maybe that would help you in this instance?
> >
> > On Wed, May 18, 2016 at 5:02 AM, Ütkarsh Tiwari
> > <iamutkarshtiwari at gmail.com <mailto:iamutkarshtiwari at gmail.com>>
> wrote:
> >> Hi,
> >> How can we overwrite(contents) a specific object in Journal?
> >>
> >> Thanks,
> >> Utkarsh
> >>
> >> On 5/18/16, Ütkarsh Tiwari <iamutkarshtiwari at gmail.com
> <mailto:iamutkarshtiwari at gmail.com>> wrote:
> >>> Hi Tony,
> >>> In case if the user chooses to overwrite the
> >>> contents(code) of the existing project(already saved in Journal),
> >>> would you like to overwrite that Journal object or create a new
> >>> object(overwritten- this might create duplicate names)?
> >>>
> >>> Thanks,
> >>> Utkarsh Tiwari
> >>>
> >>> On 5/17/16, Walter Bender <walter.bender at gmail.com
> <mailto:walter.bender at gmail.com>> wrote:
> >>>> I believe it defaults to ~/Documents (outside of sugar-build).
> >>>>
> >>>> -walter
> >>>>
> >>>> On Tue, May 17, 2016 at 10:48 AM, Ütkarsh Tiwari
> >>>> <iamutkarshtiwari at gmail.com <mailto:iamutkarshtiwari at gmail.com>
> >>>>> wrote:
> >>>>
> >>>>> Hi,
> >>>>> What is the location of the 'Journal/Documents' folder
> inside
> >>>>> sugar-build?
> >>>>>
> >>>>> Thanks,
> >>>>> Utkarsh Tiwari
> >>>>>
> >>>>> On 5/15/16, Tony Anderson <tony_anderson at usa.net
> <mailto:tony_anderson at usa.net>> wrote:
> >>>>> > Hi, Utkarsh
> >>>>> >
> >>>>> > I gave this version a trial. I think the integration is
> >>>>> complete. The
> >>>>> > next problems are left over from Richa Sehgal's work from
> last
> >>>>> year.
> >>>>> >
> >>>>> > I wasn't able to look at the feature page - I think Bernie
> >>>>> Innocenti
> >>>>> > is
> >>>>> > working on the server and it is down for a while.
> >>>>> >
> >>>>> > What we are trying to do goes beyond the jsfiddle on the
> >>>>> internet. It
> >>>>> > provides a way to enter html or css or javascript and
> test the
> >>>>> outcome
> >>>>> > when the
> >>>>> > code is processed by the browser. What I would like is
> that the
> >>>>> user
> >>>>> > can
> >>>>> > create an html file using an editor and then show that
> file on
> >>>>> with
> >>>>> > the
> >>>>> > fiddler.
> >>>>> >
> >>>>> > So, if I open the fiddler and enter <h1>Hello World</h1>
> , then
> >>>>> 'run'
> >>>>> > will display that in the right side panel. (And that works).
> >>>>> Now I
> >>>>> > save
> >>>>> > the file giving it a
> >>>>> > project name. e.g. helloworld. This is saved in the Journal.
> >>>>> When you
> >>>>> > look at the Journal, there are two entries. One shows the
> >>>>> Browse icon
> >>>>> > and the other a text page icon. This is normal - one
> represents
> >>>>> the
> >>>>> > journal object for the browse activity and the other
> object has
> >>>>> the
> >>>>> > saved html: helloworld.html.
> >>>>> >
> >>>>> > You can copy the helloworld.html file to the Documents folder
> >>>>> (hover
> >>>>> > over the text icon and select copy to Documents). Using
> >>>>> Terminal, you
> >>>>> > will see the file in the Documents folder is named
> >>>>> > helloworld.html.zip.
> >>>>> > This is correct (it should be a zip file) but the name
> should be
> >>>>> > helloworld.zip. In the Terminal you will see the expanded
> file
> >>>>> is
> >>>>> > helloworld.html.
> >>>>> >
> >>>>> > There are two problems:
> >>>>> >
> >>>>> > 1. When the file is zipped, it should be in a 'project'
> >>>>> directory
> >>>>> > with the name of the project. So helloworld/helloworld.html.
> >>>>> When
> >>>>> > unzipped, there should be a helloworld directory in Documents
> >>>>> and in
> >>>>> > it
> >>>>> > should be the helloworld.html file.
> >>>>> > 2. The html file needs a <title>helloworld</title>.
> Browse
> >>>>> > apparently uses the whole file as the title when one is not
> >>>>> given.
> >>>>> > Note:
> >>>>> > the title appears as the name of the tab.
> >>>>> >
> >>>>> > Having saved helloworld with project name helloworld, I was
> >>>>> able to
> >>>>> > open
> >>>>> > it (but only when fiddler is enabled - which is probably
> ok). It
> >>>>> > displayed correctly. However, if I show source I get the
> source
> >>>>> html
> >>>>> > for
> >>>>> > Richa Sehgal's fiddler page not the source of the
> >>>>> helloworld.html.
> >>>>> >
> >>>>> > Using Terminal, I did a less on the text of
> helloworld.html. It
> >>>>> is one
> >>>>> > line (normal for html which doesn't recognize newlines).
> There
> >>>>> is a
> >>>>> > package called BeautifulSoup which is included in the Sugar
> >>>>> image (it
> >>>>> > is
> >>>>> > outdated - should be bs4 but no problem). Anyway, you can
> find
> >>>>> the
> >>>>> > BeautifulSoup documentation on line. What you can do is
> use the
> >>>>> > prettyprint feature to save the html file so that it is more
> >>>>> useful
> >>>>> > for
> >>>>> > editiing.
> >>>>> >
> >>>>> > Note: the reason for the zip file is that an html file can
> >>>>> refer to an
> >>>>> > img (<img src='some.png'>Some</img>). This is a relative
> url and
> >>>>> > refers
> >>>>> > to a file in the same directory as the html file. By zipping
> >>>>> the html
> >>>>> > and media files together, it will work correctly when
> uploaded
> >>>>> to the
> >>>>> > school server, for example. This also supports having a main
> >>>>> page with
> >>>>> > links to other html files in the same directory (<a
> >>>>> > href='page1.html'>Page 1</a>).
> >>>>> >
> >>>>> > This is great progress and now we have the opportunity to
> make
> >>>>> sure
> >>>>> > that
> >>>>> > the feature works in various use cases.
> >>>>> >
> >>>>> > Tony
> >>>>> >
> >>>>> > On 05/14/2016 10:08 PM, Ütkarsh Tiwari wrote:
> >>>>> >> Hi,
> >>>>> >> I have fixed the .xo file. Now on clicking the
> 'Run' will
> >>>>> open a
> >>>>> >> new tab with blank fiddle screen and will insert the
> user code
> >>>>> inside
> >>>>> >> the blank skeleton in index.html. I have attached the
> new .xo
> >>>>> below.
> >>>>> >>
> >>>>> >> Note- "web-console.html" file contains the html code of the
> >>>>> >> JS-fiddler
> >>>>> >> designed by Ms. Richa Sehgal. We need not touch it. User
> code
> >>>>> is
> >>>>> >> saved
> >>>>> >> in the index.html file.
> >>>>> >>
> >>>>> >> I have also created a feature page -
> >>>>> >> https://wiki.sugarlabs.org/go/0.110/Feature_List/JS_Fiddler
> >>>>> >>
> >>>>> >> Thanks,
> >>>>> >> Utkarsh Tiwari
> >>>>> >
> >>>>> >
> >>>>> _______________________________________________
> >>>>> Sugar-devel mailing list
> >>>>> Sugar-devel at lists.sugarlabs.org
> <mailto:Sugar-devel at 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 at lists.sugarlabs.org
> <mailto:Sugar-devel at lists.sugarlabs.org>
> >> http://lists.sugarlabs.org/listinfo/sugar-devel
> >
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> <mailto:Sugar-devel at lists.sugarlabs.org>
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
>
>
> --
> Walter Bender
> Sugar Labs
> http://www.sugarlabs.org
>
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20160518/0a0e3bba/attachment-0001.html>
More information about the Sugar-devel
mailing list