Comments (6)
Would you be so kind as to provide an example ASCII file that triggers this issue, for testing?
Anything as simple as a single line of text longer than 80 columns will trigger the problem, inserting unwanted line breaks when loaded.
from durdraw.
Thank you for this report!
Yes, that 80 column file loading stuff is ugly. I'll re-visit this and see what I can come up with. Ideally I want it to correctly guess the width of all ASCII files. This is also a reason why I prefer to keep .dur files as master copies of the art I'm working on, but of course, that doesn't help much when importing ASCII and ANSI files. :)
Would you be so kind as to provide an example ASCII file that triggers this issue, for testing?
Edit: I've also considered allowing overriding of canvas width at the load screen, though loading a file from the command-line with -W should do the same thing. (Right now, as you noted, it doesn't.)
from durdraw.
Got it. There is a lot of old hard-coded 80 column stuff in Durdraw. I'm working on removing that so that it can load and edit wide (and narrow) ANSI and ASCII files better. It does better with wider and narrow .dur files.
Part of the cause of the issue here is that lots of ANSI art files assume 80 columns and eliminate the newline character to save bytes over a dialup line, which Durdraw must account for, and Durdraw uses the ANSI parser to load ASCII files, too.
Another issue is that Durdraw does not yet support vertical scrolling, so your window will need to be wider than your ASCII file. Not as bad with modern resizable terminals, but still an issue.
from durdraw.
@dilworks I just added a --wrap command line option. you can pass to it the number of columns that you want it to start wrapping at (default 80) when loding ANSI and ASCII files. I also fixed a problem that was preventing editing past 80 columns when loding an .ANS or .ASC file.
For example, if your ASCII file is 100 columns wide, you can pass --wrap 120. It should automatically cut off at 100 columns and not wrap any lines.
It's not the most elegant solution, but I wanted to get you up and drawing while I think/work on this some more.
Could you please give it a try let me know if this helps out your situation? Thanks!
from durdraw.
Also, Durdraw looks to the SAUCE record for the columns and width, as an alternative to the default 80 columns or whatever is passed to --wrap. This is how it is able to load ANSI files larger than 80 columns from artscene packs.
Unfortunately it can't write sauce records yet. But if you were to add one to the end of the ASCII file using another program, then Durdraw should respect the dimensions in the SAUCE reord.
from durdraw.
@dilworks I'm going to go ahead and mark this as fixed and closed. If --wrap does not help your situation, or if you need anything else, feel free to leave a comment.
Thanks!
from durdraw.
Related Issues (20)
- docker run HOT 2
- Unable to use any F1-F12 keys HOT 4
- durformat spec reverses x/y HOT 3
- debian package HOT 10
- AttributeError: module 'curses' has no attribute 'BUTTON5_PRESSED' HOT 4
- License change? HOT 4
- Background Colors in 256 color mode HOT 1
- request: tutorial/manual HOT 1
- how to run on windows 10? HOT 1
- Request for Help: Homebrew package maintainer HOT 7
- 16-color picker (alt+c) does not function below a certain terminal size HOT 2
- Feature request: "wait x" HOT 7
- Feature Request: terminal smaller than 80 columns when using -p argument HOT 2
- Color weirdness when opening 256-color ANSI files HOT 6
- Esc-[ can't change character sets in Playback mode HOT 5
- Python-3.11: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. HOT 4
- There was an error setting the color./selt' is not defined in durdraw_ui_curses.py HOT 10
- Crushes when I try to change character set HOT 2
- Canvas shrinked after converting to ANSI HOT 5
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 durdraw.