diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-09-20 23:11:52 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-09-20 23:11:52 +0530 |
commit | f23dae307e06d95499b35dbdd8e341b45756b330 (patch) | |
tree | b46c707a8cd62f8c63c78eb4018dc9bc0da1cffe /content |
First commit
Diffstat (limited to 'content')
38 files changed, 1891 insertions, 0 deletions
diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..2790727 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,38 @@ +--- +img: /images/gray-area/ajiro_shinpei.webp +imgLink: /danbooru-notice/ +imgAlt: Ajiro Shinpei from Summer Time Rendering +--- + +# I am the God around here + +This website is my own space, +a space where I'm free. +Here, no one can censor me, +I lay down the rules. + +All the colors on this website, +the styling of these webpages, +the layout of this website, +I designed that. + +There is no moderation that can control what I write about. +I deny no one from visiting this website. +If anyone else does, I have a .onion address for that. + +I'm writing this on my laptop. +On this laptop there is only free software. +Everything from my status bar, +to the color scheme of my text editor, +to the color scheme of this website, +reflects the design I like. + +No preset themes that I can't modify. +No conventions I need to follow. +No one tells me what to do around here. + +This is a place where I can truly represent myself. +A place free of any other distractions. +A place of control that no other website can provide me. +On this website I can truly share my thoughts without any hesitation. +*I truly am, the God around here.* diff --git a/content/blog/2022/_index.md b/content/blog/2022/_index.md new file mode 100644 index 0000000..3bf91c1 --- /dev/null +++ b/content/blog/2022/_index.md @@ -0,0 +1,3 @@ +--- +title: 2022 +--- diff --git a/content/blog/2022/i-created-a-blog.md b/content/blog/2022/i-created-a-blog.md new file mode 100644 index 0000000..c0825cc --- /dev/null +++ b/content/blog/2022/i-created-a-blog.md @@ -0,0 +1,39 @@ +--- +title: "I Created a Blog!" +date: 2022-07-12T12:54:32+05:30 +--- + +## Yos I have finally done it + +This is sort of like a test for my blog, generated with hugo, pog stuff. +This has been a journey. This is like the third iteration of my blog. First one was blog.vidhukant.xyz which no longer exists. +It was not a static site, it was a server side rendered web app written in go. It looked awesome but I got bored pretty quickly. +(also writing markdown is better) + +Second time I decided to just write my blog in plain html which was a horrible, horrible idea and now on third iteration now we have this! A static site built with hugo. + +## The "philosophy" behind this blog + +Seems cool doesn't it? + +Yea that's it. I like talking to likeminded people online, but social media is tiring ~~(and evil!)~~ so I just created my own blog! +Hopefully I write at least a few useful posts. I totally see this going into either a doujin review site or me just shilling free software. + +## What are these GIFs on the bottom? + +This seems to be a trend from the 90s, you'd add different GIFs linking to other websites that you like. +I wasn't even born at that time so I obviously haven't seen this trend in all of its glory, but hey these things are fun so I'll add it. +If you also have a website (preferably a "minimal" one) (wait does this one count as minimal?) do add my "web button" to your site! + +## Thanks to landchad.net + +I learned many things from landchad.net, like setting up a nginx frontend server, firewalls, rsync and stuff. Really neat site, I recommend checking out. +Also lol check out my [youtube channel](https://youtube.mikunonaka.net) because why not. At this moment there aren't any videos because +I deleted my old channel and this is a brand new one. But stay tuned for some quality content! + +## Check out the latest projects I've been working on + +[MAL2Go](/docs/mal2go/v4) is a very neat API Wrapper that lets you use the MyAnimeList API using Go. +[macli](/docs/macli) is an awesome CLI-Based BASED MyAnimeList unofficial client so you don't have to look at a web page (eww) + +And I'm already shilling software. diff --git a/content/blog/2022/my-failed-attempt-at-installing-gentoo.md b/content/blog/2022/my-failed-attempt-at-installing-gentoo.md new file mode 100644 index 0000000..c9056da --- /dev/null +++ b/content/blog/2022/my-failed-attempt-at-installing-gentoo.md @@ -0,0 +1,60 @@ +--- +title: "My Failed Attempt at Installing Gentoo" +date: 2022-08-02T16:35:58+05:30 +--- + +After using Arch Linux for slightly more than 2 years I decided to move to Gentoo. +I managed to install it (well it wasn't hard) but still way too many things went wrong; +and I'm gonna share my suffering with you guys by talking about it. + +## Why I moved back to Arch Linux + +Gentoo is actually really interesting, waiting 2 hours for portage to install your terminal really is a feel. +Though turns out that compiling the terminal didn't take that long, THAT SHIT ALSO COMPILED THE FUCKING PROGRAMMING LANGUAGE. +Yeah, I compiled rust THEN compiled alacritty because that's what pro hackers do. +(I really thought it'd automatically pull the binary, apparently that's rust-bin not rust) + +I like this, you compile things with the support for only what you need, and disable what you don't. It's not like Arch, +you literally don't have support for the stuff you don't need, which is even faster! +But I guess I still am not fit for that kind of pro gamer level stuff, so I'll stick to arch. + +## Not even an X server worked + +Maybe it's just because I'm a dumbass, but I can't even get an X server running. Also wifi refused to work. +I ran 2 floors to get an ethernet cable at 3 am and that also refused to work! I re-compiled my kernel with networking support and it didn't work! +I guess I should have read the logs but no, like any smart arch user would do, I re-installed it! How fun! + +Over the course of 4 days I installed Gentoo 4 times. 2 of those 4 attempts even occoured in the same day. +I guess getting everything to work would've been easier, but I realised that too late. +If you're planning to install gentoo, remember that it's easier to fix gentoo, a re-install would take too long. + +## Installation wasn't hard at all! + +Okay, to me, the installation part really wasn't too hard. I mean on Arch you just need to copy-paste a couple of commands, +it's really the same with gentoo but.. easier somehow. I didn't have to run many shell commands, I just had a bunch of config files to play around +to fine-tune my system. It was time consuming, but not harder than Arch. I'd say some things were *easier* because instead of setting some variables myself +I just used the `eselect` command to set locales and stuff, I guess that's kinda interactive and "less boring" + +Overall I'd say, no installing gentoo is not hard at all. Especially if you've installed Arch before. BUT using it was pretty hard.. +I had to deal with a lot of masked packages, and had to wait more than an hours just so I can install Xorg; I didn't even bother getting XMonad to work, +just installed dwm because that compiles within seconds. + +Also, while compiling a kernel isn't hard at all (I mean you just get an ncurses program with shit loads of options), but figuring out what I need to get +various things to work was pretty tricky, not to mention that I wasn't able to even do that successfully! + +## I will go back to gentoo but not now.. + +Okay, I quit because I had wasted a lot of my time, and was tired and fed up of it. I **will** go back to installing gentoo on my main machine. +To anyone reading this interested in gentoo, I am NOT saying that gentoo is a bad distro. I'm just saying that it's very frustrating to install, +takes an incredibly long time, and by the time you install it you don't get left with any mental energy to fix any bugs. + +I hope next time I try (maybe in a few months) I will be able to set up XMonad and polybar and all that cool stuff just like I have on Arch +or maybe have an even better setup, and maybe never even look back to Arch! But not now, I'm tired and will work on other stuff for now. + +## A little gentoo wallpaper I made + +I made this funny wallpaper to use with my gentoo installation (while my kernel was compiling in the background!) + +[![Funny Gentoo Wallpaper](/images/Gentoo\_Wallpaper\_OreImo.png)](/images/Gentoo\_Wallpaper\_OreImo.png) + +But sadly I wasn't able to use it. *Some day...* diff --git a/content/blog/2022/securing-your-mailserver-with-spf-and-dkim.md b/content/blog/2022/securing-your-mailserver-with-spf-and-dkim.md new file mode 100644 index 0000000..592c45b --- /dev/null +++ b/content/blog/2022/securing-your-mailserver-with-spf-and-dkim.md @@ -0,0 +1,264 @@ +--- +title: "Authenticating Your Mailserver With SPF and DKIM" +date: 2022-09-14T18:52:08+05:30 +--- + +I recently did a video on setting up an email server, with Postfix for SMTP and +Dovecot for IMAP, which you can check out [here.](https://odysee.com/@MikunoNaka:d/self-hosting-email-server:0) +Now this much isn't enough since you want to make sure no one can spoof your domain and/or tamper with the content of your E-mails. +This is where SPF (Sender Policy Framework) and DKIM (DomainKeys Identified Mail) come to the rescue. + +## What are SPF and DKIM? + +SPF is used to limit which servers are allowed to send emails from your domain. It protects your domain against domain spoofing. +Even if you don't use E-mail on your domain, I recommend using SPF to specify that you won't be sending any emails from this particular domain, +so no one can spoof your domain and pretend to be you while sending emails. + +DKIM can be used to sign the emails with a key pair (where the public key is added to your domain's TXT records) so your E-mails' contents cannot be tampered with. +OpenDKIM is an open source implementation of DKIM, we will be setting up OpenDKIM in this tutorial +(because I have a natural urge to use anything which has "open" in its name) + +### Setting up SPF for outgoing emails on your domain + +You need to add a TXT record to your domain containing the SPF syntax. the SPF record should always start with the SPF version number you are using. +For me it is `v=spf1`. Then, you can add all the SPF "mechanisms" that need to be evaluated in order to identify the E-mail. + +Most of the time you just need one or two mechanisms, which are `mx` or `mx:your-domain.tld` and `ip4:your_servers_ipv4` and `ip6:your_servers_ipv6` +(you don't need all of them, it's kinda overkill) + +- `mx` means the email is legit if it comes from a server which is in the MX Records of this domain +- `mx:your-domain.tld` means the email is legit if it comes from a server which is in the MX Records of your-domain.tld +- `ip4:ipv4_address` means the email is legit if the sending server has this particular IPv4 address +- `ip6:ipv6_address` means the email is legit if the sending server has this particular IPv6 address + +You can prepend any of these with `-` to *reject* emails which meet this condition (by default it *accepts* the ones passing this condition); You can use `-all` to make sure +all the other unauthorised emails don't pass the SPF test. + +So this is what a valid SPF record would look like: + +``` +v=spf1 mx -all +``` + +Now I did say using all of these at ones is pretty overkill, but here is what mine looks like: + +``` +v=spf1 mx ip4:172.105.59.60 ip6:2400:8904::f03c:93ff:feac:ca67 mx:m.vidhukant.xyz -all +``` + +I don't think using many mechanisms is a bad thing, so you can just copy mine and replace the IP4 and IP6 addresses with your server's IP4 and IP6 addresses. +Which is enough for most usecases. To apply this SPF record just add a TXT record to your root domain. It should look like this: + +![SPF Record Screenshot](/images/spf-record-example.png) + +**NOTE:** If you are using multiple domains for a single mail server, you should use the exact same SPF record for all the domains. +If you don't plan to use E-mail with any of your domains, set the SPF record to `v=spf1 -all`. +ALWAYS add this to your root domain since it tells every receiving server that this domain doesn't +send E-mails and if you receive one that means it's probably malicious. + +[This website](https://www.spf-record.com/syntax) has all of the other info about structuring an SPF record. + +### Setting up DKIM (OpenDKIM) + +#### Install the necessary packages + +``` fish +apt install opendkim opendkim-tools +``` + +#### Configure OpenDKIM + +The OpenDKIM config file located at `/etc/opendkim.conf` should look like this: + +``` +Syslog yes +SyslogSuccess yes +Canonicalization relaxed/simple +Mode sv +SubDomains no +OversignHeaders From +Socket local:/var/spool/postfix/opendkim/opendkim.sock +PidFile /var/run/opendkim/opendkim.pid +AutoRestart yes +AutoRestartRate 10/1M +Background yes +DNSTimeout 5 +SignatureAlgorithm rsa-sha256 +UserID opendkim +UMask 002 +KeyTable /etc/opendkim/key.table +SigningTable refile:/etc/opendkim/signing.table +ExternalIgnoreList /etc/opendkim/trusted.hosts +InternalHosts /etc/opendkim/trusted.hosts +TrustAnchorFile /usr/share/dns/root.key +``` + +This is what works for me on Debian 11. The data files for OpenDKIM will be stored in `/etc/opendkim/`. If you want to store them anywhere else, +edit the `KeyTable`, `SigningTable`, `ExternalIgnoreList`, `InternalHosts` parameters in `/etc/opendkim.conf` + +#### Setting up the Signing Table + +Make a list of all the domains you want to handle E-mails for, and add them to `/etc/opendkim/signing.table` like this: + +``` +*@example.tld mail._domainkey.example.tld +``` + +Replace both occurances of example.tld to your domain name, and mail to whichever subdomain sends emails. `mail._domainkey.example.tld` would act +as the DKIM selector for example.tld + +If you have any other subdomain set up for the mail server (for example I have `m.vidhukant.xyz` while the standard would be `mail.vidhukant.xyz`), +replace "mail" with that. +You can add as many domains you want, But don't add domains which won't be sending emails. + +#### Setting up the Key Table + +Now edit `/etc/opendkim/key.table` and add lines for each domain like this: + +``` +mail._domainkey.example.tld example.tld:mail:/etc/opendkim/keys/example.private +``` + +Add one line like this for all the domains added to the signing.table file, replace `mail` and `example.tld` respectively. +Decide a short name for the private key for this domain, `/etc/opendkim/keys/example.private` in this example holds the private key for `example.tld` +You should decide different names for each domain you're adding and remember that name, you will need that later. + +#### Setting up the Trusted Hosts + +Edit the `/etc/opendkim/trusted.hosts` file and add these contents: + +``` +127.0.0.1 +::1 +localhost +hostname +hostname.example.tld +*.example.tld +``` + +Replace hostname with your server's hostname (defined in `/etc/hostname`), and example.tld with your domain. If you have more than one domain, +you can append those to the file prepended with a `*.`, just like in `*.example.tld`. +No need to add another entry for `hostname.example.tld`, just append `*.yourdomain.tld` to the file as many times (for as many domains) you want. + +#### Set file permissions + +Make sure opendkim user has access to the required files/directories: + +``` fish +chmod u=rw,go=r /etc/opendkim.conf +chown -R opendkim:opendkim /etc/opendkim +chmod -R go-rwx /etc/opendkim/keys +``` + +#### Generating the keys + +Run this command, replacing example.tld with your domain name, and mail with the subdomain for email: + +``` fish +opendkim-genkey -b 2048 -h rsa-sha256 -r -s mail -d example.tld -v + +mv /etc/opendkim/mail.private /etc/opendkim/keys/example.private +mv /etc/opendkim/mail.txt /etc/opendkim/keys/example.txt +``` + +Replace "example" in the `example.private` and `example.txt` files with the short name you entered for the domain in the `key.table` file. +Repeat this step for all the domains if you have multiple of them! + +**NOTE:** Never share the contents of the generated ".private" files! + +#### Start OpenDKIM + +``` fish +systemctl restart opendkim +``` + +#### Add the TXT Records + +Read the contents of the TXT file generated by `opendkim-genkey`: + +``` fish +cat /etc/opendkim/keys/example.txt +``` + +The output would be something like this: + +``` +mail._domainkey IN TXT ( "v=DKIM1; h=sha256; k=rsa; " + "p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxzNTZydyFiNljq/Md1cXNEqemKDk9CKhZGHSzEH6x0zxtdcv5ROzaytJ4OsatDOdk+Pygkj6Qq9PiLCc3HlWPTcvMEs+M8YvRergTATFNoAmXLXvpbi+DD0oXAsbz2dM/klObY9OSNlJqFpzmGjgRbtSnvCbot8Smg5LreCjmkuHo/sxyynRHGwRHUM6jokm2YGIGATZBIVqtS" + "jM418Gtxx9MZUbwcQTlchk1hSQgbXlAAl5tagle3bq/2GwrwrdaghRH750qLjnBQhzdFnH+GjHTmRl2drQ/2zG1L0GlufipZ1UkWulidox2RtIykv2VxDlBYb77G4PAiiJsSar+wIDAQAB" ) ; ----- DKIM key mail for example.tld +``` + +Carefully delete everything outside the parenthesis (including the parenthesis) and join all three lines into one. +Now, remove all the quotes and also the whitespaces between line 2 and 3, so both lines get merged into one, without any space between them. + +The result should look like this: + +``` +v=DKIM1; h=sha256; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxzNTZydyFiNljq/Md1cXNEqemKDk9CKhZGHSzEH6x0zxtdcv5ROzaytJ4OsatDOdk+Pygkj6Qq9PiLCc3HlWPTcvMEs+M8YvRergTATFNoAmXLXvpbi+DD0oXAsbz2dM/klObY9OSNlJqFpzmGjgRbtSnvCbot8Smg5LreCjmkuHo/sxyynRHGwRHUM6jokm2YGIGATZBIVqtSjM418Gtxx9MZUbwcQTlchk1hSQgbXlAAl5tagle3bq/2GwrwrdaghRH750qLjnBQhzdFnH+GjHTmRl2drQ/2zG1L0GlufipZ1UkWulidox2RtIykv2VxDlBYb77G4PAiiJsSar+wIDAQAB +``` + +This is your public key for DKIM. + +Now go to your DNS editor, click on Add TXT Record, the hostname should be `mail._domainkey` or whatever the first few characters the original example.txt showed. +In the value field copy and paste the public key. Make sure there are no errors. + +#### Configuring postfix to use OpenDKIM + +Set up postfix to process outgoing E-mails with OpenDKIM + +``` fish +postconf -e "milter_default_action = accept" +postconf -e "milter_protocol = 6" +postconf -e "smtpd_milters = local:opendkim/opendkim.sock" +postconf -e "non_smtpd_milters = local:opendkim/opendkim.sock" +``` + +Add this to your `/etc/default/opendkim` file to set the socket for postfix + +``` +SOCKET="local:/var/spool/postfix/opendkim/opendkim.sock" +``` + +And then create the socket directory + +``` fish +mkdir /var/spool/postfix/opendkim +chown opendkim:postfix /var/spool/postfix/opendkim +``` + +#### Testing if DKIM is working + +Wait for the DNS records to propagate (shouldn't take long!) and send an email with your SMTP server, on the receiving end, your email client should have an option +to "view source" or "show email headers", open that, you should see a `DKIM-Signature:` field there. + +You can now send a test email to a GMail account, and on the GMail web app you can view the email's source. +It will show detailed information about your DKIM and SPF setup. GMail is by far the best test to verify +that your authentication mechanisms (SPF, DKIM, etc) are working properly. + +## Use DMARC to tell receiving servers how to handle your email + +Domain-based Message Authentication, Reporting and Conformance, short for DMARC can be used to specify a set of instructions for the receiving email servers on how +to handle the email. You can use it to specify which authentication mechanism (SPF, DKIM or both) is in place, what to do with emails which fail authentication +(you can reject, send, or quarantine them), how to check the `From: ` field of the email. It can also be used by receiving servers to report back to your own server, +in case any of the checks fail. + +All DMARC records start with `v=DMARC1`, and the `p=` field would specify what to do with emails that fail the SPF or the DKIM test. `p=` can have these three values: + +- none: do nothing +- quarantine: quarantine the email (e.g send it to the spam folder) +- reject: reject the incoming email + +It is best to use `p=none` while testing your SPF and DKIM records, after that you can choose between `p=reject` or `p=quarantine`. + +You can also optionally use `rua=mailto:your_email` to get DMARC fail reports to your email. Just replace `your_email` with your E-mail. +You can specify multiple E-mail addresses seperated with a comma. + +Here's what an example DMARC record should look like: + +``` +v=DMARC1; p=quarantine; rua=mailto:user@example.com +``` + +Add this to your domain's TXT records and set the hostname to `_dmarc` and you should be good to go! + +Use [this](https://appmaildev.to/en/dkim) DKIM test to test your SPF, DKIM and DMARC configuration. diff --git a/content/blog/2022/tech-companies-are-using-you.md b/content/blog/2022/tech-companies-are-using-you.md new file mode 100644 index 0000000..ec82483 --- /dev/null +++ b/content/blog/2022/tech-companies-are-using-you.md @@ -0,0 +1,79 @@ +--- +title: "All these \"tech companies\" are taking away your freedom." +date: 2022-09-16T09:09:22+05:30 +--- + +Most people (speaking from my experience) don't even understand what freedom means. From the start they are taught to go with the flow. There are things that they must do, there are things they mustn't. And frankly they don't even care about it if they're getting what they want. +And the people who know better than that, are taking advantage of this. They want you to believe that this is the right thing. They're real manipulative people. + +All of this applies to the tech sphere. I'm relating this to tech for two reasons: First being that this is my field of specialization, and second, because it's really ingrained in our lives now. It's at the point where it is very hard to back out. Which is concerning because seems like soon it'll become impossible to back out! That's **not** a good thing! + +## You are just a pawn for all of these "tech companies" + +Would you like to live in a world where people's opinion is greatly affected by just one individual? +Or a world where nothing in your life can be kept private? +A world where all of your actions are being dictated by others? +Well you don't have to imagine it! You already are! how cool. It's only going to get worse. + +You are living in a world of constant surveilance. Your phone number, more often than not, is tied to your legal ID. +When you sign up for... almost anything at this point, you are giving away your publically identifiable information. +Wherever you go, your mobile phone is scanning where you are, and sending this data to your phone company. +Even dumb phones are subject to surveilance. The text messages you send to people, they're not private. + +Many people argue that so what if, say, Discord knows what they're talking about with their friends? Or that they have "nothing to hide". +Which is just, irresponsible. You're literally throwing away some of your rights by saying "I have nothing to hide". + +*"Privacy is not the same as secrecy. Everyone knows what happens in the toilet, still everyone locks the door."* - Unknown (I forgot) + +### The data that you share will be used to manipulate you + +The point is, that all these "tech" companies are data mining you. They know your daily activities, and the system has made you to believe that it's not a big deal. +They know your vulnerabilities, they know your likes and dislikes. They are the connoisseurs of social engineering. +When you are giving out all this data to others, you have to understand the liabilities of it. +This data can very well be used against you. + +#### Targeted advertisements + +Targeted marketing is a very serious thing. These businesses feed on your insecurities, (which you cannot hide! The Gods of AI see everything) +they are constantly searching for ways to make you buy their product. They are very good at making you believe that you absolutely need this thing. + +#### Social platforms, etc use this data to get you addicted to their service + +This is one of the most concerning things I see with people around me. Take YouTube for example, when you watch a video, it would recommend you other videos related to it. These recommendations aren't random, they are mostly based on what you have seen in the past. Their ML algorithm is very good at analysing what your likes are depending on what you've watched before. +This, on the outside, looks like very convenient technology. I mean shit, I love when they recommend me music I like, even I'm not immune to this. But people just overlook the dark side of it. I've said this before but this is a really good technique to get you addicted to their service. +They're want you to get the dopamine rush you need. You watch one video, they give you another until you get immune to the dopamine, and consume more and more of their content, until you get addicted. + +#### You can be held liable for everything you've said + +Your phones are constantly listening. They record everything that you talk about, and they send it to your phone company. +What's worse is that now we have all these voice activated "smart" devices, which ~~you can use to turn on the lights with your voice~~ can use *you* for their profits. +On the surface this doesn't seem too bad, but you have to realise that the things you say now, the places you go to now, they are recorded and in the future you can totally be held liable for that. + +There was this incident about a student who said something like he'd commit arson if he loses this game or something like that. I'm not exactly sure what it was, but he was just chatting with his friends while playing some online game. He was most likely just joking but 3 years later the recording somehow got out, and he was taken to court. He didn't even do anything, but he was taken to court and I'm not sure if he's still in there but he had to spend time in jail. +And the judge literally said that he doesn't know what it means to "download" something (he probably said something like that in the recording), yet he was jailed. + +This could happen to YOU and imagine how much worse it could become in the next few years. Some people are installing smart devices in like, every room of their houses. +That was just a voice chat, a smart device listening to you is bound to be so much worse. + +For those people who believe that they don't keep their recordings "because they said so", you literally have no proof. You can NEVER trust software unless it is Free. Nonfree software can never, in any way, can be trusted. Unless your IoT device is librebooted, be ready to get in deep trouble for a dumb reason like 5 years later. + +### You are not in control of the things that you own + +#### Companies selling features as services are bullshitting you + +We have reached a ridiculous point where you (obviously) have to pay for something you buy, and **you need to pay extra to use it.** + +I recently read about a new BMW car (I forgot the model but you can look it up pretty easily on the internet), which comes with heated seats, but you have to pay extra to use the heated seats. Now you might be thinking, they charge extra for the heated seats because probably most people don't need it and it's expensive so they did this to reduce the car's cost. +Boy, are you wrong. This fucking car, comes with heated seats. When you pay for the car, you pay for the heated seats. You own the seats. But you need to pay them extra *on a monthly basis* to use those seats. What kind of idiot would be okay with this? This is not ethical. They've realised that people will pay for literally anything if they sugarcoat it. This is what they think about their customers. That they're dumb enough to buy everything they sell. + +Tesla also did something like this a few years ago! (not sure if they still are doing this kind of thing) +Their lower end cars would come with all those cameras and stuff but it won't come with autopilot mode enabled. But you need to pay $5000 to get the feature enabled. +You. paid. for. the. equipment. Now you need to pay $5000 to use it. Imagine buying a house, but you need to pay the property dealer extra so they can unlock the kitchen. + +The main point is, you're not paying to get the kitchen built, you're paying to use the pre-built kitchen you already paid for. + +## Your opinions are not yours anymore + +The internet influences a lot of us. Sometimes in good ways I must say, but the downsides can't help but take over the good sides. +The media really wants to force their opinions down your throat. They want you to believe in things that would benifit them. It's worse than ever because +media is now greatly controlled by people who *make* these devices you use to access the internet. They have the authority to control what is being shown to you, and what isn't. You're totally not free. You are in virtual jails created by huge corporations, filled with targeted advertising, and social engineering. diff --git a/content/blog/2022/why-i-customize-everything-about-my-system.md b/content/blog/2022/why-i-customize-everything-about-my-system.md new file mode 100644 index 0000000..fcf0a00 --- /dev/null +++ b/content/blog/2022/why-i-customize-everything-about-my-system.md @@ -0,0 +1,58 @@ +--- +title: "Why I Try to Customize Everything About My System" +date: 2022-07-19T01:28:07+05:30 +--- + +I love customizing things. I always go out of my way to make sure my phone, or my laptop, is doing what I want, the way I want. +Recommended usage? Pre-defined shortcuts? Don't tell me how to use my computer. I tell my computer how I want to use it. And make it adapt to that! + +I like to make my desktop/phone look good (doesn't matter if other people find it pretty though), and I love it when everything is easily accessible and all that. +Moreover, I like when all my devices look similar, and work similarly. It starts from my laptop and my phone having an anime wallpaper to radiate max weeb energy, +but also includes everything being of my favourite color, etc. + +## It's actually a learning experience + +Going out of the way to customize software is actually a learning experience, if you're very serious about it, that is. +I learned to flash phones in like 2018 because I wanted to install a newer version of android on my phone, and now I only run custom ROMs on my phone. +And that's for a very good reason. + +All phones are built differently, and nowadays phone manufacturers add new features and remove old features for various reasons that I won't cover, +but basically 2 phones both running the same OS still have many differences. I don't like it because when I use a device (i.e a phone), I don't want to waste my +time learning some new system or missing some (software) feature because the manufacturer decided to remove it. This is why always use LineageOS +(or another AOSP-based operating system, but Lineage is my preferred choice) on my phones. Really because I'm used to the UI, I love the Trebuchet launcher, +and the default ringtone is awesome (literally the only default ringtone that isn't cringe) + +And this has taught me how to work with fastboot, twrp, etc to flash phones and install different operating systems on it. It's not very hard +(but kinda dangerous for your device, I will say) to do but spending hours putting different OSs on my phone has helped me understand how +phone operating systems really work. + +Similarly, on the desktop side, my quest to get the best desktop experience, with an interface which works hand-in-hand with my thought process, +and everything being plastered with my favourite color, purple, I learned a lot about the command line, linux, etc. + +So if you want to learn more about computers, I highly recommend trying to customize them. I.e tweak your desktop to your liking, try out different programs, +or (if you want to learn programming), try to build alternatives to the programs you already use, with a different UI or colorscheme that you like. + +## It boosts my productivity + +I use tiling window managers and CLI apps, because these are very configurable/extensible. This not only helps me understand how my operating system really works, +but also lets me tweak everything to my liking and "match how I really think". What that means is if I like to work with the keyboard I can configure my system to +be as keyboard-driven as possible so not only it tires my mind less, it really boosts my productivity. And this isn't something you can achieve with proprietary +software since it's not very configurable. This is a very good reason to use only free and open source software since it boosts your productivity. + +I'm not saying that oh you should use XMonad and spend hours configuring it. I'm saying you should try out different things, window managers, apps, whatever. +You should find out what suits your workflow and use that. Or, you can even fork/create one of your programs that fulfil one specific requirement you have. +Trying out different things is always a good thing. And it really teaches you about the different ways a task can be performed on a computer. + +Those "things" can be anything, right, maybe just switch to firefox if you use chrome (seriously, don't use chrome/opera/edge), or if you're on firefox install icecat. +Play around with different software, tweak it to your liking. See what differences the alternatives have. +Maybe install a different operating system, try dual booting, just try out different stuff! And learn from it! + +## Conclusion + +I just want my phone/computer to do what I want. And I want the UI to match my tastes. And I think this kinda adds "personality" to my devices! +I think anyone who wants to learn computers should play around with the different settings, etc because this in my opinion is one of the best ways to +understand how your system actually works. + +Also, if you're a programmer (doesn't matter if you're learning) it could inspire you to work on different projects. Which is always helpful. +Personally, I learned shell scripting just because I wanted to share my linux desktop audio and mic input on discord at the same time, and I +created a shell script for that! It solved my problem, and added shell scripting to my skill set! diff --git a/content/blog/2022/why-social-media-should-be-avoided.md b/content/blog/2022/why-social-media-should-be-avoided.md new file mode 100644 index 0000000..b7c8577 --- /dev/null +++ b/content/blog/2022/why-social-media-should-be-avoided.md @@ -0,0 +1,165 @@ +--- +title: "Why Social Media Should Be Avoided" +date: 2022-07-15T17:56:56+05:30 +--- + +Welcome to Vidhu Kant's Based and Redpilled Blog. Enjoy your time here. +If you have any opinions to share I'd be more than happy to hear. + +This one's gonna be the legendary, shitting on social media blog post. + +# Social media is evil and is using you. + +Okay, I will try my best to not be extreme and try to explain this topic in layman's terms. +Basically, there are way too many bad things with social media. And I don't see those flaws going away anytime soon. +There is no "one flaw" there are many and you need to look at these said flaws in different perspectives to understand what I mean. + +I won't be covering much about the "privacy" part (I'd love to but that's what everyone does), +I'll be explaining how social media usage is bad for your mental health and is very bad for the society. +There are many more arguments one can make but I'll leave that up to those people who are smarter than me (especially in the fields I don't cover here) + +For clarification I will say, I'm not including messaging apps with my reasoning though many things (especially in the privacy section) do apply there. +I personally think they *are* somewhat important. I don't like using them but you can't just leave some of these services. +(You can take that as an excuse, but I stand with my point) + +## Glossary + +- SNS: Social Networking Service +- PII: Publically Identifiable Information + +## Social media can manipulate your views. + +Social media is very good at manipulating your views. You won't realise but your thinking gets greatly affected by [SNS](#glossary). + +### Their recommendation system plays with your mentality + +These social networking sites are really good at analysing your likes and dislikes, and manipulate the recommendations shown to you based on that. +It's a very convenient and honestly kinda cool system. But it's also very dangerous. + +This kind of system that adapts to your recommendations would make you fall into a rabbit hole and would make you believe in this one thing and one thing only. +You'd watch some kind of conspiracy videos and YouTube would recommend more of them. If you're not being careful and are in a vulnerable state of mind +you'd really start believing in those kinds of things. This is actually a really dangerous thing. On the surface it might just seem like a cool system +which would help you find something like, music that really matches your tastes. But this kind of system can very easily destroy your mindset. +I'm not saying this has the potential to do this kind of thing. If you pay attention you might spot victims of this *pretty easily*. + +### Our mind seeks validation, social media provides that in excess + +Seeking validation is a human trait, and I'm not saying that it's a bad thing. When you do some task you'd try to seek others to +give you a compliment, or to praise you. +Which is a basic human instinct, but social media gives us an incredible amount of validation, which is literally like a trap. +They want to give you the dopamine rush you need. It doesn't seem too bad at the start but soon you'll realise that you are addicted to it. +All these "challenges" and "social experiments" and other trends that require your participation, they try to keep you in the community and make sure that you +don't leave. + +This system is designed in this way because they want user retention. You are literally generating the big tech companies money by using their platform. +And in return you really are not getting anything useful. They try to understand what you like, and collect your data, to fine-tune the ads shown to you. +To all these big social media companies you're just a slave that can't leave their product, and generates you money and fame. + +### Social media forces you to follow what's mainstream + +This goes with many things. Some brand that manufactures something, some k-pop group, whatever. +Social media has made it so that you just have to follow mainstream things. It keeps ~~shilling~~ promoting all these products, +and these "influencers" promoting random garbage makes you think that you really need to spend money on this thing that you really don't need. + +I'm not saying either of these "influencers" or the advertisers are wrong, this is just how social media works, and they know it. +Everything seems to be monetised at this point. Most of the popular social media accounts are just dedicated to shilling all this mainstream media, +mainstream products. And, really, pressuring you to spend your time/money on them too. Which sadly seems to be normal at this point, but: + +#### Social media has taken away most people's personality at this point + +This is a very, very personal opinion of mine. Most of the social media users I know, (I mean everyone uses SNS at this point, but I'm talking about the hardcore users) +are living this constant fight to consoom as much memes, and as much information they can. It's like if you haven't followed this particular account or don't like this +meme you'd be exiled or some shit. + +Also, everyone just wants to copy others. They try to copy some famous YouTuber to become the center of attention, things like that. (copying should not be confused +with taking inspiration and immitating others to learn from them. Which kind of is a thing in the YouTube community) + +It almost seems like people don't even have a personality anymore. They are supposed to believe this one opinion. If you don't agree or do something else twitter +is literally going to "cancel" you. This is dumb. And this is a reality. + +### Social media takes away your freedom + +Most social networking services are owned by private companies, they don't care about you. They care about money. And you are a just a tool to make them money. +To even look at a post they want you to sign up. You need to give your PII (Publically Identifiable Information) in order to register with their services. + +You can't just opt out of them not collecting your data. You need to give them some of your most sensitive private info to even use their service. +They put unnecessary regulations on you and demand you to share your personal data. You don't have the freedom to choose what is visible to others and what is +kept private. And then they put up vague rules in their "content policy" to keep you confused. Suppose you post something and it gets removed, they won't +tell you why it got removed. They just give a vague reply like "this post goes against our terms of service/community standards". They don't give you a reason. +They want to keep you confused and afraid that you won't make this mistake again lest they terminate your account. + +There are a LOT of platforms that take away your freedom of speech in various ways. They won't allow you to say anything that goes against the moderators' personal +beliefs. This in a way engineers the society to also agree to whatever they want them to believe. + +### Social media gives you false hope + +I've seen this case irl with a few people and it infuriates me. +You might think that these bullshit services teach you life hacks and different things, because "internet is a great way to share information" +which it is, but social media definitely not one of those places. + +People absolutely believe that scrolling through instagram would give them access to news, and facts, and various scientific knowledge which also trains their mind +to believe that there's nothing wrong with using instagram (or whatever). It doesn't cross their mind that they might be making use of this particular service/app +a bit too much. And social media is designed that way. Again, it's supposed to keep you on it. It'd brainwash you into believeing that what you are doing is right +and you should never leave this particular service. In my opinion these "big tech" are just abusing their users. Manipulating them into using their service more +and more and get them addicted to it. + +I cannot stress this enough. To big tech you are a tool to generate money (and fish personal data out of). You should avoid them whenever you can. You should always +be in moderation of what services you use and what personal data you share. You are much better than this. Don't fall into their trap. +It's your right to be in control of your personal data and they take it away. + +## ~~Social media~~ most of the services on the internet strip away your privacy. + +Apart from the psychological aspect, they are collecting your data. Which can be considered a massive breach to your privacy. + +I like to call the modern internet a "privacy shithole". Every other big website is just after your personal data. And this "I have nothing to hide" +and "Privacy is for criminals" mindset is very toxic towards yourself and is making the situation worse. + +### Before allowing a site/app access to your device, decide if it really needs it + +Whenever you install an app on your phone, or visit a website, they ask you for various permissions. Look at them and think about it - does said app/website +really needs that access? And do you want to allow it? + +Take facebook for an example, when you install the app, it (at least on android) asks for a bunch of "App Permissions". Those include things like + +- Microphone access +- Location access +- Camera access +- Filesystem access +- Gyroscope access +- many more (I don't use fb so I don't fully know) + +This seems pretty normal, most people are familiar with the "allow \_\_\_\_ access to \_\_\_\_?" message. Many even click allow without even reading it. +Which is by far one of the worst things you can do with your phone. + +When you see such message, think. *Do you really want facebook to have access to your microphone? Why would it use the mic?* +Surely if you are using the calling or video recording feature you might need mic access. *But are you even using it?* +If not, do NOT give mic access. It's your right to decline mic access to them. They are spying on you and you should take an initiative to go against them. + +I'm saying this a lot, but this is a really effective way how facebook fishes out your data. It's listening to you. +While you are using their app they would record your audio and analyse that, to generate better ad recommendations for you. +It's totally a system designed to act against you. It's a very dangerous thing that they are recording your personal data. +Things you might not want anyone to know, they are recording it all. You should not use such apps. It's a dangerous concept. + +Your data needs to be private. Even if you think you "have nothing to hide", hear me out: +**They are making money with YOUR personal information.** +And you aren't even getting anything in return! What did they give to you? Mental stress? Jealousy? Desire to spend money/time/mental energy on something useless? +Trust me, social media is not worth it for its downsides. + +# But how are we supposed to exchange information on the internet? + +Normally I'd explain how easy it is to set up a website (without even knowing any programming!) but this is supposed to be an article for *everyone*, +wether you understand tech or not. ([tell me](/contact/) if I managed to do that!) So while I don't 100% agree with it, I'd recommend everyone to use social media under moderation, and try to minimise the usage, +share as little personal information as possible. But really I'd just say - don't use social media! Don't base your lifestyle around it. +There are better things out there. There are many more things to explore on the internet! +The internet is full of very informative websites without the garbage monetization and useless features included with social media. +But you need to explore. Try out <https://wiby.me>, it's a search engine which only allows personal, small websites without many ads, etc. +If you know other websites without unnecessary trackers, etc, you can also submit them to [wiby](https://wiby.me)! + +## Advice for organisations/businesses + +Also, this is advice for organisations/businesses, etc. Set up your own websites. You can totally do that. It doesn't have to be one with a very modern UI. +Focus more on the content, not aesthetics (but also don't make it an eyesore!). +Make your users want to re-visit your website. Host all the useful info related to your brand on the website. +When someone asks, just give them your website. You are free to do whatever with your site, you don't have to comply with any other service's terms of use, +and it just looks MUCH more professional! + diff --git a/content/blog/_index.md b/content/blog/_index.md new file mode 100644 index 0000000..fd6b895 --- /dev/null +++ b/content/blog/_index.md @@ -0,0 +1,4 @@ +--- +title: "All Posts" +heading: "Vidhu Kant's Based and Redpilled Blog About Weeaboo Garbage" +--- diff --git a/content/contact.md b/content/contact.md new file mode 100644 index 0000000..fb540ac --- /dev/null +++ b/content/contact.md @@ -0,0 +1,31 @@ +--- +title: Vidhu Kant Sharma's Contact + +img: /images/gray-area/kitagawa_marin.webp +imgAlt: Kitagawa Marin - Image for aesthetics (not mine) + +navpage: "contact" + +bgColor: "#262626" +--- + +# How to contact me? + +*It's not like I wan't you to talk to me ba- baka!* + +lol idk a contact page sounded cool so I created one. If you just want to respond to my blog or something feel free to send me an email! +Because I don't (and probably won't) have a comment section. That seems troublesome + +## E-Mail + +Right now I only have a public email address. Use it! +Public email address: [vidhukant@vidhukant.xyz](mailto:vidhukant@vidhukant.xyz) + +## GitHub + +If it's related to some project I'm maintaining which has a GitHub repo, use that +unless it's like, extremely important or something. Then use email. + +## Why am I not on social media? + +[Because...](/blog/2022/why-social-media-should-be-avoided) it's tiring and boring! diff --git a/content/danbooru-notice.md b/content/danbooru-notice.md new file mode 100644 index 0000000..b2f7384 --- /dev/null +++ b/content/danbooru-notice.md @@ -0,0 +1,25 @@ +--- +title: I am allowed to use these anime images from danbooru | vidhukant.xyz +img: /images/gray-area/sakurajima_mai.webp +imgAlt: Sakurajima Mai from Seishun Buta Yarou Series +--- + +# The anime images on this website are taken from Danbooru + +The anime images on <https://vidhukant.xyz> are taken from <https://danbooru.donmai.us> which is an image board website. + +Danbooru's [Terms of Service](https://danbooru.donmai.us/terms_of_service) allows me to distribute the images uploaded by users. +If you think there was a mistake and I don't have the rights to use these images, and you want them to be taken down, +please [contact](/contact/) me. + +# Where you can find such images + +These are the images on my website that are taken from Danbooru. + +- On the [homepage](/) there is an image taken from danbooru on the second section +- On the [contact page](/contact/) on the right side (on desktops) or at the top (on mobile) +- On [the current page](/danbooru-notice/) on the right side (on desktops) or at the top (on mobile) + +If not specified otherwise, I own the rights all of the other images. +All the images and text on this website are under the [CC BY-NC-SA](https://creativecommons.org/licenses/by-nc-sa/4.0/) +license unless stated otherwise on this page or anywhere else. diff --git a/content/docs/_index.md b/content/docs/_index.md new file mode 100644 index 0000000..e71f51e --- /dev/null +++ b/content/docs/_index.md @@ -0,0 +1,5 @@ +--- +title: Contents +heading: Vidhu Kant's Docs +description: Here I aggregate and store the documentation of all the programs I've written +--- diff --git a/content/docs/mal2go/_index.md b/content/docs/mal2go/_index.md new file mode 100644 index 0000000..66f369a --- /dev/null +++ b/content/docs/mal2go/_index.md @@ -0,0 +1,4 @@ +--- +title: MAL2Go +description: MyAnimeList V2 API wrapper for Go +--- diff --git a/content/docs/mal2go/v4/_index.md b/content/docs/mal2go/v4/_index.md new file mode 100644 index 0000000..61cac83 --- /dev/null +++ b/content/docs/mal2go/v4/_index.md @@ -0,0 +1,11 @@ +--- +title: MAL2Go V4 +description: Version 4 of MAL2Go MyAnimeList API Wrapper +--- + +MAL2Go V4 supports almost all of the functionality provided by the MyAnimeList API. Only working with the forums is not supported. +Everything else is supposed to properly work. If there is any bug please open an issue on the [GitHub repo](https://github.com/MikunoNaka/MAL2Go) or email me at [vidhukant@vidhukant.xyz](mailto:vidhukant@vidhukant.xyz). Forums support coming soon. + +### MAL2Go is divided into multiple packages that perform various API interactions. + +**MAL2Go documentation is incomplete but has been tested and works properly with MAL2Go v4.0.1** diff --git a/content/docs/mal2go/v4/anime/_index.md b/content/docs/mal2go/v4/anime/_index.md new file mode 100644 index 0000000..764cb33 --- /dev/null +++ b/content/docs/mal2go/v4/anime/_index.md @@ -0,0 +1,6 @@ +--- +title: Anime +description: Everything related to anime (except animelists) +weight: 1 +--- + diff --git a/content/docs/mal2go/v4/anime/get-anime-by-id.md b/content/docs/mal2go/v4/anime/get-anime-by-id.md new file mode 100644 index 0000000..ca310b3 --- /dev/null +++ b/content/docs/mal2go/v4/anime/get-anime-by-id.md @@ -0,0 +1,42 @@ +--- +title: "Getting an anime's information" +description: "Specify an anime's ID to get all the data about it." +weight: 3 +--- + +`GetAnimeById` takes in an anime's ID (which can be obtained using [`SearchAnime`](/docs/mal2go/v4/anime/search-for-an-anime) or through the URL of the anime's page on MAL) and returns information about it. This method takes these arguments: + +- `id int` The anime's ID +- `fields []string` The fields to include in the response. [Here](/docs/mal2go/v4/anime/types#mal2goanimeanime) is a list of the valid fields. Just using an empty slice (`[]string{}`) will include all the fields. + +Example: + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/anime" + "log" + "fmt" +) + +func main() { + authToken := "YOUR_TOKEN_HERE" + myClient := anime.Client { + AuthToken: "Bearer " + authToken, + } + + id := 457 + fields := []string{"title", "my_list_status", "num_episodes"} + + anime, err := myClient.GetAnimeById(id, fields) + if err != nil { + log.Fatal(err) // remember kids, always handle errors + } + + fmt.Printf("You have watched %d out of %d episodes in %s. Your list status for %s is %s.\n", anime.MyListStatus.EpWatched, anime.NumEpisodes, anime.Title, anime.Title, anime.MyListStatus.Status) +} +``` + +Above example prints something like +`"You have watched 26 out of 26 episodes in Mushishi. Your list status for Mushishi is completed."` diff --git a/content/docs/mal2go/v4/anime/get-anime-ranking.md b/content/docs/mal2go/v4/anime/get-anime-ranking.md new file mode 100644 index 0000000..6479b6c --- /dev/null +++ b/content/docs/mal2go/v4/anime/get-anime-ranking.md @@ -0,0 +1,57 @@ +--- +title: "Get anime ranking list" +description: "Returns a list of animes sorted by their rank" +weight: 4 +--- + +`GetAnimeRanking` returns a list of animes sorted by their rank. It accepts these arguments: + +- `rankingType string` Ranking type can be: + + `all` + + `airing` + + `upcoming` + + `tv` + + `ova` + + `movie` + + `special` + + `bypopularity` + + `favorite` +- `limit int` Is the max amount of results to get. Max is 500. +- `offset int` Is the "offset" for results. If offset is greater than 0 the first n number of reults will be ignored. +- `nsfw bool` Wether to include NSFW rated results +- `fields []string` The fields to include in the response. [Here](/docs/mal2go/v4/anime/types#mal2goanimeanime) is a list of the valid fields. Just using an empty slice (`[]string{}`) will include all the fields. + +Example: + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/anime" + "log" + "fmt" +) + +func main() { + authToken := "YOUR_TOKEN_HERE" + myClient := anime.Client { + AuthToken: "Bearer " + authToken, + } + + rankingType := "movie" + limit, offset := 10, 0 + nsfw := true // include NSFW results + fields := []string{"title"} + + ranking, err := myClient.GetAnimeRanking(rankingType, limit, offset, nsfw, fields) + if err != nil { + log.Fatal(err) // remember kids, always handle errors + } + + for _, i := range ranking { + fmt.Printf("#%d: %s\n", i.RankNum, i.Title) + } +} +``` + +Above example prints the top 10 ranked anime movies on MyAnimeList. diff --git a/content/docs/mal2go/v4/anime/get-seasonal-anime.md b/content/docs/mal2go/v4/anime/get-seasonal-anime.md new file mode 100644 index 0000000..f473a02 --- /dev/null +++ b/content/docs/mal2go/v4/anime/get-seasonal-anime.md @@ -0,0 +1,61 @@ +--- +title: "Get seasonal anime list" +description: "Specify an year and season to get animes from" +weight: 5 +--- + +`GetSeasonalAnime` returns a list of animes that released in the specified season and year. Accepted arguments are: + +- `year string` Is the max amount of search results to get. Max is 500. +- `season string` Is the "offset" for the search results. If offset is greater than 0 the first n number of search reults will be ignored. +Possible seasons: + + `winter` + + `spring` + + `summer` + + `fall` +- `sort string` Wether to include NSFW rated search results +Possible sorts: + + `anime_score` + + `anime_num_list_users` +- `limit int` Is the max amount of results to get. Max is 500. +- `offset int` Is the "offset" for results. If offset is greater than 0 the first n number of reults will be ignored. +- `nsfw bool` Wether to include NSFW rated results +- `fields []string` The fields to include in the response. [Here](/docs/mal2go/v4/anime/types#mal2goanimeanime) is a list of the valid fields. Just using an empty slice (`[]string{}`) will include all the fields. + +Example: + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/anime" + "log" + "fmt" +) + +func main() { + authToken := "YOUR_TOKEN_HERE" + myClient := anime.Client { + AuthToken: "Bearer " + authToken, + } + + year := "2022" + season := "spring" + sort := "anime_num_list_users" + limit, offset := 10, 0 + nsfw := true // include NSFW results + fields := []string{"title"} + + seasonalAnimes, err := myClient.GetSeasonalAnime(year, season, sort, limit, offset, nsfw, fields) + if err != nil { + log.Fatal(err) // remember kids, always handle errors + } + + fmt.Printf("Here are some popular animes from %s, %d\n", seasonalAnimes.Season.Name, seasonalAnimes.Season.Year) + for _, i := range seasonalAnimes.Animes { + fmt.Println(i.Title) + } +} +``` + +Above example prints 10 animes from spring 2022 with the most users. diff --git a/content/docs/mal2go/v4/anime/get-suggested-anime.md b/content/docs/mal2go/v4/anime/get-suggested-anime.md new file mode 100644 index 0000000..98dc01c --- /dev/null +++ b/content/docs/mal2go/v4/anime/get-suggested-anime.md @@ -0,0 +1,46 @@ +--- +title: "Get suggested animes" +description: "Returns some suggestions for the user" +weight: 6 +--- + +`GetSuggestedAnime` returns a list of animes suggested to the authenticated user. + +- `limit int` Is the max amount of results to get. Max is 100. +- `offset int` Is the "offset" for results. If offset is greater than 0 the first n number of reults will be ignored. +- `nsfw bool` Wether to include NSFW rated results +- `fields []string` The fields to include in the response. [Here](/docs/mal2go/v4/anime/types#mal2goanimeanime) is a list of the valid fields. Just using an empty slice (`[]string{}`) will include all the fields. + +Example: + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/anime" + "log" + "fmt" +) + +func main() { + authToken := "YOUR_TOKEN_HERE" + myClient := anime.Client { + AuthToken: "Bearer " + authToken, + } + + limit, offset := 10, 0 + nsfw := true // include NSFW results + fields := []string{"title"} + + suggestedAnimes, err := myClient.GetSuggestedAnime(limit, offset, nsfw, fields) + if err != nil { + log.Fatal(err) // remember kids, always handle errors + } + + for _, i := range suggestedAnimes { + fmt.Println(i.Title) + } +} +``` + +Above example prints 10 animes suggested to the authenticated user. diff --git a/content/docs/mal2go/v4/anime/search-for-an-anime.md b/content/docs/mal2go/v4/anime/search-for-an-anime.md new file mode 100644 index 0000000..addf43a --- /dev/null +++ b/content/docs/mal2go/v4/anime/search-for-an-anime.md @@ -0,0 +1,50 @@ +--- +title: "Searching for an anime" +description: "Use a search string to get a list of animes" +weight: 2 +--- + +Use the `SearchAnime` method to search for an anime. This method takes these arguments: + +- `searchString string` Is pretty obvious. This term is used to search for an anime on MyAnimeList. +- `limit int` Is the max amount of search results to get. Max is 100. +- `offset int` Is the "offset" for the search results. If offset is greater than 0 the first n number of search reults will be ignored. +- `nsfw bool` Wether to include NSFW rated search results +- `fields []string` The fields to include in the response. [Here](/docs/mal2go/v4/anime/types#mal2goanimeanime) is a list of the valid fields. Just using an empty slice (`[]string{}`) will include all the fields. +The MyAnimeList API is picky about what fields to actually include with search results. To be sure that you are getting all the data it is recommended to use the [`GetAnimeById`](/docs/mal2go/v4/anime/get-anime-by-id) method which ensures that all the required fields are included. + + +Example: + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/anime" + "log" + "fmt" +) + +func main() { + authToken := "YOUR_TOKEN_HERE" + myClient := anime.Client { + AuthToken: "Bearer " + authToken, + } + + searchString := "mushishi" // search for mushishi + limit := 10 // get 10 search results + offset := 0 // no offset + searchNsfw := false // don't include NSFW results + fields := []string{"title"} // only pull the title + + searchResults, err := myClient.SearchAnime(searchString, limit, offset, searchNsfw, fields) + if err != nil { + log.Fatal(err) // remember kids, always handle errors + } + + // loop over the search results and print the title + for _, anime := range searchResults { + fmt.Println(anime.Title) + } +} +``` diff --git a/content/docs/mal2go/v4/anime/setting-up.md b/content/docs/mal2go/v4/anime/setting-up.md new file mode 100644 index 0000000..30c4339 --- /dev/null +++ b/content/docs/mal2go/v4/anime/setting-up.md @@ -0,0 +1,34 @@ +--- +title: "Setting up" +description: "Install MAL2Go/anime and write some boilerplate" +weight: 1 +--- + +How to use the anime package: + +1. Install the anime package using this command + +``` fish +go get github.com/MikunoNaka/MAL2Go/v4/anime +``` + +2. Import and initialise the anime client. The client holds the authentication token of the user. The OAuth token should be set as "Bearer TOKEN". Refer to below example + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/anime" +) + +func main() { + // you should never hard-code tokens. This is just an example + authToken := "YOUR_TOKEN_HERE" + myClient := anime.Client { + AuthToken: "Bearer " + authToken, + } +} +``` + +Every program using MAL2Go needs something like this to initialise everything (that you need). +And now we are ready to use the MAL2Go/anime package! diff --git a/content/docs/mal2go/v4/anime/types.md b/content/docs/mal2go/v4/anime/types.md new file mode 100644 index 0000000..176c774 --- /dev/null +++ b/content/docs/mal2go/v4/anime/types.md @@ -0,0 +1,141 @@ +--- +title: "Types" +description: "The structs defined in this package" +weight: 7 +--- + +## MAL2Go/anime.Anime + +These are the valid fields you can use while getting data using MAL2Go/anime package. + +| Search Field | Struct Field | Type | Description | +|-------------------------------|-----------------|--------------------------------------------------|--------------------------------------------------------| +| id | Id | `int` | ID of the anime | +| title | Title | `string` | Title | +| main\_picture | MainPicture | [`util.Picture`](#mal2goutilgenre) | Cover picture | +| alternative\_titles | AltTitles | [`util.AltTitles`](#mal2goutilalttitles) | Alternative titles | +| start_date | StartDate | `string` | Date started airing | +| end\_date | EndDate | `string` | Date ended airing | +| synopsis | Synopsis | `string` | Synopsis | +| mean | MeanScore | `float32` | Mean score | +| rank | Rank | `int` | Rank of the anime (0 when cannot be calculated) | +| popularity | Popularity | `int` | Popularity | +| num\_list\_users | NumListUsers | `int` | Number of List Users | +| num\_scoring\_users | NumScoringUsers | `int` | Number of Scoring List Users | +| nsfw | NsfwStatus | `string` | NSFW rating (white = SFW, black = NSFW, gray = medium) | +| created\_at | CreatedAt | `string` | Created At | +| updated\_at | UpdatedAt | `string` | Updated At | +| media\_type | MediaType | `string` | Media Type | +| status | Status | `string` | Status | +| genres | Genres | [`[]util.Genre`](#mal2goutilgenre) | List of Genres | +| my\_list\_status | MyListStatus | [`ListStatus`](#mal2goanimeliststatus) | Authenticated user's List Status | +| *none, automatically applied* | ListStatus | [`ListStatus`](#mal2goanimeliststatus) | List status (for when looking up another user's list) | +| num\_episodes | NumEpisodes | `int` | Number of Episodes | +| start\_season | StartSeason | [`Season`](#mal2goanimeseason) | Season in Which the Anime Started Airing | +| broadcast | Broadcast | [`Broadcast`](#mal2goanimebroadcast) | Broadcast Info | +| source | Source | `string` | Source Media | +| average\_episode\_duration | DurationSeconds | `int` | Average Episode Duration (seconds) | +| rating | Rating | `string` | Rating (pg\_13, etc) | +| pictures | Pictures | [`[]util.Picture`](#mal2goutilgenre) | Pictures | +| background | Background | `string` | Background Info | +| related\_anime | RelatedAnime | [`[]Related`](#mal2goanimerelated) | Related Anime | +| related\_manga | RelatedManga | `not supported yet` | Related Manga (currently not supported) | +| recommendations | Recommendations | [`[]Recommendation`](#mal2goanimerecommendation) | Recommendations | +| studios | Studios | [`[]Studio`](#mal2goanimestudio) | List of Studios | +| statistics | Statistics | [`AnimeStatistics`](#mal2goanimeanimestatistics) | Statistics | + +## MAL2Go/anime.Season + +| Struct Field | Type | Description | Potential Values | +|--------------|----------|--------------------|-------------------------------------------------| +| Year | `int` | Year | Any positive integer | +| Season | `string` | Season of the year | `"winter"` / `"spring"` / `"summer"` / `"fall"` | + +## MAL2Go/anime.AnimeStatistics + +| Struct Field | Type | Description | +|--------------|---------------|----------------------| +| NumListUsers | `int` | Number of list users | +| Status | `to be added` | List status of user | + +## MAL2Go/anime.Broadcast + +| Struct Field | Type | Description | Potential Values | +|--------------|----------|-------------------|------------------------------| +| Day | `string` | Day of the week | Day of the week or `"other"` | +| Time | `string` | Time of broadcast | String like "01:25" or `nil` | + +## MAL2Go/anime.Related + +| Struct Field | Type | Description | Potential Values | +|-----------------------|------------------------------|------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| +| Anime | [`Anime`](#mal2goanimeanime) | Related anime | Any Anime | +| RelationType | `string` | Relation of this anime with selected one | `"sequel"`, `"prequel"`, `"alternative_setting"`, `"alternative_version"`, `"side_story"`, `"parent_story"`, `"summary"`, `"full_story"` | +| RelationTypeFormatted | `string` | RelationType with pretty formatting | Same as RelationType but with pretty formatting | + +## MAL2Go/anime.Studio + +| Struct Field | Type | Description | +|--------------|----------|-------------| +| Id | `int` | Studio ID | +| Name | `string` | Studio name | + +## MAL2Go/anime.Recommendation + +| Struct Field | Type | Description | +|--------------|------------------------------|---------------------------------------------------| +| Anime | [`Anime`](#mal2goanimeanime) | Recommendated anime for those who like this anime | +| Num | `int` | Number of recommendations (times recommended) | + +## MAL2Go/anime.ListStatus + +| Struct Field | Type | Description | Potential Values | +|----------------|----------|-----------------------------------------|------------------------------------------------------------------------------------| +| Status | `string` | Status | `"watching"`, `"completed"`, `"on_hold"`, `"dropped"`, `"plan_to_watch"`, or `nil` | +| Score | `int` | Score | 0 to 10 | +| StartDate | `string` | Start date for the user | date string or `nil` | +| FinishDate | `string` | Finish date for the user | date string or `nil` | +| Priority | `int` | Priority | | +| Tags | `string` | probably broken | | +| Comments | `string` | Comments | | +| UpdatedAt | `string` | Time last updated by the user | | +| EpWatched | `int` | Number of episodes watched | | +| IsRewatching | `bool` | If user is rewatching this anime or not | `true` or `false` | +| TimesRewatched | `int` | Times user has rewatched this | | +| RewatchValue | `int` | Frequency of rewatches | 0 to 5 (never, very low, low, medium, high, very high) | + +## MAL2Go/*util*.Picture + +Holds the cover picture/related picture's URLs in different sizes + +| Struct Field | Type | Description | Potential Values | +|--------------|----------|----------------------|----------------------------------------------| +| Medium | `string` | Medium sized picture | non empty string containing URL of picture | +| Large | `string` | Large sized picture | string containing the URL or an empty string | + +## MAL2Go/*util*.AltTitles + +| Struct Field | Type | Description | Potential Values | +|--------------|------------|-----------------------|---------------------------| +| Synonyms | `[]string` | Synonyms of the title | `[]string` or empty slice | +| En | `string` | English title | any string or `""` | +| Ja | `string` | Japanese title | any string or `""` | + +## MAL2Go/*util*.Genre + +| Struct Field | Type | Description | +|--------------|----------|-------------------| +| Id | `int` | ID of the genre | +| Name | `string` | Name of the genre | + +## MAL2Go/*util*.StatusStatistics + +**NOTE:** Due to changes with the MyAnimeList API, this might be broken in versions upto v4.1.0, this will be fixed in the next update. + +| Struct Field | Type | Description | +|--------------|----------|-------------------------------------------------| +| Watching | `string` | Number of users watching this anime | +| Completed | `string` | Number of users who have completed this anime | +| OnHold | `string` | Number of users who have put this anime on hold | +| Dropped | `string` | Number of users who have dropped this anime | +| PlanToWatch | `string` | Number of users planning to watch this anime | diff --git a/content/docs/mal2go/v4/manga/_index.md b/content/docs/mal2go/v4/manga/_index.md new file mode 100644 index 0000000..185d116 --- /dev/null +++ b/content/docs/mal2go/v4/manga/_index.md @@ -0,0 +1,6 @@ +--- +title: Manga +description: Everything related to manga (except mangalists) +weight: 2 +--- + diff --git a/content/docs/mal2go/v4/manga/get-manga-by-id.md b/content/docs/mal2go/v4/manga/get-manga-by-id.md new file mode 100644 index 0000000..682ef29 --- /dev/null +++ b/content/docs/mal2go/v4/manga/get-manga-by-id.md @@ -0,0 +1,44 @@ +--- +title: "Getting a manga's information" +description: "Specify a manga's ID to get all the data about it." +weight: 3 +--- + +`GetMangaById` takes in a manga's ID (which can be obtained using [`SearchManga`](#searching-for-a-manga) or through the URL of the manga's page on MAL) and returns information about it. This method takes these arguments: + +- `id int` The manga's ID +- `fields []string` The fields to include in the response. [Here]() is a list of the valid fields. Just using an empty slice (`[]string{}`) will include all the fields. + +Example: + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/manga" + "log" + "fmt" +) + +func main() { + authToken := "YOUR_TOKEN_HERE" + myClient := manga.Client { + AuthToken: "Bearer " + authToken, + } + + id := 103890 + fields := []string{"title", "my_list_status", "num_chapters"} + + manga, err := myClient.GetMangaById(id, fields) + if err != nil { + log.Fatal(err) // remember kids, always handle errors + } + + fmt.Printf("You have read %d out of %d chapters in %s. Your list status for %s is %s.\n", manga.MyListStatus.ChaptersRead, manga.NumChapters, manga.Title, manga.Title, manga.MyListStatus.Status) +} +``` + +Above example prints something like +`"You have read 7 out of 187 chapters in Bokutachi wa Benkyou ga Dekinai. Your list status for Bokutachi wa Benkyou ga Dekinai is reading."` + +Above output shows blank status because mushishi is not in my list. This is expected. diff --git a/content/docs/mal2go/v4/manga/get-manga-ranking.md b/content/docs/mal2go/v4/manga/get-manga-ranking.md new file mode 100644 index 0000000..ef5435f --- /dev/null +++ b/content/docs/mal2go/v4/manga/get-manga-ranking.md @@ -0,0 +1,57 @@ +--- +title: "Get manga ranking list" +description: "Returns a list of mangas sorted by their rank" +weight: 4 +--- + +`GetMangaRanking` returns a list of mangas sorted by their rank. It accepts these arguments: + +- `rankingType string` Ranking type can be: + + `all` + + `manga` + + `novels` + + `oneshots` + + `doujin` + + `manhwa` + + `manhua` + + `bypopularity` + + `favorite` +- `limit int` Is the max amount of results to get. Max is 500. +- `offset int` Is the "offset" for results. If offset is greater than 0 the first n number of reults will be ignored. +- `nsfw bool` Wether to include NSFW rated results +- `fields []string` The fields to include in the results. [Here]() is a list of the valid fields. Just using an empty slice (`[]string{}`) will include all the fields. Again, to get some very specific fields, [`GetMangaById`](#get-data-about-a-manga) is the most reliable option. + +Example: + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/manga" + "log" + "fmt" +) + +func main() { + authToken := "YOUR_TOKEN_HERE" + myClient := manga.Client { + AuthToken: "Bearer " + authToken, + } + + rankingType := "novels" + limit, offset := 10, 0 + nsfw := true // include NSFW results + fields := []string{"title"} + + ranking, err := myClient.GetMangaRanking(rankingType, limit, offset, nsfw, fields) + if err != nil { + log.Fatal(err) // remember kids, always handle errors + } + + for _, i := range ranking { + fmt.Printf("#%d: %s\n", i.RankNum, i.Title) + } +} +``` + +Above example prints the top 10 ranked novels on MyAnimeList. diff --git a/content/docs/mal2go/v4/manga/search-for-a-manga.md b/content/docs/mal2go/v4/manga/search-for-a-manga.md new file mode 100644 index 0000000..5d519aa --- /dev/null +++ b/content/docs/mal2go/v4/manga/search-for-a-manga.md @@ -0,0 +1,51 @@ +--- +title: "Search for a manga" +description: "Use a search string to get a list of mangas" +weight: 2 +--- + +Use the `SearchManga` method to search for a manga. This method takes these arguments: + +- `searchString string` Is pretty obvious. This term is used to search for a manga on MyAnimeList. +- `limit int` Is the max amount of search results to get. Max is 100. +- `offset int` Is the "offset" for the search results. If offset is greater than 0 the first n number of search reults will be ignored. +- `nsfw bool` Wether to include NSFW rated search results +- `fields []string` The fields to include in the search results. [Here]() is a list of the valid fields. Just using an empty slice (`[]string{}`) will include all the fields. +The MyAnimeList API is picky about what fields to actually include with search results. To be sure that you are getting all the data it is recommended to use the [`GetMangaById`](#get-data-about-a-manga) method which ensures that all the required fields are included. + + +Example: + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/manga" + "log" + "fmt" +) + +func main() { + authToken := "YOUR_TOKEN_HERE" + myClient := manga.Client { + AuthToken: "Bearer " + authToken, + } + + searchString := "mushishi" // search for mushishi + limit := 10 // get 10 search results + offset := 0 // no offset + searchNsfw := false // don't include NSFW results + fields := []string{"title"} // only pull the title + + searchResults, err := myClient.SearchManga(searchString, limit, offset, searchNsfw, fields) + if err != nil { + log.Fatal(err) // remember kids, always handle errors + } + + // loop over the search results and print the title + for _, manga := range searchResults { + fmt.Println(manga.Title) + } +} +``` + diff --git a/content/docs/mal2go/v4/manga/setting-up.md b/content/docs/mal2go/v4/manga/setting-up.md new file mode 100644 index 0000000..baa77cb --- /dev/null +++ b/content/docs/mal2go/v4/manga/setting-up.md @@ -0,0 +1,34 @@ +--- +title: "Setting up" +description: "Install MAL2Go/manga and write some boilerplate" +weight: 1 +--- + +How to use the manga package: + +1. Install the manga package using this command + +``` fish +go get github.com/MikunoNaka/MAL2Go/v4/manga +``` + +2. Import and initialise the anime client. The client holds the authentication token of the user. The OAuth token should be set as "Bearer TOKEN". Refer to below example + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/manga" +) + +func main() { + // you should never hard-code tokens. This is just an example + authToken := "YOUR_TOKEN_HERE" + myClient := manga.Client { + AuthToken: "Bearer " + authToken, + } +} +``` + +Every program using MAL2Go needs something like this to initialise everything (that you need). +And now we are ready to use the MAL2Go/manga package! diff --git a/content/docs/mal2go/v4/manga/types.md b/content/docs/mal2go/v4/manga/types.md new file mode 100644 index 0000000..6d3e297 --- /dev/null +++ b/content/docs/mal2go/v4/manga/types.md @@ -0,0 +1,108 @@ +--- +title: "Types" +description: "The structs defined in this package" +weight: 5 +--- + +## MAL2Go/manga.Manga + +These are the valid fields you can use while getting data using MAL2Go/manga package. **(INCOMPLETE)** + +| Search Field | Struct Field | Type | Description | +|-------------------------------|-----------------|--------------------------------------------------|--------------------------------------------------------| +| id | Id | `int` | ID of the manga | +| title | Title | `string` | Title | +| main\_picture | MainPicture | [`util.Picture`](#mal2goutilgenre) | Cover picture | +| alternative\_titles | AltTitles | [`util.AltTitles`](#mal2goutilalttitles) | Alternative titles | +| start_date | StartDate | `string` | Date started publishing | +| end\_date | EndDate | `string` | Date ended publishing | +| synopsis | Synopsis | `string` | Synopsis | +| mean | MeanScore | `float32` | Mean score | +| rank | Rank | `int` | Rank of the manga (0 when cannot be calculated) | +| popularity | Popularity | `int` | Popularity | +| num\_list\_users | NumListUsers | `int` | Number of List Users | +| num\_scoring\_users | NumScoringUsers | `int` | Number of Scoring List Users | +| nsfw | NsfwStatus | `string` | NSFW rating (white = SFW, black = NSFW, gray = medium) | +| created\_at | CreatedAt | `string` | Created At | +| updated\_at | UpdatedAt | `string` | Updated At | +| media\_type | MediaType | `string` | Media Type | +| status | Status | `string` | Status | +| genres | Genres | [`[]util.Genre`](#mal2goutilgenre) | List of Genres | +| my\_list\_status | MyListStatus | [`ListStatus`](#mal2gomangaliststatus) | Authenticated user's list status | +| *none, automatically applied* | ListStatus | [`ListStatus`](#mal2gomangaliststatus) | List status (for when looking up another user's list) | +| num\_volumes | NumVolumes | `int` | | +| num\_chapters | NumChapters | `int` | | +| authors | Authors | [`[]MangaAuthor`](#mal2gomangamangaauthor) | | +| pictures | Pictures | [`[]util.Picture`](#mal2goutilgenre) | Pictures | +| background | Background | `string` | Background Info | +| related\_anime| RelatedAnime | [`[]anime.Related`](/docs/mal2go/v4/anime/types#mal2goanimerelated) | Related Anime| +| related\_manga | RelatedManga | [`[]Related`](#mal2gomangarelated) | Related Manga (currently not supported) | +| recommendations | Recommendations | [`[]Recommendation`](#mal2goanimerecommendation) | Recommendations | +| serialization | Serialization | | | + +## MAL2Go/manga.ListStatus + +| Struct Field | Type | Description | Potential Values | +|--------------|----------|----------------------------------------|------------------------------------------------------------------------------------| +| Status | `string` | Status | `"watching"`, `"completed"`, `"on_hold"`, `"dropped"`, `"plan_to_watch"`, or `nil` | +| Score | `int` | Score | 0 to 10 | +| StartDate | `string` | Start date for the user | date string or `nil` | +| FinishDate | `string` | Finish date for the user | date string or `nil` | +| Priority | `int` | Priority | | +| Tags | `string` | probably broken | | +| Comments | `string` | Comments | | +| UpdatedAt | `string` | Time last updated by the user | | +| VolumesRead | `int` | Number of volumes read | | +| ChaptersRead | `int` | Number of chapters read | | +| IsRereading | `bool` | If user is rereading this manga or not | `true` or `false` | +| TimesReread | `int` | Times user has reread this | | +| RereadValue | `int` | Frequency of rereads | 0 to 5 (never, very low, low, medium, high, very high) | + +## MAL2Go/manga.Author + +| Struct Field | Type | Description | +|--------------|----------|---------------------| +| Id | `int` | Author ID | +| FirstName | `string` | Author's first name | +| LastName | `string` | Author's last name | + +## MAL2Go/manga.MangaAuthor + +| Struct Field | Type | Description | +|--------------|----------|----------------------------------| +| Id | `int` | Author ID | +| FirstName | `string` | Author's first name | +| LastName | `string` | Author's last name | +| Role | `string` | Role of the author in the series | + +## MAL2Go/manga.Related + +| Struct Field | Type | Description | Potential Values | +|-----------------------|------------------------------|------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------| +| Manga | [`Manga`](#mal2gomangamanga) | Related manga | Any Anime | +| RelationType | `string` | Relation of this manga with selected one | `"sequel"`, `"prequel"`, `"alternative_setting"`, `"alternative_version"`, `"side_story"`, `"parent_story"`, `"summary"`, `"full_story"` | +| RelationTypeFormatted | `string` | RelationType with pretty formatting | Same as RelationType but with pretty formatting | + +## MAL2Go/*util*.Picture + +Holds the cover picture/related picture's URLs in different sizes + +| Struct Field | Type | Description | Potential Values | +|--------------|----------|----------------------|----------------------------------------------| +| Medium | `string` | Medium sized picture | non empty string containing URL of picture | +| Large | `string` | Large sized picture | string containing the URL or an empty string | + +## MAL2Go/*util*.AltTitles + +| Struct Field | Type | Description | Potential Values | +|--------------|------------|-----------------------|---------------------------| +| Synonyms | `[]string` | Synonyms of the title | `[]string` or empty slice | +| En | `string` | English title | any string or `""` | +| Ja | `string` | Japanese title | any string or `""` | + +## MAL2Go/*util*.Genre + +| Struct Field | Type | Description | +|--------------|----------|-------------------| +| Id | `int` | ID of the genre | +| Name | `string` | Name of the genre | diff --git a/content/docs/mal2go/v4/tips-and-tricks/_index.md b/content/docs/mal2go/v4/tips-and-tricks/_index.md new file mode 100644 index 0000000..b172763 --- /dev/null +++ b/content/docs/mal2go/v4/tips-and-tricks/_index.md @@ -0,0 +1,28 @@ +--- +title: "Tips and Tricks" +description: "Some tips and best practises for using MAL2Go (optional)" +weight: 4 +--- + +These are some tips and best practises, and other notes for using MAL2Go. Following this is optional but might make your life easier! + +## Better ways to store/read auth tokens: + +- Use [godotenv](https://github.com/joho/godotenv) to read the auth token from a config file +- [Viper](https://github.com/spf13/viper) can do the same thing, but can also write to the file easily; also with viper you can locate the file anywhere on your system +- [go-keyring](https://github.com/zalando/go-keyring) can be used to read/write the secret token to the system's keyring. It is by far the most secure way but only works on some systems (windows, macos and linux with gnome-keyring) + +## SearchManga and SearchAnime functions are quirky! + +While you *can* specify fields to these functions, in order to get specific data, searching for some reason only returns limited fields most of the times. +It's not like it just doesn't support all of the fields but many times it just.. doesn't. So if you want to search *and* get ALL fields about an anime, or just +be sure that the data is complete, use [`SearchAnime`](/docs/mal2go/v4/anime/search-for-an-anime/)/[`SearchManga`](/docs/mal2go/v4/manga/search-for-a-manga/) +just to get the ID. After that, use [`GetAnimeById`](/docs/mal2go/v4/anime/get-anime-by-id/)/[`GetMangaById`](/docs/mal2go/v4/manga/get-manga-by-id/). + +## macli has a good example on how to generate your own tokens with go + +MAL2Go was made for my other project, [macli](https://github.com/MikunoNaka/macli). +Macli's `auth` package uses [`github.com/zalando/go-keyring`](https://github.com/zalando/go-keyring) +and the `net/http` package to prompt the user and generate an auth token with the given client id. + +You can look at [the code](https://github.com/MikunoNaka/macli/tree/master/auth) to see how it works. diff --git a/content/docs/mal2go/v4/user/_index.md b/content/docs/mal2go/v4/user/_index.md new file mode 100644 index 0000000..02c62bc --- /dev/null +++ b/content/docs/mal2go/v4/user/_index.md @@ -0,0 +1,5 @@ +--- +title: User +description: Actions related to a user's account/lists +weight: 3 +--- diff --git a/content/docs/mal2go/v4/user/anime/_index.md b/content/docs/mal2go/v4/user/anime/_index.md new file mode 100644 index 0000000..0728945 --- /dev/null +++ b/content/docs/mal2go/v4/user/anime/_index.md @@ -0,0 +1,10 @@ +--- +title: User's Animelist +description: Actions related to a user's animelist +weight: 3 +--- + +The `MAL2Go/user/anime` package supports updating the currently authenticated user's anime list along with reading the anime lists of the current user as well as other users. + + +## coming soon! diff --git a/content/docs/mal2go/v4/user/get-self-user-info/_index.md b/content/docs/mal2go/v4/user/get-self-user-info/_index.md new file mode 100644 index 0000000..31b943c --- /dev/null +++ b/content/docs/mal2go/v4/user/get-self-user-info/_index.md @@ -0,0 +1,48 @@ +--- +title: Getting authenticated user's info +description: Returns information about currenlty logged in user +weight: 2 +--- + +## Getting self user's info + +The `GetSelfUserInfo` function can be used to get information about the currently logged in user. + +``` go +package main + +import ( + "fmt" + "log" + "github.com/MikunoNaka/MAL2Go/v4/user" +) + +func main() { + authToken := "YOUR_TOKEN_HERE" + myClient := user.Client { + AuthToken: "Bearer " + authToken, + } + + userInfo, err := myClient.GetSelfUserInfo() + if err != nil { + log.Fatal(err) + } + + fmt.Printf("Username: %s\n", userInfo.Name) + fmt.Printf("Profile Picture: %s\n", userInfo.Picture) + fmt.Printf("Gender: %s\n", userInfo.Gender) + fmt.Printf("Location: %s\n", userInfo.Location) + fmt.Printf("Birthday: %s\n", userInfo.Birthday) + fmt.Printf("Time Zone: %s\n", userInfo.TimeZone) + fmt.Printf("Joined At: %s\n", userInfo.JoinedAt) + fmt.Printf("User ID: %d\n", userInfo.Id) + + if userInfo.IsSupporter { + fmt.Println("You are a MyAnimeList Supporter.") + } else { + fmt.Println("You are not a MyAnimeList Supporter.") + } +} +``` + +**MyAnimeList's Official API only allows getting info about the currently logged in user.** diff --git a/content/docs/mal2go/v4/user/manga/_index.md b/content/docs/mal2go/v4/user/manga/_index.md new file mode 100644 index 0000000..fd87fc8 --- /dev/null +++ b/content/docs/mal2go/v4/user/manga/_index.md @@ -0,0 +1,9 @@ +--- +title: User's Mangalist +description: Actions related to a user's mangalist +weight: 4 +--- + +The `MAL2Go/user/manga` package supports updating the currently authenticated user's manga list along with reading the manga lists of the current user as well as other users. + +## coming soon! diff --git a/content/docs/mal2go/v4/user/setting-up/_index.md b/content/docs/mal2go/v4/user/setting-up/_index.md new file mode 100644 index 0000000..0b2b890 --- /dev/null +++ b/content/docs/mal2go/v4/user/setting-up/_index.md @@ -0,0 +1,34 @@ +--- +title: "Setting up" +description: "Install MAL2Go/user and write some boilerplate" +weight: 1 +--- + +How to use the user package: + +1. Install the user package using this command + +``` fish +go get github.com/MikunoNaka/MAL2Go/v4/user +``` + +2. Import and initialise the user client. The client holds the authentication token of the user. The OAuth token should be set as "Bearer TOKEN". Refer to below example + +``` go +package main + +import ( + "github.com/MikunoNaka/MAL2Go/v4/user" +) + +func main() { + // you should never hard-code tokens. This is just an example + authToken := "YOUR_TOKEN_HERE" + myClient := user.Client { + AuthToken: "Bearer " + authToken, + } +} +``` + +Every program using MAL2Go needs something like this to initialise everything (that you need). +And now we are ready to use the MAL2Go/anime package! diff --git a/content/lists/_index.md b/content/lists/_index.md new file mode 100644 index 0000000..563d2d2 --- /dev/null +++ b/content/lists/_index.md @@ -0,0 +1,4 @@ +--- +title: All Lists +heading: Vidhu Kant's Lists +--- diff --git a/content/lists/anime-recommendations.md b/content/lists/anime-recommendations.md new file mode 100644 index 0000000..4640fe9 --- /dev/null +++ b/content/lists/anime-recommendations.md @@ -0,0 +1,42 @@ +--- +title: Vidhu Kant's Anime Recommendations +listType: two-column filled +--- + +# VidhuKant's list of weebshit + +These are some animes that are very close to my heart. + +- Mushishi +- Re:Zero Kara Hajimaru Isekai Seikatsu +- Yagate Kimi Ni Naru +- Ansatsu Kyoshitsu +- Majo no Tabitabi +- Kono Subarashii Sekai ni Shukufuku wo! +- Seishun Buta Yarou wa Bunny Girl Senpai no Yume wo Minai +- Kaguya-sama +- 5-Toubun no Hanayome +- Chuunibyo Demo Koi ga Shitai +- Koe no Katachi +- Yahari Ore no Seishun Love Comedy wa Machigatteiru. +- Bokutachi wa Benkyou ga Dekinai +- Summer Time Render +- Sono Kisekai Ningyo wa Koi wo Suru +- Sakura-sou no Pet na Kanojo +- ReLIFE +- Gintama +- Crayon Shin-chan +- Tanaka-kun wa Itsumo Kedaruge +- Shoujo Shuumatsu Ryokou +- Darling in the FranXX +- Asobi Asobase +- Jibaku Shounen Hanako-kun +- Appare-Ranman! +- Tower of God +- Sonny Boy +- Grand Blue +- Ore wo Suki nano wa Omae dake ka yo +- Dumbbell Nan Kilo Moteru? +- Mushoku Tensei: Isekai Ittara Honki Dasu +- Kishuku Gakkou no Juliet +- Kakkou no Iinazuke diff --git a/content/lists/music-recommendations.md b/content/lists/music-recommendations.md new file mode 100644 index 0000000..e572063 --- /dev/null +++ b/content/lists/music-recommendations.md @@ -0,0 +1,61 @@ +--- +title: Vidhu Kant's Music Recommendations +listType: two-column filled +--- + +# Here are some of my music recommendations. + +**Aka VidhuKant's gallery of weeb music and other songs** + +I highly recommend listening to these extremely dope songs. +I won't be linking anything for various reasons, but hey you know how to search! + +NOTE: The order means nothing (might sort alphabetically later) + +- "Hito Shibai" by Fuchigami Mai +- "King" by Kanaria +- "Perfect World" by TWICE +- "Slump" by Stray Kids +- "Wiggle Wiggle" by Raon +- "Lemon" by Yonezu Kenshi +- "Hikaru Nara" by Goose House +- "Feel Special" by TWICE +- "End if a Life" by Mori Calliope +- "Ijimekko" by Mori Calliope +- "Kimi no Shiranai Monogatari" by Supercell +- "My Dearest" by Supercell +- "Takane no Hanako-San" by Goose House +- "What you don't know" by Rie Murakawa +- "Bon Bon Chocolat" by Everglow +- "Pop/Stars" by K/DA +- "Pop/Stars" Cover by Raon +- "Pop/Stars" Cover by Seraphine +- "Rock Mode (Acoustic)" by LiSA +- "Graveyard Shift" by Mori Calliope +- "G4L" by Giga +- "Mela!" by Ryokoushoku Shakai +- "Mera Mera" by Mori Calliope +- "Melty Kitchen" Cover by Hoshimachi Suisei +- "Saikai" by LiSA and Uru +- "Wicked" by Hoshimachi Suisei and Mori Calliope +- "hectopascal" by Koito Yuu (Takada Yuuki) and Nanami Touko (Kotobuki Minako) +- "Time Capsule" by AZKI +- "Take Me to Heaven" by AZKI +- "Chiru Chiru" by Reol +- "Kaika" by Cadode +- "The Feels" by TWICE +- "Bad Habits" by Ed Sheeran +- "Let's End The World" by Mori Calliope +- "Kamouflage" by Mori Calliope +- "Usotsuki no Sekai" by Kano +- "After School" by Weekly +- "Nonstop" by Oh My Girl +- "No Friends" by Cadmium +- "Senorita" by (G)I-DLE +- "Euphoria" by BTS +- "Viora" by Reol +- "Sip" by Swoodeasu +- "Too Much Love" by Swoodeasu +- "Play No Games" by Swoodeasu +- "Re:" by Reol +- "Boy" by Reol diff --git a/content/lists/software-i-use.md b/content/lists/software-i-use.md new file mode 100644 index 0000000..d1491a2 --- /dev/null +++ b/content/lists/software-i-use.md @@ -0,0 +1,127 @@ +--- +title: "Software I Use" +--- + +# Here are the programs I use on a daily basis + +These are some great (mostly free) and open source apps/programs that I use (and you should too!) + +## Desktop Programs: + +- ### Operating System: + + I use [Arch](https://archlinux.org) btw + +- ### Web Browser: + + I use [librewolf](https://librewolf.net) on a daily basis but it's pretty locked down (I like that) + so I use [Brave](https://brave.com) when I need to access any shit website that librewolf blocks + or simply need a chromium based browser. + +- ### Terminal Emulator: + + [Alacritty.](https://alacritty.org/) best terminal. + +- ### Image Editor: + + [GIMP.](https://gimp.org) This is a no-adobe household. + +- ### Video Editor: + + [Kdenlive](https://kdenlive.org) is pretty crashy but eh shotcut won't even work. + Also it's gotten much better since 2020 (when I first started using it) + +- ### Screen Recorder: + + Do I even need to say it? [OBS](https://obsproject.com). + +- ### Text Editor: + + [NeoVim](https://neovim.io) is my main text editor but I've been using [Doom Emacs](https://github.com/doomemacs/doomemacs) lately. If i'm programming in Go or writing my blog I use emacs, + CSS/JS and stuff I use nvim. Not sure why but that's how my mind works. + +- ### Email Client: + + [Thunderbird](https://thunderbird.net) because I'm too lazy to configure mutt/neomutt. (tutorial coming soon??) + +- ### File Manager: + + I have both [lf](https://github.com/gokcehan/lf) and pcmanfm on my system but those are for noobs. `cd`, `rm`, `mv`, `cp` are the best things. + +- ### Shell: + + [Fish](https://fishshell.com/) but I might go back to zsh idk + +- ### Window Manager: + + [XMonad](https://xmonad.org/) is the best window manager and you can't prove me otherwise. + If you want to see my config files (along with polybar and stuff) see my [dots repo](https://github.com/MikunoNaka/dots) + +- ### RSS Feed Reader: + + I'm pretty new to RSS Feeds though I use [newsboat](https://newsboat.org/) + +- ### MyAnimeList Client: + + Btw, I use [macli](/docs/macli) + +## Mobile Programs: + +All of these apps are on <https://f-droid.org> + +- ### Operating System: + + [Project Sakura](https://projectsakura.github.io/) is a cool fork of LineageOS, it's more customizable and that's what I care about! + + Also I don't use GApps and (hopefully) never will. + +- ### Camera: + + I use [OpenCamera](https://f-droid.org/packages/net.sourceforge.opencamera/) because the default cam on Sakura OS is horrible. + +- ### YouTube Client: + + [Newpipe](https://newpipe.net/) is beautiful. + +- ### Web Browser: + + Firefox for android is garbage, but [Firefox Focus](https://www.mozilla.org/en-US/firefox/browsers/mobile/focus/) is somehow the best! + I use [ffupdater](https://f-droid.org/packages/de.marmaro.krt.ffupdater/) to download and update privacy respecting web browsers on my phone. + +- ### TOTP App: + + [FreeOTP+](https://freeotp.github.io/) is a great authenticator app. Best alternative to Google Authenticator! + +- ### Backup App: + + Custom nextcloud instance paired up with the official + [nextcloud app](https://f-droid.org/packages/com.nextcloud.client/) + and [DAVx5](https://www.davx5.com/) to back up contacts. + +- ### RSS Feed Reader: + + [Feeder](https://f-droid.org/en/packages/com.nononsenseapps.feeder/) + +- ### Reddit Client: + + No longer use Reddit on phone but [RedReader](https://f-droid.org/packages/org.quantumbadger.redreader/) supremacy! + +- ### Email Client: + + [K-9 Mail](https://f-droid.org/en/packages/com.fsck.k9/) is a really good email client on F-Droid! + +## Other: + +(i.e work on both platforms ig) + +- ### Password Manager: + + [Bitwarden](https://bitwarden.com/) because it can sync between my devices. + +- ### Cloud Storage, etc: + + [Nextcloud](https://nextcloud.com/) devs marry me! + +- ### Matrix Client: + + [Element](https://element.io/) because I haven't really checked out other alternatives yet. Maybe I will, then see which one is better! |