mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 05:34:58 +02:00
Auto-Generate Documentation for nushell.com (#2139)
* Very rough idea * Remove colour codes * Work on command for generating docs * Quick comment * Use nested collapsible markdown * Refine documentation command * Clippy and rename docs * This layout probably seems best Also moved some code to documentation.rs to avoid making help.rs massive * Delete summaries.md * Add usage strings * Remove static annotations * get_documentation produces value Which will be used like 'help generate_docs | save "something"' The resulting yaml can be passed to a script for generating HTML/MD files in the website * Fix subcommands * DRY code * Address clippy: * Fix links * Clippy lints * Move documentation to more central location
This commit is contained in:
@ -243,12 +243,10 @@ pub fn view_contents(
|
||||
image::FilterType::Lanczos3,
|
||||
);
|
||||
|
||||
let mut count = 0;
|
||||
for pixel in resized_img.pixels() {
|
||||
for (count, pixel) in resized_img.pixels().enumerate() {
|
||||
use image::Pixel;
|
||||
let rgb = pixel.to_rgb();
|
||||
render_context.frame_buffer[count] = (rgb[0], rgb[1], rgb[2]);
|
||||
count += 1;
|
||||
}
|
||||
}
|
||||
image::ColorType::RGB(8) => {
|
||||
@ -266,12 +264,10 @@ pub fn view_contents(
|
||||
image::FilterType::Lanczos3,
|
||||
);
|
||||
|
||||
let mut count = 0;
|
||||
for pixel in resized_img.pixels() {
|
||||
for (count, pixel) in resized_img.pixels().enumerate() {
|
||||
use image::Pixel;
|
||||
let rgb = pixel.to_rgb();
|
||||
render_context.frame_buffer[count] = (rgb[0], rgb[1], rgb[2]);
|
||||
count += 1;
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
@ -351,13 +347,11 @@ pub fn view_contents_interactive(
|
||||
|
||||
render_context.clear();
|
||||
|
||||
let mut count = 0;
|
||||
for pixel in resized_img.pixels() {
|
||||
for (count, pixel) in resized_img.pixels().enumerate() {
|
||||
use image::Pixel;
|
||||
let rgb = pixel.to_rgb();
|
||||
|
||||
render_context.frame_buffer[count] = (rgb[0], rgb[1], rgb[2]);
|
||||
count += 1;
|
||||
}
|
||||
render_context.flush()?;
|
||||
|
||||
|
Reference in New Issue
Block a user