19 lines
427 B
PHP
19 lines
427 B
PHP
|
<?php
|
||
|
|
||
|
require_once('./public/config.php');
|
||
|
|
||
|
$uuid = shell_exec('uuidgen');
|
||
|
|
||
|
// Have the user write the content to a temporary file
|
||
|
$temp_file_name = sys_get_temp_dir() . '/' . $uuid;
|
||
|
shell_exec("vim $temp_file_name");
|
||
|
$content = file_get_contents($temp_file_name);
|
||
|
|
||
|
// Clean up
|
||
|
unlink($temp_file_name);
|
||
|
|
||
|
|
||
|
$object_id = 'https://' . HOSTAS_DOMAIN . "/api/v1/object/$uuid";
|
||
|
$preferred_username = readline('Author username: ');
|
||
|
|