123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <?xml version="1.0" encoding="utf-8"?>
- <!--
-
- h t t :: / / t /
- h t t :: // // t //
- h ttttt ttttt ppppp sssss // // y y sssss ttttt //
- hhhh t t p p s // // y y s t //
- h hh t t ppppp sssss // // yyyyy sssss t //
- h h t t p s :: / / y .. s t .. /
- h h t t p sssss :: / / yyyyy .. sssss t .. /
-
- <https://y.st./>
- Copyright © 2015 Alex Yst <mailto:copyright@y.st>
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <https://www.gnu.org./licenses/>.
- -->
- <!DOCTYPE html>
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <base href="https://y.st./en/weblog/2015/12-December/27.xhtml" />
- <title>I think that my website cleaning is finally finished <https://y.st./en/weblog/2015/12-December/27.xhtml></title>
- <link rel="icon" type="image/png" href="/link/CC_BY-SA_4.0/y.st./icon.png" />
- <link rel="stylesheet" type="text/css" href="/link/basic.css" />
- <link rel="stylesheet" type="text/css" href="/link/site-specific.css" />
- <script type="text/javascript" src="/script/javascript.js" />
- <meta name="viewport" content="width=device-width" />
- </head>
- <body>
- <nav>
- <p>
- <a href="/en/">Home</a> |
- <a href="/en/a/about.xhtml">About</a> |
- <a href="/en/a/contact.xhtml">Contact</a> |
- <a href="/a/canary.txt">Canary</a> |
- <a href="/en/URI_research/"><abbr title="Uniform Resource Identifier">URI</abbr> research</a> |
- <a href="/en/opinion/">Opinions</a> |
- <a href="/en/coursework/">Coursework</a> |
- <a href="/en/law/">Law</a> |
- <a href="/en/a/links.xhtml">Links</a> |
- <a href="/en/weblog/2015/12-December/27.xhtml.asc">{this page}.asc</a>
- </p>
- <hr/>
- <p>
- Weblog index:
- <a href="/en/weblog/"><abbr title="American Standard Code for Information Interchange">ASCII</abbr> calendars</a> |
- <a href="/en/weblog/index_ol_ascending.xhtml">Ascending list</a> |
- <a href="/en/weblog/index_ol_descending.xhtml">Descending list</a>
- </p>
- <hr/>
- <p>
- Jump to entry:
- <a href="/en/weblog/2015/03-March/07.xhtml"><<First</a>
- <a rel="prev" href="/en/weblog/2015/12-December/26.xhtml"><Previous</a>
- <a rel="next" href="/en/weblog/2015/12-December/28.xhtml">Next></a>
- <a href="/en/weblog/latest.xhtml">Latest>></a>
- </p>
- <hr/>
- </nav>
- <header>
- <h1>I think that my website cleaning is finally finished</h1>
- <p>Day 00295: Sunday, 2015 December 27</p>
- </header>
- <p>
- It turns out that my efforts to create a <abbr title="PHP: Hypertext Preprocessor">PHP</abbr>-based Web page downloader for my onion search engine may have been wasted.
- There is already a library available that might have worked.
- <a href="https://docs.guzzlephp.org/en/latest/">Guzzle</a> is available under the <abbr title="Massachusetts Institute of Technology">MIT</abbr> license and has even been coded to be appropriately-namespaced.
- I will use my own classes that I built yesterday for three reasons though, despite their dependency on <code>php5-curl</code>.
- First, I know that my classes work.
- Guzzle probably works, but there is a chance that it would fail to appropriately proxy the <abbr title="Domain Name System">DNS</abbr> queries like <a href="https://php.net/manual/en/function.file-get-contents.php"><code>file_get_contents()</code></a> does.
- Second, I know <strong>*how*</strong> my classes work.
- I know how to use my classes, as I had to figure out how to build them, but I will need to start learning from scratch if I use Guzzle instead.
- I would like to get my onion search engine up as soon as is feasible, so learning how to use other projects that I do not need is low on my priority list.
- But third, and perhaps most importantly, I think that my classes can download files from more <abbr title="Uniform Resource Identifier">URI</abbr>s than Guzzle.
- Guzzle works over <abbr title="Hypertext Transfer Protocol">HTTP</abbr> and its encrypted counterpart, <abbr title="Hypertext Transfer Protocol Secure">HTTPS</abbr>.
- My classes however, are backed by <abbr title="Client for URLs/Client URL Request Library/Curl URL Request Library">cURL</abbr>.
- I have not looked into all the protocols that <abbr title="Client for URLs/Client URL Request Library/Curl URL Request Library">cURL</abbr> can use, but I did see <a href="https://en.wikipedia.org/wiki/File_Transfer_Protocol"><abbr title="File Transfer Protocol">FTP</abbr></a>, <a href="https://en.wikipedia.org/wiki/File_Transfer_Protocol#FTPS"><abbr title="File Transfer Protocol Secure">FTPS</abbr></a>, and <a href="https://en.wikipedia.org/wiki/Gopher_%28protocol%29">Gopher</a> on the list, all three of which might be useful if I decide to expand my search engine to include more than just <abbr title="Hypertext Transfer Protocol">HTTP</abbr> and <abbr title="Hypertext Transfer Protocol Secure">HTTPS</abbr>.
- </p>
- <p>
- I fixed up the hyperlinks in the weblog navigation bar that cause all weblog pages to be recompiled daily.
- My first thought today was to keep the most recent weblog entry at <code>/en/weblog/latest.xhtml</code> <strong>*instead of*</strong> in its appropriate place.
- This would have fixed the issue while also not causing duplicated content across the website.
- However, it would mean that weblog entries would end up pointing their "Next>" hyperlink at this address for a day, meaning that each entry page would be compiled three times: once on the first day it was posted (with no "Next>" or "Latest>>" links), once on the second day (with both links added and pointing to <code>/en/weblog/latest.xhtml</code>), and once in its final form (with the "Next>" hyperlink modified to point to the appropriate page).
- I decided instead to deal with the duplicate content and just copy the latest entry to <code>/en/weblog/latest.xhtml</code>.
- Each entry is still compiled twice, once with the "Next>" and "Latest>>" links and once without.
- </p>
- <p>
- Having finished what I believe to be the last of my urgent website maintenance, I decided to clean up my <a href="https://notabug.org/y.st./php"><abbr title="PHP: Hypertext Preprocessor">PHP</abbr> library</a> a bit.
- The problem was that it was too specific to me.
- Parts of it were not generalized enough.
- </p>
- <p>
- First, I fixed up the <code>\st\y\abbr</code> class.
- This class used to hold abbreviations that I use on my websites.
- This set of abbreviations can never be completed though, due to clashes such as "GB" (United Kingdom of Great Britain and Northern Ireland) and "GB" (gigabyte).
- Instead, it basically is just a list of all the abbreviations that I have used at least once on one of my websites since <a href="https://authorednansyxlu.onion/en/weblog/2015/03-March/07.xhtml">2015-03-07</a>.
- That set is extremely arbitrary and will likely not fit most people's needs, so it should not be built into a reusable class.
- I have now stripped all abbreviations from the class itself, and instead programmed some simple logic that allows the class to parse the needed abbreviations out of either a file or an array.
- Due to the data format that I want to use, abbreviations needed to be accessed via keys that are sometimes not allowed in function names, meaning that my old method of accessing abbreviations would not do.
- I reprogrammed the class to allow access via array-like indexes, which broke every page that uses abbreviations on both of my websites.
- It was a major pain to go through every page fixing all the errors, but two good things came of this.
- First, instead of containing arbitrary abbreviations that may or may not be of help, the class now allows the user to specify any abbreviation that is needed.
- Second, the <abbr title="PHP: Hypertext Preprocessor">PHP</abbr> library will not have to be updated with each little abbreviation I need to add.
- As an added bonus, setting up alternate abbreviation translations for use on other-language sections of the website should be a breeze now, when the time comes.
- It will take some time getting used to the new abbreviation syntax that I need to use in my weblog entries though.
- </p>
- <p>
- Second, I worked on tuning up the <code>\st\y\weblogentry()</code> function.
- This function treats an arbitrary date that is related only to this one weblog as somehow special.
- It needed to be generalized better.
- This was impossible to accomplish cleanly in a function, so I upgraded it to a class.
- The function name has been bothering me for a while, as it does not match the style of my other function/class names, so because changing the function into a class would break all direct references to it anyway, I changed the name to <code>\st\y\day_number</code>.
- This class now takes a year, month, day, and zero-padding level to use when instantiating.
- Due to a glitch in the initial programming of this class, many pages may have been recompiled needlessly.
- However, once I had the error fixed, only the reference to the old function in the main compile script needed to be fixed.
- No other direct references to that function exist, and an object of this class is a drop-in replacement for the string variable I had been using to call the function previously.
- I have a feeling that this class will need to be modified slightly to accommodate translations to other languages later.
- </p>
- <p>
- Greatly needing a break, I took a short walk looking for an open Wi-Fi connection that I could use to root my secondary device.
- I quickly found that because the Web browser was disabled, I could not use captive portals.
- This ruled out practically ruled out all the open Wi-Fi connections that are run by businesses and <strong>*want*</strong> guests using their Wi-Fi as a way to draw in customers, so I instead focused my efforts on finding a residential hot spot that someone had not bothered to secure.
- After all, if they really wanted people to stay off their Wi-Fi connection, they would have put in place either a password or a <abbr title="media access control">MAC</abbr> address whitelist.
- It is not hard to do either.
- Sure enough, I found one, and quickly rooted the device.
- I will save further work on the device for another day, quite possibly tomorrow.
- </p>
- <p>
- My <a href="/a/canary.txt">canary</a> still sings the tune of freedom and transparency.
- </p>
- <hr/>
- <p>
- Copyright © 2015 Alex Yst;
- You may modify and/or redistribute this document under the terms of the <a rel="license" href="/license/gpl-3.0-standalone.xhtml"><abbr title="GNU's Not Unix">GNU</abbr> <abbr title="General Public License version Three or later">GPLv3+</abbr></a>.
- If for some reason you would prefer to modify and/or distribute this document under other free copyleft terms, please ask me via email.
- My address is in the source comments near the top of this document.
- This license also applies to embedded content such as images.
- For more information on that, see <a href="/en/a/licensing.xhtml">licensing</a>.
- </p>
- <p>
- <abbr title="World Wide Web Consortium">W3C</abbr> standards are important.
- This document conforms to the <a href="https://validator.w3.org./nu/?doc=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2015%2F12-December%2F27.xhtml"><abbr title="Extensible Hypertext Markup Language">XHTML</abbr> 5.1</a> specification and uses style sheets that conform to the <a href="http://jigsaw.w3.org./css-validator/validator?uri=https%3A%2F%2Fy.st.%2Fen%2Fweblog%2F2015%2F12-December%2F27.xhtml"><abbr title="Cascading Style Sheets">CSS</abbr>3</a> specification.
- </p>
- </body>
- </html>
|