Merge pull request #19 from NoiTheCat/docs-rewrite

Rewrite Readme; create documentation website
This commit is contained in:
Noi 2023-03-09 12:36:11 -08:00 committed by GitHub
commit fdd77a6f2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 184 additions and 20 deletions

5
Docs/.gitignore vendored Normal file
View file

@ -0,0 +1,5 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor

4
Docs/Gemfile Normal file
View file

@ -0,0 +1,4 @@
source "https://rubygems.org"
gem "jekyll", "~> 4.3.2"
gem "jekyll-remote-theme"
gem "jekyll-seo-tag"

82
Docs/Gemfile.lock Normal file
View file

@ -0,0 +1,82 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0)
concurrent-ruby (1.1.10)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.15.5)
forwardable-extended (2.6.0)
google-protobuf (3.21.12-x86_64-linux)
http_parser.rb (0.8.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
jekyll (4.3.2)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-remote-theme (0.4.3)
addressable (~> 2.0)
jekyll (>= 3.5, < 5.0)
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
rubyzip (>= 1.3.0, < 3.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.1)
rake (13.0.6)
rb-fsevent (0.11.2)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (4.0.1)
rubyzip (2.3.2)
safe_yaml (1.0.5)
sass-embedded (1.57.1)
google-protobuf (~> 3.21)
rake (>= 10.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.4.2)
webrick (1.7.0)
PLATFORMS
x86_64-linux
DEPENDENCIES
jekyll (~> 4.3.2)
jekyll-remote-theme
jekyll-seo-tag
BUNDLED WITH
2.4.5

25
Docs/_config.yml Normal file
View file

@ -0,0 +1,25 @@
# https://github.com/BDHU/minimalist
title: World Time
description: A social time zone reference tool!
logo: /wt-mid.png
show_downloads: false
remote_theme: BDHU/minimalist
color-scheme: dark
plugins:
- jekyll-remote-theme
# https://icon-sets.iconify.design/
sidebar:
- name: Invite the bot
icon: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M12 14q.425 0 .713-.288Q13 13.425 13 13v-2h2q.425 0 .713-.288Q16 10.425 16 10t-.287-.713Q15.425 9 15 9h-2V7q0-.425-.287-.713Q12.425 6 12 6t-.712.287Q11 6.575 11 7v2H9q-.425 0-.712.287Q8 9.575 8 10t.288.712Q8.575 11 9 11h2v2q0 .425.288.712q.287.288.712.288ZM2 19.575V4q0-.825.588-1.413Q3.175 2 4 2h16q.825 0 1.413.587Q22 3.175 22 4v12q0 .825-.587 1.413Q20.825 18 20 18H6l-2.3 2.3q-.475.475-1.088.212Q2 20.25 2 19.575Zm2-2.4L5.175 16H20V4H4ZM4 4v13.175Z"/></svg>
link: https://discord.com/api/oauth2/authorize?client_id=447266583459528715&permissions=16384&scope=bot%20applications.commands
- name: Official server
icon: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M19.27 5.33C17.94 4.71 16.5 4.26 15 4a.09.09 0 0 0-.07.03c-.18.33-.39.76-.53 1.09a16.09 16.09 0 0 0-4.8 0c-.14-.34-.35-.76-.54-1.09c-.01-.02-.04-.03-.07-.03c-1.5.26-2.93.71-4.27 1.33c-.01 0-.02.01-.03.02c-2.72 4.07-3.47 8.03-3.1 11.95c0 .02.01.04.03.05c1.8 1.32 3.53 2.12 5.24 2.65c.03.01.06 0 .07-.02c.4-.55.76-1.13 1.07-1.74c.02-.04 0-.08-.04-.09c-.57-.22-1.11-.48-1.64-.78c-.04-.02-.04-.08-.01-.11c.11-.08.22-.17.33-.25c.02-.02.05-.02.07-.01c3.44 1.57 7.15 1.57 10.55 0c.02-.01.05-.01.07.01c.11.09.22.17.33.26c.04.03.04.09-.01.11c-.52.31-1.07.56-1.64.78c-.04.01-.05.06-.04.09c.32.61.68 1.19 1.07 1.74c.03.01.06.02.09.01c1.72-.53 3.45-1.33 5.25-2.65c.02-.01.03-.03.03-.05c.44-4.53-.73-8.46-3.1-11.95c-.01-.01-.02-.02-.04-.02zM8.52 14.91c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.84 2.12-1.89 2.12zm6.97 0c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.83 2.12-1.89 2.12z"/></svg>
link: https://discord.gg/JCRyFk7
- name: GitHub
icon: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M14.435 12.973c.269 0 .492.133.686.396c.192.265.294.588.294.975c0 .385-.102.711-.294.973c-.193.265-.417.396-.686.396c-.278 0-.522-.131-.715-.396c-.192-.262-.294-.588-.294-.973c0-.387.102-.71.294-.975c.192-.264.436-.396.715-.396m3.44-3.559c.746.811 1.125 1.795 1.125 2.953c0 .748-.086 1.423-.259 2.023c-.175.597-.394 1.084-.654 1.459a4.268 4.268 0 0 1-.974.989a4.94 4.94 0 0 1-1.065.623a5.465 5.465 0 0 1-1.111.306a9 9 0 0 1-.943.123l-.685.014l-.547.015a17.567 17.567 0 0 1-1.524 0l-.547-.015l-.685-.014a8.966 8.966 0 0 1-.943-.123a5.28 5.28 0 0 1-1.111-.306a4.888 4.888 0 0 1-1.064-.623a4.253 4.253 0 0 1-.975-.989c-.261-.375-.479-.862-.654-1.459c-.173-.6-.259-1.275-.259-2.023c0-1.158.379-2.143 1.125-2.953c-.082-.041-.085-.447-.008-1.217a7.071 7.071 0 0 1 .495-2.132c.934.099 2.09.629 3.471 1.581c.466-.119 1.101-.183 1.917-.183c.852 0 1.491.064 1.918.184c.629-.425 1.23-.771 1.805-1.034c.584-.261 1.005-.416 1.269-.457l.396-.09c.27.649.434 1.36.496 2.132c.076.769.073 1.175-.009 1.216m-5.845 7.82c1.688 0 2.954-.202 3.821-.607c.855-.404 1.292-1.238 1.292-2.496c0-.73-.273-1.34-.822-1.828a1.845 1.845 0 0 0-.989-.486c-.375-.061-.949-.061-1.72 0c-.769.062-1.298.09-1.582.09c-.385 0-.8-.018-1.319-.059c-.52-.04-.928-.065-1.223-.078a3.727 3.727 0 0 0-.958.108a1.913 1.913 0 0 0-.853.425c-.521.469-.79 1.077-.79 1.828c0 1.258.426 2.092 1.28 2.496c.85.405 2.113.607 3.802.607h.061m-2.434-4.261c.268 0 .492.133.685.396c.192.265.294.588.294.975c0 .385-.102.711-.294.973c-.192.265-.417.396-.685.396c-.279 0-.522-.131-.716-.396c-.192-.262-.294-.588-.294-.973c0-.387.102-.71.294-.975c.193-.264.436-.396.716-.396"/></svg>
link: https://github.com/NoiTheCat/WorldTime
- name: Support me on Ko-fi
icon: <svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24"><path fill="currentColor" d="M23.881 8.948c-.773-4.085-4.859-4.593-4.859-4.593H.723c-.604 0-.679.798-.679.798s-.082 7.324-.022 11.822c.164 2.424 2.586 2.672 2.586 2.672s8.267-.023 11.966-.049c2.438-.426 2.683-2.566 2.658-3.734c4.352.24 7.422-2.831 6.649-6.916zm-11.062 3.511c-1.246 1.453-4.011 3.976-4.011 3.976s-.121.119-.31.023c-.076-.057-.108-.09-.108-.09c-.443-.441-3.368-3.049-4.034-3.954c-.709-.965-1.041-2.7-.091-3.71c.951-1.01 3.005-1.086 4.363.407c0 0 1.565-1.782 3.468-.963c1.904.82 1.832 3.011.723 4.311zm6.173.478c-.928.116-1.682.028-1.682.028V7.284h1.77s1.971.551 1.971 2.638c0 1.913-.985 2.667-2.059 3.015z"/></svg>
link: https://ko-fi.com/noithecat

BIN
Docs/example.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

34
Docs/index.md Normal file
View file

@ -0,0 +1,34 @@
---
layout: default
title: Documentation
---
# World Time
World Time is a simple utility bot, providing users with a quick way to check the current time and day for the users in your server.
### Getting started
Invite the bot via the link on the sidebar. Once invited, the bot can be used through its commands any time it is needed.
For a list of commands, see its `/help` command.
### Why would I even want to use this?
Here's a hypothetical scenario:
Imagine that you are one user amongst many in a large community, its other users scattered all around the world. Though you feel a yearning for conversation, spurred on by a sense of boredom or unfulfillment, few seem to be available. Their statuses tease their potential existence, but they have been idle for quite some time. Surely they're around?
You are a courteous one, and you do not make assumptions. The concept of time zones crosses the front of your mind; different places around the world being subject to hours different from yours. You even consider for a moment the uncomfortable notion that others may have lives beyond the reaches of the internet. All of this ultimately lead to one important question burning at the front of your mind: Is this even a good time?
![Example output](example.png)
Oh. Well... Hm.
### Supporting the bot
World Time is provided for free, period. No paywalled features, subscriptions, or monetization insentices. World Time is an independent hobby project done in my spare time, and all costs associated with it come out of my pocket. My only interest is to provide something that I hope others find as useful as I do.
That said, this bot has proven to be far more popular than I ever anticipated, and keeping things running has occasionally strained me both financially and time-wise. If you'd like, please consider pitching in a bit to cover my recurring costs by checking out my Ko-fi page on the sidebar.
### Privacy and Security
This bot collects and stores only information necessary for its operation, in this case being user, server, and role IDs. As little information is stored as possible and access to the database is strongly restricted through proper security practices.
Time zones are not shared between servers *by design*, for those preferring to be selective about where they want their region known. Users must set their times in each individual server.
Any questions and concerns regarding data privacy, security, and retention may be sent to the bot author via the support server or by opening an issue on GitHub.

BIN
Docs/wt-mid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -1,27 +1,37 @@
# World Time
A social time zone reference tool!
* Info: https://discord.bots.gg/bots/447266583459528715
[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/J3J65TW2E)
## A social time zone reference tool!
World Time is a simple bot that acts as a quick reference for checking the current time and day for the users in your server. To use it is as simple as having your users individually add their time zone, and anyone is then free to look up the full list of current times, or those of individual users.
#### Documentation, help, resources
* [Main website, user documentation](https://noithecat.dev/bots/WorldTime)
* [Official server](https://discord.gg/JCRyFk7)
#### Why might this be useful?
Imagine that you find yourself amongst a large online community, its users scattered across the land. You feel a yearning for conversation, spurred on by a sense of boredom or unfulfillment, but none seem to be available. Many people appear on the sidebar, but they have been idle for quite some time. Surely they're around, though?
#### Running your own instance
You need:
* .NET 6 (https://dotnet.microsoft.com/en-us/)
* PostgreSQL (https://www.postgresql.org/)
* EF Core tools (https://learn.microsoft.com/en-us/ef/core/get-started/overview/install#get-the-entity-framework-core-tools)
* A Discord bot token (https://discord.com/developers/applications)
You are a courteous one, and you do not make assumptions. You recall the concept of time zones, of different places around the world being subject to hours different from yours no matter the moment. You consider the uncomfortable idea that these people might also have lives of their own which do not often involve this chat platform. All these realizations ultimately lead to one important question: Is this even a good time for them?
Get your bot token and set up your database user and schema, then create a JSON file containing the following:
```jsonc
{
"BotToken": "your bot token here",
"SqlHost": "localhost", // optional
"SqlDatabase": "worldtime", // optional
"SqlUser": "worldtime", // required
"SqlPassword": "mypassword" // required; no other authentication methods are currently supported
}
```
Perhaps this bot can offer some enlightenment. What you do with this information is up to you.
Then run the following commands:
```sh
$ dotnet restore
$ dotnet ef database update -- -c path/to/config.json
```
#### Support the bot
World Time is and shall remain fully free to use. I have no plans to hide any new or existing features behind pay-only, premium features. This is an independent hobby project and all costs associated with it come out of my pocket.
This bot has had a far greater response than I've ever expected, and at this point I find it difficult to pay for the server it runs on as its resource needs grow. I would greatly appreciate if you consider pitching in a little bit to cover my recurring costs by checking out my Ko-fi page: https://ko-fi.com/noithecat.
#### Support, Privacy and Security
The support server for my bots can be accessed via the given link: https://discord.gg/JCRyFk7. A small group of volunteers who are willing to answer questions are able to help you if you have any questions.
This bot collects and stores only information necessary for its operation, including user, server, and role IDs. On occasion, data for server members not seen in some time (at least 180 days) may be manually removed by the bot owner.
Time zones are not shared between servers that this same bot may be in. This is *by design*, for those preferring to share this information with only certain communities instead of automatically sharing it to all of them. Users must register their time zone information onto every server they share with the bot for the servers they wish for it to be known in.
Any questions and concerns regarding data and security may be sent to the bot author via the support server or GitHub.
And finally, to run the bot:
```
$ dotnet run -c Release -- -c path/to/config.json
```

View file

@ -26,4 +26,8 @@
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL.Design" Version="1.1.0" />
</ItemGroup>
<PropertyGroup>
<DefaultItemExcludes>Docs/**;$(DefaultItemExcludes)</DefaultItemExcludes>
</PropertyGroup>
</Project>