NAME

solid_auth.pl - A Solid management tool

SYNOPSIS

  # Set your default webid
  export SOLID_WEBID=https://hochstenbach.inrupt.net/profile/card#me

  # Authentication to a pod
  solid_auth.pl authenticate

  # Get the http headers for a authenticated request
  solid_auth.pl headers GET https://hochstenbach.inrupt.net/inbox/

  # Act like a curl command and fetch authenticated content
  solid_auth.pl curl -X GET https://hochstenbach.inrupt.net/inbox/

  # Add some data
  solid_auth.pl curl -X POST \
        -H "Content-Type: text/plain" \
        -d "abc" \
        https://hochstenbach.inrupt.net/public/

  # Add a file
  solid_auth.pl curl -X PUT \
        -H "Content-Type: application/ld+json" \
        -d "@myfile.jsonld" \
        https://hochstenbach.inrupt.net/public/myfile.jsonld 

  # Set a solid base url
  export SOLID_REMOTE_BASE=https://hochstenbach.inrupt.net

  # List all resources on some Pod path
  solid_auth.pl list /public/

  # Get some data
  solid_auth.pl get /inbox/

  # Post some data
  solid_auth.pl post /inbox/ myfile.jsonld 

  # Put some data
  solid_auth.pl put /public/myfile.txt myfile.txt 

  # Create a folder
  solid_auth.pl put /public/mytestfolder/

  # Delete some data
  solid_auth.pl delete /public/myfile.txt

  # Mirror a resource, container or tree
  mkdir /data/my_copy
  solid_auth.pl -r mirror /public/ /data/my_copy

  # Upload a directory to the pod
  #  Add the -x option to do it for real (only a test without this option)
  solid_auth.pl -r upload /data/my_copy /public/

  # Clean all files in a container
  #  Add the -x option to do it for real (only a test without this option)
  solid_auth.pl --keep clean /demo/

  # Clean a complete container 
  #  Add the -x option to do it for real (only a test without this option)
  solid_auth.pl -r clean /demo/

ENVIRONMENT

SOLID_WEBID

Your WebId.

SOLID_REMOTE_BASE

The Base URL that is used for all delete, get, head, options post, put, patch requests.

SOLID_CLIENT_ID

The URL to a static client configuration. See etc/web-solid-auth.jsonld for an example. This file, edited for your own environment, needs to be published on some public accessible webserver.

CONFIGURATION

--webid

Your WebId.

--base

The Base URL that is used for all delete, get, head, options post, put, patch requests.

--clientid

The URL to a static client configuration. See etc/web-solid-auth.jsonld for an example. This file, edited for your own environment, needs to be published on some public accessible webserver.

--skip

Skip resources that already exist (mirror).

--keep

Keep containers when cleaning data (clean).

-r

Recursive (clean, mirror, upload).

-x

Do it for real. The commands clean and upload will run by default in safe mode.

INSPIRATION

This was very much inspired by the Python solid-flask code by Rai http://agentydragon.com at https://gitlab.com/agentydragon/solid-flask, and Jeff Zucker's <https://github.com/jeff-zucker> Solid-Shell at https://www.npmjs.com/package/solid-shell.

COPYRIGHT AND LICENSE

This software is copyright (c) 2021 by Patrick Hochstenbach.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.