It is currently April 20th, 2024, 7:57 am

RSSWriter v1.1 - feeds made simple

Share and get help with Plugins and Addons
User avatar
Saint Wacko
Posts: 5
Joined: January 20th, 2011, 4:41 am

RSSWriter v1.1 - feeds made simple

Post by Saint Wacko »

Okay, this is my first time here. My friend, UnstoppableDave, does some skinning for Rainmeter, and he's been bugging me to write some programs to help skinners out, as I'm currently majoring in Computer Science. I don't really know much about skinning, but Dave tells me what the program needs to do, and I write it. If there are any changes you want to see, or other programs that you could use, feel free to say so.
So, without further ado, I present to you:

Image
RSSWriter V1.1
RSSWriter1.1.zip



This handy little java program will make short work of complicated rss feeds. Simply give it the information it needs and it will write the large number of measures following a complex parser and place them in a text file in a location of your choosing. This program does not include a GUI, it runs solely in the command line via a series of simple prompts. This makes it small, fast, and easy to use.

Quick Readme:

Number of measure groups: This should be the same as the number of items you have in your rss feed. For example, '[Title1], [Link1], [Title2], [Link2], [Title3], [Link3]" would be 3 measure groups.

Number of Measures per Group: For example, if, for each item in your feed, you parsed a title, a link, and a date, you would have 3 measures per group.

Measure n title: The program will then ask you to define a series of measure titles. This is the pattern of measure titles it will use to name the measures. For example, if you wanted [title1] [link1] [title2] [link2] as your measures, you would put "title" in measure 1 title, and "link" in measure 2 title. Then, you will have [title1] [link1] [title2] [link2] etc., all the way up to as many measure groups as you made. Place an '&' in the title where you want the number to go.

URL: Type in exactly what you would put in a skin, except without the brackets. If [Parser] is the name of your parser measure you are linking all these measures to, Parser is what goes here.

String Index Starting Value: In case you have parsed a page title or something before starting into your repetitive item parsing.

You can then choose whether or not to add a Substitute value and DecodeCharacterReference=1 value to the end of each measure.

After hitting enter, a folder navigation window will pop up, asking you where you want it to save the text file. Only put the name, with no extension.

And you're done!

Code by Saint Wacko, icon and readme by UnstoppableDave


Changelog:

V1.1: Allowed the user to choose where the number in the title went.
You do not have the required permissions to view the files attached to this post.
Last edited by Saint Wacko on March 28th, 2011, 8:05 am, edited 7 times in total.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: RSSWriter v1.0 - feeds made simple

Post by JpsCrazy »

Wow.
This is... amazing.
Thank you.


One thing though: when I read Number of Measure Groups I thought of Link, Title, Description rather than how many of one of those. And then Number of Measures per Group I thought of there'd be 12 Link, 12 Title, 12 Description.
Basically, I assumed it was the other way around. I don't know if it was just me.
But nonetheless, this really works so well.

Also, any way you could post a source so we could edit it for other things?
Because now I have 81 meters to make for all those measures... :P

Possibly make a different app that does something like:
Title:
Info1 (y/n)
Info1:
Info1AppendNumber (y/n)
Info2 (y/n)
Info2:
Info2AppendNumber (y/n)
etc...
How many:

Example:
Title: mtLink
Info1 (y/n) y
Info1: Meter=String
Info1AppendNumber (y/n) n
Info2 (y/n) y
Info2: MeasureName=measureLink
Info2AppendNumber (y/n) y
etc...
How Many: 20

So what'd you'd get is:
[mtLink1]
Meter=String
MeasureName=measureLink1

[mtLink2]
Meter=String
MeasureName=measureLink2

up to 20
User avatar
Saint Wacko
Posts: 5
Joined: January 20th, 2011, 4:41 am

Re: RSSWriter v1.0 - feeds made simple

Post by Saint Wacko »

JpsCrazy wrote:Wow.
This is... amazing.
Thank you.
They like me! They really like me! :P
JpsCrazy wrote:One thing though: when I read Number of Measure Groups I thought of Link, Title, Description rather than how many of one of those. And then Number of Measures per Group I thought of there'd be 12 Link, 12 Title, 12 Description.
Basically, I assumed it was the other way around. I don't know if it was just me.
But nonetheless, this really works so well.
I'm not quite sure what you mean here. The way I'm reading it, that's the way it already is. I must be misunderstanding you.
JpsCrazy wrote:Also, any way you could post a source so we could edit it for other things?
Because now I have 81 meters to make for all those measures... :P
I was just thinking about how to do that, and it should be pretty easy. I'll get to work! I've missed working with Java. Gotta keep in practice: none of my classes this semester use Java.
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: RSSWriter v1.0 - feeds made simple

Post by JpsCrazy »

Right now, for mine for example, it wass
Number of Measure Groups: 81
Number of Measures per Group: 1
Measure Title: msNumber
Otherstuffhere

I thought it makes more sense like:
Number of Measure Groups: 1
Number of Measures per Group: 81
Measure Title: msNumber
etc...

And this is for a result of:
[msNumber1]
Measure=Plugin
etcetcetc
StringIndex=1

[msNumber2]
Measure=Plugin
etcetcetc
StringIndex=2

etc.


Good! :D
That would be wonderful.
I honestly don't know any language except Rainmeter and HTML/CSS. (...and I can only read/edit CSS)
But, that's what college is for!
User avatar
Saint Wacko
Posts: 5
Joined: January 20th, 2011, 4:41 am

Re: RSSWriter v1.0 - feeds made simple

Post by Saint Wacko »

Oh, I see what you mean. I guess when you only have one measure per group it seems like it would work either way. The 'measures per group' is for when you have multiple measures of different names. For example:

Number of measure groups: 32
Number of measures per group: 2
Measure 1 title: item
Measure 2 title: price

would give you

[item1]

[price1]

[item2]

[price2]

.........

[item32]

[price32]
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: RSSWriter v1.0 - feeds made simple

Post by JpsCrazy »

Ahhh. When trying to explain something else I realized exactly where you're coming from...
Makes sense, and it's really not an issue if you mess up like I did. Easy to fix. ;)
User avatar
Saint Wacko
Posts: 5
Joined: January 20th, 2011, 4:41 am

Re: RSSWriter v1.0 - feeds made simple

Post by Saint Wacko »

Version 1.1 is up. Now you can put the number wherever you want in the title, instead of just at the end, by putting an '&' where you want it to go.


I'll see if I can get the meter writer done this weekend. I have homework to work on too, though, so I'm not sure if I will. Also, how do you remove an attachment?
User avatar
JpsCrazy
Posts: 667
Joined: April 18th, 2010, 2:16 pm
Location: NY, USA

Re: RSSWriter v1.0 - feeds made simple

Post by JpsCrazy »

User Control Panel and then on the left side under overview there's Manage Attachments
User avatar
Saint Wacko
Posts: 5
Joined: January 20th, 2011, 4:41 am

Re: RSSWriter v1.0 - feeds made simple

Post by Saint Wacko »

Yeah, finally found it while editing the post. I hadn't looked down far enough.