From 72d8b4e6bee0ffac79e96dd649a9da2adb86b507 Mon Sep 17 00:00:00 2001 From: name Date: Wed, 27 Sep 2023 11:34:23 +0000 Subject: 2023-09-26 --- rust/wolfree_patch_libredirect/Cargo.toml | 28 ++++++++ .../src/docusaurus/docs/index.mdx | 81 ++++++++++++++++++++++ .../src/docusaurus/docs/mirror.mdx | 24 +++++++ .../src/docusaurus/docs/source.mdx | 22 ++++++ .../src/docusaurus/static/instances.json | 14 ++++ rust/wolfree_patch_libredirect/src/main.rs | 40 +++++++++++ 6 files changed, 209 insertions(+) create mode 100644 rust/wolfree_patch_libredirect/Cargo.toml create mode 100644 rust/wolfree_patch_libredirect/src/docusaurus/docs/index.mdx create mode 100644 rust/wolfree_patch_libredirect/src/docusaurus/docs/mirror.mdx create mode 100644 rust/wolfree_patch_libredirect/src/docusaurus/docs/source.mdx create mode 100644 rust/wolfree_patch_libredirect/src/docusaurus/static/instances.json create mode 100644 rust/wolfree_patch_libredirect/src/main.rs (limited to 'rust/wolfree_patch_libredirect') diff --git a/rust/wolfree_patch_libredirect/Cargo.toml b/rust/wolfree_patch_libredirect/Cargo.toml new file mode 100644 index 0000000..cf55e4d --- /dev/null +++ b/rust/wolfree_patch_libredirect/Cargo.toml @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: AGPL-3.0-or-later + +[package] +name = "wolfree_patch_libredirect" +version = "2023.8.31" +authors = [ + "See the commit history of the Git repositories.", + "https://git.kiwifarms.net/wolfree", +] +categories = [ + "command-line-utilities", + "development-tools::build-utils", + "web-programming", +] +edition = "2021" +keywords = [ + "rust", + "customize", + "Wolfree", + "LibRedirect", + "write", + "remove", + "file", +] +license = "AGPL-3.0-or-later" +readme = "README.md" +repository = "https://git.kiwifarms.net/wolfree" +description = "Customize Wolfree instances to suit Libredirect." diff --git a/rust/wolfree_patch_libredirect/src/docusaurus/docs/index.mdx b/rust/wolfree_patch_libredirect/src/docusaurus/docs/index.mdx new file mode 100644 index 0000000..3cefc82 --- /dev/null +++ b/rust/wolfree_patch_libredirect/src/docusaurus/docs/index.mdx @@ -0,0 +1,81 @@ +--- +title: Home page +hide_title: true +slug: / +--- + + + +import FormCTA from "../src/components/FormCTA.tsx"; +import submitMathInputForm from "../src/functions/submitMathInputForm.ts"; +import InputMathProblems from "../src/components/InputMathProblems.tsx"; +import SubmitButton from "../src/components/SubmitButton.tsx"; +import ButtonLink from "../src/components/ButtonLink.tsx"; + +# Wolfree instances that do not bypass paywalls + +Wolfree is a free and open-source software for accessing the calculation results computed by Wolfram Alpha. Wolfree operates through a network of websites known as "instances." Unlike most instances, this instance **does not bypass paywalls**. + + + +## How to access the calculation results generated by Wolfram Alpha + +
+ +1. Type your math problem in the text box. + + + +2. Click the "Compute Input" button. + + + +3. Explore the calculation result provided. 🎉 + + + +## The problem with other Wolfree instances + +Most other Wolfree instances can bypass paywalls, which raises concerns about Microsoft GitHub's [DMCA Takedown Policy](https://docs.github.com/en/site-policy/content-removal-policies/dmca-takedown-policy). Unfortunately, this means that developers of [LibRedirect](https://libredirect.github.io/) cannot redirect users to such instances. For details about this issue, refer to [issue #425](https://github.com/libredirect/browser_extension/issues/425) on Microsoft GitHub. + +## How this instance resolves the problem + +Unlike most Wolfree instances, this instance prioritizes ethical values and **does not bypass paywalls**. + +## Mirror sites + +Wolfree operates through a network of mirror sites. If you can't access this web page, visit the [mirror sites](/mirror). + + + +## Source code + +Wolfree is **free** and **open-source** software built on transparency and openness, welcoming individuals from diverse backgrounds to collaborate on [source code](/source). ❤️ + + + +## How it works + +1. Install [LibRedirect](https://libredirect.github.io/) on your web browser. +2. Enable auto-redirection from Wolfram to this instance. +3. Enjoy accessing Wolfree instances that **do not bypass paywalls**. + +## Key benefits + +### Compliance with Microsoft GitHub + +This instance **does not bypass paywalls**, resolving [the GitHub issues](https://github.com/libredirect/browser_extension/issues/425) LibRedirect developers encounter. + +### Auto-redirection + +Once you install LibRedirect on your web browser, you can enable auto-redirection from Wolfram to this instance. + +### Cyber Ethics + +By accessing this instance, you actively promote ethical practices and support the work of content creators. + +## Get started now + +Install LibRedirect and enable auto-redirection. Enjoy Wolfree instances that **do not bypass paywalls**. + + diff --git a/rust/wolfree_patch_libredirect/src/docusaurus/docs/mirror.mdx b/rust/wolfree_patch_libredirect/src/docusaurus/docs/mirror.mdx new file mode 100644 index 0000000..a55cd77 --- /dev/null +++ b/rust/wolfree_patch_libredirect/src/docusaurus/docs/mirror.mdx @@ -0,0 +1,24 @@ +--- +title: Mirror site +hide_title: true +--- + + + +# Mirror sites: alternative instances + +Wolfree operates through a network of mirror sites. If you can't access this web page, visit the mirror sites. + +1. https://gqq.gitlab.io/ +2. https://jqq.gitlab.io/ +3. https://rqq.gitlab.io/ +4. https://sqq.gitlab.io/ +5. https://uqq.gitlab.io/ + +## Fetching JSON list of instances + +If you have programming knowledge, you can deserialize the [instances.json](pathname://../instances.json) file. + +## Accessing Wolfree in censored countries + +If you cannot access any of the mirror sites, we recommend installing the [Tor Browser](https://www.torproject.org/) to bypass censorship. diff --git a/rust/wolfree_patch_libredirect/src/docusaurus/docs/source.mdx b/rust/wolfree_patch_libredirect/src/docusaurus/docs/source.mdx new file mode 100644 index 0000000..66e222a --- /dev/null +++ b/rust/wolfree_patch_libredirect/src/docusaurus/docs/source.mdx @@ -0,0 +1,22 @@ +--- +title: Source code +hide_title: true +--- + + + +# Accessing the source code of Wolfree + +Wolfree is **free** and **open-source** software. You can access and download the source code from the following websites: + +1. https://gitea.com/wolfree +2. https://try.gitea.io/wolfree +3. https://codeberg.org/wolfree +4. https://git.disroot.org/wolfree +5. https://next.forgejo.org/wolfree +6. https://git.kiwifarms.net/wolfree +7. http://it7otdanqu7ktntxzm427cba6i53w6wlanlh23v5i3siqmos47pzhvyd.onion/wolfree + +## Accessing the source code in censored countries + +If you cannot access Gitea or Forgejo, we recommend installing the [Tor Browser](https://www.torproject.org/) to bypass censorship. diff --git a/rust/wolfree_patch_libredirect/src/docusaurus/static/instances.json b/rust/wolfree_patch_libredirect/src/docusaurus/static/instances.json new file mode 100644 index 0000000..8cdd008 --- /dev/null +++ b/rust/wolfree_patch_libredirect/src/docusaurus/static/instances.json @@ -0,0 +1,14 @@ +{ + "wolfree": { + "clearnet": [ + "https://gqq.gitlab.io/", + "https://jqq.gitlab.io/", + "https://rqq.gitlab.io/", + "https://sqq.gitlab.io/", + "https://uqq.gitlab.io/" + ], + "tor": [], + "i2p": [], + "loki": [] + } +} diff --git a/rust/wolfree_patch_libredirect/src/main.rs b/rust/wolfree_patch_libredirect/src/main.rs new file mode 100644 index 0000000..907dc36 --- /dev/null +++ b/rust/wolfree_patch_libredirect/src/main.rs @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: AGPL-3.0-or-later */ + +//! Customize Wolfree instances to suit Libredirect. + +#![allow(clippy::blanket_clippy_restriction_lints)] +#![allow(clippy::implicit_return)] +#![allow(clippy::question_mark_used)] + +use std::error; +use std::fs; + +/// By default, the main function do nothing as most Wolfree users do not use Libredirect. +#[allow(unreachable_code)] +fn main() -> Result<(), Box> { + // Remove the following line to make the instances Libredirect-compatible. + return Ok(()); + // Remove the previous line to make the instances Libredirect-compatible. + + // Disable the entrypoint of the JavaScript modules. + fs::write( + "./docusaurus/static/ajax/libs/wolfree/2023.8.31/js/entrypoint.js", + "export default () => {};" + )?; + + fs::write( + "./docusaurus/wolfree.config.js", + "module.exports = { config: { libredirect: true } };" + )?; + + fs::write( + "./docusaurus/static/instances.json", + include_str!("./docusaurus/static/instances.json") + )?; + + fs::write("./docusaurus/docs/index.mdx", include_str!("./docusaurus/docs/index.mdx"))?; + fs::write("./docusaurus/docs/mirror.mdx", include_str!("./docusaurus/docs/mirror.mdx"))?; + fs::write("./docusaurus/docs/source.mdx", include_str!("./docusaurus/docs/source.mdx"))?; + + Ok(()) +} -- cgit v1.2.3