Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
html edit difficulty (Read 9687 times)
Ian Greig
Full Member
*
Offline



Posts: 74
Wokingham, UK
html edit difficulty
Dec 09th, 2010, 5:35pm
 
I have been working with Les Orchard's very helpful tutorial

Quote:


on setting up an outline with templates for html export (as it happens, including MarkDown which is a particular interest).

I've set up a similar outline, following the procedure exactly. I have hit a rather basic snag -- in my *article.html note, I am unable to edit the note content (in html view). I cannot select anything or insert, etc.

It's probably really obvious, but not to me at this time! Can anyone set me off again in the right direction, please?
Back to top
 
 

--IanG
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: html edit difficulty
Reply #1 - Dec 9th, 2010, 6:57pm
 
HTML view shows you what the exported data looks like once all export ^code^ has been processed. To alter what you see in the HTML view edit the source note(s) and template(s) then either close/re-open the view or click the update button to refresh the view using the new data.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Ian Greig
Full Member
*
Offline



Posts: 74
Wokingham, UK
Re: html edit difficulty
Reply #2 - Dec 10th, 2010, 1:44am
 
Thanks, Mark A -- I've got that bit. Don't look in html view.

Now, where do I find the following?
Quote:
Next, edit the source of your article.html and section.html templates. Look for these lines:

^value($Text)^
Replace these expressions with the following template code:

^value(runCommand("perl /usr/local/bin/Markdown.pl",$Text))^


Where do I find the various expressions e.g. ^value($Text)^?

And if I need to edit the html -- which I will -- and I can't get to it in html view, where then?

Thanks for help so far
Back to top
 
 

--IanG
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: html edit difficulty
Reply #3 - Dec 10th, 2010, 4:31am
 
Section on the Article template: http://decafbad.com/2010/06/tinderbox-article-tutorial/article.html#section-22

Section on the Section template: http://decafbad.com/2010/06/tinderbox-article-tutorial/article.html#section-25

Both sections show the code you need to add and subsequently edit. In each case the HTML you are supposed to edit is the $Text of the template note. Thus the 'finished' code you see in the HTML view may come from either/both of the source note and its export template.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Ian Greig
Full Member
*
Offline



Posts: 74
Wokingham, UK
Re: html edit difficulty
Reply #4 - Dec 10th, 2010, 7:01pm
 
I can report some progress -- I have followed the Les Orchard tutorial right through and replicated everything, with some text of my own in the top note "Creating an HTML5 article"



Q1. What I get is an html doc of the top note, and a folder containing the rest -- not linked or unified. How can I produce an output that is viewable and printable as one cohesive document, e.g. that I can paginate in a WP?

Q2. My Markdown script isn't working. I downloaded, saved it, and changed the html templates to reflect the correct path (see screenshot below).
However, I was unable to save in the location that Les suggested -- a bit too Unix for me and involving hidden folders -- so I put the script in a folder in a library.
As suggested in the tutorial:

Quote:
To do this, you'll first need to download the Markdown script. I did so, and copied Markdown.pl to /usr/local/bin on my Mac.


This is the path I used shown in the html templates:


Help please!

Back to top
 
 

--IanG
  IP Logged
Ian Greig
Full Member
*
Offline



Posts: 74
Wokingham, UK
Re: html edit difficulty
Reply #5 - Dec 10th, 2010, 7:08pm
 
and if anyone can tell me how to get screenshot tiffs to show up on YaBB, I'd be grateful.

I used the [img][/img] and dragged the screenshot tiff in between....
Back to top
 
 

--IanG
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: html edit difficulty
Reply #6 - Dec 11th, 2010, 5:11am
 
Place the image in a web accessible place - e.g. your own website, Flikr, etc. - then place the URL to the image in between opening/closing img YABB tags (i.e. img and /img both enclosed in square brackets).
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Ian Greig
Full Member
*
Offline



Posts: 74
Wokingham, UK
Re: html edit difficulty
Reply #7 - Dec 11th, 2010, 6:52am
 
OK, here are the screenshots again -- revised from the earlier post because I worked out how to access the hidden usr/local/bin and moved the Perl script for Markdown there, which conforms to Les Orchard's method. Restarted, just for good measure.

Couple of issues still....

1. Html export doesn't seem to be cohesive. I suppose I could write everything in "Compose section text in notes". Wanted to create an outline (what TB is good at) of some complexity which builds into one document I can import into e.g. Nisus Writer Pro for polishing and printing for various purposes.

TB doc structure screenshot:


2. Can't get the Markdown script to work -- plenty of Markdown syntax in there and I know it works elsewhere -- have tried a couple of places to store the script, and paths accordingly

article.html note screenshot


I feel like someone in a business suit hacking their way through the jungle with a Swiss Army knife...
Back to top
 
 

--IanG
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: html edit difficulty
Reply #8 - Dec 11th, 2010, 7:17am
 
Check you've set the right prototype/template allocations. The *section prototype should be set to use the section.html note (check this via the prototypes HTML view), and so on.  I don't have the Orchard project to hand but I assume the articles export all their children/descendants as sections. If the notes to export have the right prototypes set it should work. It might be easier to post a link to your 'broken' TBX so we can see what's disconnected.

I don't understand/use MMD so can't offer insight on that but there are MMD users around who might be able to do so.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Mark Bernstein
YaBB Administrator
*
Offline

designer of
Tinderbox

Posts: 2871
Eastgate Systems, Inc.
Re: html edit difficulty
Reply #9 - Dec 11th, 2010, 7:44am
 
I think you'll find the path to your markdown.pl is wrong. Surely, it should start with "/", not "perl/".
Back to top
 
 
WWW   IP Logged
Ian Greig
Full Member
*
Offline



Posts: 74
Wokingham, UK
Re: html edit difficulty
Reply #10 - Dec 11th, 2010, 7:47am
 
Have made changes to *section and *article prototype so that they call section.html and article.html templates respectively -- it didn't make a difference.

Here's the TB file which will reveal more than I am capable of explaining:

http://web.me.com/greiggy/Public/IanG_Les%20Orchard%20outline.tbx   [URL fixed by admin]
Back to top
 
« Last Edit: Dec 16th, 2010, 10:32am by Mark Anderson »  

--IanG
  IP Logged
Ian Greig
Full Member
*
Offline



Posts: 74
Wokingham, UK
Re: html edit difficulty
Reply #11 - Dec 11th, 2010, 7:54am
 
I just changed the path to Markdown.pl from "perl/...." to "/...."   etc. Not quite there yet!

Can anyone comment on whether it's important to have the Perl script in usr/local/bin or is that just an individual preference for housekeeping?
Back to top
 
 

--IanG
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: html edit difficulty
Reply #12 - Dec 11th, 2010, 8:31am
 
Assuming your article temple & prototype are correct, open the prototype's HTML view and compare it against the grab of HTML view of the *article note at this part of the article. Most likely you've not un-ticked the second box top-left, which will be on by default if you started using an empty TBX; in fairness, I don't think the article specifically mentioned this - likely the author assumed it self evident - although the attribute involved does get mentioned here.

It's unfortunate that the article mixes in MMD as it's not necessary for doing in-page anchors. MMD is simply the preference of some, especially those disliking using a mouse - for entering mark-up.

I think to make this demo more accessible to the new user, it needs re-doing without the added complication of getting MMD functioning as well. I'm not deprecating MMD, but I can see that for someone new to export, it ratchets the degree of understanding needed - configuring Perl scripts isn't the ordinary users average daily task.

It's also worth noting that since the article was published, TB (v5.6.0+) now exposes a note/agent's unique object ID number via $ID. I think a new demo would likely use that attribute rather than make a new attribute - one less thing to do.
Back to top
 
« Last Edit: Dec 16th, 2010, 10:30am by Mark Anderson »  

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Ian Greig
Full Member
*
Offline



Posts: 74
Wokingham, UK
Re: html edit difficulty
Reply #13 - Dec 11th, 2010, 10:26am
 
Yay! Markdown working fine now and the export is looking sensible.

Thanks for your help-- and patience.

Now I guess I should add some CSS to both (?) of the templates to get the typography a bit more under control...

And then get on with the main task, which is writing stuff....  Smiley
Back to top
 
 

--IanG
  IP Logged
Pages: 1
Send Topic Print