You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not an issue with the code, it's an issue with my knowledge and I would really appreciate it if someone could tell me how to use it. I initially started to learn javascript (in a few spare hours) to figure out how to use this code, but it and the instructions given are just as opaque to me as they were before. Please help :)
The text was updated successfully, but these errors were encountered:
After installing the Dependencies you can run the program in one of two ways;
Clone the repo and run the file directly
In short, here are the terminal commands;
git clone https://github.com/TotalTechGeek/pictoprime folder/to/use/
npm i # or `yarn` if you use yarn, or `pnpm i` if you use pnpm
node index.js [options]
# to dump the prime number image to a text file for viewing; (I'm uncertain if this works on windows or not)
node index.js --image ./examples/headshot.png -x ascii > outFile.txt
git clone ... copies the code here in the repo to your computer so you can run it.
node index.js [options] is your access point to the tool, pass in the options you want to use
node index.js --image ... is an example of turning the headshot of Matt into a prime number in a text file. --image ./examples/headshot.png tells the program to use the image headshot.png in the examples folder -x ascii tells the program to print the text to the terminal as plain text -q tells the program to be silent until it's ready to print the plain text, it might seem like it's frozen but it's actually working fine in silence > outFile.txt tells your terminal to take whatever the program outputs, and to write it in the file outFile.txt. (note that you may have to delete the file to run again unless you change the "outFile" name)
Use pictoprime as an npm executable
In short, here are the terminal commands;
npx pictoprime [options]
# to dump the prime number image to a text file for viewing; (I'm uncertain if this works on windows or not)
npx pictoprime --image ./examples/headshot.png -x ascii > outFile.txt
these two commands do the same as their option 1 counterparts beginning with node index.js
Getting an image output doesn't appear to be a capability of this program yet, but you can still take a screenshot of the text file if you want an image.
Please could somebody tell me explicitly how to use this code (in particular to convert an image into a prime)
This is not an issue with the code, it's an issue with my knowledge and I would really appreciate it if someone could tell me how to use it. I initially started to learn javascript (in a few spare hours) to figure out how to use this code, but it and the instructions given are just as opaque to me as they were before. Please help :)
The text was updated successfully, but these errors were encountered: