Comments (8)
So there are two solutions I can think of:
a) Print each part of the output in its own line.
b) Add even more information to the output (e.g. fetch more data), so it will never fit one line on anybody's terminal and look like a "mistake".
Which is preferable?
from ansiweather.
I think the fact that the location can be of variable width makes it difficult to guarantee 80 columns.
However, I can think of one more solution that might help: add options to disable parts of the output. e.g.,
pressure = false
would make it so pressure isn't displayed.
from ansiweather.
That's a good idea @BurntSushi.
In my Python port of ansiweather, https://github.com/wktr/pyweather, I just removed the default background highlighting and split the output to use multiple lines. I personally favor how it looks. What do you think? I think it is a suitable default, as it is fairly concise in my opinion.
from ansiweather.
@wktr I think it looks nice, although I'm not particularly fussy about it. Just offering up other ideas. :-)
(The other way to go is to make the entire output configurable via a simple template or something. In Python, I'd reach for str.format.)
from ansiweather.
Text labels are now customizable in the configuration file. This solve this kind of issues, at least partially.
Adding options to disable parts of the output could be a nice idea as well. Not sure it's really needed though, as I would prefer keeping the logic as simple as possible :)
from ansiweather.
@fcambus there is a rogue leading space in the output of ansiweather (there is a space in your echo output line), which can only make overflow more likely to happen for no obvious gain...
from ansiweather.
@iandol It's a feature :-) There is a leading and a trailing space, the output looks better that way.
from ansiweather.
Could you leave a pointer as to how this new config solves this issue? How do I add "newline" in the delimiter of .ansiweatherrc?
EDIT: Aha, found it. Change "dashes" to "\n".
from ansiweather.
Related Issues (20)
- Feature suggestion: themes / custom colors HOT 1
- Include help HOT 3
- Doesn't seem to match OpenWeatherMap data HOT 1
- is this still working? HOT 2
- Change location in ansiweatherrc.example HOT 1
- You can install ansiweather with Awesome package manager HOT 1
- Feature Request: Feels like temperature HOT 6
- Wind data in km/h HOT 11
- Some options aren't working/aren't showing up HOT 5
- multiline output HOT 1
- Help option HOT 1
- Locale date format HOT 1
- Undocumented option feels_like_text HOT 1
- Improve Forecast / Current Conditions HOT 3
- Output Language HOT 1
- How to run ansiweather on android with termux HOT 1
- dateformat problem.
- How to retreive weather for 4 cities ?? HOT 2
- leading minus sign if the value is zero
- Multiple word city names do not display 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 ansiweather.