From: Banana Date: Sat, 4 Oct 2025 21:33:47 +0000 (+0200) Subject: some documentation cleanups X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=00a3d17da205ff9c310025db8563a5c5872697f9;p=bibliotheca-php.git some documentation cleanups Signed-off-by: Banana --- diff --git a/documentation/api-import.md b/documentation/api-import.md new file mode 100644 index 0000000..58e0202 --- /dev/null +++ b/documentation/api-import.md @@ -0,0 +1,98 @@ +# API Import + +The API provides an import method. + +You need the URL to your installation and api file. +You need the token. Can be created in user management and has a lifespan. +You need the information which collection to import to and what data can be imported. + +A working php example with example data-crow data can be found here: +``` +http://91.132.146.200/gitweb/?p=bibliotheca-tools.git;a=blob_plain;f=data-crow/run-import-to-bibliotheca.php;hb=HEAD +http://91.132.146.200/gitweb/?p=bibliotheca-tools.git;a=blob_plain;f=data-crow/README;hb=HEAD +``` + +Info which data can be imported in example collation #1 +``` +{ + "message": "API POST and FILES data information for collection: Movies", + "status": 200, + "data": { + "title": { + "input": "string 128" + }, + "description": { + "input": "string 64" + }, + "content": { + "input": "mysql text" + }, + "rating": { + "input": "One of 0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10" + }, + "actors": { + "input": "string 64" + }, + "directors": { + "input": "string 64" + }, + "genres": { + "input": "string 64" + }, + "runtime": { + "input": "string 128" + }, + "countries": { + "input": "string 64" + }, + "languages": { + "input": "string 64" + }, + "year": { + "input": "mysql year" + }, + "imdbrating": { + "input": "string 128" + }, + "viewcount": { + "input": "string 128" + }, + "storage": { + "input": "string 64" + }, + "tag": { + "input": "string 64" + }, + "category": { + "input": "string 64" + }, + "coverimage": { + "input": "One file in $_FILES[uploads] of post" + }, + "attachment": { + "input": "Multiple in $_FILES[uploads] of post" + } + } +} +``` + +Array structure to be send as POST with curl to: `api.php?&authKey=API_TOKEN&collection=COLLECTION_ID` + +``` +array(15) { + ["actors"]=> string(52) "Amber Heard,Gary Oldman,Harrison Ford,Liam Hemsworth" + ["countries"]=> string(20) "France,United States" + ["content"]=> string(628) "The high stakes thriller Paranoia takes us deep behind the scenes of global success to a deadly world of greed and deception. The two most powerful tech billionaires in the world (Harrison Ford and Gary Oldman) are bitter rivals with a complicated past who will stop at nothing to destroy each other. A young superstar (Liam Hemsworth), seduced by unlimited wealth and power falls between them, and becomes trapped in the middle of the twists and turns of their life-and-death game of corporate espionage. By the time he realizes his life is in danger, he is in far too deep and knows far too much for them to let him walk away." ["description"]=> string(125) "The high stakes thriller Paranoia takes us deep behind the scenes of global success to a deadly world of greed and deception." + ["directors"]=> string(14) "Robert Luketic" + ["genres"]=> string(14) "Drama,Thriller" + ["title"]=> string(8) "Paranoia" + ["languages"]=> string(7) "English" + ["coverimage"]=> object(CURLFile)#356 (3) { ["name"]=> string(87) "import/movie/movies-export_images/00330b7f-5df8-49fa-ad79-2d1eb8ebb38c_PictureFront.jpg" ["mime"]=> string(0) "" ["postname"]=> string(0) "" } + ["rating"]=> string(4) "6/10" + ["runtime"]=> string(0) "" + ["tag"]=> string(9) "Storage B" + ["year"]=> string(4) "2013" + ["attachment[0]"]=> object(CURLFile)#343 (3) { ["name"]=> string(87) "import/movie/movies-export_images/0efb720d-d9e5-406b-aa42-e356f9c544e9_PictureFront.jpg" ["mime"]=> string(0) "" ["postname"]=> string(0) "" } + ["attachment[1]"]=> object(CURLFile)#342 (3) { ["name"]=> string(87) "import/movie/movies-export_images/3edf49eb-0270-456d-a15d-e5ddcba302ed_PictureFront.jpg" ["mime"]=> string(0) "" ["postname"]=> string(0) "" } +} +``` diff --git a/documentation/api.md b/documentation/api.md index e91ec55..88098c4 100644 --- a/documentation/api.md +++ b/documentation/api.md @@ -11,7 +11,7 @@ ID of a collection `collection=NUMBER` Get the latest 10 for given collection `p=list` POST call to add a new entry to given collection. `p=add&collection=NUMBER&authKey=API_AUTH_TOKEN` -See p=addInfo for the details which info is needed in the add call. More information can be found in import.txt +See `p=addInfo` for the details which info is needed in the add call. More information can be found in import.md Describes how the data in the POST add call should be formatted. `p=addInfo&collection=NUMBER` The JSON info in the data field, tells which fields are available and in which format the value diff --git a/documentation/backup.md b/documentation/backup.md index 9660452..ff1ce49 100644 --- a/documentation/backup.md +++ b/documentation/backup.md @@ -4,4 +4,4 @@ Manually create a complete DB export and all the files in the webfolder. # Regular backup -Create a full database export and all the files in the `storage` folder of you installation. +Create a full database export and all the files in the `storage` folder of your installation. diff --git a/documentation/import.md b/documentation/import.md deleted file mode 100644 index 5a7e127..0000000 --- a/documentation/import.md +++ /dev/null @@ -1,98 +0,0 @@ -# Import - -The API provides an import method. - -You need the URL to your installation and api file. -You need the token. Can be created in user management and has a lifespan. -You need the information which collection to import to and what data can be imported. - -A working php example with example data-crow data can be found here: -``` -http://91.132.146.200:3000/Banana/bibliotheca-tools/src/master/data-crow/run-import-to-bibliotheca.php -http://91.132.146.200:3000/Banana/bibliotheca-tools/src/master/data-crow/README -``` - -Info which data can be imported in example collation #1 -``` -{ - "message": "API POST and FILES data information for collection: Movies", - "status": 200, - "data": { - "title": { - "input": "string 128" - }, - "description": { - "input": "string 64" - }, - "content": { - "input": "mysql text" - }, - "rating": { - "input": "One of 0/10,2/10,3/10,4/10,5/10,6/10,7/10,8/10,9/10,10/10" - }, - "actors": { - "input": "string 64" - }, - "directors": { - "input": "string 64" - }, - "genres": { - "input": "string 64" - }, - "runtime": { - "input": "string 128" - }, - "countries": { - "input": "string 64" - }, - "languages": { - "input": "string 64" - }, - "year": { - "input": "mysql year" - }, - "imdbrating": { - "input": "string 128" - }, - "viewcount": { - "input": "string 128" - }, - "storage": { - "input": "string 64" - }, - "tag": { - "input": "string 64" - }, - "category": { - "input": "string 64" - }, - "coverimage": { - "input": "One file in $_FILES[uploads] of post" - }, - "attachment": { - "input": "Multiple in $_FILES[uploads] of post" - } - } -} -``` - -Array structure to be send as POST with curl to: `api.php?&authKey=API_TOKEN&collection=COLLECTION_ID` - -``` -array(15) { - ["actors"]=> string(52) "Amber Heard,Gary Oldman,Harrison Ford,Liam Hemsworth" - ["countries"]=> string(20) "France,United States" - ["content"]=> string(628) "The high stakes thriller Paranoia takes us deep behind the scenes of global success to a deadly world of greed and deception. The two most powerful tech billionaires in the world (Harrison Ford and Gary Oldman) are bitter rivals with a complicated past who will stop at nothing to destroy each other. A young superstar (Liam Hemsworth), seduced by unlimited wealth and power falls between them, and becomes trapped in the middle of the twists and turns of their life-and-death game of corporate espionage. By the time he realizes his life is in danger, he is in far too deep and knows far too much for them to let him walk away." ["description"]=> string(125) "The high stakes thriller Paranoia takes us deep behind the scenes of global success to a deadly world of greed and deception." - ["directors"]=> string(14) "Robert Luketic" - ["genres"]=> string(14) "Drama,Thriller" - ["title"]=> string(8) "Paranoia" - ["languages"]=> string(7) "English" - ["coverimage"]=> object(CURLFile)#356 (3) { ["name"]=> string(87) "import/movie/movies-export_images/00330b7f-5df8-49fa-ad79-2d1eb8ebb38c_PictureFront.jpg" ["mime"]=> string(0) "" ["postname"]=> string(0) "" } - ["rating"]=> string(4) "6/10" - ["runtime"]=> string(0) "" - ["tag"]=> string(9) "Storage B" - ["year"]=> string(4) "2013" - ["attachment[0]"]=> object(CURLFile)#343 (3) { ["name"]=> string(87) "import/movie/movies-export_images/0efb720d-d9e5-406b-aa42-e356f9c544e9_PictureFront.jpg" ["mime"]=> string(0) "" ["postname"]=> string(0) "" } - ["attachment[1]"]=> object(CURLFile)#342 (3) { ["name"]=> string(87) "import/movie/movies-export_images/3edf49eb-0270-456d-a15d-e5ddcba302ed_PictureFront.jpg" ["mime"]=> string(0) "" ["postname"]=> string(0) "" } -} -``` diff --git a/documentation/setup/install.md b/documentation/setup/install.md index 5d6cec6..9722632 100644 --- a/documentation/setup/install.md +++ b/documentation/setup/install.md @@ -1,32 +1,40 @@ # Unpack + Unpack the archive in a temp folder. Follow the following steps. After that you can delete the unpacked files # DB Setup + Create a DB and choose a prefix (A _ is added automatically as separation) for your tables. Write down those values. You need them later. # Move files + Move the content of webclient folder to your webspace. # File rights + Make sure that `systemout` folder is read/write accessible for your webserver user. Recursive. Make sure that `storage` folder is read/write accessible for your webserver user. Recursive. Make sure that `config` folder is read/write accessible for your webserver user. Make sure that `setup` folder is read/write accessible for your webserver user. Recursive. # Setup + Open your browser and visit your newly created bibliotheca installation setup with `/setup` Follow the instructions and remember your settings from step DB setup. After completion the setup will delete itself. Remove the `/setup` from the url and you are done. # Access + Open your browser and visit your newly created bibliotheca installation. Default user `admin` and password: `test` # First steps + Login with default admin account and change the password! Create your own user. Create your first collection. See more in first-steps.md # To re-run the setup + Upload the setup folder again. It deletes itself after a successful setup. diff --git a/documentation/setup/manual-install.md b/documentation/setup/manual-install.md index cef803a..17d1c64 100644 --- a/documentation/setup/manual-install.md +++ b/documentation/setup/manual-install.md @@ -1,29 +1,36 @@ # Unpack -Unpack the archive in a temp folder. Follow the steps. After you can delete the unpacked files + +Unpack the archive in a temp folder. Follow the steps. After you can delete the unpacked files. # DB Setup + Create a DB and choose a prefix (A _ is added automatically as separation) for your tables. Open the provided sql file. Search for `#REPLACEME#` and replace it with your table prefix. Save. Import this file into you newly created DB. It is a mysql dump import file. Works with phpmyadmin too. # Config + Copy `webclient/config/config.php.default` to `webclient/config/config.php`. Edit and fill in the DB details. Change `PATH_ABSOLUTE` to you installation path and `PATH_WEB_STORAGE` relative to your webroot. # Move files + Move the content of webclient folder to your webspace. Make sure the location matches the `PATH_ABSOLUTE` config in `config.php` file # File rights + Make sure that `systemout` folder is read/write accessible with your webserver user. Recursive. Make sure that `storage` folder is read/write accessible with your webserver user. Recursive. # Access + Open your browser and visit your newly created bibliotheca installation. Default user `admin` and password: `test` # First steps + Login with default admin account and change the password! Create your own user. Create your first collection. See more in first-steps.md diff --git a/documentation/usermanagement-and-rights.md b/documentation/usermanagement-and-rights.md index fcb016d..273a409 100644 --- a/documentation/usermanagement-and-rights.md +++ b/documentation/usermanagement-and-rights.md @@ -15,6 +15,7 @@ Default user groups are and Should not be changed or removed: ## Rights + A user can be in multiple groups. A collection has one owner and one group. An entry has one owner and group.