www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

Semi-automated batch import of records using JavaScript

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
dme26



Joined: 25 Jan 2008
Posts: 5

PostPosted: Mon Jan 26, 2015 6:36 am    Post subject: Semi-automated batch import of records using JavaScript Reply with quote

I needed to batch import quite a few records into a Zeroshell installation. I hacked up a quick example automating the creation of static DHCP records using Safari (in my case) that I have uploaded at: https://bitbucket.org/dme26/zs-batch-load.

As noted on the readme.md file in that repository, what's there can easily be automated further, and with a little more difficulty can probably be automated in a much more robust fashion (e.g. using a tool such as http://www.seleniumhq.org/, generalising across browsers, etc.)

The example shell script in that repository opens a TSV file and when prompted reads the file line-by-line, at each line loading a chunk of JavaScript into the MacOS clipboard, that can then be pasted into the Safari JavaScript console.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group