From: Alexandre Terrasa Date: Mon, 14 May 2018 18:12:08 +0000 (-0400) Subject: contrib/sort_downloads: protect README doc units X-Git-Url: http://nitlanguage.org contrib/sort_downloads: protect README doc units Signed-off-by: Alexandre Terrasa --- diff --git a/contrib/sort_downloads/README.md b/contrib/sort_downloads/README.md index 0a42ca2..f366b8c 100644 --- a/contrib/sort_downloads/README.md +++ b/contrib/sort_downloads/README.md @@ -46,18 +46,20 @@ Your old hard drive is full and you bought a new one. You now want to copy your If you need more than one configuration, let's say to sort videos, you can use Nit class refinement. Create a separate Nit module next to `src/sort_downloads.nit` named `sort_videos.nit` and use something like: - #!/usr/bin/env nit +~~~nitish +#!/usr/bin/env nit - import sort_downloads +import sort_downloads - redef class Config - redef fun source_dir do return "/media/new-drive/video-downloads" - redef fun dest_dir do return "/media/new-drive/Videos" - redef fun regex_source_dirs do return ["~/Videos", dest_dir] - redef fun elapsed_days do return 0 - end +redef class Config + redef fun source_dir do return "/media/new-drive/video-downloads" + redef fun dest_dir do return "/media/new-drive/Videos" + redef fun regex_source_dirs do return ["~/Videos", dest_dir] + redef fun elapsed_days do return 0 +end - super # this executes the program +super # this executes the program +~~~ ## Sort only older files