Discussion:
[iterm2-discuss] Bulk Load of new hosts (profiles)
Tatzlwurm Eads
2018-08-23 20:29:02 UTC
Permalink
I often will need to add large group of hosts(profiles) to iterm2. Outside
of duplicate I don't see a good way to do this. Is there a feature to add
a new group of 100 profiles at a time?
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Richard Mitchell
2018-08-23 21:24:40 UTC
Permalink
The profiles are just a json text file. Given you are creating so many at
one time, I'm guessing you are only changing one or just a few things.
Writing a little shell script to use sed would be one way of modifying a
template profile to your desired profile. A profile can also inherit
settings from "Dynamic Profile Parent Name", which means the template only
needs to contain the values you want changed, plus the name of the parent
profile.
Post by Tatzlwurm Eads
I often will need to add large group of hosts(profiles) to iterm2.
Outside of duplicate I don't see a good way to do this. Is there a feature
to add a new group of 100 profiles at a time?
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
George Nachman
2018-08-24 05:35:56 UTC
Permalink
Richard is referring to the dynamic profiles feature, documented here:
https://www.iterm2.com/documentation-dynamic-profiles.html
Post by Richard Mitchell
The profiles are just a json text file. Given you are creating so many at
one time, I'm guessing you are only changing one or just a few things.
Writing a little shell script to use sed would be one way of modifying a
template profile to your desired profile. A profile can also inherit
settings from "Dynamic Profile Parent Name", which means the template only
needs to contain the values you want changed, plus the name of the parent
profile.
Post by Tatzlwurm Eads
I often will need to add large group of hosts(profiles) to iterm2.
Outside of duplicate I don't see a good way to do this. Is there a feature
to add a new group of 100 profiles at a time?
--
You received this message because you are subscribed to the Google Groups
"iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tatzlwurm Eads
2018-08-24 17:54:47 UTC
Permalink
Thanks - I wrote --
bash - load script -- using postgresql - I load the hostnames into a table
then query the table based on the domain I wish to load. This works very
good but how to I add triggers and colors to that result?
PROFILEDIR='/Users/username/Library/Application
Support/iTerm2/DynamicProfiles'
echo '{' > $PROFILEDIR/new.json
echo \"Profiles\"': [' >> $PROFILEDIR/new.json
psql mysqldb -X -f iterm2_query.sql -q |sed 's/XXX/"/g' >>
$PROFILEDIR/new.json
echo ']' >> $PROFILEDIR/new.json
echo '}' >> $PROFILEDIR/new.json
Post by George Nachman
https://www.iterm2.com/documentation-dynamic-profiles.html
Post by Richard Mitchell
The profiles are just a json text file. Given you are creating so many
at one time, I'm guessing you are only changing one or just a few things.
Writing a little shell script to use sed would be one way of modifying a
template profile to your desired profile. A profile can also inherit
settings from "Dynamic Profile Parent Name", which means the template only
needs to contain the values you want changed, plus the name of the parent
profile.
Post by Tatzlwurm Eads
I often will need to add large group of hosts(profiles) to iterm2.
Outside of duplicate I don't see a good way to do this. Is there a feature
to add a new group of 100 profiles at a time?
--
You received this message because you are subscribed to the Google Groups
"iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
George Nachman
2018-08-24 23:30:27 UTC
Permalink
Export a profile to JSON and look for the features you're interested in and
copy them over. It's mostly pretty clear what's going on. If you can't
figure something out, export to JSON, change one thing, export to JSON
again and compare the two files to see what changed. That'll help you find
the entries that are of interest to you.
Post by Tatzlwurm Eads
Thanks - I wrote --
bash - load script -- using postgresql - I load the hostnames into a table
then query the table based on the domain I wish to load. This works very
good but how to I add triggers and colors to that result?
PROFILEDIR='/Users/username/Library/Application
Support/iTerm2/DynamicProfiles'
echo '{' > $PROFILEDIR/new.json
echo \"Profiles\"': [' >> $PROFILEDIR/new.json
psql mysqldb -X -f iterm2_query.sql -q |sed 's/XXX/"/g' >>
$PROFILEDIR/new.json
echo ']' >> $PROFILEDIR/new.json
echo '}' >> $PROFILEDIR/new.json
Post by George Nachman
https://www.iterm2.com/documentation-dynamic-profiles.html
Post by Richard Mitchell
The profiles are just a json text file. Given you are creating so many
at one time, I'm guessing you are only changing one or just a few things.
Writing a little shell script to use sed would be one way of modifying a
template profile to your desired profile. A profile can also inherit
settings from "Dynamic Profile Parent Name", which means the template only
needs to contain the values you want changed, plus the name of the parent
profile.
Post by Tatzlwurm Eads
I often will need to add large group of hosts(profiles) to iterm2.
Outside of duplicate I don't see a good way to do this. Is there a feature
to add a new group of 100 profiles at a time?
--
You received this message because you are subscribed to the Google
Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discuss+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...