From 32d1cae0e4c8b37aec2fcd58dcc281f16364e6f9 Mon Sep 17 00:00:00 2001 From: Christian Cleberg Date: Sun, 2 Aug 2026 15:29:32 -0500 Subject: convert readme to nfo; convert docs to txt; relicense to 0bsd --- CODE_OF_CONDUCT.md | 15 -------- CODE_OF_CONDUCT.txt | 15 ++++++++ CONTRIBUTING.md | 15 -------- CONTRIBUTING.txt | 15 ++++++++ LICENSE.md | 36 +++++++------------ README.md | 100 ---------------------------------------------------- README.nfo | 51 +++++++++++++++++++++++++++ 7 files changed, 93 insertions(+), 154 deletions(-) delete mode 100644 CODE_OF_CONDUCT.md create mode 100644 CODE_OF_CONDUCT.txt delete mode 100644 CONTRIBUTING.md create mode 100644 CONTRIBUTING.txt delete mode 100644 README.md create mode 100644 README.nfo diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md deleted file mode 100644 index e16a1bf..0000000 --- a/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,15 +0,0 @@ -# Code of Conduct - -## Summary - -Be logical and act in a way that represents your values. The following values -are inherent for this project: - -- Respect -- Patience -- Friendliness - -## Reporting - -If you find anything that goes against this code of conduct or is offensive, -please report it to the maintainers. diff --git a/CODE_OF_CONDUCT.txt b/CODE_OF_CONDUCT.txt new file mode 100644 index 0000000..e16a1bf --- /dev/null +++ b/CODE_OF_CONDUCT.txt @@ -0,0 +1,15 @@ +# Code of Conduct + +## Summary + +Be logical and act in a way that represents your values. The following values +are inherent for this project: + +- Respect +- Patience +- Friendliness + +## Reporting + +If you find anything that goes against this code of conduct or is offensive, +please report it to the maintainers. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 695e170..0000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,15 +0,0 @@ -# Contributing - -## Development - -This project really only has a few guidelines to follow: - -- Focus on the end-user's privacy and experience. -- Keep the codebase minimal and, ideally, package-free. -- Follow the [PEP 8](https://peps.python.org/pep-0008/) style guide. - -## Reporting Bugs - -I don't use a report template, so just remember to give as much detail as -possible about the bug you're experiencing. If there's not enough detail -reported, emails will need to be exchanged before anyone can look into the bug. diff --git a/CONTRIBUTING.txt b/CONTRIBUTING.txt new file mode 100644 index 0000000..695e170 --- /dev/null +++ b/CONTRIBUTING.txt @@ -0,0 +1,15 @@ +# Contributing + +## Development + +This project really only has a few guidelines to follow: + +- Focus on the end-user's privacy and experience. +- Keep the codebase minimal and, ideally, package-free. +- Follow the [PEP 8](https://peps.python.org/pep-0008/) style guide. + +## Reporting Bugs + +I don't use a report template, so just remember to give as much detail as +possible about the bug you're experiencing. If there's not enough detail +reported, emails will need to be exchanged before anyone can look into the bug. diff --git a/LICENSE.md b/LICENSE.md index 68a49da..419813e 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,24 +1,12 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or -distribute this software, either in source code form or as a compiled -binary, for any purpose, commercial or non-commercial, and by any -means. - -In jurisdictions that recognize copyright laws, the author or authors -of this software dedicate any and all copyright interest in the -software to the public domain. We make this dedication for the benefit -of the public at large and to the detriment of our heirs and -successors. We intend this dedication to be an overt act of -relinquishment in perpetuity of all present and future rights to this -software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -For more information, please refer to +Copyright (C) 2026 krazy warez + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index c7a2d99..0000000 --- a/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# hn - -hn is a simple front-end alternative for Hacker News, focusing on privacy and -simplicity. - -## Getting Started - -These instructions will get you a copy of the project up and running on your -local machine for development and testing purposes. See deployment for notes on -how to deploy the project on a live system. - -### Prerequisites - -- A web server (e.g., Nginx or Apache) -- PHP (>= v8.0) -- Optional: minify - -### Installing - -Install the dependencies, using the web server of your choice: - -``` -sudo apt install nginx-full php php-cgi php-fpm minify -``` - -Clone the repo: - -``` -git clone $repo_url -``` - -If you need to minify CSS changes: - -``` -# executed in the top-level `hn` dir -minify -o static/styles.min.css static/styles.css -``` - -## Deployment - -Deployment is as easy as copying the code to your webroot. No special packages -or tools required. - -To deploy, ensure you have a publicly-available web server and configure it to -fallback with all errors to the `index.php` file rather than returning a `404` -error. - -For nginx, include the following snippet in your website's conf file: - -```conf -location / { - # First attempt to serve request as file, then - # as directory then fall back to index.php - try_files $uri $uri/ /index.php?$args; -} -``` - -For Apache, you can include the following snippet in a `.htaccess` file within -the directory you're serving the PHP file from: - -```conf -FallbackResource /index.php -``` - -## Built With - -* [PHP](https://www.php.net/) - The scripting language -* [HTML](https://html.spec.whatwg.org/multipage/) - The markup language -* [minify](https://github.com/tdewolff/minify/tree/master/cmd/minify) - Used to - minify CSS - -## Contributing - -Please read [CONTRIBUTING.md](./CONTRIBUTING.md) and -[CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md) for details on our code of -conduct, and the process for submitting pull requests to us. - -### TODO - -A scratch pad of ideas that may be useful to implement: - -- [x] Add minimal CSS. -- [x] Add functionality to view a user's profile. -- [x] Add functionality to view item-specific page with comments (`ConstructStoryDiscussion`). - - [ ] Load recursive descendant threads. -- [ ] Add functionality to handle polls (`ConstructPoll` & `ConstructPollOpt`). -- [ ] Add functionality to load more items or paginate. - -## Versioning - -This project currently doesn't use versioning. See the git log instead. - -## Authors - -* **CMC** - *Literally everything* - [Christian Cleberg](https://sr.ht/~Christian Cleberg/) - -## License - -This project is licensed under the Unlicense - see the -[LICENSE.md](./LICENSE.md) file for details. diff --git a/README.nfo b/README.nfo new file mode 100644 index 0000000..d498d9f --- /dev/null +++ b/README.nfo @@ -0,0 +1,51 @@ +┌──────────────────────────────────────────────────────────────┐ +│ H N [ KRZ ] krz.sh │ +└──────────────────────────────────────────────────────────────┘ + +WHAT + front-end alternative for hacker news. php. no tracking. + +REQUIRES + a web server (nginx or apache), php 8.0+, optional minify. + +INSTALL + sudo apt install nginx-full php php-cgi php-fpm minify + git clone $repo_url + + minify css after changes: + + minify -o static/styles.min.css static/styles.css + +DEPLOY + copy the code to your webroot. route all errors to index.php. + + nginx: + + location / { + try_files $uri $uri/ /index.php?$args; + } + + apache (.htaccess): + + FallbackResource /index.php + +BUILT WITH + php, html, minify (for css). + +TODO + - recursive descendant comment threads + - polls (ConstructPoll) + - pagination / load more + +CONTRIBUTING + see CONTRIBUTING.txt and CODE_OF_CONDUCT.txt. + +VERSIONING + none. read the git log. + +LICENSE + 0bsd. see LICENSE.md. + +┌──────────────────────────────────────────────────────────────┐ +│ krz.sh │ +└──────────────────────────────────────────────────────────────┘ -- cgit v1.2.3