====== 5e. Downloading and sharing files created in CQP ====== There are many ways of downloading files created with CQP (such as concordances, frequency lists or collocation tables). You can use the [[resources:transferring-files-zedat-account|usual ways of uploading and downloading files]] using the ZEDAT web interface, terminal, filebrowser. Here, we discuss two additional tricks using your ZEDAT web space and Google Spreadsheets. ===== Using your webspace ===== In your ZEDAT account, you have a folder called ''public_html'', which is readable via the WWW – any file you put into this folder automatically has a URL (web address). This web space is meant for publishing a web page consisting of .html files, but we can use it to download and share files created in CQP! To do so, you should first create a folder called ''cqpfiles'' within your public_html folder. The easiest way of doing this is to sign in to your ZEDAT account, typing the following, and hitting RETURN: mkdir public_html/cqpfiles Any file in this browser will now have a URL of the following form (with USERNAME standing for your ZEDAT username and FILENAME standing for the respective file: ''http:%%//%%userpage.fu-berlin.de/~USERNAME/cqpfiles/FILENAME''. ==== Displaying files in the browser ==== To save a file created by CQP in the folder cqpfiles, simply specify the path to that file when you save a concordance, frequency list or collocation table. For example, if you have created a concordance of the word //love// using the BNC and you want to save it to a file called ''conc-love-BNC.txt'', type the following and hit RETURN: cat Last > "public_html/cqpfiles/conc-love-BNC.txt" You can now display the file in your browser by going to the URL ''http:%%//%%userpage.fu-berlin.de/~USERNAME/cqpfiles/conc-love-BNC.txt'' (for example, in the Linux account of our work group, there is such a file which can be displayed by going to http://userpage.fu-berlin.de/~structeng/cqpfiles/conc-love-BNC.txt). You can download the file by simply saving it from your browser, and you can share it with others by sharing the link. ==== Displaying tables in Google Sheets ==== If you have created a collocate list or a collocate table as described in [[cqp:collocates|Section 4c]] or if you have [[cqp:cleaning-output|converted a concordance, frequency list or group list to a csv file]], you can also display your file in your browser and download it from there as described in the preceding subsection. For example, you might have created a collocate table for the word //love// and saved it to your ''cqpfiles'' folder as follows: cat Last > "| collocates.pl -c > public_html/cqpfiles/collocates-love-BNC.csv" This file would be available under the URL http:%%//%%userpage.fu-berlin.de/~USERNAME/cqpfiles/collocates-love-BNC.csv (again, we have such a file in our work group account which you can access at http://userpage.fu-berlin.de/~structeng/cqpfiles/collocates-love-BNC.csv). Depending on your browser settings, your browser will either download this file directly if you go to this address, or it will open it, displaying it in its raw form, The raw form is not very readable, so it would be nicer to have the file neatly displayed in a spreadsheet with proper rows and columns. You can do this by opening the downloaded file in a spreadsheet program such as LibreOffice Calc. But if you have a Google account, you can display it in Google Sheets without downloading it at all! To do so, follow these steps: - Open a new spreadsheet - In the top left cell (the first cell in your sheet), enter the command ''=IMPORTDATA("URL")'', replacing ''URL'' with the URL of the file you want to import into your spreadsheet. For example, for the file saved in our work group's account, you would type ''=IMPORTDATA("http://userpage.fu-berlin.de/~structeng/cqpfiles/collocates-love-BNC.csv")''. You can look at such a spreadsheet [[https://docs.google.com/spreadsheets/d/1QSVpK87vpxAQ3ZPl3woT9QrKMPEPs9WHZWoOVkmSVXM/edit?usp=sharing|here]], - You can share the URL of your spreadsheet with others, or you can save the spreadsheet to your computer in various formats, including MS Excel and LibreOffice.