Time to work on our "book"

Area for developing group projects, such as workshop equipment
User avatar
rigger
Posts: 62
Joined: Thu Jan 20, 2011 6:14 pm
Location: Minnetonka, MN

Time to work on our "book"

Postby rigger » Fri Sep 02, 2011 6:57 pm

Chris nailed it in terms of scope. Bryan is kicking booty on the software dept. My brain is completely focused on the training class I'm attending in NYC next week

So…

The group is welcome to meet next week, but I'll be absent. I'd definitely like to meet the following Wednesday to review the progress AND start to attack the "survey questions".




---
I am here: http://maps.google.com/maps?ll=44.941405,-93.502288
Work. Wander. Rest when I can.

User avatar
Orkraider
Posts: 657
Joined: Fri Mar 19, 2010 11:14 am
Location: downtown Saint Paul

Re: Time to work on our "book"

Postby Orkraider » Fri Sep 02, 2011 7:58 pm

Ok, folks, I have to say, everything is looking awesome.

I am very impressed with all the hard work y'all are doing, and this is a project that's really going to 'happen'.

I am so stoked.

I'm going to spend some time collecting pics and making text for my project page on bows, I want to have that together before I crash tonight.

Do we have a repository of some sort for folks like me who want to drag pics and text files into a folder something like book_files->rileyh->bows ?

Thanks again, and I will be following this with much enthusiasm.

Riley
Riley Harrison
facebook.com/rileyharrison

User avatar
Odegard
Posts: 120
Joined: Thu May 12, 2011 3:46 pm
Location: South Minneapolis
Contact:

Re: Time to work on our "book"

Postby Odegard » Sat Sep 03, 2011 7:22 pm

I spent a little more time today updating the Portfolio Project Wiki Page. I added a preliminary list of the questions and data categories that can or will be included on each templated portfolio page. I would be eager to get feedback on that, and to have others edit the page or otherwise contribute to how the questionnaire can be improved and clarified.
Christopher Odegard

User avatar
wammie
Site Admin
Posts: 1444
Joined: Sat Mar 14, 2009 4:14 pm
Location: Minneapolis, Minnesota
Contact:

Re: Time to work on our "book"

Postby wammie » Mon Sep 05, 2011 9:20 am

Can we get something done for Kings Fair on Sept. 17? I can give a shot at doing a sample page, say, for Bessie the Sea Cow which was built by Jude. I can get most of the information and I'm sure Jude would be happy to have me help with it.

[EDIT: I talked with Jude today and he's fine with me doing a page for Bessie.]

User avatar
paulsobczak
Site Admin
Posts: 861
Joined: Sun Jan 11, 2009 6:35 pm
Contact:

Re: Time to work on our "book"

Postby paulsobczak » Mon Sep 05, 2011 10:03 am

I have two or three projects that I think would qualify
Vidisynth
Tzedakah Box II
Roundabout Dogs
If you guys want to use them let me know. I can put together some more documentation if wanted too.

User avatar
rigger
Posts: 62
Joined: Thu Jan 20, 2011 6:14 pm
Location: Minnetonka, MN

Time to work on our "book"

Postby rigger » Mon Sep 05, 2011 10:48 am

We definitely want to use them--we're hoping all projects will be documented.

More details as to "how to submit" will be forthcoming. Meanwhile (everyone) collect your thoughts and gather your images!
Work. Wander. Rest when I can.

User avatar
Orkraider
Posts: 657
Joined: Fri Mar 19, 2010 11:14 am
Location: downtown Saint Paul

Re: Time to work on our "book"

Postby Orkraider » Mon Sep 05, 2011 2:02 pm

I have collected my content for my page on bows, and dumped it in a pile at the bottom of my site:

Riley Bows

The text is in a textarea so that it can easily be copypasta-d, and the pics are full size not scaled for viewing online.

I'm planning on heading in to the space in a bit, anyone else going to be around to keep me company?


Riley
Riley Harrison
facebook.com/rileyharrison

User avatar
rigger
Posts: 62
Joined: Thu Jan 20, 2011 6:14 pm
Location: Minnetonka, MN

Time to work on our "book"

Postby rigger » Mon Sep 12, 2011 10:46 am

Just reviewed the wiki entry and, par for the course, Chris is dead-on with his template. The one area that I see for major improvement is to provide a series of (optional?) interview questions to help people develop their project descriptions.

I plan on meeting this Wednesday so we can come up to speed (and push on!). If asked we're "on target and on schedule".


---
I am here: http://maps.google.com/maps?ll=44.969541,-93.508405
Work. Wander. Rest when I can.

User avatar
Orkraider
Posts: 657
Joined: Fri Mar 19, 2010 11:14 am
Location: downtown Saint Paul

Re: Time to work on our "book"

Postby Orkraider » Mon Sep 12, 2011 5:59 pm

do we have any other book fodder compiled yet?

Is there a way for me to stick my content in a template?

Is anyone else interested in doing it for me so I can just sit back and say "ooh purty" like the lazy boy I am?

As I said, my first batch is at the bottom of rileybows.com

Looking forward to Wednesday.

Riley
Riley Harrison
facebook.com/rileyharrison

User avatar
smittex
Posts: 189
Joined: Sat Apr 23, 2011 11:07 am

Re: Time to work on our "book"

Postby smittex » Fri Sep 16, 2011 8:37 pm

Just wanted to give y'all an update on the automation of the project book. As stated in the portfolio talk wiki page (http://www.tcmaker.org/wiki/doku.php?id=talk:tcmaker:portfolio), I switched to using the Cairo vector image library to help with rendering an SVG file for the template. Because that library is POORLY documented and doesn't necessarily decrease the learning curve, the time-to-market, or lend any useful functions, I'm mostly using just the XML markup to create the final document.

The things that are finished:
  • Simple web form capturing a users data
  • Placing that data in the right spots in the SVG document
  • Displaying the SVG document to the user after submitting the form

This is where I've hit a snag. SVG nor any of the graphics libraries I've researched will automatically wrap text. There's a few of ways around this limitation: embedding HTML into the SVG, using a markup library called Pango, using an embedded JavaScript (ECMAScript, to be precise) in the SVG, or write a program to do it. I've gone with the latter option because it is the only option that is compatible with all SVG renderers (i.e. browsers, editors, etc.) Anyway, here's the parsing functionality so far:

Code: Select all

<?php
$font = './Verdana.ttf';
$font_size = 12;

$max_main_width = 423;  // Max rendered length, in pixels, per line

$materials = $_GET['materials'];
//$maker_name = $_POST['maker_name'];
//$project_name = $_POST['project_name'];
//$completion = $_POST['completion'];
//$process = $_POST['process'];

$materials_words = explode(" ", $materials);  // Split input into array or words
$rev_words = array_reverse($materials_words);  // Reverse the array of words to use as a stack

// Not used yet
//$canvas = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, 50, 50);
//$brush = cairo_create($canvas);
//$extents = cairo_font_extents($brush);

// Determine width & height of rendered variable
$bbox = imagettfbbox($font_size, 0, $font, $materials);
$width = $bbox[2] - $bbox[0];
$height = $bbox[1] - $bbox[5];

// Some stats
$length = strlen($materials);
$ppc = $width/$length;
$num_chars = $max_main_width/$ppc;
$num_lines = ceil($length*$ppc/$max_main_width);
$num_words = count($materials_words);

echo 'materials: ' .$materials .'<br/>';
echo 'strlen: ' .$length .'<br/>';
echo 'width: ' .$width .'<br/>';
echo 'pixels/char: ' .$ppc .'<br/>';
echo 'chars/line: ' .$num_chars .'<br/>';
echo 'lines: ' .$num_lines .'<br/>';
echo 'words: ' .$num_words .'<br/>';


$lines[] = '';  // To hold correct-length lines
$line = 0;

do
{
  $word = array_pop($rev_words);

   echo 'word: ' .$word .'<br/>';
   echo 'line: ' .$line .'<br/><br/>';

  array_push($lines[$line], $word);  // ##### GETTING ERROR HERE

   echo 'len: ' .getLength($lines[$line]) .'<br/>';

  if (getLength(implode(' ', $lines[$line])) > $max_main_width)  // Get rendered length of line
  {
    array_pop($lines[$line]);
    array_push($rev_words, $word);
    $line += 1;
  }
} while (count($rev_words) > 0);

echo 'resultant lines: ' .count($lines) .'<br/>';

for ($i = 0; $i < count($lines); $i++)
{
  echo 'line ' .$i .': ' .$lines[$i] .'<br/>';
}

function getLength(string $candidate){
  $bbox = imagettfbbox($font_size, 0, $font, $candidate);
  return ($bbox[2] - $bbox[0]);
}

// filetype: SVG
//header('Content-type: image/svg+xml');
//echo '<?xml version="1.0" encoding="UTF-8" standalone="no"';
?>


Here is the querystring that passes the arguments:

Code: Select all

http://192.168.122.140/test/sample.php?materials=woods:%20cherry,%20cherry%20burl,%20walnut,%20spanish%20cedar,%20and%20wenge;%20off-the-rack%20and%20custom%20brass%20hardware;%20french-fit%20foam%20lined%20with%20synthetic%20black%20velvet


And this is what it looks like so far:

Code: Select all

materials: woods: cherry, cherry burl, walnut, spanish cedar, and wenge; off-the-rack and custom brass hardware; french-fit foam lined with synthetic black velvet
strlen: 151
width: 1242
pixels/char: 8.2251655629139
chars/line: 51.427536231884
lines: 3
words: 21
word: woods:
line: 0


I'm getting an error whilst pushing words onto the stack. Go ahead and play with it if you want. I'm not stuck; I'm just taking a break.

To Do:
  • Image upload (easy)
  • Transforming the images (somewhat easy)
  • Creating more templates (somewhat medium)
  • Polishing it all up (medium)
  • Not lose focus (somewhat medium)

By the way, I plan on releasing this project's code to the open-source community in acknowledgement of Software Fredom Day, which is Saturday, September 17th. I don't have a repository setup yet, so post here if you're interested in developing this with me.

Also, FireBug is absolutely awesome in working with SVG files. Forget about Inkscape; it's total crap for this project.

Edit: Added querystring & results


Return to “Group Projects”

Who is online

Users browsing this forum: No registered users and 1 guest

cron