Push

3 views
Skip to first unread message

Ian C

unread,
Oct 15, 2015, 8:36:35 AM10/15/15
to CorinthiaTeam
Hi there fellow quiet Corinthians.

I just pushed to the odflenses branch an update to my editor thing to make it more like a document repository.

It stores and can repeatedly edit (in a minor way) documents that are submitted to it.

Oh and it also makes links available to see a JSON view of the concrete and abstract documents.

Hope everyone is well out there.

--
Cheers,

Ian C

Peter Kelly

unread,
Oct 18, 2015, 3:02:59 PM10/18/15
to CorinthiaTeam
Hi Ian (and everyone else)

Apologies for my silence of late. I’ve been swamped with work after being asked to help out with another (commercial) project which has in crunch mode right now, and am likely to be busy with that for some time yet. Hopefully in a while I’ll have time to spend time on Corinthia again.

Now on to your recent commits:

I managed to get npm install to work in experiments/corinthiaNode by modifying the version of “moment” listed in package.json, and marking the www script as executable (both of these changes are now pushed). Then I ran ‘gulp build’ and then bin/www from the experiments/corinthiaNode directory, and got a 404 when trying to access http://localhost:3000. The server output was as follows:

Express server listening on port 3000
GET / 404 362ms - 1.55kb
GET /app/bower_components/bootstrap/dist/css/bootstrap.css 304 4ms
GET /stylesheets/style.css 404 38ms - 1.55kb

After looking at server.js I realised I had to go to /app. That successfully loaded the page.

I was able to upload a .odt document (just a simple one with a heading, paragraph, and unordered list). From the server output I saw it was going through the document structure:

Filename webtest.odt field file1
Field [submit]: value: 'Submit'
File steamed to public/input/webtest.odt
process /Users/peter/corinthia/corinthia-docformats/experiments/corinthiaNode odfFile public/input/webtest.odt
public/app/output/webtest.odt.html exists so deleting
Do the Corinthia public/input/webtest.odt to public/app/output/webtest.odt.html
stdout: ODF element: document-content
ODF element: scripts
ODF element: font-face-decls
ODF element: font-face
… (about a hundred more elements)

at the end of that I got the following:

child process exited with code 0
redirect too public/app/output/webtest.odt.html
fs.js:636
  return binding.rename(pathModule._makeLong(oldPath),
                 ^
Error: ENOENT, no such file or directory 'abstract.json'
    at Error (native)
    at Object.fs.renameSync (fs.js:636:18)
    at ChildProcess.<anonymous> (/Users/peter/corinthia/corinthia-docformats/experiments/corinthiaNode/server.js:251:20)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Socket.<anonymous> (child_process.js:1183:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:485:12)


If I look in public/app/output (where it’s expecting to find abstract.json), the only two files I see are dummy.txt and webtest.odt.html, the latter of which contains:

<!DOCTYPE html><html><head><meta content="8FAF16BB" name="corinthia-document-hash"/></head><body></body></html>

I couldn’t find anywhere in the code where it is writing to abstract.json or concrete.json; only a couple of places in core-mode.html which linked to these.

Any ideas on what’s happening?

--
Dr. Peter M. Kelly
kell...@gmail.com

(fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)

--
You received this message because you are subscribed to the Google Groups "CorinthiaTeam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to corinthiatea...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

Ian C

unread,
Oct 18, 2015, 11:40:09 PM10/18/15
to CorinthiaTeam
Oops, reply did not go to the group. You get two now Peter.

And btw, When viewing the JSON files I use Chrome and the extension https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?utm_source=chrome-app-launcher-info-dialog
There are others around, and I have also added a d3 drop down table view now anyway.

Hi Peter,

don't worry about time on Corinthia, the real (paid) work has to come first. And I am all to aware that sometimes there is little time or enthusiasm left after that.
This has to be for fun, and learning stuff. At least that's my way of looking at it.

Now as for the what is happening with the editor thing... See below for some thoughts

On Mon, Oct 19, 2015 at 3:02 AM, Peter Kelly <kell...@gmail.com> wrote:
Hi Ian (and everyone else)

Apologies for my silence of late. I’ve been swamped with work after being asked to help out with another (commercial) project which has in crunch mode right now, and am likely to be busy with that for some time yet. Hopefully in a while I’ll have time to spend time on Corinthia again.

Now on to your recent commits:

I managed to get npm install to work in experiments/corinthiaNode by modifying the version of “moment” listed in package.json, and marking the www script as executable (both of these changes are now pushed). Then I ran ‘gulp build’ and then bin/www from the experiments/corinthiaNode directory, and got a 404 when trying to access http://localhost:3000. The server output was as follows:

In order run the thing you should just enter "npm start"  instead of the bin/www explicitly.

Sorry, I need to add a message as to what URL to use or change the server.js to redirect from the root.
I just added the moment module....ah I see... a typo... darn it. Apologies again.
 

Express server listening on port 3000
GET / 404 362ms - 1.55kb
GET /app/bower_components/bootstrap/dist/css/bootstrap.css 304 4ms
GET /stylesheets/style.css 404 38ms - 1.55kb

After looking at server.js I realised I had to go to /app. That successfully loaded the page.

I was able to upload a .odt document (just a simple one with a heading, paragraph, and unordered list). From the server output I saw it was going through the document structure:

Filename webtest.odt field file1
Field [submit]: value: 'Submit'
File steamed to public/input/webtest.odt
process /Users/peter/corinthia/corinthia-docformats/experiments/corinthiaNode odfFile public/input/webtest.odt
public/app/output/webtest.odt.html exists so deleting
Do the Corinthia public/input/webtest.odt to public/app/output/webtest.odt.html
stdout: ODF element: document-content
ODF element: scripts
ODF element: font-face-decls
ODF element: font-face
… (about a hundred more elements)

at the end of that I got the following:

child process exited with code 0
Cool that means that dfconvert ran okay.
 
redirect too public/app/output/webtest.odt.html
mmm too many o's... 
fs.js:636
  return binding.rename(pathModule._makeLong(oldPath),
Ah, the abstract.json file is created by my hacked version of dfconvert.
I added some JSON dumping functions into gbg_test.c in the odf/src/text directory.

The functions are called when the ODFConverter runs at the end of a get or put..

The server.js is calling the ../../build/bin/dfconvert so that may need to be rebuilt to generate the abstact.json file?
I should also make the editor beast tolerant of it not being there. They are written for development/debug.
I intended to make them optional somehow.


                 ^
Error: ENOENT, no such file or directory 'abstract.json'
    at Error (native)
    at Object.fs.renameSync (fs.js:636:18)
    at ChildProcess.<anonymous> (/Users/peter/corinthia/corinthia-docformats/experiments/corinthiaNode/server.js:251:20)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Socket.<anonymous> (child_process.js:1183:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:485:12)


If I look in public/app/output (where it’s expecting to find abstract.json), the only two files I see are dummy.txt and webtest.odt.html, the latter of which contains:

<!DOCTYPE html><html><head><meta content="8FAF16BB" name="corinthia-document-hash"/></head><body></body></html>

I couldn’t find anywhere in the code where it is writing to abstract.json or concrete.json; only a couple of places in core-mode.html which linked to these.

Any ideas on what’s happening?

Hopefully remaking dfconvert will do the trick. I will try to push some changes to the server to make it friendlier.

I have also been looking at editor alternatives and found some interesting things. Check out https://www.gitbook.com
They have an open source editor I was trying to look at.

And something like dfconvert would be an interesting addition to that world. I wonder if they would be interested?




--
Cheers,

Ian C



--
Cheers,

Ian C

Ian C

unread,
Oct 18, 2015, 11:58:19 PM10/18/15
to CorinthiaTeam
Pushed a couple of changes that will hopefully make it cleaner and more friendly.
--
Cheers,

Ian C
Reply all
Reply to author
Forward
0 new messages