From 77730c3073b12c2b829a5bf71126ca6ee591895c Mon Sep 17 00:00:00 2001 From: xjkdev Date: Wed, 9 Mar 2022 14:50:32 +0800 Subject: [PATCH 01/10] Added eigen3 scrapers, filters, icons, and etc. --- .../templates/pages/about_tmpl.coffee | 5 + assets/stylesheets/application.css.scss | 1 + assets/stylesheets/pages/_eigen3.scss | 267 ++++++++++++++++++ lib/docs/filters/eigen3/clean_html.rb | 22 ++ lib/docs/filters/eigen3/entries.rb | 113 ++++++++ lib/docs/scrapers/eigen3.rb | 45 +++ public/icons/docs/eigen3/16.png | Bin 0 -> 1460 bytes public/icons/docs/eigen3/16@2x.png | Bin 0 -> 3088 bytes public/icons/docs/eigen3/SOURCE | 1 + 9 files changed, 454 insertions(+) create mode 100644 assets/stylesheets/pages/_eigen3.scss create mode 100644 lib/docs/filters/eigen3/clean_html.rb create mode 100644 lib/docs/filters/eigen3/entries.rb create mode 100644 lib/docs/scrapers/eigen3.rb create mode 100644 public/icons/docs/eigen3/16.png create mode 100644 public/icons/docs/eigen3/16@2x.png create mode 100644 public/icons/docs/eigen3/SOURCE diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index d8f1e249..f5fa3b14 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -262,6 +262,11 @@ credits = [ '2001-2015 by the original authors
Drupal is a registered trademark of Dries Buytaert.', 'GPLv2', 'https://api.drupal.org/api/drupal/LICENSE.txt' + ],[ + 'Eigen3', + 'Eigen', + 'MPL2', + 'https://www.mozilla.org/en-US/MPL/2.0/' ], [ 'Electron', 'GitHub Inc.', diff --git a/assets/stylesheets/application.css.scss b/assets/stylesheets/application.css.scss index 3a6d428e..1d5da325 100644 --- a/assets/stylesheets/application.css.scss +++ b/assets/stylesheets/application.css.scss @@ -52,6 +52,7 @@ 'pages/dart', 'pages/dojo', 'pages/drupal', + 'pages/eigen3', 'pages/elixir', 'pages/elisp', 'pages/ember', diff --git a/assets/stylesheets/pages/_eigen3.scss b/assets/stylesheets/pages/_eigen3.scss new file mode 100644 index 00000000..ae5c5f99 --- /dev/null +++ b/assets/stylesheets/pages/_eigen3.scss @@ -0,0 +1,267 @@ +._eigen3 { + /* General */ + a.el { + font-weight: bold; + } + a { + color: #3D578C; + font-weight: normal; + text-decoration: none; + } + /* end General */ + + /* Title */ + .title { + font: 400 14px/28px ,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; + } + + div.ingroups { + font-size: 8pt; + text-align: left; + } + /* end Title */ + + /* Fragments */ + div.fragment { + display: table; + padding: 4px; + border: 1px solid #C4CFE5; + } + .fragment { + text-align: left; + direction: ltr; + overflow-x: auto; + overflow-y: hidden; + } + + div.line { + font-family: var(--monoFont); + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; + white-space: -pre-wrap; + white-space: -o-pre-wrap; + white-space: pre-wrap; + word-wrap: break-word; + // text-indent: -53px; + // padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; + } + + .fragment { + text-align: left; + direction: ltr; + overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ + overflow-y: hidden; + } + + div.line::after { + content: "\000A"; + white-space: pre; + } + + a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; + } + + a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; + } + + /* end Fragements */ + + /* Code Colorization */ + + span.keyword { + color: var(--prismKeyword) + } + + span.keywordtype { + color: var(--prismKeyword) + } + + span.keywordflow { + color: var(--prismKeyword) + } + + span.comment { + color: var(--textColorLight); + } + + span.preprocessor { + color: var(--prismKeyword); + } + + span.stringliteral { + color: var(--prismText); + } + + span.charliteral { + color: var(--prismText); + } + + // span.vhdldigit { + // color: #ff00ff + // } + + // span.vhdlchar { + // color: #000000 + // } + + // span.vhdlkeyword { + // color: #700070 + // } + + // span.vhdllogic { + // color: #ff0000 + // } + + // blockquote { + // background-color: #F7F8FB; + // border-left: 2px solid #9CAFD4; + // margin: 0 24px 0 4px; + // padding: 0 12px 0 16px; + // } + + // blockquote.DocNodeRTL { + // border-left: 0; + // border-right: 2px solid #9CAFD4; + // margin: 0 4px 0 24px; + // padding: 0 16px 0 12px; + // } + + /* end Code Colorization */ + + /* Member List */ + + .memtitle { + padding: 8px; + border-top: 1px solid; //#A8B8D9; + border-left: 1px solid; //#A8B8D9; + border-right: 1px solid; //#A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + // background-image: url('nav_f.png'); + // background-repeat: repeat-x; + // background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + // float: left; + } + + .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { + // background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; + } + + td.memTemplParams { + border: none; + white-space: nowrap; + font-size: 80%; + } + + .memproto, dl.reflist dt { + border-top: 0.5px solid; // #A8B8D9; + border-left: 1px solid; // #A8B8D9; + border-right: 1px solid; // #A8B8D9; + border-bottom: 1px solid; // #A8B8D9; + padding: 6px 0px 6px 0px; + } + + .memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; + } + + .memdoc { + padding-left: 6px; + } + + table.mlabels { + padding: 0; + margin: 0; + border: none; + } + + td.mlabels-left, td.mlabels-right { + border: none; + padding: 0; + vertical-align: bottom; + } + + td.memSeparator { + line-height: 1px; + padding: 0px; + } + /* end Member List */ + + /* Member Name */ + td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; + } + + table.memname { + border: none; + margin-left: 6px; + margin-top: 0.5em; + } + + table.memname tr{ + border: none; + } + + table.memname th, table.memname td{ + border: none; + padding: 1px; + vertical-align: bottom; + } + + td.mlabels-left { + width: 100%; + } + + .paramname { + // color: #602020; + white-space: nowrap; + } + + span.mlabel { + background-color: #728DC1; + // border-top: 1px solid #5373B4; + // border-left: 1px solid #5373B4; + // border-right: 1px solid #C4CFE5; + // border-bottom: 1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; + } + /* end Member Name */ +} diff --git a/lib/docs/filters/eigen3/clean_html.rb b/lib/docs/filters/eigen3/clean_html.rb new file mode 100644 index 00000000..e1215403 --- /dev/null +++ b/lib/docs/filters/eigen3/clean_html.rb @@ -0,0 +1,22 @@ +module Docs + class Eigen3 + class CleanHtmlFilter < Filter + + def call + # TODO doc.inner_html = parse + # inner_html = String.new(doc.inner_html).gsub(/
(.*?)<\/div>/m, "\\1\n").gsub(/
(.*?)<\/div>/m, '
\1
') + # doc.inner_html = inner_html + @doc = at_css('#doc-content') + css('#MSearchSelectWindow').remove + css('#MSearchResultsWindow').remove + css('.directory .levels').remove + css('.header .summary').remove + css('.ttc').remove + css('.top').remove + css('.dynheader.closed').remove + css('.permalink').remove + doc + end + end + end +end diff --git a/lib/docs/filters/eigen3/entries.rb b/lib/docs/filters/eigen3/entries.rb new file mode 100644 index 00000000..1aa134bf --- /dev/null +++ b/lib/docs/filters/eigen3/entries.rb @@ -0,0 +1,113 @@ +module Docs + class Eigen3 + class EntriesFilter < Docs::EntriesFilter + def get_type + group = at_css('.title .ingroups') + content = at_css('.contents').content + title = get_title() + downtitle = title.downcase + name = get_name + if content.include?('TODO: write this dox page!') || + content.blank? || content.empty? + return nil + end + if slug.include?('unsupported') + return 'Unsupported' + elsif title.end_with?('module') + return name + elsif not group.nil? and not group.children[-1].nil? and group.children[-1].content != 'Reference' + if group.children[-1].content.end_with?('module') || group.content.include?('Reference') + return group.children[-1].content + else + return 'Chapter: ' + group.children[-1].content + end + elsif slug.start_with?('Topic') || downtitle.end_with?("topics") + return 'Topics' + elsif downtitle.end_with?("class template reference") || downtitle.end_with?("class reference") || downtitle.end_with?("struct reference") + return 'Classes' + elsif downtitle.end_with?("typedefs") + return 'Typedefs' + elsif downtitle.end_with?("namespace reference") + return 'Namespaces' + elsif name.match(/^Eigen::.*::/) + return name.gsub(/^Eigen::/, '').gsub(/::.*/, '') + elsif not group.nil? and not group.children[0].nil? + return 'Chapter: ' + group.children[0].content + # elsif slug.downcase.include?('tutorial') + # return nil + else + return 'Eigen' + end + end + + def get_name + title = get_title().gsub(/[<(].*/, '').gsub(/(Class|Class Template|Namespace|Struct) Reference/, '').strip + end + + def get_title + unless at_css('.title').nil? + group = at_css('.title .ingroups') + title = at_css('.title').content + if not group.nil? + title = title.delete_suffix(group.content) + end + return title.strip + else + return slug + end + end + + + def additional_entries + # return [] if slug.include?('unsupported') + name = get_name() + entries = [] + + css('table.memberdecls').map do |table| + doxygen_type = table.at_css("tr.heading").text.strip + case doxygen_type + when "Functions" + type = name == 'Eigen' ? "Functions" : nil + when "Public Member Functions", "Static Public Member Functions" + type = nil + when "Classes", "Typedefs" + type = "Classes" + when "Variables" + type = "Variables" + else + next + end + + table.css('td.memItemRight,td.memTemplItemRight').map do |node| + if node.content.include?('KLU') + puts(node.content) + end + href = node.at_css("a") + if href.nil? + next + end + + href = node.at_css("a").attr('href') + if href.index("#").nil? then + href += "#" + end + if slug.include?('unsupported') and not href.include?('unsupported') + next + end + + content = node.content + if doxygen_type == "Typedefs" + content = content.sub(/\s*=.*$/, "") + end + if not (name.end_with?('module') || name.end_with?('typedefs')) + content = name + "::" + content + end + + entries << [content, href, type] + end + end + entries + end + end + end +end diff --git a/lib/docs/scrapers/eigen3.rb b/lib/docs/scrapers/eigen3.rb new file mode 100644 index 00000000..641ec72d --- /dev/null +++ b/lib/docs/scrapers/eigen3.rb @@ -0,0 +1,45 @@ +module Docs + class Eigen3 < UrlScraper + self.name = 'Eigen3' + self.type = 'eigen3' + self.slug = 'eigen3' + self.base_url = 'https://eigen.tuxfamily.org/dox/' + self.root_path = 'index.html' + self.initial_paths = [ + "modules.html" + ] + self.release = '3.4.0' + + self.links = { + home: 'https://eigen.tuxfamily.org', + code: 'https://gitlab.com/libeigen/eigen' + } + + html_filters.push 'eigen3/entries', 'eigen3/clean_html' + + # Remove the `clean_text` because Doxygen are actually creating empty + # anchor such as to do anchor link.. and that anchor + # will be removed by clean_text + self.text_filters = FilterStack.new + text_filters.push 'images', 'inner_html', 'attribution' + + + + def get_latest_version(opts) + tags = get_gitlab_tags("https://gitlab.com", "libeigen", "eigen", opts) + tags[0]['name'] + end + + options[:attribution] = <<-HTML + © Eigen.
+ Licensed under the MPL License. + HTML + + # Skip source code since it doesn't provide any useful docs + options[:skip_patterns] = [/_source/, /-members/, /__Reference\.html/, /_chapter\.html/,] + + # TODO: replace cppreference + # options[:replace_urls] = { 'http://en.cppreference.com/w/cpp/' => 'cpp/' } + + end +end diff --git a/public/icons/docs/eigen3/16.png b/public/icons/docs/eigen3/16.png new file mode 100644 index 0000000000000000000000000000000000000000..265a2f49df6d386a0188315a6170e46f02966cbb GIT binary patch literal 1460 zcmZuwdsNd^9KYLs+wZrH!C*YbU}G=FCa@EuZhr5~q1I-R=beDC-Bz4v~;_xoI%VN0Tr z7$g7yB_-LIg>vdFAvkmwMta#%22~lX1^~u3kf$AZRA*NtXITMg5dg5F1Asr#qZRi6 zSR@7Dei;DjUH}5>`zA8A0AR0Xq-C3CF>FChOgz&IYc$%JOs-HUHVG*_p3ojaP(`UL zqv4q@NI}QWQ^E)YNO(ZR0~{9ECGd<==}*Df41Vm8P}G7xJ~=vC%cNo@fjA8ZuMWZK zxKO+R?@s|(94wV8qoQ;(Gc(OCOUKXOppk%%4WVB+6!;bssoh2?Q4)+oj}RuuWJ+T& zxN~!?3+ieLiyaaE*nA0Gt|W=WL}qgu>S29Vady0rMFA=%wmyMYpFolG8GL>?oz99C z(d`nXIEJVdlT^W2w+a#X;;G*Lfq@}>oCz(;IEGGF>oQf2=9!BYc<4r9jR80=4$3AFP&<}5T9V2~ z9!i!naApBs$HK|jaE_iT;lf}JNFx$$2*LosU`UD68QZIE9qx?f`SPZ8kw%j+dFI%G z14BEu_lyp12@^!tXeiw+rLB!cOXg>+t1&kiyxYr!%~?#R0_iGb4X@Pq*F>}=dQ`{= zb+JgR#do+>GdWN+vC-C<$7nW^7a7pn(YoEzBO5Z$?{!`}+_1eV&ZY4*@*t-YK@-^P z7LIhLPxKU>-dTQmY~i8qylN|dP9$BzBIqJ1RZ67G5w@?*e0HGpWPjP&-OiEDOs7>~ z&sK(M*kU!)6+>R<5cM@_CwG;e=`T36+SFSsbL)MQ;zFCO!L6CWTiv4mdEtF--ZG1K zegs~}C!sxdE8V3>(=^bSWt*Ln|62jWZGN6|3heI-BSV!K0){ep{NR<#<3m&9Bt{Nw z|NZ6k!4QDZceXEoZ3WQ{A_K{^-(|Sk?A#ypWoJCgX8>@9=`nT<@8CZgoJB5 zAydMx7Z>-kp*@3M9!F0FApI|%Y=&%8C)RgRTkhVw|Ht&xCl@lhmcl*>`jncEx)L5n zR_o)o#_UJ^!<1W+jG?D7=Vsf4Sf5o4#uTdwzJnvuxPcF@Z5~E3 zK`BNuVeGg%>Q4wpB;hwva&5GEAO36F>rOQbtxasp69 zMZ?ONUAy-T#;W$JH3-n^;)wD3xAqOaZAeJmZzKVeIVm~i!0^cE!Bk6{)s_x2GPCU2 zIfup$zmuDnUr<;C$a9NJO3TLIJ@THTyu!oj0+h>wtCIl&ULS^@7mD) z1{$sZ#!Z{IyxG&cb=&s7{vA(;>Yrhor}NQ^&_+{!qtnsoQdcZ=p$y2Sa(Sdw5h+z= y%VcUrlsZZtE{#=7rG?Z-WB&rw);X&yoBs=tNB<2Fu5v&q0Hl~~#?gebw!Z+DpsNA^ literal 0 HcmV?d00001 diff --git a/public/icons/docs/eigen3/16@2x.png b/public/icons/docs/eigen3/16@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..9cc98d2c1e7941be530d4f3e3496280b59f3de4a GIT binary patch literal 3088 zcmV+r4Da)aP)004R>004l5008;`004mK004C`008P>0026e000+ooVrmw00006 zVoOIv0RI600RN!9r;`8x010qNS#tmY3ljhU3ljkVnw%H_000McNliru<^u^6A|33t zP_+O63jaw&K~z}7tyf!&p2t~!X6F0mJO1ax?*ISmwbyoHCoVoTZK6N}Nn32I6sQV{ zDgiAh7nBPSTu=%U>J3*d5(q(|NWIHNs*(bM0O~5GX;PfTt`i?)d)Is3wg1EJfBMef z9Jp}6wJ1bLeWlTiG_OX_yzevfyf49z+4k)_h%`-(v|9VVTqqQ8Sls-UkmBku{qnDd zzw_Il{U84H#|9OO-KZJMQ=|AAl-simkH$WkB zoId@F>E_mI!F9Yd0IHO*lcs6OixLhQq=81DGpOxEv36O7z#N4k>z^>`hXg zzPD`xC@{cx4Y-tmNeu}=w_Ec#f8jMSX4G8Q{bZwAcL88D8W%XX{)I7PI2_)Og7LrJ zL}^4h_SyyVld}c-CD*3sj%E7!EYrz>D*HGy$V0A8eZwR=SLk2c%GNh_#geDjm(VO9 zBbN8Me!pL}xQ)(S3&RmVRIS#3s$8zE^!q!QOh)$soIQIMgb*4<5nEnf7QXN6n>TOb zi8&rO%XYeYR$kr-=nscHlOO4CSH$W-K}di<(IE_Ivv^Vb|Iw3 zB-JAV%u}t8lsK`t#mv;1$2cya+YcZW!6?uejRnd!Xx*bcjRi)upG^04AbcZ%S*SR zwVWdaKfAVe3yj^%zVUNsKL+sPhgYt>`Qg{U_v+t%`uopgZS5XQADd&C26RSHw_#Bh75*7Woref!ejiIbgsk7IkRu-upXixz#n zXb}*?;JQ8>)4;VWm$9+A32j%fy}5y6xr|n;f=<{l6la}S)KQF)ewLj@N`QRgS72}A(NPT;(UU}{rCwgNkN0{Tle3^cxW|JnR z07`A-P7`nZ$M>OB1b6mCzA;h%K8(dzg~XduidVGO zvjm{rG*=y-!Bpe#a+XhweyA}?^@Z+KovS+JjLVhR@{P|Aa79bLL3NYSCEZ33RAia8d2tm@N4O_!=(pdPkOa?&;k5kezQH4JWI zXE#FKbHHVemCY%3r#T`4#EL8{ke5b@-YnTrsesN!Ha>pH>sLJJf@>c39pk#ijf4Tf zt-e4n(3?$<94%So*!r%32Ka%haiZzbPu4y9fr3LV-=e6OIXdkUI-MG3n^hD!5KX7B zX^x@=6m5!XwrO_%Dto`#X?;@d0GXO{>@av~|(hJp= zL&?)7Mb)GP4h59dyyQ?`@hBXNqEdFz*;hxi)kM2p2hkEFi(s)FQfY95z%~i-Y+9yT z{j>vRXoa`h9&)?vBNu94$+tMA?AH0~gZpAMjuo!<)K0-7LDi+tcqXx+07?lcxhIQ^ zTWGfGsLs^kmdfB>0bmR=%P^fr$kH6HP2kxKu0>!o*aq~eNRyjq4zg<(yAny7HD1qzjC=;bOsO91G5DJ4J;fi(?8}~&lX&UeQg)z zdKuKOpfTHky}f-nQqFad=Gml=Bf5GzB4-c%t=Bsc?HPK>VP`{UuX zk%rN%R`MUU(t`&gP__tCf#bQ*3ye_|3kDp|hFhsY!bhjmgy%Zg?v7FRI4qGPi9!Gb z+_F%fX+Z=5LhK=}lrRWmBzqB3nWIuADA>*;cf0XQ9z`!11{(n4e#u1%aJ8qXYvQoO ziEG;wQfVZD!EiiKgTt~+P)ZP|5}*`>Fi0UG(i8>HhSCJxiG--m;MgPkVOD+gd>137{0hAjUY#p$rorJkr7>OR+YcqT3ro#0e_4MC)Ml;I6}ebLn5NUUOT8 zq4C2JP#TO7*h+)sxyDE+6k~}nh_O435L8VRD+b(x0{}>p1j%#)%Q9d>AWLE#Xju5( zyW6<2TEz$ETi9F9VK3MqN+U5S3`U`pJZjiR69mKmP64?$X{q#BX~dREV3-Vq8PJ4) z5P%Q@?l>@Q2U<(Cs~jo~aO2hnCVRWc!YNE-Xj>WHxv~PwU^v=rfPuoV7Ln!}d++Yt zoNNq#FCC?~(s6p91M*%9@>JkTBC(VzXv;R?7hISohe3eBFocvjM4lpzBgiy@OhXKJ zcd@&(g}v@w+`YSt5|z-S5w0z7S5%O>f3pv8c2*GfKI1G>m6L1-0v^&C`-UL~aV>}UH zT48;dqFgEIU^n>gm22x?dd{htPqy2qZi{^JK(ToJ(s20TN3^=D0AO!tEN}0tuwGTk z`Di*}qu~^$76_??2*yxgpa4wH;8+9%3Sp3fDT%uyfl;KuDM4Kaxcb_;q~YO(@Fp?bYF+EUya25JU!9Rw8huI0@`)3T z6B#qx8D+#NyYj|Xw6YheY006c$%!6Ek_;y~`a?nbQ<+aG7p;!RN_9Kw1#)$os^@Dy z`}*Hs&feg_(WYts!V%wZ6oGgs<;Fav@sI3`o_y32gy_AixB6ePO>zgg-5#nX zlVCqJRMCr6CrVVyGs&S*tb=~2mK$waC>9BVFugQP)VbXdSFi5;?x;h)jCEk~5!3ub zq4jf_5YGg_BG-D4;Qfu@o*L`-)&>9xz?<<%y;Y)f(^Rjo?WrLnsA`Q#t}zCn-Wxw` zv;pkrgm~Lp-(Z0FPhKWV!ZC3HntbYx+4WjbSWWnpw>05UK#GA%GOEigG$ zF)=zbG&(ghD=;`ZFff+7?k@lU03~!qSaf7zbY(hiZ)9m^c>ppnGBPbNGc7PVR539+ eGc-CfIV&(YIxsNrB@1u>0000 Date: Wed, 9 Mar 2022 15:08:28 +0800 Subject: [PATCH 02/10] Fix license version, and some entries issues. --- lib/docs/filters/eigen3/entries.rb | 3 ++- lib/docs/scrapers/eigen3.rb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/docs/filters/eigen3/entries.rb b/lib/docs/filters/eigen3/entries.rb index 1aa134bf..12248a2f 100644 --- a/lib/docs/filters/eigen3/entries.rb +++ b/lib/docs/filters/eigen3/entries.rb @@ -99,7 +99,8 @@ module Docs if doxygen_type == "Typedefs" content = content.sub(/\s*=.*$/, "") end - if not (name.end_with?('module') || name.end_with?('typedefs')) + if not (name.end_with?('module') || name.end_with?('typedefs')) \ + and not content.start_with?("Eigen::") content = name + "::" + content end diff --git a/lib/docs/scrapers/eigen3.rb b/lib/docs/scrapers/eigen3.rb index 641ec72d..c7ed97a6 100644 --- a/lib/docs/scrapers/eigen3.rb +++ b/lib/docs/scrapers/eigen3.rb @@ -32,7 +32,7 @@ module Docs options[:attribution] = <<-HTML © Eigen.
- Licensed under the MPL License. + Licensed under the MPL2 License. HTML # Skip source code since it doesn't provide any useful docs From b4a1491c4e2edcad24a1094b44921b8793581d87 Mon Sep 17 00:00:00 2001 From: xjkdev Date: Wed, 9 Mar 2022 21:35:54 +0800 Subject: [PATCH 03/10] Restructuring entries, duplicated items removed. --- lib/docs/filters/eigen3/entries.rb | 52 +++++++++++++++++------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/lib/docs/filters/eigen3/entries.rb b/lib/docs/filters/eigen3/entries.rb index 12248a2f..3f2a585d 100644 --- a/lib/docs/filters/eigen3/entries.rb +++ b/lib/docs/filters/eigen3/entries.rb @@ -7,34 +7,33 @@ module Docs title = get_title() downtitle = title.downcase name = get_name + + # Remove Empty pages. if content.include?('TODO: write this dox page!') || content.blank? || content.empty? return nil end + if slug.include?('unsupported') return 'Unsupported' - elsif title.end_with?('module') - return name - elsif not group.nil? and not group.children[-1].nil? and group.children[-1].content != 'Reference' - if group.children[-1].content.end_with?('module') || group.content.include?('Reference') - return group.children[-1].content - else - return 'Chapter: ' + group.children[-1].content - end elsif slug.start_with?('Topic') || downtitle.end_with?("topics") - return 'Topics' - elsif downtitle.end_with?("class template reference") || downtitle.end_with?("class reference") || downtitle.end_with?("struct reference") + return 'Topics' + elsif downtitle.end_with?("class template reference") || downtitle.end_with?("class reference") return 'Classes' + elsif downtitle.end_with?("struct reference") + return 'Structs' elsif downtitle.end_with?("typedefs") return 'Typedefs' elsif downtitle.end_with?("namespace reference") - return 'Namespaces' - elsif name.match(/^Eigen::.*::/) - return name.gsub(/^Eigen::/, '').gsub(/::.*/, '') - elsif not group.nil? and not group.children[0].nil? - return 'Chapter: ' + group.children[0].content - # elsif slug.downcase.include?('tutorial') - # return nil + return 'Namespaces' + elsif not group.nil? and group.content.include?('Reference') and (downtitle.end_with?("module") || downtitle.end_with?("modules")) + return "Modules" + elsif not group.nil? + if group.children.length > 0 + return 'Chapter: ' + group.children[-1].content + else + return 'Chapter: ' + group.content + end else return 'Eigen' end @@ -67,11 +66,13 @@ module Docs doxygen_type = table.at_css("tr.heading").text.strip case doxygen_type when "Functions" - type = name == 'Eigen' ? "Functions" : nil + type = "Functions" when "Public Member Functions", "Static Public Member Functions" type = nil - when "Classes", "Typedefs" + when "Classes" type = "Classes" + when "Typedefs" + type = "Typedefs" when "Variables" type = "Variables" else @@ -88,12 +89,17 @@ module Docs end href = node.at_css("a").attr('href') - if href.index("#").nil? then - href += "#" - end - if slug.include?('unsupported') and not href.include?('unsupported') + + if not href.include?("#") and (name == 'Eigen' || type = "Classes") then next end + if slug.include?('unsupported') + if not (href.include?('unsupported') || href.include?('#')) + next + elsif href.include?('#') and not href.include?('unsupported') + href = 'unsupported/' + href + end + end content = node.content if doxygen_type == "Typedefs" From 684d5bb1946fe41e8862f316bdd0dc36a9b961fc Mon Sep 17 00:00:00 2001 From: xjkdev Date: Thu, 10 Mar 2022 17:06:36 +0800 Subject: [PATCH 04/10] Improve color scheme. Known issue: space eaten by Nokogiri. --- assets/stylesheets/pages/_eigen3.scss | 160 ++++---------------------- lib/docs/filters/eigen3/clean_html.rb | 11 +- 2 files changed, 28 insertions(+), 143 deletions(-) diff --git a/assets/stylesheets/pages/_eigen3.scss b/assets/stylesheets/pages/_eigen3.scss index ae5c5f99..3505f0aa 100644 --- a/assets/stylesheets/pages/_eigen3.scss +++ b/assets/stylesheets/pages/_eigen3.scss @@ -1,12 +1,14 @@ ._eigen3 { /* General */ - a.el { - font-weight: bold; - } a { - color: #3D578C; font-weight: normal; - text-decoration: none; + } + + code { + margin: 0 1px; + padding: 1px 4px 2px; + background: var(--labelBackground); + border-radius: 3px; } /* end General */ @@ -24,130 +26,6 @@ } /* end Title */ - /* Fragments */ - div.fragment { - display: table; - padding: 4px; - border: 1px solid #C4CFE5; - } - .fragment { - text-align: left; - direction: ltr; - overflow-x: auto; - overflow-y: hidden; - } - - div.line { - font-family: var(--monoFont); - font-size: 13px; - min-height: 13px; - line-height: 1.0; - text-wrap: unrestricted; - white-space: -moz-pre-wrap; - white-space: -pre-wrap; - white-space: -o-pre-wrap; - white-space: pre-wrap; - word-wrap: break-word; - // text-indent: -53px; - // padding-left: 53px; - padding-bottom: 0px; - margin: 0px; - -webkit-transition-property: background-color, box-shadow; - -webkit-transition-duration: 0.5s; - -moz-transition-property: background-color, box-shadow; - -moz-transition-duration: 0.5s; - -ms-transition-property: background-color, box-shadow; - -ms-transition-duration: 0.5s; - -o-transition-property: background-color, box-shadow; - -o-transition-duration: 0.5s; - transition-property: background-color, box-shadow; - transition-duration: 0.5s; - } - - .fragment { - text-align: left; - direction: ltr; - overflow-x: auto; /*Fixed: fragment lines overlap floating elements*/ - overflow-y: hidden; - } - - div.line::after { - content: "\000A"; - white-space: pre; - } - - a.code, a.code:visited, a.line, a.line:visited { - color: #4665A2; - } - - a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { - color: #4665A2; - } - - /* end Fragements */ - - /* Code Colorization */ - - span.keyword { - color: var(--prismKeyword) - } - - span.keywordtype { - color: var(--prismKeyword) - } - - span.keywordflow { - color: var(--prismKeyword) - } - - span.comment { - color: var(--textColorLight); - } - - span.preprocessor { - color: var(--prismKeyword); - } - - span.stringliteral { - color: var(--prismText); - } - - span.charliteral { - color: var(--prismText); - } - - // span.vhdldigit { - // color: #ff00ff - // } - - // span.vhdlchar { - // color: #000000 - // } - - // span.vhdlkeyword { - // color: #700070 - // } - - // span.vhdllogic { - // color: #ff0000 - // } - - // blockquote { - // background-color: #F7F8FB; - // border-left: 2px solid #9CAFD4; - // margin: 0 24px 0 4px; - // padding: 0 12px 0 16px; - // } - - // blockquote.DocNodeRTL { - // border-left: 0; - // border-right: 2px solid #9CAFD4; - // margin: 0 4px 0 24px; - // padding: 0 16px 0 12px; - // } - - /* end Code Colorization */ - /* Member List */ .memtitle { @@ -189,7 +67,7 @@ .memtemplate { font-size: 80%; - color: #4665A2; + color: var(--prismKeyword); font-weight: normal; margin-left: 9px; } @@ -204,6 +82,12 @@ border: none; } + .memproto a.el, .memberdecls a.el { + // font-weight: bold; + color: var(--prismKeyword); + text-decoration: none; + } + td.mlabels-left, td.mlabels-right { border: none; padding: 0; @@ -244,24 +128,20 @@ } .paramname { - // color: #602020; white-space: nowrap; } span.mlabel { - background-color: #728DC1; - // border-top: 1px solid #5373B4; - // border-left: 1px solid #5373B4; - // border-right: 1px solid #C4CFE5; - // border-bottom: 1px solid #C4CFE5; - text-shadow: none; - color: white; + // text-shadow: none; + font-family: monospace; + color: var(--prismKeyword); margin-right: 4px; padding: 2px 3px; - border-radius: 3px; - font-size: 7pt; + // border-radius: 3px; + font-size: 12px; white-space: nowrap; vertical-align: middle; } /* end Member Name */ + } diff --git a/lib/docs/filters/eigen3/clean_html.rb b/lib/docs/filters/eigen3/clean_html.rb index e1215403..21c2a1e2 100644 --- a/lib/docs/filters/eigen3/clean_html.rb +++ b/lib/docs/filters/eigen3/clean_html.rb @@ -3,10 +3,15 @@ module Docs class CleanHtmlFilter < Filter def call - # TODO doc.inner_html = parse - # inner_html = String.new(doc.inner_html).gsub(/
(.*?)<\/div>/m, "\\1\n").gsub(/
(.*?)<\/div>/m, '
\1
') - # doc.inner_html = inner_html @doc = at_css('#doc-content') + + css("div.fragment").each do |node| + node.css("div.line").each do |node| + node.replace(node.inner_html + "\n") + end + node.replace("
" + node.inner_html + "
") + end + css('#MSearchSelectWindow').remove css('#MSearchResultsWindow').remove css('.directory .levels').remove From add3280261bb2ea2513d67d9cfe99e55c0ebc1f1 Mon Sep 17 00:00:00 2001 From: xjkdev Date: Thu, 10 Mar 2022 17:11:53 +0800 Subject: [PATCH 05/10] Improve code fragment. However, some indents are still eaten. --- lib/docs/filters/eigen3/clean_html.rb | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/docs/filters/eigen3/clean_html.rb b/lib/docs/filters/eigen3/clean_html.rb index 21c2a1e2..0542507e 100644 --- a/lib/docs/filters/eigen3/clean_html.rb +++ b/lib/docs/filters/eigen3/clean_html.rb @@ -4,14 +4,6 @@ module Docs def call @doc = at_css('#doc-content') - - css("div.fragment").each do |node| - node.css("div.line").each do |node| - node.replace(node.inner_html + "\n") - end - node.replace("
" + node.inner_html + "
") - end - css('#MSearchSelectWindow').remove css('#MSearchResultsWindow').remove css('.directory .levels').remove @@ -20,6 +12,16 @@ module Docs css('.top').remove css('.dynheader.closed').remove css('.permalink').remove + + css("div.fragment").each do |node| + node.name = 'pre' + node['data-language'] = 'cpp' + node_content = "" + node.css('div').each do |inner_node| + node_content += inner_node.text + "\n" + end + node.content = node_content + end doc end end From 6448e19c1285c50e0356648a22eda0a909ed7f40 Mon Sep 17 00:00:00 2001 From: xjkdev Date: Fri, 11 Mar 2022 02:22:37 +0800 Subject: [PATCH 06/10] Improve code fragment, fixed space problems. --- lib/docs/filters/eigen3/clean_html.rb | 10 ---------- lib/docs/scrapers/eigen3.rb | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/lib/docs/filters/eigen3/clean_html.rb b/lib/docs/filters/eigen3/clean_html.rb index 0542507e..3cbe6bb2 100644 --- a/lib/docs/filters/eigen3/clean_html.rb +++ b/lib/docs/filters/eigen3/clean_html.rb @@ -12,16 +12,6 @@ module Docs css('.top').remove css('.dynheader.closed').remove css('.permalink').remove - - css("div.fragment").each do |node| - node.name = 'pre' - node['data-language'] = 'cpp' - node_content = "" - node.css('div').each do |inner_node| - node_content += inner_node.text + "\n" - end - node.content = node_content - end doc end end diff --git a/lib/docs/scrapers/eigen3.rb b/lib/docs/scrapers/eigen3.rb index c7ed97a6..30722b2e 100644 --- a/lib/docs/scrapers/eigen3.rb +++ b/lib/docs/scrapers/eigen3.rb @@ -41,5 +41,29 @@ module Docs # TODO: replace cppreference # options[:replace_urls] = { 'http://en.cppreference.com/w/cpp/' => 'cpp/' } + def parse(response) # Hook here because Nokogori removes whitespace from code fragments + last_idx = 0 + # Process nested
s inside code fragment div. + while not (last_idx = response.body.index('
', last_idx)).nil? + # enter code fragment
+ level = 1 + while not (last_idx = response.body.index(/<\/?div/, last_idx+1)).nil? + # skip nested divs inside. + if response.body[last_idx..last_idx+3] == '' + response.body[last_idx..last_idx+5] = '' + end + end + response.body.gsub! /[\r\n\s]*
]*>.*<\/div>[\r\n\s]*/, "" + response.body.gsub! /
(.*?)<\/div>/m, "\\1" + response.body.gsub! '
', '
'
+      super
+    end
   end
 end

From c31d71150fa821a165106634fec0c4540d911e1a Mon Sep 17 00:00:00 2001
From: xjkdev 
Date: Fri, 11 Mar 2022 02:53:20 +0800
Subject: [PATCH 07/10] Clear errors.

Filter empty pages in `process_response?`.
---
 lib/docs/filters/eigen3/entries.rb | 8 +-------
 lib/docs/scrapers/eigen3.rb        | 9 ++++++++-
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/lib/docs/filters/eigen3/entries.rb b/lib/docs/filters/eigen3/entries.rb
index 3f2a585d..48d37caf 100644
--- a/lib/docs/filters/eigen3/entries.rb
+++ b/lib/docs/filters/eigen3/entries.rb
@@ -8,12 +8,6 @@ module Docs
         downtitle = title.downcase
         name = get_name
 
-        # Remove Empty pages.
-        if content.include?('TODO: write this dox page!') ||
-            content.blank? || content.empty?
-          return nil
-        end
-
         if slug.include?('unsupported')
           return 'Unsupported'
         elsif slug.start_with?('Topic') || downtitle.end_with?("topics")
@@ -90,7 +84,7 @@ module Docs
 
             href = node.at_css("a").attr('href')
 
-            if not href.include?("#") and (name == 'Eigen' || type = "Classes") then
+            if not href.include?("#") and (name == 'Eigen' || type == "Classes") then
               next
             end
             if slug.include?('unsupported')
diff --git a/lib/docs/scrapers/eigen3.rb b/lib/docs/scrapers/eigen3.rb
index 30722b2e..e30fe54c 100644
--- a/lib/docs/scrapers/eigen3.rb
+++ b/lib/docs/scrapers/eigen3.rb
@@ -36,7 +36,7 @@ module Docs
     HTML
 
     # Skip source code since it doesn't provide any useful docs
-    options[:skip_patterns] = [/_source/, /-members/, /__Reference\.html/, /_chapter\.html/,]
+    options[:skip_patterns] = [/_source/, /-members/, /__Reference\.html/, /_chapter\.html/, /\.txt/, /\.tgz/]
 
     # TODO: replace cppreference
     # options[:replace_urls] = { 'http://en.cppreference.com/w/cpp/' => 'cpp/' }
@@ -65,5 +65,12 @@ module Docs
       response.body.gsub! '
', '
'
       super
     end
+
+    def process_response?(response)
+      return false unless super
+      # Remove Empty pages.
+      response.body.index(/
[\r\n\s]*<\/div>/m).nil? and \ + response.body.index(/

TODO: write this dox page!<\/p>/).nil? + end end end From efc7512621a72709e001a15d20d829698d984846 Mon Sep 17 00:00:00 2001 From: xjkdev Date: Fri, 11 Mar 2022 04:47:47 +0800 Subject: [PATCH 08/10] Added some missed entries. --- lib/docs/filters/eigen3/entries.rb | 33 +++++++++++++++++++----------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/lib/docs/filters/eigen3/entries.rb b/lib/docs/filters/eigen3/entries.rb index 48d37caf..b80b0e24 100644 --- a/lib/docs/filters/eigen3/entries.rb +++ b/lib/docs/filters/eigen3/entries.rb @@ -61,7 +61,7 @@ module Docs case doxygen_type when "Functions" type = "Functions" - when "Public Member Functions", "Static Public Member Functions" + when "Public Member Functions", "Static Public Member Functions", "Public Types", "Additional Inherited Members" type = nil when "Classes" type = "Classes" @@ -73,20 +73,26 @@ module Docs next end - table.css('td.memItemRight,td.memTemplItemRight').map do |node| - if node.content.include?('KLU') - puts(node.content) - end - href = node.at_css("a") - if href.nil? - next - end + tmp_entries = [] - href = node.at_css("a").attr('href') + table.css('td.memItemRight,td.memTemplItemRight').map do |node_r| + node_l = node_r.parent.at_css('memItemLeft') + if (not node_l.nil? and node_l.text.strip == 'enum') || node_r.content.include?('{') + node_r.css("a").each {|n| tmp_entries << [n.content, n.attr('href')]} + else + n = node_r.at_css("a") + next if n.nil? + tmp_entries << [node_r.content, n.attr('href')] + end + end + tmp_entries.each do |args| + (content, href) = args + next if href.nil? if not href.include?("#") and (name == 'Eigen' || type == "Classes") then next end + if slug.include?('unsupported') if not (href.include?('unsupported') || href.include?('#')) next @@ -95,17 +101,20 @@ module Docs end end - content = node.content if doxygen_type == "Typedefs" content = content.sub(/\s*=.*$/, "") end + if not (name.end_with?('module') || name.end_with?('typedefs')) \ and not content.start_with?("Eigen::") content = name + "::" + content end - + content.gsub! /^\s+/, '' + content.gsub! /\s+,\s+/, ', ' + content.gsub! /\s\s+/, ' ' entries << [content, href, type] end + end entries end From 789afa48b9d91318d9edc4ffee90c13ad47611db Mon Sep 17 00:00:00 2001 From: xjkdev Date: Tue, 15 Mar 2022 00:10:43 +0800 Subject: [PATCH 09/10] Reduced scss file. --- assets/stylesheets/pages/_eigen3.scss | 131 +++++++------------------- 1 file changed, 33 insertions(+), 98 deletions(-) diff --git a/assets/stylesheets/pages/_eigen3.scss b/assets/stylesheets/pages/_eigen3.scss index 3505f0aa..f0145d90 100644 --- a/assets/stylesheets/pages/_eigen3.scss +++ b/assets/stylesheets/pages/_eigen3.scss @@ -1,75 +1,40 @@ ._eigen3 { - /* General */ - a { - font-weight: normal; - } - - code { - margin: 0 1px; - padding: 1px 4px 2px; - background: var(--labelBackground); - border-radius: 3px; - } - /* end General */ + code, span.mlabel { @extend %label; } - /* Title */ - .title { - font: 400 14px/28px ,sans-serif; - font-size: 150%; - font-weight: bold; - margin: 10px 2px; - } + .title { @extend h1; } + /* Breadcrumb Navigation */ div.ingroups { - font-size: 8pt; + font-size: 10pt; text-align: left; } - /* end Title */ - - /* Member List */ + /* Method Title */ .memtitle { - padding: 8px; - border-top: 1px solid; //#A8B8D9; - border-left: 1px solid; //#A8B8D9; - border-right: 1px solid; //#A8B8D9; - border-top-right-radius: 4px; - border-top-left-radius: 4px; - margin-bottom: -1px; - // background-image: url('nav_f.png'); - // background-repeat: repeat-x; - // background-color: #E2E8F2; - line-height: 1.25; - font-weight: 300; - // float: left; - } + padding: 6px; + @extend %heading-box; + } - .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, .memTemplItemLeft, .memTemplItemRight, .memTemplParams { - // background-color: #F9FAFC; + /* begin Method Declearation */ + .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, + .memTemplItemLeft, .memTemplItemRight, .memtemplate, .memTemplParams { border: none; - margin: 4px; - padding: 1px 0 0 8px; - } + padding: 1px 8px 0 8px; + } - td.memTemplParams { - border: none; - white-space: nowrap; + .memtemplate, .memTemplParams { font-size: 80%; + color: var(--prismKeyword); } .memproto, dl.reflist dt { - border-top: 0.5px solid; // #A8B8D9; - border-left: 1px solid; // #A8B8D9; - border-right: 1px solid; // #A8B8D9; - border-bottom: 1px solid; // #A8B8D9; - padding: 6px 0px 6px 0px; + border: 1px solid var(--boxBorder); + margin-bottom: 0.8em; } - .memtemplate { - font-size: 80%; + .memproto a.el, .memberdecls a.el { color: var(--prismKeyword); - font-weight: normal; - margin-left: 9px; + text-decoration: none; } .memdoc { @@ -82,66 +47,36 @@ border: none; } - .memproto a.el, .memberdecls a.el { - // font-weight: bold; - color: var(--prismKeyword); - text-decoration: none; - } - td.mlabels-left, td.mlabels-right { border: none; padding: 0; vertical-align: bottom; } - td.memSeparator { - line-height: 1px; - padding: 0px; + td.mlabels-left { + width: 100%; } - /* end Member List */ - /* Member Name */ - td.mlabels-right { - vertical-align: bottom; + td.memSeparator { + line-height: 1px; padding: 0px; - white-space: nowrap; } table.memname { border: none; margin-left: 6px; margin-top: 0.5em; + th, td { + padding: 1px; + vertical-align: bottom; + } + tr, th, td { + border: none; + } } - table.memname tr{ - border: none; - } - - table.memname th, table.memname td{ - border: none; - padding: 1px; - vertical-align: bottom; - } - - td.mlabels-left { - width: 100%; - } - - .paramname { + .paramname, .mlabels-left, .mlabels-right, .memtemplate, .memTemplParams { white-space: nowrap; - } - - span.mlabel { - // text-shadow: none; - font-family: monospace; - color: var(--prismKeyword); - margin-right: 4px; - padding: 2px 3px; - // border-radius: 3px; - font-size: 12px; - white-space: nowrap; - vertical-align: middle; - } - /* end Member Name */ - + } + /* end Method Declearation */ } From c94aa25e6c0e2cbefa9442d977df9bd11dc74585 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Thu, 31 Mar 2022 08:25:32 +0200 Subject: [PATCH 10/10] eigen3: clean html, scss --- assets/stylesheets/pages/_eigen3.scss | 82 --------------------------- lib/docs/filters/eigen3/clean_html.rb | 6 ++ lib/docs/scrapers/eigen3.rb | 2 +- 3 files changed, 7 insertions(+), 83 deletions(-) diff --git a/assets/stylesheets/pages/_eigen3.scss b/assets/stylesheets/pages/_eigen3.scss index f0145d90..e69de29b 100644 --- a/assets/stylesheets/pages/_eigen3.scss +++ b/assets/stylesheets/pages/_eigen3.scss @@ -1,82 +0,0 @@ -._eigen3 { - code, span.mlabel { @extend %label; } - - .title { @extend h1; } - - /* Breadcrumb Navigation */ - div.ingroups { - font-size: 10pt; - text-align: left; - } - - /* Method Title */ - .memtitle { - padding: 6px; - @extend %heading-box; - } - - /* begin Method Declearation */ - .mdescLeft, .mdescRight, .memItemLeft, .memItemRight, - .memTemplItemLeft, .memTemplItemRight, .memtemplate, .memTemplParams { - border: none; - padding: 1px 8px 0 8px; - } - - .memtemplate, .memTemplParams { - font-size: 80%; - color: var(--prismKeyword); - } - - .memproto, dl.reflist dt { - border: 1px solid var(--boxBorder); - margin-bottom: 0.8em; - } - - .memproto a.el, .memberdecls a.el { - color: var(--prismKeyword); - text-decoration: none; - } - - .memdoc { - padding-left: 6px; - } - - table.mlabels { - padding: 0; - margin: 0; - border: none; - } - - td.mlabels-left, td.mlabels-right { - border: none; - padding: 0; - vertical-align: bottom; - } - - td.mlabels-left { - width: 100%; - } - - td.memSeparator { - line-height: 1px; - padding: 0px; - } - - table.memname { - border: none; - margin-left: 6px; - margin-top: 0.5em; - th, td { - padding: 1px; - vertical-align: bottom; - } - tr, th, td { - border: none; - } - } - - .paramname, .mlabels-left, .mlabels-right, .memtemplate, .memTemplParams { - white-space: nowrap; - } - /* end Method Declearation */ -} diff --git a/lib/docs/filters/eigen3/clean_html.rb b/lib/docs/filters/eigen3/clean_html.rb index 3cbe6bb2..3870566e 100644 --- a/lib/docs/filters/eigen3/clean_html.rb +++ b/lib/docs/filters/eigen3/clean_html.rb @@ -12,6 +12,12 @@ module Docs css('.top').remove css('.dynheader.closed').remove css('.permalink').remove + css('.groupheader').remove + css('.header').remove + css('#details').remove + css('*').each do |node| + node.remove_attribute('class') + end doc end end diff --git a/lib/docs/scrapers/eigen3.rb b/lib/docs/scrapers/eigen3.rb index e30fe54c..7ed3d1eb 100644 --- a/lib/docs/scrapers/eigen3.rb +++ b/lib/docs/scrapers/eigen3.rb @@ -15,7 +15,7 @@ module Docs code: 'https://gitlab.com/libeigen/eigen' } - html_filters.push 'eigen3/entries', 'eigen3/clean_html' + html_filters.push 'eigen3/entries', 'eigen3/clean_html', 'title' # Remove the `clean_text` because Doxygen are actually creating empty # anchor such as to do anchor link.. and that anchor