![]() I wanted better Markdown support, and “real” directory listings, including files with various quirky names which for some reason broke werc. Spent an afternoon trying to fix werc but my rc foo wasn’t exactly top notch after two years of not using it. Got tired of it and spent another afternoon writing some bare Python CGI that implements the subset of werc’s functionality that I care about. It’s an uncommon setup but I ended up with it because: I’ve been using the last thing for about 3 years now and I don’t see myself switching any time soon. I want to be able to easily grep through text files, not use some in-browser search function.I have 20 years of notes and reference material there, the only way I can find something is by grepping an otherwise well-organized directory structure. I have a lot of mixed media to organize – it’s not just text, it’s also thousands of PDFs (datasheet, reference manuals etc.), schematics, images, ebooks, whatever.Some of the materials I organize are really long – e.g.Without a “real” file structure behind it, this quickly becomes unmanageable. Editing that in a browser is hell.Įdit: ah, worth pointing out. A lot of this is obtained by distilling notes that I take on paper, but a lot of that doesn’t lend itself easily to wikifying, so I have a bunch of old-fashioned folders around. These are mostly on non-technical subjects, but there’s a bunch of tech stuff in there, too. However, I do go through them periodically and sometimes throw away some of the stuff that I definitely suspect I won’t care about, not even for nostalgia. ![]() If it finds a file called index.html, it just takes that blob of HTML.If it finds a file called index.md, it runs it through markdown and gets out a blob of HTML.If it can’t find a file called index.md or index.html, it generates a “clean” directory listing.Translates the URL into a local path, makes sure said path is not /etc/passwd or something similarly harmful, and then.That being said, it’s a completely trivial, 200-line CGI script that basically: It’s a little quirky and has a bunch of hardcoded things that probably make it useless for others, but I’ll see if I can find some time to clean it up. If it’s anything else, it just lets you download it.md file, it builds the sidebar links (as above) and renders that + whatever it gets by running the file through markdown html file, it just builds the sidebar links (as above) and renders that + the HTML And finally it concatenates this with the blob of HTML above and drops it out.It then scans the directory for files and folders with names other than index.md and index.html, and builds the sidebar. It probably takes less time to write one from scratch than to figure out how to use my 200 lines of poor-taste, uncomented Python. I haven’t used it heavily myself but I have got it set up and it appears the focus is on backlinking rather than folder heirarchy. ![]() See, it comes out just fine.You’d presumably need to add the backlink syntax which I believe is something like ] as well as any possible metadata like tags but just a #+ TITLE should be enough. (In my follow-up post, I create a new reply, go into HTML mode, paste this code below into the edit area, and then post. My guess is that I created it using Moodle's editor, went into HTML mode, copy and pasted the code. I will post mine below as a picture, and below as "text." It looks like it is HTML-ish, and since I created it a while ago, I can't remember how I did this. ![]() The contents of my footer I create in Site Admin / Appearance / Additional HTML, Before BODY is closed. Some of the "styling" of the footer I show in my CSS code, above. jpg, but I left off the "g" so that moodle doesn't interpret and display the graphic.) * Fix footer positioning problem - Mary */ Then, to reposition and improve the footer, I use custom Raw SCSS in the Boost theme, as shown below. I use several techniques on my own Moodle to produce a subtle, and what I consider a better-formatted footer (see the graphic.) I am using Moodle 3.5, but I think these techniques will work for earlier versions of Moodle (and Boost.)įor my own copyright and email notice, I added these in Site Admin, Additional HTML, Before BODY is closed.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |