From 5396899855c1929fbdace5a92971449a7f2dbe6a Mon Sep 17 00:00:00 2001 From: cxl Date: Fri, 14 Jul 2017 18:39:54 +0000 Subject: [PATCH] .uppbox git-svn-id: svn://ultimatepp.org/upp/trunk@11235 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppbox/uppweb2/svn.cpp | 4 ++-- uppbox/uppweb2/topic1.cpp | 4 ++-- uppbox/uppweb2/topictree.cpp | 2 +- uppbox/uppweb2/www.cpp | 35 ++++++++++++++++++----------------- 4 files changed, 23 insertions(+), 22 deletions(-) diff --git a/uppbox/uppweb2/svn.cpp b/uppbox/uppweb2/svn.cpp index 2ff4f64eb..1ee37a8f6 100644 --- a/uppbox/uppweb2/svn.cpp +++ b/uppbox/uppweb2/svn.cpp @@ -82,8 +82,8 @@ void GetSvnFolderDeep(VectorMap &data, const String &tppfold } void GetSvnList(VectorMap &data, const String &rootdir) { LLOG("Querying svn for documentation metadata ..."); - GetSvnFolder(data, AppendFileName(rootdir, "uppbox/uppweb/www.tpp")); - GetSvnFolder(data, AppendFileName(rootdir, "uppbox/uppweb/gsoc.tpp")); + GetSvnFolder(data, AppendFileName(rootdir, "uppbox/uppweb2/www.tpp")); + GetSvnFolder(data, AppendFileName(rootdir, "uppbox/uppweb2/gsoc.tpp")); GetSvnFolderDeep(data, AppendFileName(rootdir, "uppsrc")); GetSvnFolderDeep(data, AppendFileName(rootdir, "bazaar")); } diff --git a/uppbox/uppweb2/topic1.cpp b/uppbox/uppweb2/topic1.cpp index 8daf6f99a..8fc0dac27 100644 --- a/uppbox/uppweb2/topic1.cpp +++ b/uppbox/uppweb2/topic1.cpp @@ -61,14 +61,14 @@ Topic ReadTopic0(const char *text) void InitWwwTpp() { - String wwwtpp = AppendFileName(uppbox, "uppweb/www.tpp"); + String wwwtpp = AppendFileName(uppbox, "uppweb2/www.tpp"); FindFile ff(AppendFileName(wwwtpp, "*")); static Vector data; while(ff) { RLOG(ff.GetName()); Topic p = ReadTopic0(LoadFile(AppendFileName(wwwtpp, ff.GetName()))); data.Add(p.text); - RegisterTopic__("", GetFileTitle(ff.GetName()), p.title, data.Top(), data.Top().GetCount()); + RegisterTopic__("", GetFileTitle(ff.GetName()), p.title, data.Top(), data.Top().GetCount()); ff.Next(); } }; diff --git a/uppbox/uppweb2/topictree.cpp b/uppbox/uppweb2/topictree.cpp index d6e04a136..d0e2e0def 100644 --- a/uppbox/uppweb2/topictree.cpp +++ b/uppbox/uppweb2/topictree.cpp @@ -147,7 +147,7 @@ String GatherTopics(ArrayMap& tt, Vector& ttFullIds, cons return "index.html"; title = p.title; p.title += " (translated)"; - String help = "topic://uppweb/www/contribweb$" + GetTopicLanguage(topic); + String help = "topic://uppweb2/www/contribweb$" + GetTopicLanguage(topic); p.text = String("{{1f1t0/50b0/50@(240.240.240) [ +#define IMAGEFILE #include #include -#define TFILE +#define TFILE #include #define LLOG(x) // LOG(x) @@ -51,7 +51,7 @@ String GetRcFile(const char *s) String f = GetDataFile(s); if(FileExists(f)) return f; - return GetHomeDirFile("upp.src/uppbox/uppweb/" + AsString(s)); + return GetHomeDirFile("upp.src/uppbox/uppweb2/" + AsString(s)); } bool ContainsAt(const String &source, const String &pattern, int pos) @@ -284,7 +284,7 @@ ArrayMap tt; Vector ttId; Vector ttFullIds; -String Www(const char *topic, int lang, String topicLocation = "topic://uppweb/www/") +String Www(const char *topic, int lang, String topicLocation = "topic://uppweb2/www/") { String strLang = ToLower(LNGAsText(lang)); String www = GatherTopics(tt, ttFullIds, String().Cat() << topicLocation << topic << "$" << strLang, ""); @@ -390,7 +390,7 @@ String MakeExamples(const char *dir, const char *www, int language, String paren String fn = AppendFileName( AppendFileName( - AppendFileName(uppbox, "uppweb"), + AppendFileName(uppbox, "uppweb2"), String(www) + ".tpp" ), topic.title + "$" + ToLower(LNGAsText(language)) + ".tpp" @@ -539,7 +539,7 @@ void ExportPage(int i) // if (!strlang.IsEmpty()) // qtflangs += Format(String("[2 ") + t_("This page is also in %s") + ".]", strlang); if (tt[i].title.Find("How to contribute. Web page") < 0) { - String help = "topic://uppweb/www/contribweb$" + ToLower(LNGAsText(languages[ilang])); + String help = "topic://uppweb2/www/contribweb$" + ToLower(LNGAsText(languages[ilang])); qtflangs += " " + String("[^") + help + "^ [= 0) @@ -823,6 +823,7 @@ CONSOLE_APP_MAIN InitWwwTpp(); languages.Add(LNG_('E','N','U','S')); // en-us has to be the first one +#if 0 #ifndef _DEBUG // too slow to have them all while developing languages.Add(LNG_('C','A','E','S')); languages.Add(LNG_('C','S','C','Z')); @@ -835,7 +836,7 @@ CONSOLE_APP_MAIN languages.Add(LNG_('Z','H','C','N')); languages.Add(LNG_('Z','H','T','W')); #endif - +#endif if (outHtml) RealizeDirectory(targetdir); @@ -900,9 +901,9 @@ CONSOLE_APP_MAIN bi << BarLink(Www("overview", lang), t_("Overview"), false); bi << BarLink(Www("examples", lang), t_("Examples")); { - int di = tt.Find("topic://uppweb/www/examples$" + ToLower(LNGAsText(lang))); + int di = tt.Find("topic://uppweb2/www/examples$" + ToLower(LNGAsText(lang))); tt[di].text << MakeExamples(examples, "examples", lang, String("/") + FormatInt(di)); - tt[di].text << GetTopic("topic://uppweb/www/reference$" + ToLower(LNGAsText(lang))).text << '\n'; + tt[di].text << GetTopic("topic://uppweb2/www/reference$" + ToLower(LNGAsText(lang))).text << '\n'; tt[di].text << MakeExamples(reference, "reference", lang, String("/") + FormatInt(di)); } @@ -913,7 +914,7 @@ CONSOLE_APP_MAIN bi << BarLink(Www("documentation", lang), t_("Documentation")); { - int di = tt.Find("topic://uppweb/www/documentation$" + ToLower(LNGAsText(lang))); + int di = tt.Find("topic://uppweb2/www/documentation$" + ToLower(LNGAsText(lang))); if (di >= 0) { Index x; x.Clear(); @@ -988,7 +989,7 @@ CONSOLE_APP_MAIN for(int i = 0; i < tt.GetCount(); i++) { String topic = tt.GetKey(i); - links.Add(topic, topic == "topic://uppweb/www/index$en-us" ? "index.html" : + links.Add(topic, topic == "topic://uppweb2/www/index$en-us" ? "index.html" : memcmp(topic, "topic://", 8) ? topic : TopicFileNameHtml(topic)); } @@ -997,7 +998,7 @@ CONSOLE_APP_MAIN if (tt[i].title == "Svn releases") tt[i].text.Replace(svntableStr, SvnChanges(svnlog, 300, "")); else if (tt[i].title == "Svn Web releases") - tt[i].text.Replace(svntableStr, SvnChanges(svnlog, 100, "uppweb")); + tt[i].text.Replace(svntableStr, SvnChanges(svnlog, 100, "uppweb2")); else if (tt[i].title == "Svn Bazaar releases") tt[i].text.Replace(svntableStr, SvnChanges(svnlog, 100, "bazaar")); else if (tt[i].title == "Svn Upp releases") @@ -1005,7 +1006,7 @@ CONSOLE_APP_MAIN else if (tt[i].title == "Svn major releases") tt[i].text.Replace(svntableStr, SvnChanges(svnlog, 300, "", true)); else if (tt[i].title == "Svn Web major releases") - tt[i].text.Replace(svntableStr, SvnChanges(svnlog, 100, "uppweb", true)); + tt[i].text.Replace(svntableStr, SvnChanges(svnlog, 100, "uppweb2", true)); else if (tt[i].title == "Svn Bazaar major releases") tt[i].text.Replace(svntableStr, SvnChanges(svnlog, 100, "bazaar", true)); else if (tt[i].title == "Svn Upp major releases") @@ -1168,7 +1169,7 @@ CONSOLE_APP_MAIN LLOG("I: " << MemoryUsedKb()); - FileCopy(AppendFileName(uppbox, "uppweb/favicon.png"), AppendFileName(targetdir, "favicon.png")); + FileCopy(AppendFileName(uppbox, "uppweb2/favicon.png"), AppendFileName(targetdir, "favicon.png")); // SaveFile(AppendFileName(targetdir, "favicon.ico"), LoadFile(AppendFileName(uppsrc, "ide/ide.ico"))); SaveFile(AppendFileName(targetdir, "stats.html"), HtmlLink("http://www.mygooglepagerank.com", "_blank") /