U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » Documentation » How can I set up UPPWEB on my computer?
How can I set up UPPWEB on my computer? [message #26607] Fri, 14 May 2010 19:03 Go to next message
klrkt is currently offline  klrkt
Messages: 20
Registered: December 2008
Promising Member

The link below shows how to automatically build web pages for Bazaar - I would like to setup UPPWEB and do this on my app on my computer?
Can you explain how?
http://www.ultimatepp.org/www$uppweb$bazaar_submission$en-us .html
3.4 Your web page



Now you have the opportunity to show everybody what your package does. It is easy.



Prepare in T++ your help as usual: Reference, examples, implementation, summary.



Be careful that all the pages are linked between them and from T++ Help main page. If a page is left alone it will not appear in web.



A good main page could be the Summary page. You will have to care that this page is linked from Bazaar introduction page in your Package name hyperlink.



After that the day after you will see the web page updated. The secret of this is that Upp hosting system will compile and run uppweb package converting this index package and your T++ help system into .html web pages.



Re: How can I set up UPPWEB on my computer? [message #26609 is a reply to message #26607] Fri, 14 May 2010 22:23 Go to previous messageGo to next message
andrei_natanael is currently offline  andrei_natanael
Messages: 262
Registered: January 2009
Experienced Member
The only action you have to do is to checkout the uppweb from svn. Modify(add) pages you want(you should have a svn account), commit and the changes will appear online on next midnight sync.

Andrei
Re: How can I set up UPPWEB on my computer? [message #26610 is a reply to message #26607] Fri, 14 May 2010 23:14 Go to previous messageGo to next message
klrkt is currently offline  klrkt
Messages: 20
Registered: December 2008
Promising Member
Thanks for the reply, but I want to setup uppWeb for my custom app, on my system.
Re: How can I set up UPPWEB on my computer? [message #26611 is a reply to message #26610] Sat, 15 May 2010 00:15 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

klrkt wrote on Fri, 14 May 2010 23:14

Thanks for the reply, but I want to setup uppWeb for my custom app, on my system.

Hi,

Unfortunately, uppweb can not be used to do that. But you can reuse some pieces of the code... The absolute basics is function
String EncodeHtml(const RichText& text, Index<String>& css,
                  const VectorMap<String, String>& links,
                  const VectorMap<String, String>& labels,
                  const String& path, const String& base = Null, Zoom z = Zoom(8, 40),
                  const VectorMap<String, String>& escape = VectorMap<String, String>(),
                  int imtolerance = 0);
and few related ones from RichText package.

Generally, I would recommend you to have a look at the code in uppweb package, everything you need is there...

Best regards,
Honza
Re: How can I set up UPPWEB on my computer? [message #26612 is a reply to message #26607] Sat, 15 May 2010 01:01 Go to previous messageGo to next message
klrkt is currently offline  klrkt
Messages: 20
Registered: December 2008
Promising Member
OK
That is what I thought -
I would have to rewrite/reuse,
BUT
Hey thought I would ask the Forum, I wanted to be wrong and maybe save some time.

THANK YOU both for trying to help.
Re: How can I set up UPPWEB on my computer? [message #26618 is a reply to message #26612] Sun, 16 May 2010 17:22 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Hello Andy

I do not understand you very well. Could you describe what are your needs for a dummy (me in this case) Smile

Quote:

I want to setup uppWeb for my custom app, on my system.



Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #26640 is a reply to message #26618] Mon, 17 May 2010 20:26 Go to previous messageGo to next message
klrkt is currently offline  klrkt
Messages: 20
Registered: December 2008
Promising Member
uppWeb was developed by Mirek and is online using svn.
It uses Topic++ to "automatically" create web pages for your app.
- same way that Topic++ create "automatic" documentation.
- NOTE: I had included a link in my first post.
Please follow link if you are not sure what uppWeb is all about.

In any case the link explains how to use uppWeb.

BUT
I wanted to set it up on my own computer and NOT use the online site.

MOSTLY
I just wanted to know if there was a way to do this already, with example and maybe some documentation.

It seems there is NOT.

- so I will have to do it myself.

Hope that is clear.... :=}
Re: How can I set up UPPWEB on my computer? [message #26653 is a reply to message #26640] Tue, 18 May 2010 08:58 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
klrkt wrote on Mon, 17 May 2010 20:26

uppWeb was developed by Mirek and is online using svn.
It uses Topic++ to "automatically" create web pages for your app.
- same way that Topic++ create "automatic" documentation.
- NOTE: I had included a link in my first post.
Please follow link if you are not sure what uppWeb is all about.

In any case the link explains how to use uppWeb.

BUT
I wanted to set it up on my own computer and NOT use the online site.

MOSTLY
I just wanted to know if there was a way to do this already, with example and maybe some documentation.

It seems there is NOT.

- so I will have to do it myself.

Hope that is clear.... :=}


Hello klrkt

Smile Smile Smile

Thank you for your explanation.

I do not fully understand what you want but I will try to answer you.

Uppweb is a package that maintains U++ web page. It works basically like this:

- Gathers T++ help pages related with U++ and Bazaar
- Searches through examples and references and it converts the code into qtf rich text
- Converts it all into html, adding left side menu, footer and ads.
- Uploads html to web server to be available in internet for all

Some variables and actions can be configured through an .xml file located in HOME_DIR/uppweb.xml.
Main variables are:
<rootdir> This is the U++ main folder
<targetdir> The folder where U++ web page will be created
<ftpUpload> If 1 the page is uploaded to server. For tests it has to be 0
<doSvn> If 1 it checks svn. Normally it has to be 1

To get all of this you just need to run uppweb.

After running it you will get an offline copy of U++ web page in your <targetdir> folder. You can browse it with your browser as if you where connected to internet.

Hope that it is clear Very Happy



Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #26657 is a reply to message #26607] Tue, 18 May 2010 10:55 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 826
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
koldo: he want to use it offline for his own application for building own web, not upp web.

I think dolik's answer is quite relevant and should get him on track fast. (edit: and yours last comment should help imho too Smile ... anyway, I'm commenting something I have no knowledge about, so I'm the one being not relevant here Smile)

klrkt: in case you run into some difficulties, just keep asking, probably only Mirek and Dolik have some insight into how it works, but people will try to help you anyway, don't worry. Smile

[Updated on: Tue, 18 May 2010 10:56]

Report message to a moderator

Re: How can I set up UPPWEB on my computer? [message #26658 is a reply to message #26657] Tue, 18 May 2010 11:13 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Hello klrkt

Please confirm that you want to use uppweb technology to setup your own web page.

If it is like this it remembers me one of UltimateBook goals.

The key of T++ to html translation is in these functions:

- ExportPage
- QtfAsHtml
- ParseQTF
- EncodeHtml

QtfAsHtml does the job thanks to ParseQTF and EncodeHtml. However ExportPage completes the layout of a browsable html page.

Unfortunately ExportPage is crowded with things related closely with uppweb only.

If you need this I can give a push to UltimateBook and help you at the same time.


Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #26661 is a reply to message #26657] Tue, 18 May 2010 13:44 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

mr_ped wrote on Tue, 18 May 2010 10:55

probably only Mirek and Dolik have some insight into how it works, but people will try to help you anyway, don't worry. Smile

Sorry mr_ped, but I have to correct you Smile I know the basics but Koldo knows the technology much better than me Very Happy Anyway, I'll try to help as much as I can.
Honza
Re: How can I set up UPPWEB on my computer? [message #26727 is a reply to message #26658] Fri, 21 May 2010 22:12 Go to previous messageGo to next message
klrkt is currently offline  klrkt
Messages: 20
Registered: December 2008
Promising Member
hi koldo

yes - I want to use for my own web page
that is - create an application, and "automatically" generate web pages
thank you for your very kind offer
for the time being I am in "regroup" and "redsign" mode
Re: How can I set up UPPWEB on my computer? [message #26729 is a reply to message #26727] Sat, 22 May 2010 00:37 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
klrkt wrote on Fri, 21 May 2010 22:12

hi koldo

yes - I want to use for my own web page
that is - create an application, and "automatically" generate web pages
thank you for your very kind offer
for the time being I am in "regroup" and "redsign" mode



Hello klrkt

The easiest case would be that you have all your web page in pure T++. I mean:

- It is just a T++ page with links to others and so on

- So it is not necessary to automatically generate T++

Is this your case?




Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #26730 is a reply to message #26729] Sun, 23 May 2010 00:58 Go to previous messageGo to next message
klrkt is currently offline  klrkt
Messages: 20
Registered: December 2008
Promising Member
yes - I want to translate T++ to HTML "automagically"
Re: How can I set up UPPWEB on my computer? [message #26731 is a reply to message #26730] Sun, 23 May 2010 00:59 Go to previous messageGo to next message
klrkt is currently offline  klrkt
Messages: 20
Registered: December 2008
Promising Member
ALSO
create HTML pages from my source code
- without T++
Re: How can I set up UPPWEB on my computer? [message #26732 is a reply to message #26730] Sun, 23 May 2010 09:14 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
klrkt wrote on Sun, 23 May 2010 00:58

yes - I want to translate T++ to HTML "automagically"



Let me some days and I will show you something.

klrkt wrote on Sun, 23 May 2010 00:59

ALSO
create HTML pages from my source code
- without T++


Really it is almost the same as T++ and QTF are also almost the same. Smile


Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #26833 is a reply to message #26732] Tue, 01 June 2010 18:31 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Hello klrkt

I have prepared a function that takes:

- A list of folders with T++ folders and files inside at any level
- A folder to put resulting .html
- The name of the page to be the "index" page


After that you can open index.html with your browser and navigate through all pages, linked between themselves or to external web links.

This is what it does now. I am polishing it and adding C++ generated T++ (.html).

This is just what uppweb does, but focused as a class to be used in a program.

If you need something urgent, I can upload it but if you can wait for it some days I will put it in a more proper way. Smile


Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #26848 is a reply to message #26833] Wed, 02 June 2010 09:18 Go to previous messageGo to next message
chickenk is currently offline  chickenk
Messages: 171
Registered: May 2007
Location: Grenoble, France
Experienced Member
That's totally great !

I'm gonna use your class extensively I think.

Lionel
Re: How can I set up UPPWEB on my computer? [message #26941 is a reply to message #26848] Fri, 11 June 2010 09:27 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Hello Lionel

Now UltimateBook is updated and contains the code that can serve you.

It takes a series of folders with .tpp files inside, gather them all and convert them to .html or .pdf.

To run it please do this steps:

1. Before compiling it, put the main U++ folder here:

	void Main::DoGo()
	{
		GatherTpp tpp;
		String uppfolder = "My U++ folder";


2. Compile and run it

3. Set "Do .html" and/or "Do .pdf" checkboxes and set the "Html folder" or "Pdf file"

4. Click Go


It works very simple if you just convert .tpp in .html:

	GatherTpp tpp;
	
	tpp.AddFolder(folder_1_with_Tpp);
	tpp.AddFolder(folder_2_with_Tpp);
	...
	tpp.Load(tpp_file_that_is_index);		// It has a Gate2 arg for progress bar
	tpp.MakeHtml(folder_to_put_html);		// It has a Gate2 arg for progress bar
	tpp.MakePdf(file_to_put_pdf);			// It has a Gate2 arg for progress bar



If you want to modify existing T++ or add new T++ topics made by program you have these methods:

	int FindTopic(const String name);
	Topic &GetTopic(int id);
	Topic &AddTopic(const String name);
	String GatherTopics(const char *topic, String& title);



These code is basically uppweb package code packaged as a standalone class. It is also rather experimental and it will change, but I think the basic interface will remain stable.




Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #26959 is a reply to message #26941] Sun, 13 June 2010 21:02 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Sorry for the fixes in svn.

There have been problems with interferences between ide/Browser/Browser.h and Xwindows .h files in SysInfo.h.

Fortunately they are all solved in Linux and Windows Smile.


Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #28326 is a reply to message #26959] Fri, 27 August 2010 19:10 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1313
Registered: September 2007
Ultimate Contributor
Koldo, you're the man with every solution Smile

I just asked on another topic how to to that, and after, looking for HtmlEncoder, I found your post Smile

I guess I'll give a try to your package, seems great !

Ciao

Max
Re: How can I set up UPPWEB on my computer? [message #28336 is a reply to message #28326] Sun, 29 August 2010 15:52 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
mdelfede wrote on Fri, 27 August 2010 19:10

Koldo, you're the man with every solution Smile

I just asked on another topic how to to that, and after, looking for HtmlEncoder, I found your post Smile

I guess I'll give a try to your package, seems great !

Ciao

Max


Hello Massimo

Excellent. Please give ideas.

Although it is not interesting for you, A thing I wanted to set is the order of the pages when transferring from .tpp to .pdf.


Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #28341 is a reply to message #28336] Mon, 30 August 2010 01:22 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1313
Registered: September 2007
Ultimate Contributor
Well, I'm trying a different way, indeed.... I rewrote an help window (named HelpViewer) which allows a table of contents (TOC), which is loaded automatically from TOC$xx-xx.tpp files.
It's almost working, and it gives automatically an order to generated html pages, a nice index on help window and should allow generation of PDF with table of contents too.

By now the TOC is a bulletted list, with indenting depending of chapter-subchapter.... relationship; that one could be easily translated automatically to a treectrl parsing the corresponding QTF, if wished.

So, you create the help, add a TOC topic with ordered list of links inside and you can generate an ordered html series with toc, or a pdf with TOC too.... or just use my HelpViewer to show help with TOC on left side.

I've got just a problem converting bulletted lists to html... bullets and indents are not translated; see the attached file and corresponding html and css.... the css is right, the html not.

If you've got some idea on how to solve it would be great Smile

Ciao

Max

Edit : BTW, we should document somehow that damn'd EncodeHtml stuff, I got more than one day figuring out what parameters means....

[Updated on: Mon, 30 August 2010 01:23]

Report message to a moderator

Re: How can I set up UPPWEB on my computer? [message #28342 is a reply to message #28341] Mon, 30 August 2010 08:56 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Hello Massimo

In the attachment you have included the html and tpp, but not the code Smile.

Quote:

Edit : BTW, we should document somehow that damn'd EncodeHtml stuff, I got more than one day figuring out what parameters means....
I do not understand it enough to document it Crying or Very Sad .

Anyway, as GatherTpp seems to be useful I will document it soon.


Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #28344 is a reply to message #28342] Mon, 30 August 2010 10:17 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1313
Registered: September 2007
Ultimate Contributor
Yep, the attachment is just to show the bullets problems.
The code isn't quite ready by now... but if you like I could post it.
I've no time to work on it for a couple of weeks from now.

Well, I'm posting the html generation code now... still unfinished, but if you're interested at it it's maybe useful.
It miss the TOC handling and table generation part.... I guess I'll make some javascript code there, in order to have html easily integrated with already present website.

Don't take care of name, my app's name is TimberStruct, so I made the export app's name TimberHtml, but it'll be changed on bazaar release Smile

The app is (by now) made to export the APPLICATION help, not the source code docs, but adding that one is trivial.

Ciao

Max
Re: How can I set up UPPWEB on my computer? [message #28345 is a reply to message #28344] Mon, 30 August 2010 10:23 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1313
Registered: September 2007
Ultimate Contributor
Koldo,

here the (relly initial code) HelpViewer class.
It just shows an help window whith toc by side.
The code to use it :
HelpViewer helpViewer;

void ShowHelp(void)
{
	if(!helpViewer.IsOpen())
		helpViewer.Open((Ctrl *)NULL);
	else
		helpViewer.Activate();
	helpViewer.LoadTOC("topic://MyApp/app/TOC$it-it");
}


It's still missing some parts I want to add :

1) TOC-on-TreeCtrl, I need to parse the toc and put inside a treectrl. Not too difficult.
2) A search-in-help, that one needs indexing of help file, a TabCtrl on the left and some more code. Not too difficult either.
3) The toolbar...Smile

Ciao

Max
Re: How can I set up UPPWEB on my computer? [message #28353 is a reply to message #28345] Mon, 30 August 2010 12:32 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Hello Massimo

HelpViewer is a draft of one of the next things I wanted to do related to UltimateBook/GatherTpp.
I like to see that different people require similar things Smile.

TimberHtnl seems after a quick view a simplified version of GatherTpp.

This is the structure I imagined:

index.php?t=getfile&id=2773&private=0

As we look for similar things, could we join our efforts?
  • Attachment: dib.PNG
    (Size: 12.48KB, Downloaded 1219 times)


Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #28354 is a reply to message #28353] Mon, 30 August 2010 12:43 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1313
Registered: September 2007
Ultimate Contributor
koldo wrote on Mon, 30 August 2010 12:32



As we look for similar things, could we join our efforts?


Well, why not ? Smile

What I really need is a nice way to get PDF and HTML manuals for my app(s), and a better help system.
Better means "with TOC and search", thich is the only thing I miss from UPP ones.

Mines were just a quick-and-dirty solution for a quick problem.
If you download my app

http://www.ultimatepp.org/forum/index.php?t=msg&th=5469& amp;start=0&

You'll see basic helpviewer at work, among others Smile

Last thing... I'm really, but *REALLY* against not commenting code. I spent about 2 days to understand what AsHtml() parameters do and 1 our coding, so the apps on which I partecipate *have to* be hardly commented Smile

Ciao

Max
Re: How can I set up UPPWEB on my computer? [message #28355 is a reply to message #28354] Mon, 30 August 2010 13:10 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Hello Massimo

Excellent!

Quote:

What I really need is a nice way to get PDF and HTML manuals for my app(s), and a better help system.
Better means "with TOC and search", thich is the only thing I miss from UPP ones.

That is the goal of UltimateBook package, but for all U++ Smile. And of course I agree.

Quote:

Last thing... I'm really, but *REALLY* against not commenting code. I spent about 2 days to understand what AsHtml() parameters do and 1 our coding, so the apps on which I partecipate *have to* be hardly commented Smile

Well... Main GatherTpp and UltimateBook code has been borrowed (or stolen Wink) from UppWeb package. This package does a great job but, as Mirek recognized, is not the best example of U++ coding. I spent months and terrible effort Smile in understanding more or less how it works enough to do the changes (with dolik.rce) that all of you know in Web.

In summary, for me to change base code is out of my capabilities... but the rest of code has to be clean and simple, and some comments do not hurt Smile.






Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #28356 is a reply to message #28355] Mon, 30 August 2010 13:19 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3461
Registered: August 2008
Senior Veteran
Hello Massimo

I have tried a little bit your program.

One advantage we can include (I did it in an unreleased version) is to set a Callback filter in GatherTpp so that a help can be changed before viewed (or output to html).

This way you can fill tpp forms and so on the fly before render them.


Best regards
Iñaki
Re: How can I set up UPPWEB on my computer? [message #28357 is a reply to message #28355] Mon, 30 August 2010 13:30 Go to previous message
mdelfede is currently offline  mdelfede
Messages: 1313
Registered: September 2007
Ultimate Contributor
koldo wrote on Mon, 30 August 2010 13:10

I spent months and terrible effort Smile in understanding more or less how it works enough to do the changes (with dolik.rce) that all of you know in Web.



I know well the problem, having developed X11 DHCtrl. It was a pain in the @@@@ just to study Upp core code... which is indeed *very* well written, but really poorly documented.
I know that some people hates my code because is often "too" commented, but I'm able to read it after years Smile

Ciao

Max
Previous Topic: Manual page
Next Topic: Ultimate book questions
Goto Forum:
  


Current Time: Sun Aug 02 07:00:21 GMT+2 2026

Total time taken to generate the page: 0.01484 seconds