Pulling Weather Forecast from XML - Tasker Tips & Tricks

I'm a LONG time Tasker user, so I know my way around. But one thing I've never played with is pulling data from something like an XML.
I'd like to have my phone speak the day's weather forecast once I dismiss my alarm in the morning.
I have an FTP link to a the daily XML: ftp://ftp.bom.gov.au/anon/gen/fwo/IDN11027.xml
I need to pull the description for todays forecast, and the max and min values. I've highlighted where these are in the attached image, because the XML has forecast data for more several different locations.
I know you can split XML files to narrow down to the values but this is a rather complex XML, so I'm wondering if anyone is able to help me grab those values?
Each element starts with a unique code, "area aac....", so it should be possible. But because there are multiple instances of the same variable names, I'm not 100% sure on how to best achieve this.
I'm ok with the speech etc, it's just getting those values into Tasker variables that I'm asking for help with.
Any help is much appreciated

Managed to figure it out.
Using the split variable option is more simple than I though. Got it working great :good:

Files?
Hi!
can you post your project here?
It looks interesting to me... i would like to use it...
Thank you in advance.

Related

Setting a different time zone while creating an appointment

I know that while creating a new appointment, WM6/Office Mobile does not have the capability to let you set a different time zone for that appointment -like Outlook on a PC. I have searched for quite a while on this site and elsewhere using different combinations of seach phrases to locate a solution to this - a hack or a addon application or a replacement for the built in calendar program with this capability - either freeware or commercial. It is a strong irritant for me because at least half of the entries in my calendar need to be created with time zones set to a zone different from mine. Each time I have to do a calculation in my mind to add or subtract the difference before creating an appointment. If I dont do that and then I go travelling all appointments get shifted to wrong time slots. Anyway to a cut a long story short - I did find an application called TimeZones on www.pocketpcfreewares.com/en/index.php which seems to do exactly what I need - However that does not work on WM6 !!!! presumably this was written for some older version of WM.
I am sure there are many people out there for whom this will be a very useful feature.
Any help in finding a solution to this will be much appreciated.
Thanks.
Bump!
Several days and no comments! Either I am one of the very few who is bugged by this problem or there is no solution! I am afraid of the later because I didn't even get flamed for not searching before asking!!!!!
Try SPB Traveler. It does exactly what you want.
Thanks a lot. I will give it try right away
Does PocketInformant allow this?
On thie site:
Multiple Alarms, Travel Appointments
Beyond the primary alarm, you can now add secondary alarms, notifications and travel appointments to new and existing appointments
Click to expand...
Click to collapse
This was in the manual:
There is almost no difference between the dialog you see when creating a new appointment, and
the one you see when you edit an existing one. The only exception is with Appointment
Timezones which only show up for new appointments.
Click to expand...
Click to collapse
I saw this in the Knowledgebase:
http://forum.xda-developers.com/newreply.php?do=newreply&noquote=1&p=2075185
Thanks guys for your help. Of the two Pocketinformant is more like what I needed. Many of the goodies in SPB Traveller are already available on Worldmate (free version). Thanks again for the suggestions

(Oct-20) Little App: FuelCal v0.1.1

Hi everybody,
I wanted to learn some (basic) programming in VC# and the .Net Framework. So i looked for an idea. After a short time i had this idea, to create a program, in which you can keep track of your Fuel consumption of your car. (i think it is kind of useful, because the prices are changing every day).
I thought i'd share it here.. maybe someone is looking for a piece of software like this.. if not, just ignore it
you can test it, use it etc (whatever you want)..
Currently, there are two languages: German and English, but i dont love my English translation...
News:
v0.1.1 is now online:
I fixed the bug but another problem appeared: people who upgrade to the new version will lose all their data stored in data.xml with the uninstaller...
So i decided to create a simple Backup-Restore Function. Now, with the new version, you can Backup your Data before Upgrading and after that, you can restore it... If you use the Backup - the files will remain in your memory, until you delete them..
This is not the best way to solve the problem, because these files will stay on Memory even if the user uninstalls the program...
I read, that there is a way to costumize the setup process with a custom "Setup.dll" but i could not figure out how this works.. if anyone knows how to do this, please PM me..
Changelog:
v0.1.1 - 10/20/2008
fixed: storing units did not work
added: simple backup-function
added: simple restore-function
v0.1 - 10/19/2008
inital release
Beware: I will not guarantee for damage on your devices
If you have Bugs, ideas for new features or other feedback - let me know ..
This is a cool little program, would help a lot of people who have to teavel to work, etc..
I wish i had this when i was having some mileage problems with my car.
FuelCal
It looks good. I will give it a try.
Don't worry about your English, you can program!!!
Have a great day.
Glenn
FuelCal
Now for some more fun programming.
The store function is not storing the updated info.
It would be very useful for me if it would also calculate Mile/Gallon
Thanks.
Glenn
thanks for the feedback...
well i did not test the "Store" Feature for the Units ... bad in this case...
is will release a fixed version soon, stay tuned...
have a nice day
Just what i was looking for.
Thank you very much.
A bug
Hi. Excellent idea. You should check that on "Evaluation" the "price per Km" should be divided by 100 because it is done in cents but the unit says, when you change it, $/Km and not $cents/Km
Thanks.
Suggestion
Nice idea g3eB4Y. I will try the app.
This is something that could grow into a larger application if you want to track vehicle maintenance too. Also, I think that it would be helpful if you could simply enter the odometer reading and fuel quantity and allow the program to calculate distance.
First of all, thank you for your feedback...
maxzr said:
Hi. Excellent idea. You should check that on "Evaluation" the "price per Km" should be divided by 100 because it is done in cents but the unit says, when you change it, $/Km and not $cents/Km
Thanks.
Click to expand...
Click to collapse
I think there is nothing really wrong with the calculation.
When you change something on the settings page, you will only change the mask, but it will not affect the calculation..
The first Textbox under "Currency" will change the display for the "big-currency-unit" (€,$...) and the other textbox will change the "small-currency-unit" ($Cent, €Cent.. )
I can include a feature, that you really can change the calculation and display mode (€/km, €Cent/km, €Cent/20km ...) but at this moment, it does not
artyjeep said:
Nice idea g3eB4Y. I will try the app.
This is something that could grow into a larger application if you want to track vehicle maintenance too. Also, I think that it would be helpful if you could simply enter the odometer reading and fuel quantity and allow the program to calculate distance.
Click to expand...
Click to collapse
i have some idea for new features, i will try do implement them in one of the next versions, stay tuned...
its great to see, that somebody uses it... thank you!
g3eB4Y,
Very nice app you have. I've been using a excel spreadsheet to do this and now, I'm moving over to your app.
I wonder if you could add in another method of calculating the fuel consumption.
Distance travelled / No. of Litres = km/litre
Hope you can add that in to your next update.
Thanks once again.
PS:
No big deal but if you could name your cab file with the version number, it would be great!

Watchmaker faces settings reset

I use watchmaker and love it. One issue I am having is certain faces have color settings (color for the hands, color for the text, color for the markets, etc). It seems that after setting the colors just the way I like it, within a few hours the colors reset to the default settings.
Does anybody else have this issue and does anybody know how to get the colors to stick?
Any help is appreciated.
Cheers,
B.D.
It depend on how that specific watchface is being build. You better start building your own face, with the desired colours and that will not reset itself .
ro_explorer said:
It depend on how that specific watchface is being build. You better start building your own face, with the desired colours and that will not reset itself .
Click to expand...
Click to collapse
Not really helpful in answering my question, ro_explorer. I know building my own would allow the watchface to be styled more to my personal tastes without requiring my question be answered, but I do like faces others have created with their personal scripting and sometimes these faces are locked and I do not have the time to recreate them. As such I'm asking a specific question about watchmaker and how it operates. I would ask that you please do not act condescending and pedantic in answering a specific question about a specific program in the future.
Sincerely,
B.D.
BostonDan said:
I use watchmaker and love it. One issue I am having is certain faces have color settings (color for the hands, color for the text, color for the markets, etc). It seems that after setting the colors just the way I like it, within a few hours the colors reset to the default settings.
Does anybody else have this issue and does anybody know how to get the colors to stick?
Any help is appreciated.
Cheers,
B.D.
Click to expand...
Click to collapse
I had the same issue with one watch face I have been using. I ended up solving it when I found a file that configures the defaults for the watch face. I edited the file and changed the variables for the colors and other settings to the way I wanted them to be so when it resets, it goes back to how I want it.
I assume that you could maybe do something similar. On my phone the location of the file was:
/sdcard/BeautifulWatches/scripts
It was just a matter of opening the text file and then changing the values for the variables. Then going on the watch and removing the watch face and resending it to the watch from watchmaker on my phone.
Nx248, thank you. I will explorer the scripts used to try to track down the colors I want. This is helpful. Wish the watch/program would remember the colors though and save me the time in tracking down the script implementation.
Thanks again.
Cheers,
B.D.
BostonDan said:
As such I'm asking a specific question about watchmaker and how it operates. I would ask that you please do not act condescending and pedantic in answering a specific question about a specific program in the future.
Click to expand...
Click to collapse
Please don't be an ass. My advice was a real one and I'm sticking to it. If you want to have something that suits your specific needs, with the specific look, the ONLY WAY to achieve it is to build it yourself. Do not expect others to deliver the perfection for you.
BostonDan said:
Wish the watch/program would remember the colours though and save me the time in tracking down the script implementation.
Click to expand...
Click to collapse
And I'm convinced 100% that you sent that wish to the developer as well ...
If you really want to find out more about the inner workings of a certain software/platform, or to add useful things to it, the easiest way is to contact the developer.
My recommendation is to stop complaining and actually do something to fix your issue. Do not bash on the ones who are trying to share with you their ideas.
ro_explorer,
If there were an option you would like to see on your car would you build a car yourself, or reach out to see if anybody else had implemented the solution. Your responses ARE condescending and rude in the way you come across expecting people to have infinite time to do this. Maybe you have the time to explorer building this yourself but I have other more important things to do which is why I posed the original question.
To quote you, 'don't be an ass. '
I have found a number of people who have offered useful help on these forums and still contend your 'advice' does not address the original question. I would contend that you need to read the questions people post and not write out an answer just to up your post count or 'prove' what a smart ass you can be.
This is the last post I will make on this subject.
B.D.
BostonDan said:
ro_explorer,
If there were an option you would like to see on your car would you build a car yourself, or reach out to see if anybody else had implemented the solution.
Click to expand...
Click to collapse
I'm an engineer and a tinkerer .... I'm ALWAYS implementing my own solutions in ALL technical fields that I understand. I also help others and try to put seeds of creation in everyone else ....
If I ever had to ask for stuff I always asked the producer.
I hope this is answering your concerns.
Other than this I'm really sorry you are sensitive to a level to consider my comments as rude ...
Good luck in your endeavour ... If I can help you again, I will ...
nx248 said:
I had the same issue with one watch face I have been using. I ended up solving it when I found a file that configures the defaults for the watch face. I edited the file and changed the variables for the colors and other settings to the way I wanted them to be so when it resets, it goes back to how I want it.
I assume that you could maybe do something similar. On my phone the location of the file was:
/sdcard/BeautifulWatches/scripts
It was just a matter of opening the text file and then changing the values for the variables. Then going on the watch and removing the watch face and resending it to the watch from watchmaker on my phone.
Click to expand...
Click to collapse
Hi nx248,
I tried changing the script on the phone and resending the watchface to the watch but found that since the script had already been transferred to the watch previously I had to edit the script on the watch.
I accomplished this by adb into the watch and pulling the script to my computer, editing it, and then pushing the script back on the watch to the /sdcard/BeautifulWatches/scripts directory. Alternatively, I think I could have pulled the script from my phone, edited it, and pushed it to the same location.
In any case, I edited the watchface variables so that the default position in the array corresponded to the colors I wanted, which is working.
Thanks for your help. :good:
EDIT: Just saw that you had stated I should delete the watchface from the watch. I don't know how to do this, so I will have to educate myself.
I read the Watchmaker forum and found that if you enter the "change faces" screen on the watch under Watchmaker (usually press at one of the main watch positions - default to 3 o'clock, but can be set to 6,9,12 o'clock) and swipe up on the face you wish to remove, it is removed from the watch.
Cheers,
B.D.

Multiple font colours in one text string

Hi there guys, this is my first time on here so sorry if i'm posting in the wrong bit.
I'm just playing around with android studio now learning the ins and outs of it and I've hit a speedbump. I am making a custom button and the design i'm working with has the text of a button in different colours. This is for a friend who has offered me the opportunity to have a go developing his app as a learning process so I'm not going to post pictures of his designs however it's easy enough to explain without. So for instance a string says: hello like so.
I managed to use java and html to do this however this means I can only see the result in the actual built app and not in my layout view. This bothers me a little as every time I do a little change it means I have to build the app to see what it looks like. Is there a way I can use the html in my xml file without java?
Cheers for any help guys!
This is impossible for now. You have to use Java for multiple text colors in a View. No preview available at the time.
Check here
In Android Studio 2.0 that will be released soon, the build times are improved and instant run really shortens the time wasted for running and running again the app! Hope it makes our life easier
You can use HTML to customize your text.
For example:
TextView.setText(fromHtml("<font color='#FFFFFF'>text</font>"));
alphascript said:
You can use HTML to customize your text.
For example:
TextView.setText(fromHtml("<font color='#FFFFFF'>text</font>"));
Click to expand...
Click to collapse
He is talking about previewing the color in the layout for multi-color text.

task when appointment in calendar starts/ends - how to find / with pattern matching

Hi,
I wanted to have a notification that always shows me the task that has me marked as busy in my calendars.
so I need a task that refreshs that notification whenever something changes. To achieve that I made 2 profiles:
-one profile is used to trigger the update task whenever the next appointment ends
-the other triggers whenever a new appointment starts
the update task not only creates the string for the notification but also refreshs the appoinment that ends next and also a string with all known appoinments. The second profile is triggered with a pattern match that always excludes all known appointments.
This way the second profile turns off itsself whenever a new appointment starts.
This way the whole thing works even if there are appointments that:
*start at the same time but do not end at the same time
*start at different times and end at different times
(if you don't have that: good for you ... no need to discuss it - I explained in the link below why this is not avoidable)
Now I still have one problem:
I do have appointments in my calendar that have slashes "/" (and many people might have when being invited by others). The list with the known appointments that is used as trigger for the second profile looks like this: "!appoinment1/appointment2" (the slash means "or"). If one of the titles contains a "/" that will keep the second profile on all the time and it will not trigger new appointments ...
unfortunately it seems like tasker cannot us other characters in that place (like regex) and it seems like I cannot even escpe the / slashes ("\/")
Any solution to that would be appreciated. And - maybe the code is usefull to others (there is a variable in the adjust_notif task in the very beginning that can be filled with the calendars that shall be shown in the notification - format "*cal1*/*cal2*/*cal3*" and so on)
Also for testing purposes I mad a variable %now to be able to change when the task is checking the calendar (of course this won't help when testing the profiles ...)
I started the discussion here but I think google groups is too unflexible (no file upload) and also ... too few people there ... and - I love XDA ...
best regards
Daniel
hmmm - testing if replacing the / with a + or * will help - would make the whole thing slightly unreliable but I actually don't think that would cause a problem ...
seems to work my perfectionism would prefer a better solution
However: how come the profile does not automatically update its status when I am in tasker? still shows green and only when I click it and go back it changes ...
good that I asked ... motivated me so that the thing is improved now. Still no real solution for finding / but a newer version with some bugs removed (callist did not really work with the old version)
I also made an additional profile with which it is possible to use "restore settings" so that now only one task "silent" is necessary to adjust to your personal needs.
Hi
I wonder where the palace is to discuss tasker projects ...
Here .... obviously not
Regards
daniu said:
Hi
I wonder where the palace is to discuss tasker projects ...
Here .... obviously not
Regards
Click to expand...
Click to collapse
interesting idea...
Have you tried putting all known appointments into a variable (appending, separated with a new line)? Then you can call on this variable to see if the current appointment has a match (with *%CurrentAppointVar*).
That way, there should be no slash in the match function.
alienyd said:
interesting idea...
Have you tried putting all known appointments into a variable (appending, separated with a new line)? Then you can call on this variable to see if the current appointment has a match (with *%CurrentAppointVar*).
That way, there should be no slash in the match function.
Click to expand...
Click to collapse
Hi
I don't get how that would remove the / from the text besides that I do check against a variable already if I understood your point correctly ...
Regards
daniu said:
Hi
I don't get how that would remove the / from the text besides that I do check against a variable already if I understood your point correctly ...
Regards
Click to expand...
Click to collapse
if I understood correctly, you have something like this:
current events: meeting/task1, meeting2, meeting3
new event: meeting4
if %new != meeting/task1/meeting2/meeting3
do something
which returns wrong results.
So I would try:
set %curr to
meeting/task1
meeting2
meeting3
(append, with new line after each event)
and then
if %new !match %curr
do.....
probably the appending part could be done with a FOR loop.
Hope this helps.
alienyd said:
if I understood correctly, you have something like this:
current events: meeting/task1, meeting2, meeting3
new event: meeting4
if %new != meeting/task1/meeting2/meeting3
do something
which returns wrong results.
So I would try:
set %curr to
meeting/task1
meeting2
meeting3
(append, with new line after each event)
and then
if %new !match %curr
do.....
probably the appending part could be done with a FOR loop.
Hope this helps.
Click to expand...
Click to collapse
Hmmm ... well - the problem is that I check against that string in a profile not in a task ... I ckeck if a new task starts that does not have a name within that string (of currently running appointments). In your example:
!meeting/task1/meeting2/meeting3
My way now is to change the check variable to:
!meeting*task1/meeting2/meeting3
which does jot work that bad after all ...
I am just generally a bit disappointed by this forum because I would love to have a place were there are enough ppl so that someone would be interested enough to actually install the project which even you obviously did not do.
Regards
daniu said:
Hmmm ... well - the problem is that I check against that string in a profile not in a task ... I ckeck if a new task starts that does not have a name within that string (of currently running appointments). In your example:
!meeting/task1/meeting2/meeting3
My way now is to change the check variable to:
!meeting*task1/meeting2/meeting3
which does jot work that bad after all ...
I am just generally a bit disappointed by this forum because I would love to have a place were there are enough ppl so that someone would be interested enough to actually install the project which even you obviously did not do.
Regards
Click to expand...
Click to collapse
sorry to say this, but obviously your project didn't raise enough interest, at least not for me. I guess people try to help where and how they can, without obligations. You should not expect much, especially when the project is complex...
just my 2 cents

Categories

Resources