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_libredirect_patch/Cargo.toml | 21 ----- rust/wolfree_libredirect_patch/src/body.md | 68 ---------------- rust/wolfree_libredirect_patch/src/head.html | 43 ---------- rust/wolfree_libredirect_patch/src/instances.json | 14 ---- rust/wolfree_libredirect_patch/src/main.rs | 95 ----------------------- 5 files changed, 241 deletions(-) delete mode 100644 rust/wolfree_libredirect_patch/Cargo.toml delete mode 100644 rust/wolfree_libredirect_patch/src/body.md delete mode 100644 rust/wolfree_libredirect_patch/src/head.html delete mode 100644 rust/wolfree_libredirect_patch/src/instances.json delete mode 100644 rust/wolfree_libredirect_patch/src/main.rs (limited to 'rust/wolfree_libredirect_patch') diff --git a/rust/wolfree_libredirect_patch/Cargo.toml b/rust/wolfree_libredirect_patch/Cargo.toml deleted file mode 100644 index 5b587d5..0000000 --- a/rust/wolfree_libredirect_patch/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -# SPDX-License-Identifier: AGPL-3.0-or-later -# This file is part of Wolfree. -# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -[package] -name = "wolfree_libredirect_patch" -version = "23.7.31" -edition = "2021" - -authors = ["See the commit history of the Git repositories: "] -description = "The Rust crate provides lightweight wrappers around the `fs::write` and `fs::remove_dir_all` functions from the standard library's `fs` module." -license = "AGPL-3.0-or-later" -repository = "https://try.gitea.io/wolfree" -readme = "README.md" -keywords = ["rust", "wrapper", "write", "remove", "file"] -categories = ["command-line-utilities", "development-tools::build-utils", "web-programming"] - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -markdown = "1.0.0-alpha" diff --git a/rust/wolfree_libredirect_patch/src/body.md b/rust/wolfree_libredirect_patch/src/body.md deleted file mode 100644 index 69ccfc1..0000000 --- a/rust/wolfree_libredirect_patch/src/body.md +++ /dev/null @@ -1,68 +0,0 @@ -# Paywall-Respecting Instances: Wolfree instances that do not bypass any paywall - -Welcome to Paywall-Respecting Instances, where we provide Wolfree instances that **do not bypass any paywall**. - -## 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. - -To learn more about this issue, please refer to [issue #425](https://github.com/libredirect/browser_extension/issues/425) on Microsoft GitHub. - -## The Solution: Paywall-Respecting Instances - -Unlike other Wolfree instances, Paywall-Respecting Instances prioritize ethical practices and **do not bypass any paywall**. So developers of LibRedirect can confidently redirect their users to Paywall-Respecting Instances. - -## Instance List - -Here are some Paywall-Respecting Instances you can access: - -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/ - -JSON: [instances.json](/instances.json) - -## Source Code - -Paywall-Respecting Instances is free and open-source software. You can access and download its source code from the following websites: - -1. https://try.gitea.io/wolfree -2. https://codeberg.org/wolfree -3. https://git.disroot.org/wolfree -4. https://next.forgejo.org/wolfree -5. https://git.kiwifarms.net/wolfree -6. http://it7otdanqu7ktntxzm427cba6i53w6wlanlh23v5i3siqmos47pzhvyd.onion/wolfree - -SPDX-License-Identifier: AGPL-3.0-or-later - -This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - -## How it Works - -1. Install [LibRedirect](https://libredirect.github.io/) on your web browser. -2. LibRedirect automatically redirects you from Wolfram to our instances, safeguarding your privacy. -3. Enjoy accessing Wolfree instances that uphold ethical practices and **do not bypass any paywall**. - -## Key Features - -### Compliance with Microsoft GitHub - -Paywall-Respecting Instances **do not bypass any paywall**, empowering LibRedirect developers with the confidence to redirect users to our instances. - -### Protect Your Privacy - -Once you install LibRedirect on your web browser, LibRedirect automatically redirects you from Wolfram to our instances, securing your digital privacy. - -### Ethical Practices - -By accessing our instances, you actively promote ethical practices and support the work of content creators. - -## Get Started Now! - -Install LibRedirect to access Paywall-Respecting Instances. Enjoy Wolfree instances that **do not bypass any paywall**. - -- [Install LibRedirect](https://libredirect.github.io/) diff --git a/rust/wolfree_libredirect_patch/src/head.html b/rust/wolfree_libredirect_patch/src/head.html deleted file mode 100644 index d67963c..0000000 --- a/rust/wolfree_libredirect_patch/src/head.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - Wolfree instances that do not bypass any paywall | Paywall-Respecting Instances - - - - - - - \ No newline at end of file diff --git a/rust/wolfree_libredirect_patch/src/instances.json b/rust/wolfree_libredirect_patch/src/instances.json deleted file mode 100644 index 8cdd008..0000000 --- a/rust/wolfree_libredirect_patch/src/instances.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "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_libredirect_patch/src/main.rs b/rust/wolfree_libredirect_patch/src/main.rs deleted file mode 100644 index 65f1b93..0000000 --- a/rust/wolfree_libredirect_patch/src/main.rs +++ /dev/null @@ -1,95 +0,0 @@ -//! The Rust crate provides lightweight wrappers around the `fs::write` and `fs::remove_dir_all` functions from the standard library's `fs` module. -//! The crate is designed to simplify file writing and directory removal operations by encapsulating the error handling logic and providing a more convenient interface. -//! It is particularly useful for tasks that involve writing multiple files or removing directories with their contents. - -#![allow(clippy::blanket_clippy_restriction_lints)] -#![allow(clippy::exit)] -#![allow(clippy::print_stderr)] -#![allow(clippy::implicit_return)] - -/* SPDX-License-Identifier: AGPL-3.0-or-later - * This file is part of Wolfree. - * This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - */ - -use markdown::to_html_with_options; -use markdown::Options; -use std::fs; - -/// A lightweight wrapper around `fs::write`. -fn wolfree_write(file_path: &str, contents: &str) { - match fs::write(file_path, contents) { - Ok(_) => (), - Err(err) => { - eprintln!("Error: {err}",); - std::process::exit(1); - } - }; -} - -/// A lightweight wrapper around `fs::remove_dir_all`. -fn wolfree_remove_dir_all(dir_path: &str) { - match fs::remove_dir_all(dir_path) { - Ok(_) => (), - Err(err) => { - eprintln!("Error: {err}",); - std::process::exit(1); - } - }; -} - -/// A lightweight wrapper around `markdown::to_html_with_options`. -fn wolfree_to_html_with_options(value: &str) -> String { - match to_html_with_options(value, &Options::gfm()) { - Ok(result) => result, - Err(err) => { - eprintln!("Error: {err}",); - std::process::exit(1); - } - } -} - -/// Entry point of the program. -fn main() { - wolfree_write( - "./docusaurus/build/ajax/libs/wolfree/23.7.8/js/Entrypoint.js", - "export default () => {}", - ); - wolfree_write( - "./docusaurus/build/index.html", - &format!( - "{}{}", - include_str!("head.html"), - wolfree_to_html_with_options(include_str!("body.md")), - ), - ); - wolfree_write( - "./docusaurus/build/instances.json", - include_str!("instances.json"), - ); - wolfree_write( - "./docusaurus/build/404.html", - "", - ); - wolfree_write( - "./docusaurus/build/acknowledgment/index.html", - "", - ); - wolfree_write( - "./docusaurus/build/community/index.html", - "", - ); - wolfree_write( - "./docusaurus/build/dmca/index.html", - "", - ); - wolfree_write( - "./docusaurus/build/mirror/index.html", - "", - ); - wolfree_write( - "./docusaurus/build/source/index.html", - "", - ); - wolfree_remove_dir_all("./docusaurus/build/assets/"); -} -- cgit v1.2.3