6ebd1e56ee
Recent changes in thumbnail generators revealed that finfo module cannot be relied on - I found a GIF file that started with usual "GIF87a", and yet finfo reported its mime type to be "application/octet-stream". This change removes reliance on finfo module and implements detecting common file types supported by szurubooru in manual fashion. This might, of course, introduce some bugs that weren't present when using finfo. However, this change was made exactly because of such bug - while previously such edge cases were impossible to fix, now they can be dealt with accordingly in our own code. Also from what I saw on the Internet, getting fileinfo to work on Windows is a lot of trouble, so this change is welcome from that angle, too. |
||
---|---|---|
data | ||
public_html | ||
scripts | ||
src | ||
tests | ||
.gitignore | ||
composer.json | ||
gruntfile.js | ||
INSTALL.md | ||
LICENSE | ||
package.json | ||
phpcheckstyle.cfg | ||
README.md | ||
TODO |
szurubooru
What is it?
Szurubooru is a Danbooru-style board, a gallery where users can upload, browse, tag and comment images, video clips and flash animations.
Its name have its roots in Polish language and has onomatopoeic meaning of scraping or scrubbing. It is pronounced "shoorubooru" [ˌʃuruˈburu].
Licensing
Please see the file named LICENSE
.
Installation
Please see the file named INSTALL.md
.
Bugs and feature requests
All bugs and suggestions should be reported as issues on the Github repository page. When reporting, please do following:
- Search for existing issues for possible duplicates. If something is related to your problem, comment on that issue instead of opening a new one.
- If you found an issue and the issue is closed, feel free to reopen it.
- If you're reporting a bug, create an isolated and reproducible scenario.
- If you're filing a feature request, provide examples - what might be obvious to you, might not be so obvious to the developers.
Contributing the code
Here are some guidelines on how to contribute:
- Keep your changes compact.
- Respect coding standards - be consistent with existing code base.
- Watch your whitespace - don't leave any characters at the end of the lines.
- Always run tests before pushing.
- Before starting, see
INSTALL.md
. - Use
grunt
to do automatic tasks like minifying Javascript files or running tests. Rungrunt --help
to see full list of available tasks.
API
Szurubooru from version 0.9+ uses REST API. Currently there is no formal
documentation; source code behind REST layer lies in src/Controllers/
directory. In order to use the API, bear in mind that you need to:
- Have actual user account on the server to do most things (depending on privileges).
- Authenticate your requests:
- Send user credentials to
/auth
. You'll receive authentication token in return. - Send this token in X-Authorization-Token header on subsequent requests.
- Send user credentials to
Developers reserve right to change API at any time with neither prior notice nor keeping backwards compatibility.