Idea: S9y CLI tool

Discussion corner for Developers of Serendipity.
mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 10:35 pm
Location: Wiesbaden, Germany
Contact:

Re: Idea: S9y CLI tool

Post by mattsches » Mon Jul 29, 2013 2:53 pm

yellowled wrote:While we're at it, I have to admit that Dogma is actually one of the very few flicks by Kevin Smith which I don't like. :mrgreen:

YL
Now this is getting off-topic, but anyway. It's definitely not his best movie, but I haven't seen anything since Clerks II. (The original Clerks is one of my favorite movies of all time ...)

Btw: Is someone capable of mixing the S9y logo with this? Would result in a nice logo for Metatron :wink:

User avatar
onli
Regular
Posts: 2252
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Idea: S9y CLI tool

Post by onli » Mon Jul 29, 2013 5:55 pm

A more carefully made
Image
?^^

mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 10:35 pm
Location: Wiesbaden, Germany
Contact:

Re: Idea: S9y CLI tool

Post by mattsches » Mon Jul 29, 2013 6:13 pm

LOL .. yeah, almost perfect!!!

@onli Have you tried to run the tool yet?

User avatar
onli
Regular
Posts: 2252
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Idea: S9y CLI tool

Post by onli » Mon Jul 29, 2013 6:15 pm

Yep, just sent the mail a minute ago.

User avatar
yellowled
Regular
Posts: 7072
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Idea: S9y CLI tool

Post by yellowled » Mon Jul 29, 2013 6:39 pm

I took the liberty of creating a repository for Metatron: https://github.com/s9y/Metatron

Now mattsches just needs to commit the actual project files. :) (Unless I did something wrong.)

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

artodeto
Regular
Posts: 12
Joined: Sat Jul 30, 2011 12:07 am
Contact:

Re: Idea: S9y CLI tool

Post by artodeto » Mon Jul 29, 2013 10:31 pm

yellowled wrote:I took the liberty of creating a repository for Metatron: https://github.com/s9y/Metatron

Now mattsches just needs to commit the actual project files. :) (Unless I did something wrong.)

YL
I will have a look to the github project ;-).
I've played around with symfony console and created some simple components (composer ready). Take a look to configuration format converter if you want to. I extended the existing application with a IOInterface (influenced by composer) to get rid of the io handling :-).

mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 10:35 pm
Location: Wiesbaden, Germany
Contact:

Re: Idea: S9y CLI tool

Post by mattsches » Sat Aug 03, 2013 3:34 pm

So, I've just pushed the first version to GitHub :D

I've also blogged about it (in German): Metatron - Ein CLI-Tool für Serendipity

Clone or fork it, try it, give feedback please!

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Idea: S9y CLI tool

Post by Timbalu » Sat Aug 03, 2013 3:49 pm

Whow. Congrats!
That looks very neat. :)

To extend the userbase for testing, you might need to add a dummy description on how to use it for what in detail here, since not everybody is knowing the usage and possible benefits. This starts telling, that it is used to install or administrate Serendipity by CLI console with some very simple commands, am I right? :wink:
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian

User avatar
yellowled
Regular
Posts: 7072
Joined: Fri Jan 13, 2006 12:46 pm
Location: Eutin, Germany
Contact:

Re: Idea: S9y CLI tool

Post by yellowled » Sat Aug 03, 2013 3:55 pm

Timbalu wrote:To extend the userbase for testing, you might need to add a dummy description on how to use it for what in detail here, since not everybody is knowing the usage and possible benefits.
https://github.com/s9y/Metatron#usage

YL
amazon Wishlist - Serendipity-Podcast (German only, sorry)

mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 10:35 pm
Location: Wiesbaden, Germany
Contact:

Re: Idea: S9y CLI tool

Post by mattsches » Sat Aug 03, 2013 4:46 pm

Timbalu wrote:To extend the userbase for testing, you might need to add a dummy description on how to use it for what in detail here, since not everybody is knowing the usage and possible benefits. This starts telling, that it is used to install or administrate Serendipity by CLI console with some very simple commands, am I right? :wink:
Thanks for the feedback, Ian! I wanted to push it to GitHub as soon as possible, that's why the README contains only the most important information. Since the tool is aimed at admins and developers, they will know what to do hopefully ;)

But I will add some more info and documentation later!

mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 10:35 pm
Location: Wiesbaden, Germany
Contact:

Re: Idea: S9y CLI tool

Post by mattsches » Thu Sep 05, 2013 11:30 am

Two small changes in serendipity_config.inc.php seem to be necessary for Metatron to work correctly. If nobody has any objections, I will commit the following change to the 2.0 branch:

Code: Select all

$ git diff serendipity_config.inc.php
diff --git a/serendipity_config.inc.php b/serendipity_config.inc.php
index a55f475..99c21c7 100644
--- a/serendipity_config.inc.php
+++ b/serendipity_config.inc.php
@@ -8,7 +8,7 @@ if (defined('S9Y_FRAMEWORK')) {
 
 @define('S9Y_FRAMEWORK', true);
 
-if (!headers_sent()) {
+if (!headers_sent() && php_sapi_name() !== 'cli') {
     // Only set the session name, if no session has yet been issued.
     if (session_id() == '') {
         session_name('s9y_' . md5(dirname(__FILE__)));
@@ -312,7 +312,7 @@ if ( (isset($serendipity['autodetect_baseURL']) && serendipity_db_bool($serendip
  * If a user is logged in, fetch his preferences. He possibly wants to have a different language
  */
 
-if (IS_installed === true) {
+if (IS_installed === true && php_sapi_name() !== 'cli') {
     // Import HTTP auth (mostly used for RSS feeds)
     if ($serendipity['useHTTP-Auth'] && (isset($_REQUEST['http_auth']) || isset($_SERVER['PHP_AUTH_USER']))) {
         if (!isset($_SERVER['PHP_AUTH_USER'])) {

User avatar
garvinhicking
Core Developer
Posts: 30020
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Idea: S9y CLI tool

Post by garvinhicking » Thu Sep 05, 2013 2:08 pm

No objections!
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/

mattsches
Regular
Posts: 440
Joined: Sat Nov 05, 2005 10:35 pm
Location: Wiesbaden, Germany
Contact:

Metatron (WAS: Re: Idea: S9y CLI tool)

Post by mattsches » Sat May 10, 2014 11:26 pm

I just pushed version 0.2.0. Please test!

I've been working on the update for quite a while every now and then. Today I felt I had to push things forward, so I committed my changes. It's quite a large commit and, even if my tests are all green, may still contain some bugs. So, please don't use in production!!

See the changelog for updates.

Regards,
Mattsches

Post Reply