Author Topic: Create Ice application with Command Line? (SOLVED)  (Read 667 times)

Offline pizzalovingnerd

  • Developer
  • Member
  • *****
  • Posts: 178
  • Karma: 41
  • CS:GO Addict
    • View Profile
    • My Website
Create Ice application with Command Line? (SOLVED)
« on: February 21, 2020, 05:40:36 pm »
Hey, I was wondering if it was possible to build an ice application using the command line. For example, I'm looking for something like
Code: [Select]
ice add url browser
« Last Edit: February 26, 2020, 11:25:30 pm by pizzalovingnerd »
- PizzaLovingNerd

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2343
  • Karma: 616
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Create Ice application with Command Line?
« Reply #1 on: February 22, 2020, 12:21:31 am »
Hi pizzalovingnerd,


No, it is not possible.


Regards,


-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline spence

  • Administrator
  • Hero
  • *****
  • Posts: 2952
  • Karma: 335
  • peppermint user since 2010
    • View Profile
  • Peppermint version(s): PMVII, PMVIII, PMIX, PMX Respins
Re: Create Ice application with Command Line?
« Reply #2 on: February 22, 2020, 11:21:13 am »
What' s the reason to avoid the simplicity of
Code: [Select]
Menu > Internet > Ice > Create
spence
PeppermintOS 8,9 & 10 Respins currently installed  on:
'16 Antec Aria rebuild
PMX Respin on '18 Asus VivoBook


Do not despair, grasshopper...
    with patience all will be revealed...
       Through pain, enlightenment will come.

Offline pizzalovingnerd

  • Developer
  • Member
  • *****
  • Posts: 178
  • Karma: 41
  • CS:GO Addict
    • View Profile
    • My Website
Re: Create Ice application with Command Line?
« Reply #3 on: February 26, 2020, 04:54:00 pm »
I am building a distro, and I wanted to make an "Ice Store" with different websites to put in ice, but I needed to be able to use the command line with ice to do it.
- PizzaLovingNerd

Offline pizzalovingnerd

  • Developer
  • Member
  • *****
  • Posts: 178
  • Karma: 41
  • CS:GO Addict
    • View Profile
    • My Website
Re: Create Ice application with Command Line?
« Reply #4 on: February 26, 2020, 10:36:14 pm »
I just added the feature to Ice myself:
https://github.com/borderOS/ice/commit/6bddbcfbda4aedd72d3f94bf9b14d23718ae7732

With this commit, if you run "ice ssbname ssburl" than it will fill in those boxes for you when you open it.

If you want this feature upstream, I'll polish it up with things like "ice --name ssbname" and I'll improve my code.

if you don't want it upstream, I'm going to keep it in, as a sloppy way to call ice as a subprocess in my "IceStore" program.
- PizzaLovingNerd

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2343
  • Karma: 616
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Create Ice application with Command Line?
« Reply #5 on: February 26, 2020, 11:09:07 pm »
Hi pizzalovingnerd,

Great that you did this! I personally think it would be fantastic if you manage to find the time to "improve your code" and "polish" things up a bit (e.g. maybe by adding a few lines of explanation that would appear when some one runs

Code: [Select]
ice --help
or
Code: [Select]
ice -?

Please let us know if you manage to do this.  8)

Finally, if you are satisfied that your original question has been answered, could you please go back to your initial message about the issue, click on the button Modify and then add (SOLVED) to the end of the line Subject: and finally, Post the result?  :)


Thanks in advance,

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline pizzalovingnerd

  • Developer
  • Member
  • *****
  • Posts: 178
  • Karma: 41
  • CS:GO Addict
    • View Profile
    • My Website
Re: Create Ice application with Command Line? (SOLVED)
« Reply #6 on: February 26, 2020, 11:28:21 pm »
Great, I have to do some spreadsheets for my parents this week (I’m a teen), but I can probably finish the changes by the end of the week. When I’m done, I’ll open a pull request and reply to this thread.

Hopefully I help :)
-PizzaLovingNerd
- PizzaLovingNerd

Offline pizzalovingnerd

  • Developer
  • Member
  • *****
  • Posts: 178
  • Karma: 41
  • CS:GO Addict
    • View Profile
    • My Website
Re: Create Ice application with Command Line? (SOLVED)
« Reply #7 on: February 27, 2020, 11:04:59 pm »
As it turned out, I didn't have to make any spreadsheets for my parents today, (probably tomorrow).

I added three arguments, --ssbname, --ssburl, --help (-n, -u, and -h too :P)

I had to go with "--ssbname" instead of "--name" because for some reason it wouldn't receive data with "--name", but it would with "-n". As a workaround, i just switched --name to --ssbname. I changed --url to --ssburl for consistency reasons.

Using --ssbname or --ssburl will fill in those respective textboxes in ice with those entries.

Here are the commit:
https://github.com/borderOS/ice/commit/ac32f4eef611cb8001571d7a7ce76cd899e66cfd

Note that I made a typo on line 580, which I fixed with this:
https://github.com/borderOS/ice/commit/715c280fffec7a020628f354c656850bbbd98d18

If you want me to add anymore arguments, or change the behavior of an argument, let me know. Otherwise I will open a pull request.

An idea for another argument I have is a "--dialog-mode" argument. What this would do is make the apply button close the program, change the close button to a "cancel" button, and remove the "remove" tab.
The reason I would like to implement this feature is because I would like to write a "IceStore" which would list web apps to use as ice applications, and clicking install would open up ice with arguments. Basically, GNOME Software Center for ICE. I intend to add "--dialog-mode" to my fork of ice so I can create the IceStore, but if you guys want it upstream, I'll happily send a pull request for it.

Hopefully I could help :)
- PizzaLovingNerd (I need to come up with a signature for this forum)
- PizzaLovingNerd

Offline pizzalovingnerd

  • Developer
  • Member
  • *****
  • Posts: 178
  • Karma: 41
  • CS:GO Addict
    • View Profile
    • My Website
Re: Create Ice application with Command Line? (SOLVED)
« Reply #8 on: February 28, 2020, 11:19:11 am »
I opened a poll request here:
https://github.com/peppermintos/ice/pull/51
- PizzaLovingNerd

Offline murraymint

  • Trusted User
  • Veteran
  • *****
  • Posts: 2170
  • Karma: 441
  • soft boiled with a yolk of gold
    • View Profile
  • Peppermint version(s): 7, 8, 9
Re: Create Ice application with Command Line? (SOLVED)
« Reply #9 on: February 28, 2020, 01:07:46 pm »
Thanks for this, seems like it could be useful. How do you specify which browser to use?

Offline pizzalovingnerd

  • Developer
  • Member
  • *****
  • Posts: 178
  • Karma: 41
  • CS:GO Addict
    • View Profile
    • My Website
Re: Create Ice application with Command Line? (SOLVED)
« Reply #10 on: February 28, 2020, 04:39:02 pm »
I have not implemented that yet, I can though.
- PizzaLovingNerd

Offline Slim.Fatz

  • Global Moderator
  • Veteran
  • *****
  • Posts: 2343
  • Karma: 616
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Create Ice application with Command Line? (SOLVED)
« Reply #11 on: February 29, 2020, 12:26:50 am »
Hi pizzalovingnerd,

Yes, that must be implemented, using the same browsers as in the GUI version.

Thanks again,  8)

-- Slim
Respect science, respect nature, respect each other.

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline pizzalovingnerd

  • Developer
  • Member
  • *****
  • Posts: 178
  • Karma: 41
  • CS:GO Addict
    • View Profile
    • My Website
Re: Create Ice application with Command Line? (SOLVED)
« Reply #12 on: March 09, 2020, 09:45:40 am »
I added --ssbbrowser or -b as an argument. Sorry for the long delay between the commit and this post... The forum was down lol.

I am working on a concept of something I would like to implement through Ice.
- PizzaLovingNerd