afuna_archive: (Default)
I've moved over my scripts to my site (after months of putting it off. Thank you, [livejournal.com profile] ciaran_h for hosting them this past year <3).

Old site: http://afuna.theblob.org/greasemonkey/
(redirects to)
New site: http://afunamatata.com/greasemonkey/

I also spent some time cleaning up naming conventions and namespaces. These changes break all old direct links to scripts, and may prevent many scripts from being recognized as the same script if you have to reinstall for any reason (which means duplicate scripts in the list, or preferences not carrying over).

But this is the last time I'm doing something like this, and it won't cause any problems for any scripts newly installed or written from this point forward. (And should not cause problems for the majority of existing scripts, either).

The best part about reorganizing is that I've managed to consolidate new scripts and script updates which had previously been scattered across three different sites! And some of these scripts weren't linked to from anywhere else, so it was all a mess.

It feels good to have them all neatly referred to from one location. This page will likely remain more updated than my userscripts.org account :-)

I've announced most of my scripts before, but I think LJ Search Defaults was only done through PM, and the autocomplete for the taglister hadn't gone public before. Some others I brought up in IRC, but might not have brought up in an entry or added to the old site.

Anyway, take a look if you're interested! It's all red and white now, too: here be scripts

All changes can be tracked with http://www.afunamatata.com:8000/atom-log/, though that includes the website updates as well...it's possible to track individual scripts by going to (note ending "?"), which I should mention, but I'm too lazy to add a link beside each script at the moment:

http://www.afunamatata.com:8000/atom-log/tip/scriptname.user.js?
afuna_archive: (Default)
Not the inside-inside, Perl guts, but trying to update all (DW) layout layers, to get all the updated features!

Long-term goal (actually, medium-term, because once the site goes live, everything needs to be stable, so I won't be able to do any drastic changes) is to turn this layout/feature chart entirely green. I know it's not possible; I can at least try what is reasonable.

One The hard thing about developing with S2 "officially" is that the quickest (only?) way to get feedback on your changes is to apply the layout to your journal, use the S2 compiler (layeredit.bml), apply changes, check journal, rinse repeat. However, then you have to copy the updated layer to bin/upgrading/s2layers. I've found that last step error-prone: tedious to pick out the changes bit by bit and transfer them manually. If I try to replace the entire layer in one go, I find that I have a hard time copy-pasting more than a screenful in vi (hm, have I ever tried just truncating the file and then pasting everything into a blank file? I don't think I have. Maybe I should do have tried that before trying to work around it).

So, anyway! Perl script! You give it the name of the layout. It reads the updated version which is currently "live" (on your dev site need to set the base URL; localhost works fine reads from ljconfig.pl). It then updates the static file in bin/upgrading/s2layers. After that, just need to do cvsreport.pl or hg diff or svn diff or commit or whatever. I've stuck in my ~/bin, so I can run it from anywhere, which is pretty convenient:

http://afunamatata.com/scripts/dreamwidth/s2sync.old

(This assumes that $LJHOME is set properly, and live versus cvs directories are in their normal LJ-setup locations, though this is really more for DW, since it overwrites bin/upgrading in DW-free)

Sample in action )

At some point, I may find it useful to modify it so that it accepts and upgrades multiple layouts (and themes??), but too much trouble to do so now, since I'm not touching themes at all.

And hopefully this will make development that much easier :) I was dreading keeping my live layout versus my diff-able layout in sync, but I am looking forward to coding this weekend now.


Update
[livejournal.com profile] exor674 just came up with a much prettier version <3 http://pastebin.com/f2fc673b3

I'm appropriating it for my own use.

Update2
Slightly tweaked version here: http://afunamatata.com/scripts/dreamwidth/s2sync!

(Basically, sanity check to make sure it's a layout layer, and also put the output directory into a variable, so that people who want to stick it straight into live instead of under cvs/ can change just the one line)

It now accepts either layer id (as a number), or layout name or redist_uniq, so either of these will work:
$ s2sync 333
$ s2sync bob/layout
$ s2sync bob


Also, output slightly changed:

dh-afuna@li-166:~/dw/cvs/dw-free$ s2sync 336
Can only handle layout layers at /dreamhack/8080-afuna/bin/s2sync line 33.
dh-afuna@li-166:~/dw/cvs/dw-free$ s2sync 333
bob/layout written to /dreamhack/8080-afuna/dw/cvs/dw-free/bin/upgrading/s2layers/bob/layout.s2
afuna_archive: (Default)
Damn. PHP also uses @$. First thing I thought when I saw it was, "Oh neat, it's dereferencing an array reference." Then I realized a) the variable on the LHS wasn't an array, and b) I was in the wrong language.

(It's used for error control instead, which is also neat in its own way, I guess.)
afuna_archive: (Default)
Abby, I'm making this for you (though anyone else can join in if they want). Post new script suggestions, ideas for improving current scripts, and bug reports here. Take a look at my current Greasemonkey scripts my current Greasemonkey scripts, and see if you think of anything!

(Poor man's tracker, ahaha)
afuna_archive: (what does this button do)
Google recently published an API for Greasemonkey scripts. I haven't had a chance to test it yet, or to even look closely, but if it's possible to use it to easily access and edit content in a message, that would be perfect.

(And even if it isn't, just the concept excites pleases me very much.)

Update:
Yes, it is possible, because I've just managed to add in a userpic input field for LJ comment notifications. It took me longer to figure out how to get the script to load in Greasemonkey, than it took to figure out the logic to add in the input textbox. I should have scrolled down -- there's a sample script on the API page which explains that you have to add an onload event listener.

Still not done, as I'm too lazy to do the three items on the todo list for the script:

// TODO: make it a dropdown (Can use this and then store it, I suppose)
// TODO: check that it *is* a comment notification ;-0
// need to add something for when a message is expanded, if it's possible via the API

But I now have a fair grasp of the way around the API. Want to play with it so badly, but I need to sleep because I promised myself I would get that student's license by tomorrow.
afuna_archive: (Default)
In case anyone wants to comment on the script but doesn't feel comfortable doing so on us.o, here is a good place. I'm assuming that anyone who wants to use that script has an LJ account, since the script itself is made to work with LJ!

---

Because it seems fitting, here's a script (not written by me!) which restores the appearance and formatting of the old update.bml page.

Also, I've finally posted the script to add a tagslist to update.bml. There's an easter egg in there of a sorts -- didn't bother to remove my uglification code, but it can't be activated unless you know the exact steps.

Ah, the stupid thing is that my script is not compatible with the first one, so unless someone (else) is willing to figure out how to fix that, you'll have to choose one or the other.

The information below is outdated; most updated info is in the script itself and probably also in the extended description over at us.o.
Rough docu for my script. This text is also found within the script itself )
afuna_archive: (Default)
I've been lurking around [livejournal.com profile] news/[livejournal.com profile] lj_design/[livejournal.com profile] lj_releases, hoping for any news that the userpic has been dragged back down to the bottom by sheer force of gravity, if nothing else. I even made a couple of comments saying that having the userpic at the top seriously disrupts my workflow (I tried to stop myself, honestly I did).

Then I realized that I didn't need to wait for the powers that be to change their minds; I could work on my own solution. So in between studying for my polsci long test and studying for my theo quiz, I tried my hand at modifying update.bml and I came up what has to be the world's ugliest update.bml page ever. And it only really works for me because I don't think that anyone else wants to lose their music and location fields, or to have their mood icon preview and userpic preview side by side.

world's ugliest update.bml page EVER )

But see, I don't care! AHAHAHA.

I have a list of tags! I can change my icon without having to scroll up! Everything that I need is right where I need it, and life is good.

Welcome to my world, my personally tweaked update.bml. Bless your ugly little Greasemonkied face heart.

I could move the music and location fields to the right instead of removing them entirely, but right now that's more trouble than it's worth, considering that I don't ever use them. For me, they're icing on the pudding -- that is to say, don't like, don't use, don't need.

Oh and I still feel guilty over the screenscraping involved in fetching those tags so still not making the (tag-related) code public until I've added even a tiny measure against overdoing that. Unless I don't need to. Gah! Help!

Profile

afuna_archive: (Default)
afuna_archive

June 2009

S M T W T F S
  1 2 3 4 5 6
7 8 9 10 11 1213
14151617181920
21222324252627
282930    

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 24th, 2017 02:43 am
Powered by Dreamwidth Studios