marcus

wireshell - an extendable ProcessWire command line interface

Recommended Posts

Currently it's not easy for me to find the time to properly prepare a Virtual Windows10 machine with PHP/composer in order to reproduce. Are there any other Window users out there that can?

I assume you are using wireshell 1.0.2?

Share this post


Link to post
Share on other sites
18 minutes ago, netcarver said:

@Mike Rockett Have the permissions changed on the containing directory such that there is no longer any write permission?

I'm on Windows, so there aren't any. If there were, the zip file would not have been written to the directory anyway. The issue seems to be with deleting the temp file, which causes the rename function to return false, which is when the IOException is thrown.

  • Like 1

Share this post


Link to post
Share on other sites

Hello

I am on windows 10 and I am having the same problem like Mike Rockett,  [Symfony\Component\Filesystem\Exception\IOException] Cannot rename ... 

Share this post


Link to post
Share on other sites

@justb3a or @marcus, maybe a dump question, but when I want to upgrade an existing wire core installation with the latest dev-version, do I need to pass a sha-key to the command?

Share this post


Link to post
Share on other sites

Yes. For version 3.0.106 this would be

$ wireshell upgrade --sha 643c9d3a87ddd8d579c4879c2382a9170466344b

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks for the clarification, now I know that I haven't overseen something. 🙂

But wouldn't it be better to have an alias for the lates-dev version, something like:

$ wireshell upgrade --latestdev

Otherwise I have to look up every time, (sometimes multiple times a week), for the latest dev sha-key and copy paste it into my CLI.

For example: As you can see, only one hour later than your post, the sha key to the latest dev has changed to: 637f81579e121af8ab4c4a12e21227b36ae0cd8a

  • Like 2

Share this post


Link to post
Share on other sites
On 6/20/2018 at 7:11 PM, horst said:

But wouldn't it be better to have an alias for the lates-dev version, something like:


$ wireshell upgrade --latestdev

Otherwise I have to look up every time, (sometimes multiple times a week), for the latest dev sha-key and copy paste it into my CLI.

For example: As you can see, only one hour later than your post, the sha key to the latest dev has changed to: 637f81579e121af8ab4c4a12e21227b36ae0cd8a

Bump! @marcus, any chance to get an alias for upgrading to the latest dev?

Share this post


Link to post
Share on other sites

Won't find the time to implement this anytime soon, sorry. Everybody feel free to submit a PR regarding this and maybe ping core contributor @justb3a regarding release

  • Like 2

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By louisstephens
      So I have a form, once completed, will create new pages. All in all, this is eazy-peezy for me now. I guess I need a bit of guidance on how to actually structure the rest of my code.  I thought I could just write a function (_func.php) and pass the fields to the function and let it do its' thing. However, I am kinda hitting a road block when I do it this way. 
      I currently am passing first name, last name, city, state (options field), and making pages based on the first/last names. I guess where I run into some issues is I am trying to check to see if the "page" already exists, and if it does, throw out an error:
      In the home template:
      if(isset( $_POST['submit'])) { $firstName =Trim (stripslashes($_POST['firstname'])); $lastName = Trim(stripslashes($_POST['lastname'])); $fullName = $firstName . $lastName; $city = Trim(stripslashes($_POST['city'])); $state = Trim(stripslashes($_POST['state'])); $lowerCaseName = strtolower($fullName); $people = $pages->find("template=person"); foreach ($people as $person) { $checkFirstName = $person->first_name; $checkLastName = $person->last_name; $checkFullName = $checkFirstName . $checkLastName; if ($checkFullName === $lowerCaseName) { echo "<p>" . "This person has already created a page. Please choose a different name." . "</p>"; } else { echo "hey"; processNewPerson(need_to_pass_person_details_to_function); } } // end foreach In _func.php:
      function processNewPerson($list) { $u = new Page(); $u->template = "person"; $u->parent = wire('pages')->get("/people/"); $u->title = ; $u->first_name = ; $u->last_name = ; $u->state = ; $u->city = ; $u->save(); $u->setOutputFormatting(false); } I am a little unsure of how to actually pass all the information to the template, as well as if this is even the best approach to do this. Would it make more sense to do this in a class, or keep it the way it is?
    • By louisstephens
      I have done a bit of searching, but I can not seem to find an actual answer. I have a list of services as child pages under "Services". I can output the services just fine, but I cant wrap my head around how to group them "alphabetically" like:
      Services A - Service "A" 1 - Service "A" 2 - Service "A" 3 B - Service "B" 1 - Service "B" 2 - Service "B" 3 C - Service "C" 1 - Service "C" 2 - Service "C" 3 Has anyone achieved this type of functionality before?
    • By quickjeff
      Hey guys, 
      Looking for another dev to help on multiple processwire projects as well as some other PHP apps. 
      First project is a directory style site with lots of components to come, including stripe implementation  and other fun stuff.
      Need someone ASAP to help out. 
       
      Thanks.
    • By louisstephens
      I am wondering, how do you pass a variable into wire('page')->get() inside a function? I have been looking through the forums, but unfortunately I have not found the answer yet.
      My current set up is:
      function generateNewPages($parentPageName) { $p = new Page(); $p->template = "parent"; $p->parent = wire('pages')->get('/home/'); $p->name = $parentPageName; $p->title = $parentPageName; $p->of(false); $p->save(); $p2 = new Page(); $p2->template = "child"; $p2->parent = wire('pages')->get('$parentPageName'); $p2->name = "child"; $p2->title = "Child Page"; $p2->of(false); $p2->save(); } When I try to run it by passing in a title like generateNewPages('Demo');, "Demo" is created, but when it gets to the child page I get:
      Unknown Selector operator: '$' -- was your selector value properly escaped?
      Is there a way to pass the $parentPageName to "wire('pages')->get('$parentPageName')" ?
    • By thomasaull
      I recently started to build Vue SPAs with ProcessWire as the backend, connected with a REST API. Thanks to code and the help of @LostKobrakai (How to use FastRoute with ProcessWire) and @clsource (REST-Helper) I got it up and running pretty quickly and now have put all of it in a site profile for others to use. It includes the REST API with routing for different endpoints, JWT Auth and a simple Vue SPA which shows the process of logging in a user (nevertheless, you don't have to use the Vue part, the API will work on it's own).
      Check it out here: https://github.com/thomasaull/RestApiProfile
      I'm pretty sure, it's not the perfect or most sophisticsted solution, but it gets the job done for me…
      Feedback or Improvements are very welcome
      Update: This site profile is a module now: https://github.com/thomasaull/RestApi