helena
helena copied to clipboard
How to remove existing saved scripts?
There are many scripts shipped with the extension. How do I remove all of them because of them I can't load new one as CLICK is not working to load a script
Can you tell me more about why you think all the other scripts are the reason you can't load a new one? I suspect something else may be going on. Any extra information might be useful in debugging this!
@schasins Thx for the answer. The list is so long that when I click my script name it does not get loaded. So I wanted to have only those scripts on list which made by Me only.
@schasins and can I use it offline? Why does it say "connecting server"? is it controlled remotely?
See the image, I try to open existing programs, it shows the message and that's it. I want to save program and then share the save script with my colleagues.
@schasins Also found some JS error on Console.
Ok, try pulling from both the root and the src/scripts/lib/helena-library directory, then try recording it, then loading it again. Let me know how it goes! (This won't make any fewer scripts show in the Saved Scripts list, but that shouldn't be related to the issue you're seeing.)
@schasins I had installed from Chrome Store but guess you are suggesting to use the Developer Mode for the purpose. I will do and let you know.
Could not load..
Looks like you might not have installed the submodule. Try following the installation instructions here: https://github.com/schasins/helena/wiki/Installing-Helena-(for-Developers)
@schasins
It got installed but errors are there. Unable to load the existing script. is it because curl http://kaofang.cs.berkeley.edu:8080/programs/8
taking a lot of time and returning a huge data?
The most important issue is sharing the scraper configuration. Is it possible to export the setting and shared with peers?
Ah, you're trying to load a program made with one of the earliest prototypes of Helena, and the program format is no longer compatible with current Helena. If you record a script with the current version and load it with the current version, you should be fine.
As for sharing it with peers, yes, definitely. Just record your script, give it a unique name, and save it. When your peers loads the list of saved scripts in their version of Helena, they'll see your script there, and they can click on the name to load it.
Excuse me what do you mean? I cloned the repo as you suggested. What's wrong have I done? Can you please pls help in baby steps?
No worries! Your version of the Chrome extensions is just fine - the tool isn't broken. It's just that you can't load every single script that's in the list of saved scripts. (In particular, some old ones are broken.) If you write your own script, you should be able to run it. So if you write your own program, you'll be able to load it from the list of saved scripts. But you might not be able to load other ones that other people have saved.
Oh Gotcha.
Now, the main question that made me to open an issue, the list goes long and the latest one is loaded in the end, when I click, it does not get loaded, even if it gets loaded or trying to load, when I scroll up the panel I see nothing. So my sub-questions were:
- How do I customize to see the one made by me only?
- How a script can be shared with others? Right now I don't find any option to export.
Ok, we'll take these one by one. (1) When I click on a script that I've recorded, it doesn't load. This usually means that you closed the extension before the script was saved to the server, so you'll have to re-record the script.
(2) How can I see only my own scripts in the "Saved Scripts" tab? To allow this, we'd need to have some kind of user accounts, log ins, something like that. We're happy to add user accounts eventually, but it's not the most pressing item on the to-do list, so this probably won't happen in the immediate future.
(3) How do I share scripts? If you want to share your script with others, you should have them install the Helena extension themselves. Any scripts that you've saved are available in the "Saved Scripts" tab for anyone to see, so if you give a script a unique name and send the name to your collaborators, they can CTRL+F for the name of the script in the "Saved Scripts" tab, then click on it to load the script.
OK it's more like a workaround.
Regarding (3, Can you please at least load the list in a way that the latest one shows on top? Right now I have to go all the way down and then click? Or hide those made by older versions? Please, @schasins ? :)
Regarding other things, I'd like to hack around, can you please guide where to look to make changes as per my need?
- I want to show my own scripts only.
- I want to export scraper config in a text file.
TIA.
Sure, I could change it so that it's ordered from most recent to least recent. (In the meantime, the fast way to get to your program is to CTRL+f for the name you want.)
For showing only your own scripts, the first thing you'd need to do is add a user model (e.g., https://teamtreehouse.com/library/user-authentication-with-rails/password-hashing-and-sign-in/creating-the-user-model-part-1) in the server-side code: https://github.com/schasins/helena-server
For exporting your programs. The programs that you can write with Helena can only be run from within a Chrome extension. So even if you export the programs to some kind of text format, you'd just have to load them right back into the Helena extension to run them. If you're just looking to run the programs from the command line, that's still an option. (See https://github.com/schasins/helena/blob/master/utilities/runHelenaScriptInParallel.py)
Thanks.
I forgot to thank you at first place. You have come up with something that saved my butt but since this is something my teammates to run so I wanted a way that others could also use, even if net is not working and automating intranet based webapps.
https://github.com/schasins/helena/blob/master/utilities/runHelenaScriptInParallel.py)
I did look at it. My past experience with Chrome Headless is not good. Especially while scraping CraigsList as it considers Chrome a non supportable browser while used with Selenium in Python.
However, I'd try it again as per your guidance.
Thanks!
Sure, I could change it so that it's ordered from most recent to least recent.
Whenever you get time pls check on this.
I am also planning to improve UX by making changes in extension screens.
That's awesome to hear! Make a pull request whenever you have some nice UX things to add!
Also, from your prior message about wanting to use it for intranet based webapps, I have an idea for something that might help you. I think I understand your needs somewhat better based on that use case. I'll take a look early next week.
In answer to your headless Chrome question, I can certainly see why you'd have that impression! But the script I pointed out uses Selenium exclusively to trigger the Helena extension to take over. From that point on, everything else is directed from within the extension. In fact, that script was originally developed for some tests on Craigslist.
Oh! And I did the change for ordering programs from most recent to least recent. Sorry, forgot to mention.
Oh! And I did the change for ordering programs from most recent to least recent. Sorry, forgot to mention.
Thanks a lot!
Also, from your prior message about wanting to use it for intranet based webapps, I have an idea for something that might help you. I think I understand your needs somewhat better based on that use case. I'll take a look early next week.
That sounds good. Yeah basically, lots of time you have to automate things within premises and have no Internet facility available. In this case this extension became useless as it depends on a remote server.
Ok, I've added buttons to the Additional Run Options section (although they can be moved, of course) for downloading the current Helena program locally and for loading a previously saved Helena program. This allows you to pass scripts around between collaborators without access to the Helena server. I want to emphasize that running scripts still relies on access to the Helena server. (Early versions of this tool attempted to store all data locally, but runs quickly ran up against the limits of Chrome storage. I'm interested in potentially developing a version that does not rely on a remote server, but given the common use cases, it's not at the top of the to-do list.)
Kewl. I will pull the code and give it a try. Thanks!