Metadata-Version: 2.1
Name: portableqda
Version: 0.1.2
Summary: import/export QDC and QDPX files for Qualitative Data Analysis (CAQDAS) Software, conforming to the XML-based REFI-QDA Standard (https://www.qdasoftware.org)
Home-page: https://gitlab.com/portableqda/portableQDA
License: LGPL-3.0-only
Keywords: Qualitative-Data-Analysis,QDA,codebook,CAQDAS
Author: Leandro Batlle
Author-email: Leandro.Batlle@gmail.com
Requires-Python: >=3.6,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Documentation
Classifier: Topic :: Sociology
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Text Processing :: Markup :: XML
Requires-Dist: Markdown (>=2.0,<3.0)
Requires-Dist: PyYAML (>=5.1,<6.0)
Requires-Dist: bottle (>=0.12.13,<0.13.0)
Requires-Dist: lxml (>=4.6.2,<5.0.0)
Requires-Dist: mdx_outline (>=1.3.0,<2.0.0)
Requires-Dist: nose (>=1.3.7,<2.0.0)
Requires-Dist: openpyxl (>=2.6,<3.0)
Requires-Dist: plantuml-markdown (>=3.4.0,<3.5.0)
Requires-Dist: python-markdown-math (>=0.6,<0.7)
Requires-Dist: requests (>=2.0,<3.0)
Requires-Dist: six
Project-URL: Documentation, https://gitlab.com/portableqda/portableQDA/-/wikis/home
Project-URL: Repository, https://gitlab.com/portableqda/portableQDA
Description-Content-Type: text/markdown

# portableQDA

portableQDA is package for import/export of information according to REFI-QDA Standard:

- Codebooks (QDC files)
- Projects (QDPX files, not yet implemented)

Exchange formats [QDC and QDPX](https://www.qdasoftware.org/wp-content/uploads/2019/09/REFI-QDA-1-5.pdf) are:
  - suitable for structured archiving of any kind of files, including:
    + personal corpus of information analysis (coding, cites, comments) 
    + the source documents themselves (any arbitrary format, including office docs, PDF, html, audio) 
  - well-defined and maintained by the [REF-QDA working group](http://qdasoftware.org) 
  - supported and developed by a growing number of participants

QDA stands for Qualitative Data Analysis, as known in social sciences. Related Wikipedia article states: “Qualitative research relies on data obtained by the researcher by first-hand observation, interviews, recordings, […]. The data are generally non-numerical. Qualitative methods include ethnography, grounded theory, discourse analysis […]. These methods have been used in sociology, anthropology, and educational research.”

## Installation

```bash
# pip install portableqda
```

## Basic usage


### testing the output format

```bash
# python -m portableqda
```

produces an empty codebook file in your home directory, should be suitable for import by your CAQDAS software. 

### testing the input format

- export a codebook from the QDA software of your choise
- run the following script:
```python
import portableqda
codebook = portableqda.codebookCls(output=None) #create a codebook, will export to the screen
codebook.readQdcFile(input="/path/to/your/exported.qdc")
codebook.writeQdcFile()
```
- no errors should ocurr, check the output for completeness


### developing


```python
import portableqda
#look for output in system logging

codebook = portableqda.codebookCls(output="codebook_example.qdc") #create a codebook

# create 3 codes and group them in two sets
for number in range(3):
    error,errorDesc,code = codebook.createElement(elementCls=portableqda.codeCls,
                                                name=f"code{number}",
                                                sets=["set1","set2"])

codebook.writeQdcFile() # export the codebook as a REFI-QDA 1.5 compatible QDC file
```

Look for the file `codebook_example.qdc` at your home directory. You can see more of what's happening (portableQDA is a library thus not intended for direct use), inserting the following code where the comment "look for output in system logging" is, right after the `import portableqda` statement:

```python
import logging
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s')
handler.setFormatter(formatter)
portableqda.log.addHandler(handler)
portableqda.log.setLevel(logging.DEBUG)
```

Something like this will be shown:

 ```log
 portableqda.refi_qda - DEBUG - tree created, root node: 'CodeBook'. see REFI-QDA 1.5
portableqda.refi_qda - INFO - output is C:\Users\X\codebook_example.qdc
portableqda.refi_qda - DEBUG - added code code0 to set set1 
portableqda.refi_qda - DEBUG - added code code0 to set set2 
portableqda.refi_qda - DEBUG - added code code1 to set set1 
portableqda.refi_qda - DEBUG - added code code1 to set set2 
portableqda.refi_qda - DEBUG - added code code2 to set set1 
portableqda.refi_qda - DEBUG - added code code2 to set set2 
portableqda.refi_qda - INFO - exporting as REFI-QDC  codebook to file: C:\Users\X\codebook_example.qdc
 ```


## Documentation

## Contributing

### Acknowledges

LMXL: portableQDA relies on the excellent [lxml package](http://lxml.de) for the  underlying tree data structure and  XML handling
REFI-QDA: [working group](http://qdasoftware.org) pushing interoperability and open standards



## License

GNU Lesser General Public License v3 (LGPLv3)
