#!/bin/bash ######################################################################## # # A bash script for setting up a WolfreeAlpha instance locally without # using Docker. This script requires wget to be available and will install # WolfreeAlpha to the /srv/wolfree/ directory by default. # # The user running this script must have write access to the destination # directory. The script will create the directory if it does not exist. # # The script does *not* install a web server. You will need to configure # the web server of your choice to serve the destination directory. # # This file was developed as part of the Private.coffee project. # # 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. # # Upstream Repository: https://try.gitea.io/wolfree/wolfree-dockerfile/ # Latest commit: 2b238370683abafae2bdd6b89651e104c7dc9989 # ######################################################################## DESTINATION = /srv/wolfree/ # Get files from WolframAlpha rm -rf /tmp/wolfree mkdir /tmp/wolfree wget --recursive --level=1 --adjust-extension --span-hosts \ --convert-links --page-requisites --no-parent -P /tmp/wolfree \ https://www.wolframalpha.com/input/index.html sed ' s/.*js...static.chunks........../https:\/\/www.wolframalpha.com\/_next\/static\/chunks\// ; s/".......js.....miniCssF.*/.js\n/ ; s/:"/./g ; s/",/.js\nhttps:\/\/www.wolframalpha.com\/_next\/static\/chunks\//g ; ' /tmp/wolfree/www.wolframalpha.com/_next/static/chunks/webpack* | wget --page-requisites --convert-links --input-file - sed ' s/.*return.static.css..../https:\/\/www.wolframalpha.com\/_next\/static\/css\// ; s/........css.......function.*/.css\n/ ; s/[0-9]*:"//g ; s/",/.css\nhttps:\/\/www.wolframalpha.com\/_next\/static\/css\//g ; ' /tmp/wolfree/www.wolframalpha.com/_next/static/chunks/webpack* | wget --page-requisites --convert-links --input-file - # Move files to destination directory rm -rf $DESTINATION/* mkdir -p $DESTINATION mv /tmp/wolfree/www.wolframalpha.com/* $DESTINATION true | tee $DESTINATION/_next/static/images/* mkdir -p $DESTINATION/users/me/ echo >$DESTINATION/users/me/account mkdir -p $DESTINATION/n/v1/api/ echo >$DESTINATION/n/v1/api/randomizer mkdir -p $DESTINATION/n/v1/api/sourcer/ echo >$DESTINATION/n/v1/api/sourcer/index.html echo >$DESTINATION/n/v1/api/sourcer/dataSources mkdir -p $DESTINATION/n/v1/api/samplefiles/fileinput/ echo >$DESTINATION/n/v1/api/samplefiles/fileinput/examples mkdir -p $DESTINATION/n/v1/api/autocomplete/ echo >$DESTINATION/n/v1/api/autocomplete/index.html # Get dependencies of WolfreeAlpha wget -P $DESTINATION/input/ https://raw.githubusercontent.com/cure53/DOMPurify/main/dist/purify.min.js wget -P $DESTINATION/input/ https://ajax.googleapis.com/ajax/libs/jquery/3.6.3/jquery.min.js wget -P $DESTINATION https://unpkg.com/chota@0.8.1/dist/chota.min.css # Patching files from WolframAlpha echo ' ' >>$DESTINATION/input/index.html needle="try\{[^;]*?utils2D\.generateEncodedJSONFromValue.*?\{}" m=$(grep -oP -m1 "$needle" $DESTINATION/_next/static/chunks/*.js | grep -oP -m1 '(?<=try\{)\w+(?=\.\w+\?)') sed -i ' s/'"$needle"'/ \ '"$m"'.value = new URLSearchParams(location.search).get`i` || `mathematics`; \ '"$m"'.i2d = new URLSearchParams(location.search).get`i2d` == `true`; \ & \ wolfree.i2d = '"$m"'.i2d; \ wolfree.input = '"$m"'.value; \ setTimeout(wolfree.main); \ / ' $DESTINATION/_next/static/chunks/*.js sed -i ' s/webSocket=new WebSocket/ \ webSocket = new WebSocket(`wss:\/\/www.wolframalpha.com\/n\/v1\/api\/fetcher\/results`), \ / ' $DESTINATION/_next/static/chunks/pages/*.js # Writing WolfreeAlpha Files cat >$DESTINATION/input/wolfree.js <<'EOT' // 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. 'use strict' const wolfree = { main: async () => { // To generate a new AppID: // 1. Open Tor Browser and go to: https://products.wolframalpha.com/api/ // 2. Click the orangish "Get API Access" button. You will go to: https://account.wolfram.com/login/oauth2/sign-in // 3. Click the reddish "Create one" hyperlink to create a new Wolfram ID. You will go to: https://account.wolfram.com/login/create // 4. Fill out the form using random alphanumeric characters. // 5. Click the reddish "Create Wolfram ID" button. You will go to: https://developer.wolframalpha.com/portal/myapps/index.html // 6. Click the orangish "Sign up to get your first AppID" button. // 7. Fill out the form using random alphanumeric characters. // 8. Click the orangish "Sign up" button. // 9. Click the orangish "Get an AppID" button. // 10. Fill out the form using random alphanumeric characters. // 11. Click the orangish "Get AppID" button. const appIDArray = [ 'H9V325-HTALUWHKGK', 'AKJTJT-LR5LL8WTG6', 'LKY83U-XW6ATU9URU', ] // f8RCUrgvdPqq return // hide the results of previous calculations setTimeout( () => { document.querySelectorAll`div[data-wolfree-pods]`.forEach( element => element.remove() ) } ) // show the skeleton placeholder components document.querySelector` div [class="_3Cg6"], div [class="_2UIf"] `.insertAdjacentHTML( 'afterend', `
${subpod.plaintext}
${ JSON.stringify( { wolfree, document, userAgent: navigator?.userAgent, Date: Date(), DateTimeFormat: Intl?.DateTimeFormat()?.resolvedOptions(), response, }, null, 4 ) }
Bookmark the following mirror sites so you can try other mirrors when the Internet service providers have broken the Internet connection to this site. Machine-readable data: instances.json
See the acknowledgment page for details.
Copyright owners may sue infringers, which can be expensive and time-consuming. The DMCA "notice and takedown" process is much cheaper and takes less time.
Here are some DMCA takedown notices from Wolfram Alpha LLC.
The math output from scientific calculators on the Wolfree mirror sites may be objectionable. If you believe someone is using your copyrighted content unauthorizedly on Microsoft GitHub, fill out the form hyperlinked below to submit a DMCA takedown notice to request that the content be changed or removed.
As with all legal matters, it is always best to consult a professional about your questions or situation. The Wolfree community strongly encourages you to do so before taking action that might impact your rights. All content on this site is not legal advice.
See the acknowledgment page for details.
The following communities are not directly involved in the Wolfree community but have contributed conceptual inspiration or criticism. They may create Web services that indirectly benefit the Wolfree community on the Fediverse.
The Fediverse is a federated social network consisting of independently hosted servers. There are autonomous servers for blogging, photo sharing, and video sharing, and they are all interconnected seamlessly. So you only need one account to follow anyone on any compatible social media platform.
Thanks to the people on the Fediverse, the website operators of the Wolfree mirror sites and the programmers of the Wolfree Dockerfile can collaborate freely.
Gitea is a community-managed code hosting solution. Thanks to the people on Gitea, the programmers of the Wolfree Dockerfile can distribute the source code on the Fediverse freely.
Copyleft says that anyone who redistributes the software, with or without changes, must pass along the freedom to copy and change it further.
The Internet Archive is a non-profit library that lends digital copies of books. Penguin Random House, HarperCollins, Hachette, and Wiley claim that the Internet Archive infringes copyright by lending digital books.
Sci-Hub is a shadow library website that provides free access to millions of research papers and books.
Library Genesis (Libgen) is a shadow library website for scholarly journal articles, academic and general-interest books, audiobooks, and magazines.
Learn how to circumvent censorship on the Internet safely.
The big-I Internet is falling apart and becoming many little-i internets. The Internet can be much healthier and more vibrant if we eliminate the artificial restrictions imposed by third parties. How do we preserve the Internet for future generations?
Wolfree bypasses paywalls and shares step-by-step solutions. (It's like Sci-Hub, but Sci-Hub shares scholarly literature.) Wolfree is free and open-source.
For example, if y'=y is the math problem,
If something goes wrong, try other mirror sites.
See the list of mirrors for details. Try other mirrors when the Internet service providers have broken the Internet connection to this site.
The Wolfree community on the Fediverse may post Web addresses of new mirror sites. Try the new mirrors when the Internet service providers have broken the Internet connection to the older mirrors.
If your Internet service providers have broken the Internet connection to the Fediverse, install Tor Browser to circumvent censorship.
Microsoft GitHub is unreliable due to the DMCA. Internet hosting services compatible with the Fediverse, such as ForgeFed and Gitea, are much more reliable than Microsoft GitHub. You can find the source code on the following Gitea servers.
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.
Internet service providers, Web hosting service providers, the website operators of the Wolfree mirror sites, and the programmers of the Wolfree Dockerfile can help you get Wolfram Alpha Pro step-by-step solutions for free. Here's how:
Get step-by-step answers and hints for your math homework problems. Learn the basics, check your work, and gain insight into ways to solve problems.
Use step-by-step calculators for chemistry, calculus, algebra, trigonometry, and equation solving. Gain more understanding of your homework with steps and hints guiding you from problems to answers.
The Wolfree mirror sites not only give you the answers you're looking for but also help you learn how to solve problems. The Wolfree mirror sites leverage the Wolfram Language to allow free-form linguistic input of computations and programs.
The Wolfree mirror sites bring extensive data and computation capabilities derived from the Wolfram knowledgebase and curated data. The Wolfree mirror sites integrate interactive and programmatic access to the full power of the Wolfram Alpha computational knowledge engine.
See the acknowledgment page for details.