Showing posts with label research. Show all posts
Showing posts with label research. Show all posts

Tuesday, November 17, 2009

progress: 11/17/09

so a lot's been going on but not a lot's been happening.

to start with; the XML.
from the beginning, i had planned to implement something to generate the XML by very cleverly manipulating strings with bizzare regular expressions. i didn't need it to be perfect or something i could really build on later, i just needed it to work. after the main aspects of goffe made more progress i could incorporate building the XML into java, so just getting reliable XML that would validate against a DTD was all i was concerned with. and i figured doing it through strings would be simple.

the best tool for the job was awk. unfortunately i learned quickly that awk wouldn't separate fields based on whitespace; whenever it found a match, it would collapse all whitespace around it. that collapsed whitespace was the way awk would determine its nesting level, so i was pretty screwed. i fiddled around with it, pretty extensively, such as examining trailing slashes on folders, etc, but no luck.

so i read more on java. well, java sucks for dealing with *NIX conventions, something they are apparently working on for java 7 (i.e. retreiving user, group, permissions, etc). i really don't want to port my code over to java7 any time soon, so now my back burner tool takes on more importance.

enter perl, which while slightly more verbose than awk, could keep the whitespace i needed. after a week of coding, tweaking, and tuning, i got it working through up to 10 levels of nesting, fairly impressive for manipulating 35000 lines of complicated strings, but not good enough. i am considering continuing the endeavor in perl but without using the strings.

then after my presentation i got an unsolicited email from an anonymous code donor, written in python and walking the filesystem directly instead of using strings. first off, whoever sent it to me, thanks. unfortunately, it doesn't work. i dont have time to play with it right now, but it looks like the way it prints its tags prevents it from nesting, period. so there is exactly one file in every folder, which dont actually correspond to real folders. sorry to be the bearer of bad news, but thanks again for the effort.

and last but not least i considered donating to the tree project, and actually sent them an email. well i heard back not long ago, and apparently they still work on it from time to time. i would really like to contribute, as the versitility of tree is pretty remarkable. if i implemented it in tree, it could be very user defineable, i.e. print attributes or elements, trailing slashes for folders, character sets, the list goes on. so, yeah, i'm going to do that. and hopefully it works.

so languages that XML generation will have gone through: sh/awk, perl, java(ish), python, and hopefully it will find its home in C where it rightfully belongs.

in other news, pete has been working on researching the GUI pretty intensely. i will try to get him to come post on here. we are trying to asses how viable it is to use more than one existing GUI to work on the files (one parses and generates JFrame data, one performs operations) versus start almost completely from scratch with a typical browser. hopefully we will make progress on that soon.
-bryan

Wednesday, May 27, 2009

status update from start-5/27/09

as of right now, here is what has happened and is happening with goffe

- doing a lot of reading into taking full advantage of java, mainly the API's and how i'm going to get the main app started up.
- almost finished with a "good enough" bourne shell/awk script for generating XML data.

the script is far from perfect, but it provides a good starting point until i'm ready to integrate the functionality into the more final java app. it does not properly close tags yet, but pseudocode is already in place to make the necessary corrections.
plenty of other reasons why this wouldnt be in any final code. for example, it currently relies on the package "tree" found in the repos to generate data. also there is a terrible hack-job for determining file versus folder, but i won't get into that. look in the code (once it's posted) if you're really interested.

next steps include fixing the
tag issues and trying to poke around with a command line app and DOM or SAX to make sure it's all well-formed.