How to use pts_md_template class

Best Phoronix-test-suite code snippet using pts_md_template

dump_documentation.php

Source:dump_documentation.php Github

copy

Full Screen

...167 $body->appendChild($p);168 }169 $dom->saveHTMLFile(PTS_PATH . 'documentation/stubs/55_virtual_suites.html');170 // Load the HTML documentation171 $md = new pts_md_template();172 foreach(pts_file_io::glob(PTS_PATH . 'documentation/stubs/*_*.html') as $html_file)173 {174 $pdf->html_to_pdf($html_file);175 $html_doc->html_to_html($html_file);176 $md->html_to_md($html_file);177 }178 if(!is_writable(PTS_PATH . 'documentation/'))179 {180 echo PHP_EOL . 'Not writable: ' . PTS_PATH . 'documentation/';181 }182 else183 {184 $pdf_file = PTS_PATH . 'documentation/phoronix-test-suite.pdf';185 $pdf->Output($pdf_file);186 $html_doc->Output(PTS_PATH . 'documentation/phoronix-test-suite.html');187 echo PHP_EOL . 'Saved To: ' . $pdf_file . PHP_EOL . PHP_EOL;188 $md->Output(PTS_PATH . 'documentation/phoronix-test-suite.md');189 // Also re-generate the man page190 $man_page = '.TH phoronix-test-suite 1 "www.phoronix-test-suite.com" "' . PTS_VERSION . '"' . PHP_EOL . '.SH NAME' . PHP_EOL;191 $man_page .= 'phoronix-test-suite \- The Phoronix Test Suite is an extensible open-source platform for performing testing and performance evaluation.' . PHP_EOL;192 $man_page .= '.SH SYNOPSIS' . PHP_EOL . '.B phoronix-test-suite [options]' . PHP_EOL . '.br' . PHP_EOL . '.B phoronix-test-suite benchmark [test | suite]' . PHP_EOL;193 $man_page .= '.SH DESCRIPTION' . PHP_EOL . pts_documentation::basic_description() . PHP_EOL;194 $man_page .= '.SH OPTIONS' . PHP_EOL . '.TP' . PHP_EOL;195 foreach($pts_options as $section => &$contents)196 {197 if(empty($contents))198 {199 continue;200 }201 $man_page .= '.SH ' . strtoupper($section) . PHP_EOL;202 sort($contents);203 foreach($contents as &$option)204 {205 $man_page .= '.B ' . trim($option[0] . ' ' . (!empty($option[1]) && is_array($option[1]) ? implode(' ', $option[1]) : null)) . PHP_EOL . $option[2] . PHP_EOL . '.TP' . PHP_EOL;206 }207 }208 $man_page .= '.SH SEE ALSO' . PHP_EOL . '.B Websites:' . PHP_EOL . '.br' . PHP_EOL . 'https://www.phoronix-test-suite.com/' . PHP_EOL . '.br' . PHP_EOL . 'https://commercial.phoronix-test-suite.com/' . PHP_EOL . '.br' . PHP_EOL . 'https://www.openbenchmarking.org/' . PHP_EOL . '.br' . PHP_EOL . 'https://www.phoronix.com/' . PHP_EOL . '.br' . PHP_EOL . 'https://www.phoronix.com/forums/' . PHP_EOL;209 $man_page .= '.SH AUTHORS' . PHP_EOL . 'Copyright 2008 - ' . date('Y') . ' by Phoronix Media, Michael Larabel.' . PHP_EOL . '.TP' . PHP_EOL;210 file_put_contents(PTS_PATH . 'documentation/man-pages/phoronix-test-suite.1', $man_page);211 }212 // simple README213 $readme = '# Phoronix Test Suite ' . PTS_VERSION . PHP_EOL . 'https://www.phoronix-test-suite.com/' . PHP_EOL . PHP_EOL;214 $readme .= pts_documentation::basic_description() . PHP_EOL . PHP_EOL;215 $readme .= pts_file_io::file_get_contents(PTS_PATH . 'documentation/stubs/readme-basics.txt') . PHP_EOL . PHP_EOL;216 $readme = wordwrap($readme, 80, PHP_EOL);217 file_put_contents(PTS_PATH . 'README.md', $readme);218 // Phoromatic Documentation219 $pdf = new pts_pdf_template(pts_core::program_title(false), 'Phoromatic Documentation');220 $html_doc = new pts_html_template(pts_core::program_title(false), 'Phoromatic Documentation');221 $pdf->AddPage();222 $pdf->Image(PTS_CORE_STATIC_PATH . 'images/pts-308x160.png', 69, 85, 73, 38, 'PNG', 'https://www.phoronix-test-suite.com/');223 $pdf->Ln(120);224 $pdf->WriteStatement('www.phoronix-test-suite.com', 'C', 'https://www.phoronix-test-suite.com/');225 $pdf->Ln(15);226 $pdf->Image(PTS_CORE_STATIC_PATH . 'images/phoromatic-390x56.png', 55, 250, 0, 0, 'PNG', 'https://www.phoronix-test-suite.com/');227 //$pdf->Image(PTS_CORE_STATIC_PATH . 'images/phoromatic-390x56.png', 69, 85, 73, 38, 'PNG', 'https://www.phoromatic.com/');228 $pdf->WriteBigHeaderCenter(pts_core::program_title(true));229 $pdf->WriteHeaderCenter('Phoromatic User Manual');230 $pdf->html_to_pdf(PTS_PATH . 'documentation/phoromatic.html');231 $pdf_file = PTS_PATH . 'documentation/phoromatic.pdf';232 $pdf->Output($pdf_file);233 echo PHP_EOL . 'Saved To: ' . $pdf_file . PHP_EOL . PHP_EOL;234 $md = new pts_md_template();235 $md->html_to_md(PTS_PATH . 'documentation/phoromatic.html');236 $md->Output(PTS_PATH . 'documentation/phoromatic.md');237 $md = new pts_md_template();238 $md->html_to_md(PTS_PATH . 'documentation/phoronix-test-suite-windows.html');239 $md->Output(PTS_PATH . 'documentation/phoronix-test-suite-window.md');240 }241}242?>...

Full Screen

Full Screen

pts_md_template

Using AI Code Generation

copy

Full Screen

1require_once('pts_md_template.php');2$test = new pts_md_template();3$test->set_title("Test");4$test->set_description("This is a description");5$test->set_version("1.0");6$test->set_author("Author");7$test->set_license("License");8$test->set_test_type("Test Type");9$test->set_test_category("Test Category");10$test->set_result_proportion("Result Proportion");11$test->set_result_scale("Result Scale");12$test->set_result_format("Result Format");13$test->set_result_pass("Result Pass");14$test->set_result_fail("Result Fail");15$test->set_result_error("Result Error");16$test->set_result_min("Result Min");17$test->set_result_max("Result Max");18$test->set_result_default("Result Default");19$test->set_result_precision("Result Precision");20$test->set_result_comparison("Result Comparison");21$test->set_result_explanation("Result Explanation");22$test->set_result_notes("Result Notes");23$test->set_result_support("Result Support");24$test->set_result_sensitivity("Result Sensitivity");25$test->set_result_see_also("Result See Also");26$test->set_result_example("Result Example");27$test->set_result_message("Result Message");28$test->set_result_warning("Result Warning");29$test->set_result_save("Result Save");30$test->set_result_display("Result Display");31$test->set_result_graph("Result Graph");32$test->set_result_graph_min("Result Graph Min");33$test->set_result_graph_max("Result Graph Max");34$test->set_result_graph_scale("Result Graph Scale");35$test->set_result_graph_scale_type("Result Graph Scale Type");36$test->set_result_graph_scale_divisions("Result Graph Scale Divisions");37$test->set_result_graph_scale_division_size("Result Graph Scale Division Size");38$test->set_result_graph_scale_division_label("Result Graph Scale Division Label");39$test->set_result_graph_scale_division_color("Result Graph Scale Division Color");40$test->set_result_graph_scale_division_style("Result Graph Scale Division Style");41$test->set_result_graph_scale_division_size("Result Graph Scale Division Size");42$test->set_result_graph_scale_division_label("Result Graph Scale Division Label");43$test->set_result_graph_scale_division_color("Result Graph Scale Division Color");

Full Screen

Full Screen

pts_md_template

Using AI Code Generation

copy

Full Screen

1$pts_md_template = new pts_md_template();2$pts_md_template->set_title("Test Name");3$pts_md_template->set_description("Test Description");4$pts_md_template->set_result_scale("Score");5$pts_md_template->set_result_unit("Score");6$pts_md_template->set_result_format("%s");7$pts_md_template->set_result_proportion("HIGHER_IS_BETTER");8$pts_md_template->set_result_pass_criteria("80");9$pts_md_template->set_result_graph_type("BAR_GRAPH");10$pts_md_template->set_result_graph_title("Test Name");11$pts_md_template->set_result_graph_min_value("0");12$pts_md_template->set_result_graph_max_value("100");13$pts_md_template->set_result_graph_legend("Score");

Full Screen

Full Screen

pts_md_template

Using AI Code Generation

copy

Full Screen

1$pts_md_template = new pts_md_template();2$pts_md_template->build_template();3$pts_md_template = new pts_md_template();4$pts_md_template->build_template();5$pts_md_template = new pts_md_template();6$pts_md_template->build_template();7$pts_md_template = new pts_md_template();8$pts_md_template->build_template();9$pts_md_template = new pts_md_template();10$pts_md_template->build_template();11$pts_md_template = new pts_md_template();12$pts_md_template->build_template();13$pts_md_template = new pts_md_template();14$pts_md_template->build_template();15$pts_md_template = new pts_md_template();16$pts_md_template->build_template();

Full Screen

Full Screen

pts_md_template

Using AI Code Generation

copy

Full Screen

1require_once('pts_md_template.php');2$obj = new pts_md_template();3$obj->set_name("test2");4$obj->set_version("1.0");5$obj->set_license("GPL");6$obj->set_author("Phoronix");7$obj->set_description("test2");8$obj->set_test_type("Benchmark");9$obj->set_test_category("Graphics");10$obj->set_test_profile_type("BENCHMARK");11$obj->set_test_suite("test2");12$obj->set_display_format("BAR_GRAPH");13$obj->set_result_proportion("HIGHER_IS_BETTER");14$obj->set_result_scale("1:1");15$obj->set_result_precision("2");16$obj->set_result_unit("FPS");17$obj->set_result_identifier("Frames Per Second");18$obj->set_result_comparison("GEOMETRIC_MEAN");19$obj->set_result_value_type("FLOAT");20$obj->set_result_buffer("LINE_BUFFER");21$obj->set_result_buffer_size("10");22$obj->set_result_buffer_save("FALSE");23$obj->set_result_buffer_save_location("/home/pts");24$obj->set_result_buffer_save_format("CSV");25$obj->set_result_buffer_save_delimiter("TAB");26$obj->set_result_buffer_save_enclosure("DOUBLE_QUOTE");27$obj->set_result_buffer_save_escape("BACKSLASH");28$obj->set_result_buffer_save_line_ending("UNIX");29$obj->set_result_buffer_save_include_headers("TRUE");30$obj->set_result_buffer_save_include_timestamp("TRUE");31$obj->set_result_buffer_save_include_result_scale("TRUE");32$obj->set_result_buffer_save_include_result_unit("TRUE");33$obj->set_result_buffer_save_include_result_identifier("TRUE");34$obj->set_result_buffer_save_include_result_comparison("TRUE");35$obj->set_result_buffer_save_include_result_value_type("TRUE");36$obj->set_result_buffer_save_include_result_buffer("TRUE");37$obj->set_result_buffer_save_include_result_buffer_size("TRUE");38$obj->set_result_buffer_save_include_result_buffer_save("TRUE");39$obj->set_result_buffer_save_include_result_buffer_save_location("TRUE");40$obj->set_result_buffer_save_include_result_buffer_save_format("TRUE");41$obj->set_result_buffer_save_include_result_buffer_save_delimiter("TRUE");42$obj->set_result_buffer_save_include_result_buffer_save_enclosure("TRUE");

Full Screen

Full Screen

pts_md_template

Using AI Code Generation

copy

Full Screen

1require_once('pts_md_template.php');2$md = new pts_md_template();3$md->set_title('My Test');4$md->set_description('This is a test');5$md->set_version('1.0');6$md->set_date('2011-02-28');7$md->set_author('John Doe');8$md->set_author_email('

Full Screen

Full Screen

pts_md_template

Using AI Code Generation

copy

Full Screen

1include('pts_md_template.php');2$column_titles = array('Name', 'Email', 'Age', 'Address');3$column_widths = array('30%', '25%', '15%', '30%');4$column_alignments = array('left', 'left', 'right', 'left');5$md_table = new pts_md_template("Table Title", $column_titles, $column_widths, $column_alignments);6$md_table->add_row(array('John Doe', '

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Phoronix-test-suite automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Most used methods in pts_md_template

Run Selenium Automation Tests on LambdaTest Cloud Grid

Trigger Selenium automation tests on a cloud-based Grid of 3000+ real browsers and operating systems.

Test now for Free

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful