The Sankaku Viewer is a simple HTTP server written in Golang that allows users to input a URL from the Sankaku Complex and receive a content from the provided URL. This also enables users to easily generate link previews when sharing Sankaku Viewer URL to social media platforms like Discord or Telegram.
- Users visit the server's web page.
- On the web page, there is an input text field where users can enter the URL of a Sankaku Complex post.
- When the user submits the form, the server makes a request to the Sankaku API with the ID from the provided URL.
- The Sankaku API returns the requested image URL or video URL.
- The server then generates an HTML page with the image or video content. The HTML page contains Open Graph protocol and Twitter Card to generate a link preview using the received information and displays it to the user.
- Golang should be installed on your system. You can download it from the official Golang website: https://go.dev/dl/
- Clone this repository to your local machine:
git clone https://github.com/DevonTM/sankaku-viewer.git
cd sankaku-viewer
- Build the binary using the build.sh script:
# Replace [os] and [arch] with your desired target OS and architecture.
./build.sh [os] [arch]
- Start the server:
# Replace [flags] with your desired flags.
./sankaku-viewer [flags]
-l
: Listen address. Defaults to:8000
. Support unix sockets by using theunix:
prefix.-p
: Proxy address.--user
: Sankaku username--pass
: Sankaku password
Contributions to this project are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.