Comments (9)
I understand. I'll let you know when I get an updated version uploaded. Thanks!
from word-search-generator.
I've got a working PR #16 that I think provides the functionality you are looking for.
You can call the save()
method with solution=True
to have the solution exported within the same file as the puzzle.
p = WordSearch("dog cat pig")
p.save("test.pdf", solution=True)
...result in the pdf file linked below. The "solution" is added as a second page with the words highlighted in red just as you get with the show(solution=True)
method.
TestWithSolution.pdf
p = WordSearch("dog cat pig")
p.save("test.csv", solution=True)
...result in the csv file linked below. The "solution" is added at the bottom of the csv file with only the puzzle words visible. All other characters are represented as a blank space " "
.
TestWithSolution.csv
Have a look and let me know what you think. Thanks!
from word-search-generator.
Yeah, I haven't merged the new feature code and released a new version yet... So if you installed it using pip you would get that error. I just wanted to get your feedback on the attached pdf to see if that is the result you were looking for before I released the new version.
from word-search-generator.
There is no current functionality to save the puzzle solution to PDF. I assume by "solution", you mean what gets output when calling puzzle.solution
? If so, It wouldn't be very hard to add it's just not there now. The answer key is printed at the bottom (and upside down) of the standard puzzle PDF output.
Am I correctly understanding what you are asking?
from word-search-generator.
So, I thought of 3 potential solutions. Let me know if any sound better or worse to you.
puzzle.save("filepath.pdf", solution=True)
- The command above saves the standard PDF puzzle file but highlights the solution by either coloring them in red or putting red squares around them.
- The command above saves the standard PDF puzzle file and includes a second page with the solution. The second page would be the same as the first but would only show the letters from the puzzle words.
- The setting above would only save a PDF file of the solution at the specified path. This option would require you to save the standard puzzle output in a second step.
from word-search-generator.
sorry for my English I think the first and second answers are better, my point is to get the answer on a separate page
in the last, after I run the script I hope to get
page 1 contains the word search puzzle
page 2 get the solution of the puzzle on (pdf or image)
I hope you understand me and thanks for this repo
from word-search-generator.
I understand. I'll let you know when I get an updated version uploaded. Thanks!
thanks for help
from word-search-generator.
I've got a working PR #16 that I think provides the functionality you are looking for.
You can call the
save()
method withsolution=True
to have the solution exported within the same file as the puzzle.p = WordSearch("dog cat pig") p.save("test.pdf", solution=True)...result in the pdf file linked below. The "solution" is added as a second page with the words highlighted in red just as you get with the
show(solution=True)
method. TestWithSolution.pdfp = WordSearch("dog cat pig") p.save("test.csv", solution=True)...result in the csv file linked below. The "solution" is added at the bottom of the csv file with only the puzzle words visible. All other characters are represented as a blank space
" "
. TestWithSolution.csvHave a look and let me know what you think. Thanks!
thanks for the update
still not working I use the code
p = WordSearch("dog cat pig")
p.save("test.csv", solution=True)
" TypeError: WordSearch.save() got an unexpected keyword argument 'solution' "
from word-search-generator.
Yeah, I haven't merged the new feature code and released a new version yet... So if you installed it using pip you would get that error. I just wanted to get your feedback on the attached pdf to see if that is the result you were looking for before I released the new version.
it's perfect you can add a grid system (border on each letter) it will be better Other than that everything is great
from word-search-generator.
Related Issues (20)
- Solution without random fill characters HOT 3
- find_a_fit does not care about secret directions HOT 1
- add hide_fillers to save? HOT 5
- Outputting shortened words of a solution HOT 7
- change default path word search.exe HOT 2
- Unbake assumptions about secret words [priority, valid direction] from the Game class HOT 11
- fpdf2 required version discrepancy in dev requirements HOT 4
- Draw a rectangle around the words HOT 4
- --no-validators results in error: unrecognized arguments: --no-validators HOT 6
- Quick Questions - Solution, Diff Level and word lists. HOT 10
- Add an option to generate puzzles with lowercase letters? HOT 6
- Multilingual Support HOT 7
- Upgrade of packages required HOT 5
- Despite space, its not placing words? HOT 14
- Themed word sets
- latest cli version word-search HOT 2
- Why is there no difficulty 6 level? HOT 7
- How can i remove ans key HOT 1
- CLI doesn't work for me on MacOS 14.2 HOT 2
- Custom Filler Alphabet/Characters HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from word-search-generator.