Restructure documentation

Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-11-29 14:25:11 -04:00
parent 5493c33257
commit c9be1bccd2
180 changed files with 1663 additions and 2176 deletions

View File

@@ -0,0 +1,19 @@
==============
Access control
==============
Mayan EDMS uses a role based permission system
(https://en.wikipedia.org/wiki/Role-based_access_control) that provides a
mechanism to control access to the contained documents and system functions.
The role access control system is divided into two main groups:
- :doc:`../chapters/permissions`: Permission grants to roles for the entire system.
- :doc:`../chapters/acls`: ACLs (access control lists). These are permission granted to a role for a
specific object or group of objects.
.. toctree::
:hidden:
../chapters/permissions
../chapters/acls

View File

@@ -0,0 +1,17 @@
==============
Administration
==============
- :doc:`../chapters/languages`
- :doc:`../chapters/password_reset`
- :doc:`../chapters/ocr_backend`
- :doc:`../chapters/backups`
.. toctree::
:hidden:
../chapters/languages
../chapters/password_reset
../chapters/ocr_backend
../chapters/backups

20
docs/parts/advanced.txt Normal file
View File

@@ -0,0 +1,20 @@
===============
Advanced topics
===============
- :doc:`../chapters/workflows`
- :doc:`../chapters/signatures`
- :doc:`../chapters/metadata`
- :doc:`../chapters/transformations`
- :doc:`../chapters/versioning`
- :doc:`../chapters/quick_labels`
.. toctree::
:hidden:
../chapters/workflows
../chapters/signatures
../chapters/metadata
../chapters/transformations
../chapters/versioning
../chapters/quick_labels

View File

@@ -0,0 +1,37 @@
==============
Categorization
==============
Mayan EDMS several ways to visual organize documents. Document categorization
allows showing users different views of document groups. These are divided
into ones requiring manual maintenance and others that are updated
automatically.
Manual methods
==============
- :doc:`../chapters/document_types`
- :doc:`../chapters/cabinets`
- :doc:`../chapters/tags`
.. toctree::
:hidden:
../chapters/document_types
../chapters/cabinets
../chapters/tags
Automatic methods
=================
- :doc:`../chapters/indexes/index`
- :doc:`../chapters/smart_links`
.. toctree::
:hidden:
../chapters/indexes/index
../chapters/smart_links

View File

@@ -0,0 +1,15 @@
=============
Collaboration
=============
Mayan EDMS includes several methods to allow users to collectively collaborate
when working with documents.
- :doc:`../chapters/checkouts`
- :doc:`../chapters/mailing`
.. toctree::
:hidden:
../chapters/checkouts
../chapters/mailing

29
docs/parts/contact.txt Normal file
View File

@@ -0,0 +1,29 @@
=======
Contact
=======
FAQ
===
* Try the :doc:`FAQ <faq>` -- it's got answers to many common questions.
Forum
=====
Search for information or post a question, report or feature request at:
https://forum.mayan-edms.com.
Mayan EDMS developers do their best to reply to basic questions.
Be sure to use the search feature of the forum as some posts may already
contain the answers to your questions.
Bugs/ticket tracker
===================
Report bugs with Mayan EDMS or search existing ones using GitLab's `ticket tracker`_.
.. _ticket tracker: https://gitlab.com/mayan-edms/mayan-edms/issues

View File

@@ -0,0 +1,29 @@
==============
For developers
==============
- :doc:`../chapters/philosophies`
- :doc:`../chapters/code_structure`
- :doc:`../chapters/documentation`
- :doc:`../chapters/source_control`
- :doc:`../chapters/contributing`
- :doc:`../chapters/releases`
- :doc:`../chapters/translations`
- :doc:`../mercs/index`
- :doc:`../chapters/caa_entity`
- :doc:`../chapters/caa_individual`
.. toctree::
:hidden:
../chapters/philosophies
../chapters/code_structure
../chapters/documentation
../chapters/source_control
../chapters/contributing
../chapters/releases
../chapters/translations
../mercs/index
../chapters/caa_entity
../chapters/caa_individual

282
docs/parts/faq.txt Normal file
View File

@@ -0,0 +1,282 @@
===
FAQ
===
Non technical
=============
Contact
-------
Can I contact members of the development team?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Direct access to members of the development team is reserved for clients
of a support or consultation contract.
I can't pay for support/consultation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A community forum is available at https://forum.mayan-edms.com. Members of
the development team visit the forum on occasions and might answer some
questions on a voluntary basis.
I found a bug
^^^^^^^^^^^^^
For bugs, open an issue at https://gitlab.com/mayan-edms/mayan-edms/issues.
I found a security issue
^^^^^^^^^^^^^^^^^^^^^^^^
Open an issue at https://gitlab.com/mayan-edms/mayan-edms/issues and mark it as
Confidential. Allow us at least 48 hours to find and release a fix
for the issue before submitting it to the CVE database.
I want to join the development team
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Perfect! We need all the help we can get. Tell us where we can see what you've
done using Mayan EDMS. It could be a fork, a new UI, an API client, a custom app,
or anything else that you think will be able to evidence your dominion over the
codebase.
I submitted an issue and it has not been fixed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There are many reason an issue might not get resolved and remain open for an
extended period of time. We document on the issue itself the progress and when
resolved will reference what commit fixed it and the version or approximate time
for the code to make it into a production release. Some reason why issues remain
open with no resolution are:
- It was not an issue with the code. It happens that sometimes the problem lies
with the operating system, the filesystem being used, the platform or packaging
method.
- It was not an issue but a question or a comment. The issue system is for reporting
problems with the code. That said, we sometimes answer questions submitted as
issues. For questions or discussions use the community forum.
- We are not able to reproduce the issue. We need to be able to recreate the
conditions that trigger the issue so that we can pinpoint the cause. After that
we create a test to make sure the issue is really fixed. Some issues can
be triggered manually easily but are hard to trigger programatically.
- The issue is not clearly explained. Issue descriptions like: "It doesn't work",
or "It showed an error but I forgot to write it down" are almost impossible to
resolve.
- We understand the cause of the problem but don't yet a solution to implement.
We have studied the issue and have been able to reproduce it, but have not
reached a consensus on how it should be fixed. Could be that the solution is
beyond the collective expertise of the development team or that a design
decision of big impact is needed before code changes can be implemented.
- The issue is no real. The issue might be for an obsolete version. It could be
for a fork or a program that is not developed by us. Sometimes they are just
fake issues.
I submitted a merge request and has not been merged
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Merge requests must follow the development standards of the code as close a
possible. They must also be atomic and as small as possible. The code must also
not change the behavior of the project. We can't accept merge request that
customize it in some way based on your own preferences or needs.
Distribution
------------
Can I distribute Mayan EDMS under another name and/or logo?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yes, the terms of the license allow this. However, the copyright notice must
remain intact. If you use an alternate name, a notice indicating that yours is
a derived product from Mayan EDMS must be included. You must indicate to your
clients that their act of purchasing Mayan EDMS from you is an independent
action and in no way legally binds Mayan EDMS LLC, the Mayan EDMS copyright
holders, or the core team in any way.
Sale
----
Can I sell Mayan EDMS as is or under another name?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yes, selling Mayan EDMS is permitted. However, the copyright notice must
remain intact. If you use an alternate name, a notice indicating that yours is
a derived product from Mayan EDMS must be included. You must indicate to your
clients that their act of purchasing Mayan EDMS from you is an independent
action and in no way legally binds Mayan EDMS LLC, the Mayan EDMS copyright
holder, or the core team in any way. Note that when you sell Mayan EDMS,
you are selling your service and not a license, rights, or privileges of any
type.
Can I get exclusive distribution rights for my region?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
No, the terms of the license make the project freely available to everyone.
Restricting distribution or sale would conflict with the license terms. This
would possible for a commercial version of Mayan EDMS with separate licensing
terms.
Is there a commercial partnership program?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
There was at one time but was retired. If there is interest it could be
reinstated in the future.
What is an EDMS?
^^^^^^^^^^^^^^^^
EDMS stands for Electronic Document Management System and it is an more modern
version of a DMS. A DMS is a Document Management System. A system to store,
sort, and categorize printed documents. It is an electronic filing system.
Besides images of scanned documents, an EDMS also support electronic documents,
documents created in a computer that may or may not have been printed.
While they may look similar, EDMS/DMS is not to be confused with CMS
(Content Management System), IM (Information Management), KM
(Knowledge Management), RM (Record management), ECM (Enterprise Content
Management). Mayan EDMS started initially as a strict EDMS project but has
been expanding its feature set and provide some functionality from other
system types.
Technical
=========
Database managers
-----------------
PostgreSQL vs. MySQL
^^^^^^^^^^^^^^^^^^^^
Since Django abstracts database operations from a functional point of view
Mayan EDMS will behave exactly the same either way. The only concern would be
that MySQL doesn't support transactions for schema modifying commands. The only
moment this could cause problems is when running South migrations during
upgrades, if a migration fails the database structure is left in a transitory
state and has to be reverted manually before trying again.
LDAP
----
How to do LDAP authentication
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A sample settings file called ldap_connection_settings.py is included in the
contrib/settings/ folder of the repository showing how to setup LDAP
authentication. This file can be found on the web at: https://gitlab.com/mayan-edms/mayan-edms/blob/master/contrib/settings/ldap_connection_settings.py. This is a community contributed file. Use the Python
settings file method to use this file.
Operating systems
-----------------
How to install Mayan EDMS in Windows operating systems?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mayan EDMS doesn't run natively on Windows. The best way is to use a virtual
machine product, install Ubuntu or Debian, and proceed with the standard
deployment instructions or use Docker inside a GNU/Linux virtual machine.
Python
------
Is virtualenv required as specified in the documentation?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It is not necessary, but it's a strong recommendation mainly to reduce
dependency conflicts by isolation from the main Python system install. If not
using a virtualenv, pip would install Mayan's dependencies globally coming in
conflict with the distribution's prepackaged Python libraries messing other
Django projects or Python programs, or another later Python/Django project
dependencies coming into conflict causing Mayan to stop working for no
apparent reason.
Does Mayan EDMS work with Python 3?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Yes, version 3.3 ships with Python 3.7 support. Support for Python 2 will
be removed in version 4.0.
How to upgrade an existing Python 2 virtualenv
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Use::
virtualenv <existing directory> -p <Python 3 binary path>
If you followed the deployment instructions, the command line would be::
virtualenv /opt/mayan-edms -p /usr/bin/python3
If using a dedicated user account for Mayan EDMS::
sudo -u <username> virtualenv /opt/mayan-edms -p /usr/bin/python3
Static files
------------
Mayan EDMS installed correctly and works, but static files are not served
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Django's development server doesn't serve static files unless the DEBUG option
is set to True, this mode of operation should only be used for development or
testing. For production deployments the management command::
$ mayan-edms.py preparestatic
should be used and the resulting static folder served from a webserver.
For more information check the
:django-docs:`howto/static-files/`
Watch folders
-------------
The watched folder feature is not working
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Make sure that the Celery BEAT scheduler is running correctly as it is the
element that triggers the periodic tasks. Check that the user running the Mayan
EDMS services has read and write permissions for the watch folder.
Other
-----
File system links not showing when serving content with ``Samba``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Disable unix extensions in the [global] section and enable wide links for the file serving share
Example::
[global]
unix extensions = no
...
[digitalizacion]
path = /var/local/mayan
guest ok = yes
read only = yes
wide links = yes
follow symlinks = yes
Reference:
* http://www.samba.org/samba/docs/man/manpages-3/smb.conf.5.html

100
docs/parts/features.txt Normal file
View File

@@ -0,0 +1,100 @@
========
Features
========
- :doc:`Document versioning <../chapters/versioning>`.
- Store many versions of the same document, download or revert to a
previous version.
- :doc:`Digital signatures <../chapters/signatures>`.
- Check the authenticity of documents by verifying their embedded
cryptographic signatures or upload detached signatures for document
signed after they were stored.
- :doc:`Collaboration tools <../parts/collaboration>`.
- Discuss documents, or comment on new versions of a document.
- :doc:`User-defined document metadata <../chapters/metadata>`.
- Several metadata fields can be matched to a document type as per technical,
legal or structural requirements such as the `Dublin core`_.
- Metadata fields can have an initial value, which can be static or determined
by a template code snippet provided by the user.
- :doc:`Documents can be uploaded from different sources <../chapters/sources>`.
- Local file or server side file uploads, multifunctional copier, or even via
email.
- Batch uploads.
- Many documents can be upload in a single action.
- Clone a document's metadata for speedier uploads and eliminate repetitive
data entry.
- Previews for many file formats.
- Mayan EDMS provides image preview generation for many popular file
formats.
- Office document format support.
- Mayan EDMS can detect the presence of Libre Office and use it to support
word processing files, spreadsheets and presentations.
- Full text searching.
- Documents can be searched by their text content, their metadata or any other
file attribute such as name, extension, etc.
- :doc:`Configurable document grouping <../parts/categorization>`.
- Automatic linking of documents based on metadata values or document
properties.
- :doc:`Advanced access control system <../chapters/permissions>`.
- Role based access control. It is possible to create an unlimited amount
of different roles not being restricted to the traditional admin,
operator, guest paradigm.
- There is a permission for every atomic operation performed by users.
- Multi page document support.
- Multiple page PDF and TIFF files are supported.
- :doc:`Automatic OCR processing <../chapters/ocr_backend>`.
- The task of transcribing text from documents via OCR can be distributed
among several physical or virtual computers to decrease load and increase
availability.
- The current language of the document is passed to the corresponding OCR
engine to increase the text recognition rate.
- Multilingual user interface.
- Mayan EDMS being written using the Django_ framework, can be translated
to practically any language spoken in the world. For a list of translated
languages have a look at the Transifex_ project location.
- :doc:`Plugable storage backends <../parts/storage>`.
- It is very easy to use 3rd party plugins such as the ones available for
Amazon EC2.
- :doc:`Color coded tags <../chapters/tags>`.
- Labeled and color coded tags can be assigned for intuitive recognition.
- :doc:`Workflows <../chapters/workflows>`.
- Keep track of the state of documents, along with the log of the previous
state changes.
.. _`Dublin core`: http://dublincore.org/metadata-basics/
.. _Django: https://www.djangoproject.com/
.. _Transifex: https://www.transifex.com/projects/p/mayan-edms/

View File

@@ -0,0 +1,26 @@
===============
Getting started
===============
These are the basic concepts you need to understand to start using Mayan EDMS.
The absolute minimum setup to start using Mayan EDMS is:
#. A document type: :doc:`../chapters/document_types`
#. A document source to add new documents: :doc:`../chapters/sources`
that's it!
To make things even easier, a default document type (named "Default") and a
default document source (also named "Default") were created for you during the
installation. So you don't need to do anything more to start adding documents
right now, however take your time reading the information below to get a deeper
understanding about how these concepts work.
.. toctree::
:hidden:
../chapters/document_types
../chapters/sources

View File

@@ -0,0 +1,51 @@
============
Installation
============
The easiest way to use Mayan EDMS is by using the official Docker_ image.
Make sure Docker is properly installed and working before attempting to install
Mayan EDMS.
Minimum hardware requirements
=============================
- 2 Gigabytes of RAM (1 Gigabyte if OCR is turned off).
- Multiple core CPU (64 bit, faster than 1 GHz recommended).
- Unix-like operating system like GNU/Linux. For other operating systems
user container technologies like Docker or virtual machines.
Installation methods
====================
Docker
------
Docker is a computer program that performs operating-system-level
virtualization also known as containerization. It allows independent
"containers" to run within a single Linux instance, avoiding the overhead
of starting and maintaining virtual machines (VMs).
- :ref:`docker_install`
.. toctree::
:hidden:
../chapters/docker/install_simple
Direct installation
-------------------
For users with knowledge of Python, Django, Ubuntu, and databases.
- :doc:`../chapters/deploying`
.. toctree::
:hidden:
../chapters/deploying
.. _Docker: https://www.docker.com/

14
docs/parts/license.txt Normal file
View File

@@ -0,0 +1,14 @@
=======
License
=======
Mayan EDMS is distributed under the `Apache 2.0 License`_.
The complete license terms are included below.
.. _Apache 2.0 License: https://www.apache.org/licenses/LICENSE-2.0.txt
License terms
=============
.. include:: ../../LICENSE

4
docs/parts/settings.txt Normal file
View File

@@ -0,0 +1,4 @@
.. toctree::
:hidden:
../chapters/settings

15
docs/parts/storage.txt Normal file
View File

@@ -0,0 +1,15 @@
=======
Storage
=======
Mayan EDMS stores documents in their original file format only changing the
filename to avoid collision. By default, documents files are stored in the
same filesystem as the program code but by using different drivers, these
can also be placed in other storage systems like object storage.
- :doc:`../chapters/file_storage`
.. toctree::
:hidden:
../chapters/file_storage

View File

@@ -0,0 +1,179 @@
===============
Troubleshooting
===============
Database
========
MySQL error: ``OperationalError: (1267, "Illegal mix of collations (latin1_swedish_ci, IMPLICIT) and (utf8_general_ci, COERCIBLE) for operation '='”)``
-------------------------------------------------------------------------------------------------------------------------------------------------------
::
$ mayan-edms.py shell
>>> from django.db import connection
>>> cursor = connection.cursor()
>>> cursor.execute('SHOW TABLES')
>>> results=[]
>>> for row in cursor.fetchall(): results.append(row)
>>> for row in results: cursor.execute('ALTER TABLE %s CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' % (row[0]))
References:
* http://stackoverflow.com/questions/1073295/django-character-set-with-mysql-weirdness
MySQL error: ``Incorrect string value: `'xE2x80x95rs6…'` for column `'content'` at row 1``
------------------------------------------------------------------------------------------
When using MySQL and doing OCR on languages other than English
Use utf-8 collation on MySQL server, or at least in table
documents_documentpage', content' field
References:
* http://groups.google.com/group/django-users/browse_thread/thread/429447086fca6412
* http://markmail.org/message/bqajx2utvmtriixi
MySQL error: ``Error "django.db.utils.IntegrityError IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`…`.`…`, CONSTRAINT `…_refs_id_b0252274` FOREIGN KEY (`…`) REFERENCES `…` (`…`))')``
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Solution:
Convert all MySQL tables to the same type, either all MyISAM or InnoDB
PostgreSQL error: ``OperationalError: FATAL: sorry, too many clients already``
-------------------------------------------------------------------------------
Set ``MAYAN_DATABASE_CONN_MAX_AGE`` to 0
This setting keeps a database connection alive. It allows reuse of database
connections. When Mayan EDMS is deployed with Gunicorn a microthreads backend,
the database connections are not shared and this setting has the reverse effect
of exhausting the available PostgreSQL connections available. To avoid this,
Setting ``MAYAN_DATABASE_CONN_MAX_AGE`` to 0 will cause all microthreads to
release their connections, by closing them when finished.
References:
- https://serverfault.com/questions/635100/django-conn-max-age-persists-connections-but-doesnt-reuse-them-with-postgresq
- https://github.com/benoitc/gunicorn/issues/996
Docker
======
MAYAN_APT_INSTALLS does not work for Archlinux with kernels > 4.14
------------------------------------------------------------------
This is caused by a change from kernel 4.18 - 4.19. Metacopy on these kernels
is set to yes in archlinux kernels (/sys/module/overlay/parameters/metacopy)
and overlayfs should override this which it does not at the moment.
The workaround is to disable metacopy::
echo N | sudo tee /sys/module/overlay/parameters/metacopy
References:
* https://bbs.archlinux.org/viewtopic.php?id=241866
* https://www.spinics.net/lists/linux-unionfs/msg06316.html
Passwords
=========
.. _troubleshooting-admin-password:
Admin password reset
--------------------
To reset the password of the admin account use the following command::
MAYAN_MEDIA_ROOT=<your Mayan media root setting> <installation directory>/bin/mayan-edms.py changepassword admin
If you followed the deploying instructions from the documentation your
``MAYAN_MEDIA_ROOT`` will be ``|MAYAN_MEDIA_ROOT|``.
If using a Docker image, execute the command inside the container. First you
need to know the name of the Docker container running Mayan EDMS on your setup
with::
docker ps
Then execute the password reset command inside the Docker container::
docker exec -ti <your docker container name> |MAYAN_BIN| changepassword admin
Another way to do this is to execute a shell inside the container to get a
command prompt::
docker exec -ti <your docker container name> /bin/bash
And then execute the command::
|MAYAN_BIN| changepassword admin
.. _troubleshooting-autoadmin-account:
Missing automatic admin account after installation
--------------------------------------------------
This is caused when the ``initialsetup`` command is interrupted as the admin
user is created outside of the database migrations.
To create an admin super user account manually use the command::
MAYAN_MEDIA_ROOT=|MAYAN_MEDIA_ROOT| |MAYAN_BIN| createsuperuser
If you followed the deploying instructions from the documentation your
``MAYAN_MEDIA_ROOT`` will be ``|MAYAN_MEDIA_ROOT|``.
If using a Docker image, execute the command inside the container. First
find you container name with::
docker ps
Then execute the command inside the container::
docker exec -ti <your docker container name> |MAYAN_BIN| createsuperuser
Another way to do this is to execute a shell inside the container to get a
command prompt::
docker exec -ti <your docker container name> /bin/bash
And then execute the command::
|MAYAN_BIN| createsuperuser
Watchfolders
============
Incomplete files uploaded
-------------------------
To avoid uploading files are they are being copied to the watchfolder, copy the
files to a temporary directory on the same partition as the watchfolder first.
Then move the files to the watchfolder. The move will be executed as an atomic
operation and will prevent the files to be uploaded in the middle of the
copying process.
Dependencies
============
Error: ``unable to execute 'x86_64-linux-gnu-gcc': No such file or directory``
------------------------------------------------------------------------------
This happens when using the ``MAYAN_APT_INSTALLS`` feature. It means that the
``GCC`` package is required to compile the packages specified with
``MAYAN_APT_INSTALLS``.
Solution: Include ``gcc`` in the list of packages specified with ``MAYAN_APT_INSTALLS``.