From f03e1e67c2f410c06df53c80443deb2a7d57ecf0 Mon Sep 17 00:00:00 2001 From: perennial Date: Mon, 14 Oct 2024 15:35:33 +1100 Subject: [PATCH] docs: tidy and update more --- doc/dev/design-flaws.md | 8 +++++--- doc/dev/feature-ideas.md | 7 ++++--- doc/dev/features/app-api.md | 9 +++++---- doc/dev/testing.md | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/doc/dev/design-flaws.md b/doc/dev/design-flaws.md index 76be34b..016ef85 100644 --- a/doc/dev/design-flaws.md +++ b/doc/dev/design-flaws.md @@ -2,12 +2,14 @@ This section documents some bad/buggy designs in PixivFE's design, both frontend and backend. -## Low Quality Go Module: net/url +## Low Quality Go Module: `net/url` `url.Path` is stored decoded (no %XX). `url.Scheme` is stored without `://` (mandated by RFC). Not sure why Go does that. Felt like this is bound to cause some nasty bug on decoding and encoding. Current proxied URLs don't have weird characters in them. Hopefully it stays this way. -Solution: Replace "net/url" with a better third-party module +Solution: Replace `net/url` with a better third-party module -Mitigation: replaced `url.Parse` with `urlx.Parse` from `github.com/goware/urlx` +~~Mitigation: replaced `url.Parse` with `urlx.Parse` from `github.com/goware/urlx`~~ + +**Update as of 2024-10-14:** swapping out `url.Parse` for `urlx.Parse` caused several issues and was essentially reverted over multiple bug fix commits diff --git a/doc/dev/feature-ideas.md b/doc/dev/feature-ideas.md index cffb3a0..6968f60 100644 --- a/doc/dev/feature-ideas.md +++ b/doc/dev/feature-ideas.md @@ -35,7 +35,7 @@ Thoughts Service owned by Pixiv, this time for 3D humanoid models. -Example page: https://hub.vroid.com/en/characters/115435665512885870/models/57790810665766270 +Example page: [スロウス 夏用 - VRoid Hub](https://hub.vroid.com/en/characters/115435665512885870/models/57790810665766270) ## Ugoira support @@ -88,8 +88,9 @@ Ideas Notes -- Currently, we do not know if we could implement the "user follow" function into PixivFE. -- The development for this page has been put on hold because of it, since "following", after all, is what you want to do if you discover an user you like. +- ~~Currently, we do not know if we could implement the "user follow" function into PixivFE.~~ + - ~~The development for this page has been put on hold because of it, since "following", after all, is what you want to do if you discover an user you like.~~ + - **User follow was implemented in [`#129`](https://codeberg.org/VnPower/PixivFE/pulls/129) using the API for mobile users viewing the Pixiv website (not the Pixiv app API).** Ideas diff --git a/doc/dev/features/app-api.md b/doc/dev/features/app-api.md index 06fd5be..2540cf7 100644 --- a/doc/dev/features/app-api.md +++ b/doc/dev/features/app-api.md @@ -5,10 +5,11 @@ Besides the web API, Pixiv also has a private API made specifically for mobile a There are currently no official API specifications for the private API, and the unofficial ones seem to lack several functionalities. We might have to write one. Examples of implementations: -- https://github.com/upbit/pixivpy/blob/master/pixivpy3/aapi.py -- https://github.com/book000/pixivts/blob/master/src/pixiv.ts + +- [upbit/pixivpy (`aapi.py`)](https://github.com/upbit/pixivpy/blob/master/pixivpy3/aapi.py) +- [book000/pixivts (`pixiv.ts`)](https://github.com/book000/pixivts/blob/master/src/pixiv.ts) ## Goal -- Separate the Web API core and the App API core, but made both of them compatible with each other. -- Complications... +- Separate the Web API core and the App API core, but make both of them compatible with each other. +- Complications... diff --git a/doc/dev/testing.md b/doc/dev/testing.md index 8ee06d2..5e04ee6 100644 --- a/doc/dev/testing.md +++ b/doc/dev/testing.md @@ -7,7 +7,7 @@ I tried doing using rapid to test templates. However, the generator is broken. The error says `reflect.Set on unexported field`. -See the [`rapid` branch](https://codeberg.org/VnPower/PixivFE/src/branch/rapid. +See the [`rapid` branch](https://codeberg.org/VnPower/PixivFE/src/branch/rapid). `interface{}` can't be used anywhere in Data_* or else rapid will complain.